@authing/guard-shim-react 4.5.40-alpha.2 → 4.5.40-alpha.20

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 (45) hide show
  1. package/dist/guard.min.css +1 -1
  2. package/dist/guard.min.js +2490 -12407
  3. package/dist/typings/src/ChangeLanguage/index.d.ts +2 -2
  4. package/dist/typings/src/CompleteInfo/businessRequest.d.ts +2 -1
  5. package/dist/typings/src/CompleteInfo/core/completeInfo.d.ts +0 -1
  6. package/dist/typings/src/CompleteInfo/interface.d.ts +1 -1
  7. package/dist/typings/src/Guard/GuardModule/stateMachine.d.ts +1 -1
  8. package/dist/typings/src/Guard/authClient.d.ts +4 -6
  9. package/dist/typings/src/Guard/core/hooks/useMultipleAccounts.d.ts +23 -23
  10. package/dist/typings/src/Guard/module.d.ts +25 -33
  11. package/dist/typings/src/Login/core/withAuthingOtpPush/types.d.ts +3 -3
  12. package/dist/typings/src/Login/core/withLDAP.d.ts +1 -2
  13. package/dist/typings/src/Login/core/withPassword/index.d.ts +1 -2
  14. package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +5 -8
  15. package/dist/typings/src/Login/interface.d.ts +1 -4
  16. package/dist/typings/src/MFA/VerifyCodeInput/index.d.ts +1 -1
  17. package/dist/typings/src/MFA/businessRequest.d.ts +1 -1
  18. package/dist/typings/src/MFA/core/passkey.d.ts +1 -3
  19. package/dist/typings/src/Qrcode/UiQrCode.d.ts +1 -1
  20. package/dist/typings/src/Qrcode/WorkQrCode.d.ts +1 -1
  21. package/dist/typings/src/Qrcode/hooks/useImage.d.ts +1 -1
  22. package/dist/typings/src/Qrcode/hooks/usePreQrCode.d.ts +2 -2
  23. package/dist/typings/src/Qrcode/index.d.ts +2 -2
  24. package/dist/typings/src/SelfUnlock/core/selfUnlock.d.ts +1 -1
  25. package/dist/typings/src/ShieldSpin/index.d.ts +0 -1
  26. package/dist/typings/src/TenantPortalSelect/interface.d.ts +1 -1
  27. package/dist/typings/src/Type/application.d.ts +15 -24
  28. package/dist/typings/src/Type/index.d.ts +1 -2
  29. package/dist/typings/src/ValidatorRules/index.d.ts +1 -1
  30. package/dist/typings/src/_utils/compute.d.ts +3 -3
  31. package/dist/typings/src/_utils/config/index.d.ts +0 -1
  32. package/dist/typings/src/_utils/context.d.ts +1 -4
  33. package/dist/typings/src/_utils/http.d.ts +2 -2
  34. package/dist/typings/src/_utils/index.d.ts +6 -4
  35. package/dist/typings/src/_utils/locales/index.d.ts +1 -0
  36. package/dist/typings/src/_utils/responseManagement/interface.d.ts +1 -3
  37. package/package.json +1 -1
  38. package/dist/typings/src/ChangePassword/core/resetPassword.d.ts +0 -1
  39. package/dist/typings/src/Invitation/Application/index.d.ts +0 -2
  40. package/dist/typings/src/Invitation/AuthenticationBind/index.d.ts +0 -2
  41. package/dist/typings/src/Invitation/Complete/index.d.ts +0 -2
  42. package/dist/typings/src/Invitation/Error/index.d.ts +0 -2
  43. package/dist/typings/src/Invitation/Success/index.d.ts +0 -1
  44. package/dist/typings/src/Invitation/interface.d.ts +0 -66
  45. package/dist/typings/src/Message/index.d.ts +0 -9
@@ -4,6 +4,6 @@ export declare const LngTextMapping: Record<Lang, {
4
4
  label: string;
5
5
  }>;
6
6
  export declare const ChangeLanguage: (props: {
7
- onLangChange?: ((lang: Lang) => void) | undefined;
8
- langRange?: Lang[] | undefined;
7
+ onLangChange?: (lang: Lang) => void;
8
+ langRange?: Lang[];
9
9
  }) => JSX.Element | null;
@@ -1,3 +1,4 @@
1
+ import { User } from 'authing-js-sdk';
1
2
  import { CompleteInfoRequest, RegisterCompleteInfoInitData } from './interface';
