@authing/react-ui-components 4.3.3-alpha.1 → 4.3.3-hep.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/lib/index.min.css +1 -1
  2. package/lib/index.min.js +1 -1
  3. package/package.json +1 -1
  4. package/types/AccountMerge/UserRadio.d.ts +5 -0
  5. package/types/AccountMerge/index.d.ts +3 -0
  6. package/types/AccountMerge/interface.d.ts +27 -0
  7. package/types/AccountMerge/utils.d.ts +3 -0
  8. package/types/ChangeAccoutType/index.d.ts +3 -0
  9. package/types/CompleteInfo/core/components/TreeSelect.d.ts +11 -0
  10. package/types/CompleteInfo/index.d.ts +1 -0
  11. package/types/CompleteInfo/interface.d.ts +8 -4
  12. package/types/ForgetPassword/core/resetPassword.d.ts +2 -2
  13. package/types/ForgetPassword/interface.d.ts +1 -0
  14. package/types/Guard/config.d.ts +2 -1
  15. package/types/Guard/core/hooks/useMultipleAccounts.d.ts +3 -3
  16. package/types/Guard/event.d.ts +3 -12
  17. package/types/Guard/module.d.ts +4 -2
  18. package/types/Login/core/withLandrayQrcode.d.ts +11 -0
  19. package/types/Login/core/withWeComQrcode.d.ts +2 -0
  20. package/types/Login/hooks/useLoginMultiple.d.ts +1 -1
  21. package/types/Login/multipleAccounts/panel.d.ts +0 -1
  22. package/types/NewSubmitSuccess/interface.d.ts +2 -0
  23. package/types/TenantPortalSelect/index.d.ts +0 -13
  24. package/types/TenantPortalSelect/interface.d.ts +33 -0
  25. package/types/Type/application.d.ts +24 -7
  26. package/types/_utils/config/index.d.ts +1 -0
  27. package/types/_utils/context.d.ts +3 -2
  28. package/types/_utils/responseManagement/interface.d.ts +1 -0
  29. package/types/index.d.ts +0 -1
  30. package/types/version/version.d.ts +1 -1
  31. package/types/AppOtpVerify/DownloadVerifier.d.ts +0 -2
  32. package/types/AppOtpVerify/LoginApp.d.ts +0 -2
  33. package/types/AppOtpVerify/ScanQrcode.d.ts +0 -2
  34. package/types/AppOtpVerify/Steps.d.ts +0 -11
  35. package/types/AppOtpVerify/index.d.ts +0 -3
  36. package/types/Guard/core/hooks/useAgreements.d.ts +0 -15
  37. package/types/Guard/core/hooks/useGuardView.d.ts +0 -7
  38. package/types/LazyloadImage/index.d.ts +0 -12
  39. package/types/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +0 -17
  40. package/types/Login/core/withAuthingOtpPush/PendingLogin.d.ts +0 -7
  41. package/types/Login/core/withAuthingOtpPush/index.d.ts +0 -3
  42. package/types/Login/core/withAuthingOtpPush/types.d.ts +0 -18
  43. package/types/Login/hooks/useOtpPushLogin.d.ts +0 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/react-ui-components",
3
- "version": "4.3.3-alpha.1",
3
+ "version": "4.3.3-hep.0",
4
4
  "private": false,
5
5
  "main": "lib/index.min.js",
6
6
  "typings": "types/index.d.ts",
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { UserRadioItemProps, UserRadioProps } from './interface';
3
+ import './styles.less';
4
+ export declare const UserRadioItem: React.FC<UserRadioItemProps>;
5
+ export declare const UserRadio: React.FC<UserRadioProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './styles.less';
3
+ export declare const GuardAccountMergeView: React.FC;
@@ -0,0 +1,27 @@
1
+ export interface BriefUserInfo {
2
+ displayName: string;
3
+ avatar: string;
4
+ phone: string;
5
+ email: string;
6
+ username: string;
7
+ name: string;
8
+ }
9
+ export interface GuardAccountMergeInitData {
10
+ currentUserInfo: BriefUserInfo;
11
+ existingUserInfo: BriefUserInfo;
12
+ mergeToken?: string;
13
+ }
14
+ export interface UserRadioProps {
15
+ currentUserInfo: BriefUserInfo;
16
+ existingUserInfo: BriefUserInfo;
17
+ onChange?: (value: any) => void;
18
+ value?: any;
19
+ }
20
+ export interface UserRadioItemProps extends BriefUserInfo {
21
+ value: boolean;
22
+ selected: boolean;
23
+ onClick: (value: boolean) => void;
24
+ }
25
+ export declare enum AuthFlowAction {
26
+ MERGE = "confirm-account-merge"
27
+ }
@@ -0,0 +1,3 @@
1
+ import { User } from 'authing-js-sdk';
2
+ export declare const getDisplayName: (user: User) => string;
3
+ export declare const getDisplayNameByEmail: (displayName: string) => string;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import './style.less';
3
+ export declare const GuardChangeAccoutTypesView: () => JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export declare type OptionType = {
3
+ id: string;
4
+ name: string;
5
+ children: OptionType[];
6
+ };
7
+ interface TreeSelectProps {
8
+ options: OptionType[];
9
+ }
10
+ declare const TreeSelect: React.FC<TreeSelectProps>;
11
+ export default TreeSelect;
@@ -9,3 +9,4 @@ export declare const GuardCompleteInfo: React.FC<{
9
9
  }>;
10
10
  export declare const GuardLoginCompleteInfoView: React.FC;
11
11
  export declare const GuardRegisterCompleteInfoView: React.FC;
12
+ export declare const GuardAccountMergeCompleteInfoView: React.FC;
@@ -7,19 +7,21 @@ export interface CompleteInfoEvents extends IG2Events {
7
7
  onRegisterInfoCompleted?: (user: User, udfs: {
8
8
  key: any;
9
9
  value: any;
10
- }[], authClient: AuthenticationClient) => void;
10
+ }[], authClient: AuthenticationClient, opts?: {
11
+ phone?: string;
12
+ canMergeUser?: boolean;
13
+ }) => void;
11
14
  onRegisterInfoCompletedError?: (error: CommonMessage, udfs: {
12
15
  key: any;
13
16
  value: any;
14
17
  }[], authClient: AuthenticationClient) => void;
18
+ onAccountMergeCompleteInfo?: (user: User) => void;
15
19
  }
16
20
  export interface GuardCompleteInfoProps extends IG2FCProps, CompleteInfoEvents {
17
21
  config: Partial<CompleteInfoConfig>;
18
22
  }
19
23
  export interface GuardCompleteInfoViewProps extends GuardCompleteInfoProps {
20
24
  config: CompleteInfoConfig;
21
- initData: any;
22
- onLogin?: any;
23
25
  }
24
26
  export declare type ExtendsFieldType = 'user' | 'internal';