2
3
  export declare enum CompleteInfoAuthFlowAction {
3
4
  Complete = "complete-completion",
@@ -5,4 +6,4 @@ export declare enum CompleteInfoAuthFlowAction {
5
6
  }
6
7
  export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
7
8
  export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'] | string, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
8
- export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<import("../_utils/http").AuthingGuardResponse<any> | undefined>;
9
+ export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<import("../_utils/http").AuthingGuardResponse<any> | User | undefined>;
@@ -3,7 +3,6 @@ import { CompleteInfoMetaData, CompleteInfoRequest } from '../interface';
3
3
  export interface CompleteInfoProps {
4
4
  metaData: CompleteInfoMetaData[];
5
5
  businessRequest: (data: CompleteInfoRequest) => Promise<void>;
6
- extendsFieldsI18n?: any;
7
6
  }
8
7
  export interface FieldMetadata {
9
8
  key: string;
@@ -21,7 +21,7 @@ export interface GuardCompleteInfoViewProps extends GuardCompleteInfoProps {
21
21
  initData: any;
22
22
  onLogin?: any;
23
23
  }
24
- export declare type ExtendsFieldType = 'user' | 'internal';
24
+ export type ExtendsFieldType = 'user' | 'internal';
25
25
  export interface ExtendsField {
26
26
  type: ExtendsFieldType;
27
27
  name: string;
@@ -14,7 +14,7 @@ export interface StateMachineLog {
14
14
  date: number;
15
15
  dataSource: ModuleState;
16
16
  }
17
- export declare type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
17
+ export type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
18
18
  export declare class GuardStateMachine {
19
19
  private order;
20
20
  private config;
@@ -1,14 +1,12 @@
1
1
  import { AuthenticationClient } from 'authing-js-sdk';
2
2
  import { GuardLocalConfig } from './config';
3
- declare let authClient: AuthenticationClient;
4
3
  export declare const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string) => AuthenticationClient;
5
4
  export declare const useInitGuardAuthClient: (props: {
6
- config?: GuardLocalConfig | undefined;
7
- appId?: string | undefined;
8
- authClient?: AuthenticationClient | undefined;
5
+ config?: GuardLocalConfig;
6
+ appId?: string;
7
+ authClient?: AuthenticationClient;
9
8
  setError?: any;
10
- tenantId?: string | undefined;
9
+ tenantId?: string;
11
10
  }) => AuthenticationClient | undefined;
12
11
  export declare const getGuardAuthClient: () => AuthenticationClient;
13
12
  export declare const useGuardAuthClient: () => AuthenticationClient;
14
- export {};
@@ -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' | 'zjzwfw-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
16
+ export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'zjzwfw-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
17
17
  /**
18
18
  * when: 多账号页面跳转进入登录页面
19
19
  * 携带的回填数据信息
@@ -27,7 +27,7 @@ export interface BackFillMultipleState extends Omit<User, 'id' | 'name' | 'nickn
27
27
  /**
28
28
  * Store instance
29
29
  */
30
- export declare type StoreInstance = ReturnType<MultipleAccount['getStore']>;
30
+ export type StoreInstance = ReturnType<MultipleAccount['getStore']>;
31
31
  /**
32
32
  * 当前 userId 对应的类型
33
33
  */
@@ -248,18 +248,18 @@ declare class MultipleAccount {
248
248
  }) => void;
249
249
  setUserInfo: (user: Omit<User & {
250
250
  id: string;
251
- loginAccount?: string | undefined;
252
- usertype?: string | undefined;
253
- }, "way" | "tab" | "phoneCountryCode">) => void;
251
+ loginAccount?: string;
252
+ usertype?: string;
253
+ }, 'way' | 'tab' | 'phoneCountryCode'>) => void;
254
254
  setLoginWayByHttpData: (account: string, data: {
255
- username?: string | undefined;
256
- phone?: string | undefined;
257
- email?: string | undefined;
255
+ username?: string;
256
+ phone?: string;
257
+ email?: string;
258
258
  }) => void;
259
259
  setLoginWayByLDAPData: (account: string, data: {
260
- name?: string | undefined;
261
- phone?: string | undefined;
262
- email?: string | undefined;
260
+ name?: string;
261
+ phone?: string;
262
+ email?: string;
263
263
  }) => void;
264
264
  getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
265
265
  getMemoSingleUser: (id: string) => {
@@ -277,8 +277,8 @@ declare class MultipleAccount {
277
277
  * MultipleAccounts 相关 Hook
278
278
  * Finally Config 类型过滤
279
279
  */
280
- declare const useSelectAccounts: ({ appId, finallyConfig }: {
281
- appId?: string | undefined;
280
+ declare const useMultipleAccounts: ({ appId, finallyConfig }: {
281
+ appId?: string;
282
282
  finallyConfig?: any;
283
283
  }) => {
284
284
  instance: {
@@ -292,18 +292,18 @@ declare const useSelectAccounts: ({ appId, finallyConfig }: {
292
292
  }) => void;
293
293
  setUserInfo: (user: Omit<User & {
294
294
  id: string;
295
- loginAccount?: string | undefined;
296
- usertype?: string | undefined;
297
- }, "way" | "tab" | "phoneCountryCode">) => void;
295
+ loginAccount?: string;
296
+ usertype?: string;
297
+ }, 'way' | 'tab' | 'phoneCountryCode'>) => void;
298
298
  setLoginWayByHttpData: (account: string, data: {
299
- username?: string | undefined;
300
- phone?: string | undefined;
301
- email?: string | undefined;
299
+ username?: string;
300
+ phone?: string;
301
+ email?: string;
302
302
  }) => void;
303
303
  setLoginWayByLDAPData: (account: string, data: {
304
- name?: string | undefined;
305
- phone?: string | undefined;
306
- email?: string | undefined;
304
+ name?: string;
305
+ phone?: string;
306
+ email?: string;
307
307
  }) => void;
308
308
  getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
309
309
  getMemoSingleUser: (id: string) => {
@@ -321,4 +321,4 @@ declare const useSelectAccounts: ({ appId, finallyConfig }: {
321
321
  multipleAccountData: BackFillMultipleState | undefined;
322
322
  clearBackFillData: () => void;
323
323
  };
324
- export default useSelectAccounts;
324
+ export default useMultipleAccounts;
@@ -1,39 +1,31 @@
1
1
  export declare enum GuardModuleType {
2
- ERROR = "error",
3
- LOGIN = "login",
4
- REGISTER = "register",
5
- MFA = "mfa",
6
- FORGET_PWD = "forgetPassword",
7
- FORCED_PASSWORD_RESET = "forcedPasswordReset",
8
- NOTICE_PASSWORD_RESET = "noticePasswordReset",
9
- FIRST_LOGIN_PASSWORD = "firstLoginPassword",
10
- UNSAFE_PASSWORD_RESET = "unsafePasswordReset",
11
- DOWNLOAD_AT = "downloadAT",
12
- BIND_TOTP = "bindTotp",
13
- ANY_QUESTIONS = "anyQuestions",
14
- LOGIN_COMPLETE_INFO = "loginCompleteInfo",
15
- REGISTER_PASSWORD = "registerPassword",
16
- REGISTER_COMPLETE_INFO = "registerCompleteInfo",
17
- RECOVERY_CODE = "recoveryCode",
18
- SUBMIT_SUCCESS = "submitSuccess",
19
- IDENTITY_BINDING_ASK = "identityBindingAsk",
20
- IDENTITY_BINDING = "identityBinding",
21
- IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",
22
- SELF_UNLOCK = "selfUnlock",
23
- FLOW_SELECT_ACCOUNT = "flowSelectAccount",
2
+ ERROR = "error",//错误页
3
+ LOGIN = "login",//登录页
4
+ REGISTER = "register",//注册页
5
+ MFA = "mfa",// 二次 mfa 认证页
6
+ FORGET_PWD = "forgetPassword",// 忘记密码页
7
+ FORCED_PASSWORD_RESET = "forcedPasswordReset",// 登陆安全策略 密码轮换页
8
+ NOTICE_PASSWORD_RESET = "noticePasswordReset",//提示修改密码页
9
+ FIRST_LOGIN_PASSWORD = "firstLoginPassword",//首次登录修改密码页
10
+ UNSAFE_PASSWORD_RESET = "unsafePasswordReset",// 密码强度不符合要求修改密码页
11
+ DOWNLOAD_AT = "downloadAT",//下载 Authenticator 页
12
+ BIND_TOTP = "bindTotp",// 绑定 TOTP页
13
+ ANY_QUESTIONS = "anyQuestions",// 问题反馈页
14
+ LOGIN_COMPLETE_INFO = "loginCompleteInfo",// 登录信息补全
15
+ REGISTER_PASSWORD = "registerPassword",// 验证码注册拉起密码补全页
16
+ REGISTER_COMPLETE_INFO = "registerCompleteInfo",//注册信息补全页
17
+ RECOVERY_CODE = "recoveryCode",// MFA 恢复码展示页
18
+ SUBMIT_SUCCESS = "submitSuccess",// 提交成功展示页
19
+ IDENTITY_BINDING_ASK = "identityBindingAsk",// 身份源绑定 问询页
20
+ IDENTITY_BINDING = "identityBinding",// 身份源绑定页
21
+ IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",// 身份源绑定页不问询
22
+ SELF_UNLOCK = "selfUnlock",// 自助解锁页
23
+ FLOW_SELECT_ACCOUNT = "flowSelectAccount",// 选择登录账号
24
24
  /** 多租户门户选择页 */
25
25
  TENANT_PORTAL = "tenant-portal",
26
- New_SUBMIT_SUCCESS = "newSubmitSuccess",
27
- SELECT_ACCOUNT_2_LOGIN = "selectAccout2Login",
28
- RESET_ACCOUNT_NAME = "resetAccountName",
29
- APPLY_INVITATION = "applyInvitation",
30
- MESSAGE = "message",
31
- INVITE_AUTH = "inviteAuth",
32
- INVITE_COMPLETE = "inviteComplete",
33
- INVITE_EXPIRE = "inviteExpire",
34
- INVITE_PAGE_EXPIRE = "invitePageExpire",
35
- INVITE_SUCCESS = "inviteSuccess",
36
- RESET_PASSWORD = "resetPassword"
26
+ New_SUBMIT_SUCCESS = "newSubmitSuccess",// 提交成功展示页
27
+ SELECT_ACCOUNT_2_LOGIN = "selectAccout2Login",// 选择登录身份
28
+ RESET_ACCOUNT_NAME = "resetAccountName"
37
29
  }
38
30
  export interface GuardModuleAction {
39
31
  action: string;
@@ -10,7 +10,7 @@ export interface OnLoginProps {
10
10
  account: string;
11
11
  agreementIds?: (string | number)[];
12
12
  }
13
- export declare type LoginStatus = 'before' | 'pending';
13
+ export type LoginStatus = 'before' | 'pending';
14
14
  export interface LoginWithAuthingOtpPushProps {
15
15
  onLoginSuccess?: any;
16
16
  multipleInstance?: StoreInstance;
@@ -21,9 +21,9 @@ export interface PushLoginGudeModalProps {
21
21
  visible: boolean;
22
22
  onClose: () => void;
23
23
  }
24
- export declare type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
24
+ export type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
25
25
  export interface SelectorOption {
26
26
  value: Selector;
27
27
  label: string;
28
28
  }
29
- export declare type SelectorOptions = SelectorOption[];
29
+ export type SelectorOptions = SelectorOption[];
@@ -13,10 +13,9 @@ interface LoginWithLDAPProps {
13
13
  */
14
14
  multipleInstance?: StoreInstance;
15
15
  /**
16
- * 选择已登录账号回填的数据
16
+ * 多账号回填的数据
17
17
  */
18
18
  backfillData?: BackFillMultipleState;
19
- loginHint?: string;
20
19
  }
21
20
  export declare const LoginWithLDAP: (props: LoginWithLDAPProps) => JSX.Element;
22
21
  export {};
@@ -19,10 +19,9 @@ interface LoginWithPasswordProps {
19
19
  */
20
20
  multipleInstance?: StoreInstance;
21
21
  /**
22
- * 选择已登录账号回填的数据
22
+ * 多账号回填的数据
23
23
  */
24
24
  backfillData?: BackFillMultipleState;
25
- loginHint?: string;
26
25
  }
27
26
  export declare const LoginWithPassword: (props: LoginWithPasswordProps) => JSX.Element;
28
27
  export {};
@@ -2,29 +2,26 @@ import { FormInstance } from 'shim-antd/lib/form';
2
2
  import { React } from 'shim-react';
3
3
  import { BackFillMultipleState, LoginWay } from '../../Guard/core/hooks/useMultipleAccounts';
4
4
  /**
5
- * 登录账号选择时:账户 & 登录方式自动回填
6
- * oidc 时:login_hint 回填账号
7
- *
5
+ * 多账号登录下 账户 & 登录方式自动回填
8
6
  * TODO: HOOK 参数有时间整理成为对象,开始没有想到有这么多
9
7
  * 调用地方 core 中需要回填的两个登录方式
10
8
  */
11
- declare function useLoginAccountBackFill(options: {
9
+ declare function useLoginMultipleBackFill(options: {
12
10
  form: FormInstance<any>;
13
- way: LoginWay | LoginWay[];
11
+ way: LoginWay;
14
12
  formKey: string;
15
13
  backfillData?: BackFillMultipleState;
16
14
  isOnlyInternationSms?: boolean;
17
15
  setAreaCode?: React.Dispatch<React.SetStateAction<string>>;
18
16
  cancelBackfill?: boolean;
19
17
  changeCurrentMethod?: (account: string) => void;
20
- loginHint?: string;
21
18
  }): void;
22
19
  /**
23
20
  * 多账号统一状态管理
24
21
  * @param setLoginWay
25
22
  * @returns
26
23
  */
27
- declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
24
+ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
28
25
  isMultipleAccount: boolean;
29
26
  multipleInstance: {
30
27
  initStore: (appId: string, options: {
@@ -65,4 +62,4 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
65
62
  backfillData: BackFillMultipleState | undefined;
66
63
  defaultQrWay: string | undefined;
67
64
  };
68
- export { useLoginAccountBackFill, useLoginSelectAccount as useLoginMultiple };
65
+ export { useLoginMultipleBackFill, useLoginMultiple };
@@ -1,7 +1,7 @@
1
1
  import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '../Type';
2
2
  import { AuthenticationClient, User } from 'authing-js-sdk';
3
3
  import { QrCodeAuthenticationClient } from 'authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient';
4
- import { Agreement, LoginMethods, Protocol, SocialConnectionProvider } from '../Type/application';
4
+ import { Agreement, LoginMethods, SocialConnectionProvider } from '../Type/application';
5
5
  export interface LoginConfig extends IG2Config {
6
6
  autoRegister?: boolean;
7
7
  disableResetPwd?: boolean;
@@ -20,7 +20,6 @@ export interface LoginConfig extends IG2Config {
20
20
  * 关闭二维码状态check轮询(console上使用)
21
21
  */
22
22
  _closeLoopCheckQrcode?: boolean;
23
- loginHint?: string;
24
23
  }
25
24
  export interface LoginEvents extends IG2Events {
26
25
  onLogin?: (user: User, authClient: AuthenticationClient) => void;
@@ -40,5 +39,3 @@ export interface GuardLoginInitData {
40
39
  _lockMethod?: string;
41
40
  }
42
41
  export declare const getDefaultLoginConfig: () => LoginConfig;
43
- export declare const baseLoginPathMapping: Partial<Record<Protocol, string | null>>;
44
- export declare const loginUrlFieldMapping: Partial<Record<Protocol, string>>;
@@ -7,7 +7,7 @@ interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  onEenter?: Function;
8
8
  showDivider?: boolean;
9
9
  onChange?: any;
10
- value?: string;
10
+ value?: Array<number | string>;
11
11
  onFinish?: any;
12
12
  }
13
13
  export declare const VerifyCodeInput: React.FC<VerifyCodeInputProps>;
@@ -35,7 +35,7 @@ interface AssociateFaceContent {
35
35
  isExternalPhoto?: boolean;
36
36
  mfaToken?: string;
37
37
  }
38
- declare type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON;
38
+ type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON;
39
39
  interface VerifyPasskeyContent {
40
40
  credential: PublicKeyCredentialWithAssertionJSON;
41
41
  ticket: string;
@@ -1,15 +1,13 @@
1
1
  import { React } from 'shim-react';
2
- import { MFAType } from '../interface';
3
2
  interface BindPasskeyProps {
4
3
  mfaToken: string;
5
4
  mfaLogin: (code: any, data: any, message?: string) => void;
6
- mfaConfigsMap: Map<MFAType, boolean>;
7
5
  }
8
6
  interface VerifyPasskeyProps {
9
7
  mfaToken: string;
10
8
  mfaLogin: (code: any, data: any, message?: string) => void;
11
9
  }
12
- export declare type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
10
+ export type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
13
11
  passkeyEnabled: boolean;
14
12
  };
15
13
  export declare const MFAPasskey: React.FC<MFAPasskeyProps>;
@@ -1,7 +1,7 @@
1
1
  import { React } from 'shim-react';
2
2
  import './index.less';
3
3
  import { CodeStatusDescriptions } from './WorkQrCode';
4
- export declare type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
4
+ export type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
5
5
  export declare const prefix = "refactor";
6
6
  export interface UiQrProps {
7
7
  /**
@@ -4,7 +4,7 @@ import { CodeStatus, UiQrProps } from './UiQrCode';
4
4
  /**
5
5
  * 二维码不同状态下的底部描述文字
6
6
  */
7
- export declare type CodeStatusDescriptions = Partial<Record<Exclude<CodeStatus, 'loading'>, React.ReactNode | ((referQrCode?: () => void) => React.ReactNode)>>;
7
+ export type CodeStatusDescriptions = Partial<Record<Exclude<CodeStatus, 'loading'>, React.ReactNode | ((referQrCode?: () => void) => React.ReactNode)>>;
8
8
  export interface WorkQrCodeRef {
9
9
  referQrCode: () => Promise<{
10
10
  random: string;
@@ -1,4 +1,4 @@
1
1
  declare const useImage: (src: string | undefined, options: {
2
- onLoad?: (() => void) | undefined;
2
+ onLoad?: () => void;
3
3
  }) => (string | undefined)[];
4
4
  export { useImage };
@@ -1,7 +1,7 @@
1
1
  import { React } from 'shim-react';
2
2
  import { CodeStatus } from '../UiQrCode';
3
- export declare type ReducerType = 'change' | 'changeStatus' | 'changeDesc';
4
- export declare type RootState = {
3
+ export type ReducerType = 'change' | 'changeStatus' | 'changeDesc';
4
+ export type RootState = {
5
5
  /**
6
6
  * 状态
7
7
  */
@@ -1,9 +1,9 @@
1
1
  import { UiQrCode, LinkQrcode } from './UiQrCode';
2
2
  import { WorkQrCode, WorkGeneQrCode } from './WorkQrCode';
3
- declare type IQrCode = typeof WorkQrCode & {
3
+ type IQrCode = typeof WorkQrCode & {
4
4
  UI: typeof UiQrCode;
5
5
  };
6
- declare type IGeneQrCode = typeof WorkGeneQrCode & {
6
+ type IGeneQrCode = typeof WorkGeneQrCode & {
7
7
  UI: typeof LinkQrcode;
8
8
  };
9
9
  declare const QrCode: IQrCode;
@@ -4,5 +4,5 @@ export declare enum InputMethodMap {
4
4
  phone = "phone-code"
5
5
  }
6
6
  export declare const SelfUnlock: ({ identifyRef }: {
7
- identifyRef?: React.MutableRefObject<string> | undefined;
7
+ identifyRef?: React.MutableRefObject<string>;
8
8
  }) => JSX.Element;
@@ -1,6 +1,5 @@
1
1
  interface IG2SpinProps {
2
2
  size?: number;
3
- className?: string;
4
3
  }
5
4
  export declare const ShieldSpin: (props: IG2SpinProps) => JSX.Element;
6
5
  export declare const Spin: () => JSX.Element;
@@ -31,7 +31,7 @@ export interface TenantPortalEvents extends IG2Events {
31
31
  /** 租户门户选择回调 */
32
32
  onTenantSelect?: (data?: TenantPortalSelectType) => void;
33
33
  }
34
- export declare type TenantView = 'default' | 'join' | 'create';
34
+ export type TenantView = 'default' | 'join' | 'create';
35
35
  export interface TenantButtonProps {
36
36
  className?: string;
37
37
  onClick?: () => void;
@@ -1,5 +1,5 @@
1
- export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
2
- import { MFAType } from '../MFA/interface';
1
+ export type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
2
+ import { MFAType } from 'src/MFA/interface';
3
3
  import { PasswordStrength } from '../_utils';
4
4
  export * from 'authing-js-sdk';
5
5
  export declare enum LoginMethods {
@@ -7,16 +7,14 @@ export declare enum LoginMethods {
7
7
  AppQr = "app-qrcode",
8
8
  Password = "password",
9
9
  PhoneCode = "phone-code",
10
- EmailCode = "email-code",
11
- WxMinQr = "wechat-miniprogram-qrcode",
12
- AD = "ad",
13
- WechatMpQrcode = "wechatmp-qrcode",
14
- AuthingOtpPush = "authing-otp-push",
15
- WechatworkCorpQrconnect = "wechatwork-corp-qrconnect",
16
- WECHATWORKQRCONNECTOFAUTHINGAGENCY = "wechatwork-authing-agency-qrcode",
17
- WECHATWORKAGENCYQRCONNECT = "wechatwork-agency-qrcode",
18
- DingTalkQrcode = "dingtalk-qrcode",
19
- Passkey = "passkey",
10
+ EmailCode = "email-code",// 这是前端单独加的,后端只会返回 phone-code
11
+ WxMinQr = "wechat-miniprogram-qrcode",// 对应社会化登录的 wechat:miniprogram:qrconnect(小程序扫码登录)
12
+ AD = "ad",// 对应企业身份源的 Windows AD 登录
13
+ WechatMpQrcode = "wechatmp-qrcode",// 微信扫码关注登录
14
+ AuthingOtpPush = "authing-otp-push",// App 扫码登录
15
+ WechatworkCorpQrconnect = "wechatwork-corp-qrconnect",// 微信企业扫码关注登录
16
+ DingTalkQrcode = "dingtalk-qrcode",//钉钉扫码
17
+ Passkey = "passkey",// passkey
20
18
  ZJZWFWQrcode = "zjzwfw-qrcode"
21
19
  }
22
20
  export declare enum OIDCConnectionMode {
@@ -37,8 +35,6 @@ export declare enum SocialConnectionProvider {
37
35
  WECHATWORK_ADDRESS_BOOK = "wechatwork:addressbook",
38
36
  WECHATWORK_CORP_QRCONNECT = "wechatwork:corp:qrconnect",
39
37
  WECHATWORK_SERVICEPROVIDER_QRCONNECT = "wechatwork:service-provider:qrconnect",
40
- WECHATWORK_QRCONNECT_OF_AUTHING_AGENCY = "wechatwork:qrconnect:of:authing:agency",
41
- WECHATWORK_AGENCY_QRCONNECT = "wechatwork:agency:qrconnect",
42
38
  DINGTALK = "dingtalk",
43
39
  WEIBO = "weibo",
44
40
  APPLE = "apple",
@@ -125,7 +121,6 @@ export interface QrCodeItem {
125
121
  id: string;
126
122
  title: string;
127
123
  isDefault?: boolean;
128
- type?: LoginMethods;
129
124
  QRConfig?: {
130
125
  corpId: string;
131
126
  agentId: string;
@@ -135,7 +130,7 @@ export interface QrCodeItem {
135
130
  authorizationUrl?: string;
136
131
  };
137
132
  }
138
- export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
133
+ export type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
139
134
  export interface OidcClientMetadata {
140
135
  grant_types: string[];
141
136
  client_id: string;
@@ -170,7 +165,7 @@ export interface UserExtendsField {
170
165
  required: boolean;
171
166
  validateRules: any[];
172
167
  }
173
- export declare type ExtendsField = InternalExtendsField | UserExtendsField;
168
+ export type ExtendsField = InternalExtendsField | UserExtendsField;
174
169
  export interface ApplicationPasswordTabConfig {
175
170
  enabledLoginMethods?: PasswordLoginMethods[];
176
171
  validRegisterMethods?: string[];
@@ -188,9 +183,9 @@ export interface Agreement {
188
183
  lang: Lang;
189
184
  availableAt?: number;
190
185
  }
191
- export declare type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
192
- export declare type VerifyLoginMethods = 'email-code' | 'phone-code';
193
- export declare type ComplateFiledsPlace = 'register' | 'login';
186
+ export type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
187
+ export type VerifyLoginMethods = 'email-code' | 'phone-code';
188
+ export type ComplateFiledsPlace = 'register' | 'login';
194
189
  export interface TabFieldsI18nItem {
195
190
  key: string;
196
191
  label: string;
@@ -327,8 +322,6 @@ export interface ApplicationConfig {
327
322
  enableCompletePassword: boolean;
328
323
  /** 是否开启手机密码注册手机号验证 */
329
324
  enabledPPRegisterValid?: boolean;
330
- /** 是否开启邮箱域名匹配登录 */
331
- enabledMatchEmailDomain?: boolean;
332
325
  /**
333
326
  * 登录注册排序
334
327
  */
@@ -384,6 +377,4 @@ export interface ApplicationConfig {
384
377
  switch: 'OFF' | 'ON' | 'CONDON';
385
378
  };
386
379
  };
387
- /** 特殊浏览器匹配字符串 */
388
- specialBrowserSymbols?: string[];
389
380
  }
@@ -82,8 +82,7 @@ export declare enum EmailScene {
82
82
  RESET_PASSWORD_VERIFY_CODE = "RESET_PASSWORD_VERIFY_CODE",
83
83
  EMAIL_BIND_VERIFY_CODE = "EMAIL_BIND_VERIFY_CODE",
84
84
  EMAIL_UNBIND_VERIFY_CODE = "EMAIL_UNBIND_VERIFY_CODE",
85
- SELF_UNLOCKING_VERIFY_CODE = "SELF_UNLOCKING_VERIFY_CODE",
86
- VERIFY_CODE = "VERIFY_CODE"
85
+ SELF_UNLOCKING_VERIFY_CODE = "SELF_UNLOCKING_VERIFY_CODE"
87
86
  }
88
87
  export declare enum ForcedModifyPwdCycleUnit {
89
88
  Day = "DAY",
@@ -21,7 +21,7 @@ export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
21
21
  export interface ICheckProps {
22
22
  check: (values: any) => void;
23
23
  }
24
- declare type InternalFormItemType = typeof Form.Item;
24
+ type InternalFormItemType = typeof Form.Item;
25
25
  interface FormItemInterface extends InternalFormItemType {
26
26
  Password: typeof PasswordFormItem;
27
27
  Email: typeof EmailFormItem;
@@ -14,9 +14,9 @@ export declare const isEdgeBrowser: () => boolean;
14
14
  export declare const isWeiboBrowser: () => boolean | null;
15
15
  export declare const isAlipayBrowser: () => boolean | null;
16
16
  export declare const isBaiduBrowser: () => boolean | null;
17
- export declare const isWeComeBrowser: () => boolean | null;
18
- export declare const isMobile: () => RegExpMatchArray | null | undefined;
17
+ export declare const isWeComeBrowser: () => boolean;
18
+ export declare const isMobile: () => RegExpMatchArray | null;
19
19
  export declare const isWebview: () => boolean | null;
20
20
  export declare const isLenovoNetdisk: () => boolean | null;
21
- export declare const computeIsSpecialBrowser: (specialBrowserSymbol?: string[]) => boolean;
21
+ export declare const isSpecialBrowser: () => boolean;
22
22
  export declare const getPhoneInLoginPageContext: () => any;
@@ -101,7 +101,6 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
101
101
  withCustomData?: boolean | undefined;
102
102
  } | undefined;
103
103
  _closeLoopCheckQrcode?: boolean | undefined;
104
- loginHint?: string | undefined;
105
104
  goBack?: (() => void) | null | undefined;
106
105
  };
107
106
  guardPageConfig: GuardPageConfig;
@@ -49,8 +49,6 @@ export interface IGuardContext {
49
49
  defaultLanguageConfig: Lang;
50
50
  /** 租户信息获取和操作处理相关 */
51
51
  tenantInstance?: MultipleTenant;
52
- /** 特殊浏览器,身份源无法弹窗,非托管模式不显示身份源图标 */
53
- isSpecialBrowser: boolean;
54
52
  }
55
53
  export declare const createGuardXContext: () => {
56
54
  Provider: React.FC<{
@@ -78,7 +76,6 @@ export declare const useGuardButtonContext: () => {
78
76
  export declare const useGuardButtonState: () => IGuardContextProvider;
79
77
  export declare const useGuardPublicConfig: () => ApplicationConfig;
80
78
  export declare const useGuardHttpClient: () => GuardHttp;
81
- export declare const useIsSpecialBrowser: () => boolean;
82
79
  export declare const useGuardDefaultMergedConfig: () => GuardLocalConfig;
83
80
  export declare const useGuardAppId: () => string;
84
81
  export declare const useGuardTenantId: () => string | undefined;
@@ -97,7 +94,7 @@ export declare const useGuardPageConfig: () => Partial<GuardPageConfig>;
97
94
  /**
98
95
  * 多账号登录 store 实例
99
96
  */
100
- export declare const useGuardAccountSelectInstance: () => {
97
+ export declare const useGuardMultipleInstance: () => {
101
98
  /**
102
99
  * 多账号相关
103
100
  */
@@ -5,7 +5,7 @@ export declare const requestClient: {
5
5
  get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig): Promise<AuthingResponse<T>>;
6
6
  post<T_1>(path: string, data: any, config?: {
7
7
  headers: any;
8
- } | undefined): Promise<AuthingResponse<T_1>>;
8
+ }): Promise<AuthingResponse<T_1>>;
9
9
  postForm<T_2>(path: string, formData: any, config?: {
10
10
  headers: any;
11
11
  }): Promise<AuthingResponse<T_2>>;
@@ -19,7 +19,7 @@ export declare const requestClient: {
19
19
  setTenantId(tenantId: string): void;
20
20
  };
21
21
  export interface AuthingResponse<T = any> {
22
- code: number;
22
+ code?: number;
23
23
  statusCode?: number;
24
24
  apiCode?: number;
25
25
  data?: T;