25
27
  export interface ExtendsField {
@@ -52,6 +54,7 @@ export interface CompleteInfoMetaData {
52
54
  name: string;
53
55
  required: boolean;
54
56
  validateRules: CompleteInfoRule[];
57
+ checkUnique?: boolean;
55
58
  options?: CompleteInfoSelectOption[];
56
59
  }
57
60
  export declare enum CompleteInfoBaseControls {
@@ -70,7 +73,8 @@ export declare enum CompleteInfoExtendsControls {
70
73
  STRING = "string",
71
74
  TEXT = "text",
72
75
  GENDER = "gender",
73
- COUNTRY = "country"
76
+ COUNTRY = "country",
77
+ TREE = "tree"
74
78
  }
75
79
  export interface CompleteInfoInitData {
76
80
  skip: boolean;
@@ -1,15 +1,15 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare enum InputMethodMap {
3
3
  email = "email-code",
4
4
  phone = "phone-code"
5
5
  }
6
6
  interface ResetPasswordProps {
7
7
  publicConfig: any;
8
- setPhoneOrEmail: any;
9
8
  setControlShow: any;
10
9
  setPolicyStrength: any;
11
10
  setCustomPasswordStrength: any;
12
11
  setPhoneOrEmailText: any;
12
+ setResetToken: React.Dispatch<React.SetStateAction<string>>;
13
13
  }
14
14
  export declare const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
15
15
  export {};
@@ -9,6 +9,7 @@ export interface ForgetPasswordEvents extends IG2Events {
9
9
  onPwdResetError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
10
10
  }
11
11
  export interface ForgetPasswordConfig extends IG2Config {
12
+ goBack?: null | (() => void);
12
13
  }
13
14
  export interface ForgetPasswordProps extends IG2FCProps, ForgetPasswordEvents {
14
15
  config: Partial<IG2Config>;
@@ -1,8 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { GuardModuleType } from '.';
3
+ import { ForgetPasswordConfig } from '../ForgetPassword/interface';
3
4
  import { LoginConfig } from '../Login/interface';
4
5
  import { RegisterConfig } from '../Register/interface';
5
- export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
6
+ export interface GuardLocalConfig extends RegisterConfig, LoginConfig, ForgetPasswordConfig {
6
7
  isSSO?: boolean;
7
8
  defaultScenes?: GuardModuleType;
8
9
  defaultInitData?: any;
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
13
13
  * 登录时所有支持的登录列表(前端定义列表)
14
14
  * 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
15
15
  */
16
- export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
16
+ export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone';
17
17
  /**
18
18
  * when: 多账号页面跳转进入登录页面
19
19
  * 携带的回填数据信息
@@ -249,7 +249,7 @@ declare class MultipleAccount {
249
249
  setUserInfo: (user: Pick<User & {
250
250
  id: string;
251
251
  loginAccount?: string | undefined;
252
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "qrCodeId" | "areaCode" | "_updateTime" | "loginAccount">) => void;
252
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
253
253
  setLoginWayByHttpData: (account: string, data: {
254
254
  username?: string | undefined;
255
255
  phone?: string | undefined;
@@ -292,7 +292,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
292
292
  setUserInfo: (user: Pick<User & {
293
293
  id: string;
294
294
  loginAccount?: string | undefined;
295
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "qrCodeId" | "areaCode" | "_updateTime" | "loginAccount">) => void;
295
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
296
296
  setLoginWayByHttpData: (account: string, data: {
297
297
  username?: string | undefined;
298
298
  phone?: string | undefined;
@@ -5,15 +5,9 @@ import { IdentityBindingEvents } from '../IdentityBinding/interface';
5
5
  import { IdentityBindingAskEvents } from '../IdentityBindingAsk';
6
6
  import { LoginEvents } from '../Login/interface';
7
7
  import { RegisterEvents } from '../Register/interface';
8
- interface OnAfterChangeModuleOptions {
9
- currentView: string;
10
- currentModule: GuardModuleType;
11
- currentTab?: string;
12
- data?: any;
13
- }
14
- export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
8
+ import { TenantPortalEvents } from '../TenantPortalSelect/interface';
9
+ export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents, TenantPortalEvents {
15
10
  onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
16
- onAfterChangeModule?: (options: OnAfterChangeModuleOptions) => void;
17
11
  }
18
12
  export declare const guardEventsFilter: (props: any, multipleInstance?: {
19
13
  initStore: (appId: string, options: {
@@ -27,7 +21,7 @@ export declare const guardEventsFilter: (props: any, multipleInstance?: {
27
21
  setUserInfo: (user: Pick<import("./core/hooks/useMultipleAccounts").User & {
28
22
  id: string;
29
23
  loginAccount?: string | undefined;
30
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "qrCodeId" | "areaCode" | "_updateTime" | "loginAccount">) => void;
24
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
31
25
  setLoginWayByHttpData: (account: string, data: {
32
26
  username?: string | undefined;
33
27
  phone?: string | undefined;
@@ -72,7 +66,6 @@ export declare const GuardEventsCamelToKebabMapping: {
72
66
  readonly onRegisterInfoCompletedError: "register-info-completed-error";
73
67
  readonly onLangChange: "lang-change";
74
68
  readonly onBeforeChangeModule: "before-change-module";
75
- readonly onAfterChangeModule: "after-change-module";
76
69
  };
77
70
  export interface GuardEventsKebabToCamelType {
78
71
  load: GuardEvents['onLoad'];
@@ -96,6 +89,4 @@ export interface GuardEventsKebabToCamelType {
96
89
  'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
97
90
  'lang-change': GuardEvents['onLangChange'];
98
91
  'before-change-module': GuardEvents['onBeforeChangeModule'];
99
- 'after-change-module': GuardEvents['onAfterChangeModule'];
100
92
  }
101
- export {};
@@ -21,11 +21,13 @@ export declare enum GuardModuleType {
21
21
  IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",
22
22
  SELF_UNLOCK = "selfUnlock",
23
23
  FLOW_SELECT_ACCOUNT = "flowSelectAccount",
24
- APP_OTP_VERIFY = "appOtpVerify",
25
24
  /** 多租户门户选择页 */
26
25
  TENANT_PORTAL = "tenant-portal",
27
26
  New_SUBMIT_SUCCESS = "newSubmitSuccess",
28
- RESET_ACCOUNT_NAME = "resetAccountName"
27
+ RESET_ACCOUNT_NAME = "resetAccountName",
28
+ /** 高教社特殊节点 */
29
+ CUSTOM_COMPLETE_INFO = "customCompleteInfo",
30
+ ACCOUNT_MERGE = "accountMerge"
29
31
  }
30
32
  export interface GuardModuleAction {
31
33
  action: string;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { StoreInstance } from '../../Guard/core/hooks/useMultipleAccounts';
3
+ interface LoginWithLandrayQrcodeProps {
4
+ onLoginSuccess: any;
5
+ canLoop: boolean;
6
+ qrCodeScanOptions: any;
7
+ id: string;
8
+ multipleInstance?: StoreInstance;
9
+ }
10
+ export declare const LoginWithLandrayQrcode: (props: LoginWithLandrayQrcodeProps) => JSX.Element | null;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const LoginWithWeComQrcode: (props: any) => JSX.Element;
@@ -35,7 +35,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
35
35
  setUserInfo: (user: Pick<import("../../Guard/core/hooks/useMultipleAccounts").User & {
36
36
  id: string;
37
37
  loginAccount?: string | undefined;
38
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "qrCodeId" | "areaCode" | "_updateTime" | "loginAccount">) => void;
38
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
39
39
  setLoginWayByHttpData: (account: string, data: {
40
40
  username?: string | undefined;
41
41
  phone?: string | undefined;
@@ -40,7 +40,6 @@ export interface SelectOptions {
40
40
  * 替代图片元素
41
41
  */
42
42
  element?: React.ReactElement;
43
- way: string;
44
43
  }
45
44
  declare const SelectPanel: React.FC<SelectPanelProps>;
46
45
  export { SelectPanel };
@@ -10,6 +10,8 @@ export interface SubmitSuccessInitData {
10
10
  text?: string;
11
11
  countDesc?: string;
12
12
  changeModule?: GuardModuleType;
13
+ needBack?: boolean;
14
+ goBack?: () => void;
13
15
  }
14
16
  export interface GuardNewSubmitSuccessViewProps extends IG2FCViewProps, SubmitSuccessEvents {
15
17
  config: SubmitSuccessConfig;
@@ -1,16 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import './styles.less';
3
- /** 租户门户选择状态机返回数据类型 */
4
- export interface TenantPortalSelectType {
5
- title: string;
6
- description: string;
7
- logo: string;
8
- list: {
9
- tenantName: string;
10
- tenantId: string;
11
- tenantLogo: string;
12
- host: string;
13
- userName: string;
14
- }[];
15
- }
16
3
  export declare const GuardTenantPortalSelectView: () => JSX.Element;
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ import { AvatarProps } from 'antd/lib/avatar';
3
+ import { AuthenticationClient, IG2Events, User } from '../Type';
4
+ export interface TenantPortalListType {
5
+ tenantName: string;
6
+ tenantId: string;
7
+ tenantLogo: string;
8
+ host: string;
9
+ description: string;
10
+ /** 是否为用户池 */
11
+ isUserPool: boolean;
12
+ userName?: string;
13
+ }
14
+ export interface TenantPortalSelectType extends Omit<TenantPortalListType, 'userName'> {
15
+ }
16
+ /** 租户门户选择状态机返回数据类型 */
17
+ export interface TenantPortalDataType {
18
+ title: string;
19
+ description: string;
20
+ logo: string;
21
+ list: TenantPortalListType[];
22
+ }
23
+ export interface TenantPortalDataItem extends TenantPortalListType {
24
+ avatar?: AvatarProps;
25
+ extra?: React.ReactNode;
26
+ title?: string;
27
+ }
28
+ /** 租户门户相关事件 */
29
+ export interface TenantPortalEvents extends IG2Events {
30
+ onLogin?: (user: User, authClient: AuthenticationClient) => void;
31
+ /** 租户门户选择回调 */
32
+ onTenantSelect?: (data?: TenantPortalSelectType) => void;
33
+ }
@@ -8,8 +8,7 @@ export declare enum LoginMethods {
8
8
  PhoneCode = "phone-code",
9
9
  WxMinQr = "wechat-miniprogram-qrcode",
10
10
  AD = "ad",
11
- WechatMpQrcode = "wechatmp-qrcode",
12
- AuthingOtpPush = "authing-otp-push"
11
+ WechatMpQrcode = "wechatmp-qrcode"
13
12
  }
14
13
  export declare enum OIDCConnectionMode {
15
14
  FRONT_CHANNEL = "FRONT_CHANNEL",
@@ -178,6 +177,14 @@ export interface TabFieldsI18nItem {
178
177
  [propName in Lang]?: string;
179
178
  };
180
179
  }
180
+ interface LoginTypeI18nProps {
181
+ tab: {
182
+ default: string;
183
+ i18n: {
184
+ [propName: string]: string;
185
+ };
186
+ };
187
+ }
181
188
  export interface ApplicationConfig {
182
189
  id: string;
183
190
  allowedOrigins: string[];
@@ -263,6 +270,12 @@ export interface ApplicationConfig {
263
270
  socialLoginBtns: boolean;
264
271
  userPasswordInput: boolean;
265
272
  wxMpScanTab: boolean;
273
+ loginMethodsI18nDisplaySettings: {
274
+ password?: LoginTypeI18nProps;
275
+ verifyCode?: LoginTypeI18nProps;
276
+ ad?: LoginTypeI18nProps;
277
+ ldap?: LoginTypeI18nProps;
278
+ };
266
279
  };
267
280
  protocol: Protocol;
268
281
  oidcConfig: OidcClientMetadata;
@@ -275,6 +288,9 @@ export interface ApplicationConfig {
275
288
  verifyCodeLength: number;
276
289
  websocket: string;
277
290
  welcomeMessage: any;
291
+ userPortal?: {
292
+ mergeAccount?: boolean;
293
+ };
278
294
  skipComplateFileds: boolean;
279
295
  selfUnlockStrategy: 'captcha' | 'password-captcha';
280
296
  defaultLanguageConfig: Lang;
@@ -308,9 +324,10 @@ export interface ApplicationConfig {
308
324
  mfa: {
309
325
  faceScore: number;
310
326
  };
311
- authingOtpPushTabConfig: {
312
- enabledLoginMethods: Array<string> | null;
313
- validLoginMethods: Array<string> | null;
314
- validRegisterMethods: Array<string> | null;
315
- };
327
+ /** 是否开启自定义安全规则 */
328
+ customSecurityEnabled: boolean;
329
+ /** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
330
+ appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
331
+ /** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
332
+ userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
316
333
  }
@@ -100,6 +100,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
100
100
  withCustomData?: boolean | undefined;
101
101
  } | undefined;
102
102
  _closeLoopCheckQrcode?: boolean | undefined;
103
+ goBack?: (() => void) | null | undefined;
103
104
  };
104
105
  guardPageConfig: GuardPageConfig;
105
106
  } | {
@@ -83,7 +83,6 @@ export declare const useGuardEvents: () => Partial<GuardEvents>;
83
83
  export declare const useGuardModule: () => {
84
84
  changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
85
85
  backModule: (() => void) | undefined;
86
- currentModule: ModuleState;
87
86
  };
88
87
  export declare const useGuardFinallyConfig: () => GuardLocalConfig;
89
88
  export declare const useGuardContextLoaded: () => boolean;
@@ -117,7 +116,7 @@ export declare const useGuardMultipleInstance: () => {
117
116
  setUserInfo: (user: Pick<import("../Guard/core/hooks/useMultipleAccounts").User & {
118
117
  id: string;
119
118
  loginAccount?: string | undefined;
120
- }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "qrCodeId" | "areaCode" | "_updateTime" | "loginAccount">) => void;
119
+ }, "email" | "username" | "phone" | "photo" | "id" | "name" | "nickname" | "_updateTime" | "qrCodeId" | "areaCode" | "loginAccount">) => void;
121
120
  setLoginWayByHttpData: (account: string, data: {
122
121
  username?: string | undefined;
123
122
  phone?: string | undefined;
@@ -155,3 +154,5 @@ export declare const useGuardPhoneRegex: () => RegExp | null;
155
154
  export declare const useGuardDefaultLanguage: () => Lang;
156
155
  /** 用来操作和获取租户相关的内容 */
157
156
  export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
157
+ /** 当前人机验证策略 */
158
+ export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
@@ -16,6 +16,7 @@ export declare enum ApiCode {
16
16
  FLOW_END = 1600,
17
17
  FIRST_LOGIN_PASSWORD = 1639,
18
18
  FORCED_PASSWORD_RESET = 2058,
19
+ ACCOUNT_MERGE = 10000,
19
20
  UNSAFE_PASSWORD_TIP = 2061,
20
21
  UNSAFE_PASSWORD_RESET = 2071,
21
22
  FLOW_SELECT_ACCOUNT = 2921,
package/types/index.d.ts CHANGED
@@ -4,4 +4,3 @@ export * from './AuthClientProvider';
4
4
  export * from './Guard';
5
5
  export * from './Type';
6
6
  export * from './version';
7
- export * from './Guard/core/hooks/useGuardView';
@@ -1,2 +1,2 @@
1
- declare const _default: "4.3.3-alpha.0";
1
+ declare const _default: "4.3.3-hep.0";
2
2
  export default _default;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function DownloadVerifier(): JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function LoginApp(): JSX.Element;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const ScanQrcode: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>;
@@ -1,11 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import './steps.styles.less';
3
- interface StepsProps {
4
- current: number;
5
- items: StepItem[];
6
- }
7
- interface StepItem {
8
- title: ReactNode;
9
- }
10
- export declare function Steps(props: StepsProps): JSX.Element;
11
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import './styles.less';
3
- export declare function AppOtpVerify(): JSX.Element;
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import { Agreement } from '../../../Type';
3
- interface Options {
4
- agreements: Agreement[];
5
- checkedAgreements: (string | number)[];
6
- checkAllAgreements: () => void;
7
- noCheckAllAgreements: () => void;
8
- }
9
- export declare function useAgreements(options: Options): {
10
- agreements: Agreement[];
11
- checkedAgreements: import("react").ReactText[];
12
- checkAllAgreements: () => void;
13
- noCheckAllAgreements: () => void;
14
- };
15
- export {};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- interface Options {
3
- changeTab?: React.Dispatch<any>;
4
- currentTab?: string;
5
- }
6
- export declare function useGuardView(options?: Options): void;
7
- export {};
@@ -1,12 +0,0 @@
1
- import { CSSProperties, ReactNode } from 'react';
2
- interface LazyloadImageProps {
3
- src: string;
4
- placeholder: ReactNode;
5
- className?: string;
6
- style?: CSSProperties;
7
- alt?: string;
8
- width?: string;
9
- height?: string;
10
- }
11
- export declare function LazyloadImage(props: LazyloadImageProps): JSX.Element;
12
- export {};
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import { OnPushSuccessProps, OnLoginProps } from './types';
3
- import { AuthingGuardResponse } from '../../../_utils/http';
4
- import { Agreement } from '../../../Type';
5
- interface BeforeLoginProps {
6
- onPushSuccess: (props: OnPushSuccessProps) => void;
7
- signinByPush: (props: OnLoginProps) => Promise<AuthingGuardResponse<{
8
- pushCodeId: string;
9
- }>>;
10
- pushLoginStatus: boolean;
11
- onchangePushLoginStatus: () => void;
12
- defaultAccount: string;
13
- setAccount: React.Dispatch<any>;
14
- agreements: Agreement[];
15
- }
16
- export declare function BeforeLogin(props: BeforeLoginProps): JSX.Element;
17
- export {};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import './styles.less';
3
- interface PendingLoginProps {
4
- onCancelLogin: () => void;
5
- }
6
- export declare function PendingLogin(props: PendingLoginProps): JSX.Element;
7
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { LoginWithAuthingOtpPushProps } from './types';
3
- export declare function LoginWithAuthingOtpPush(props: LoginWithAuthingOtpPushProps): JSX.Element;
@@ -1,18 +0,0 @@
1
- import { BackFillMultipleState, StoreInstance } from '../../../Guard/core/hooks/useMultipleAccounts';
2
- import { Agreement } from '../../../Type';
3
- export interface OnPushSuccessProps {
4
- pushCodeId: string;
5
- }
6
- export interface CheckPushCodeStatusProps {
7
- pushCodeId: string;
8
- }
9
- export interface OnLoginProps {
10
- account: string;
11
- }
12
- export declare type LoginStatus = 'before' | 'pending';
13
- export interface LoginWithAuthingOtpPushProps {
14
- onLoginSuccess?: any;
15
- multipleInstance?: StoreInstance;
16
- initData?: BackFillMultipleState;
17
- agreements: Agreement[];
18
- }
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function useOtpPushLoginWay(setLoginWay: React.Dispatch<any>): void;
3
- export declare function useOtpPushLoginCache(): {
4
- getCachedOtpLoginAccount: typeof getCachedOtpLoginAccount;
5
- cacheOtpLoginAccount: typeof cacheOtpLoginAccount;
6
- clearOtpLoginAccountCache: typeof clearOtpLoginAccountCache;
7
- };
8
- export declare function cacheOtpLoginAccount(account: string): void;
9
- export declare function getCachedOtpLoginAccount(): string;
10
- export declare function clearOtpLoginAccountCache(): void;