@authing/guard-shim-react 4.5.40-alpha.8 → 4.5.40-ey.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 (67) hide show
  1. package/dist/guard.min.css +1 -1
  2. package/dist/guard.min.js +4427 -4889
  3. package/dist/typings/shim-antd4/index.d.ts +4 -4
  4. package/dist/typings/src/ChangeLanguage/index.d.ts +2 -2
  5. package/dist/typings/src/CompleteInfo/businessRequest.d.ts +2 -2
  6. package/dist/typings/src/CompleteInfo/core/completeInfo.d.ts +8 -1
  7. package/dist/typings/src/CompleteInfo/interface.d.ts +5 -1
  8. package/dist/typings/src/CompleteInfo/utils.d.ts +9 -2
  9. package/dist/typings/src/EY/CheckCaptcha/index.d.ts +1 -0
  10. package/dist/typings/src/EY/Error/index.d.ts +1 -0
  11. package/dist/typings/src/EY/ForgetPassword/index.d.ts +2 -0
  12. package/dist/typings/src/EY/InviteComplete/index.d.ts +1 -0
  13. package/dist/typings/src/EY/InviteIdentityBind/component/WeComQrcode.d.ts +2 -0
  14. package/dist/typings/src/EY/InviteIdentityBind/component/WeComQrcodeNew.d.ts +1 -0
  15. package/dist/typings/src/EY/InviteIdentityBind/index.d.ts +1 -0
  16. package/dist/typings/src/EY/InviteLoading/index.d.ts +1 -0
  17. package/dist/typings/src/EY/Login/components/EyLoginWithWeComQrcode.d.ts +1 -0
  18. package/dist/typings/src/EY/Login/components/EyLoginWithWeComQrcodeNew.d.ts +1 -0
  19. package/dist/typings/src/EY/Login/core/EmailVerify.d.ts +7 -0
  20. package/dist/typings/src/EY/Login/core/ScanCode.d.ts +7 -0
  21. package/dist/typings/src/EY/Login/index.d.ts +6 -0
  22. package/dist/typings/src/EY/PreCheckEmail/index.d.ts +1 -0
  23. package/dist/typings/src/EY/Protocol/index.d.ts +1 -0
  24. package/dist/typings/src/EY/components/EmailFormItem.d.ts +2 -0
  25. package/dist/typings/src/EY/components/GoBack.d.ts +1 -0
  26. package/dist/typings/src/EY/components/ResetPassword.d.ts +16 -0
  27. package/dist/typings/src/EY/interface.d.ts +75 -0
  28. package/dist/typings/src/ForgetPassword/core/resetPassword.d.ts +3 -0
  29. package/dist/typings/src/Guard/GuardModule/stateMachine.d.ts +1 -1
  30. package/dist/typings/src/Guard/authClient.d.ts +4 -6
  31. package/dist/typings/src/Guard/config.d.ts +1 -0
  32. package/dist/typings/src/Guard/core/hooks/useMultipleAccounts.d.ts +24 -24
  33. package/dist/typings/src/Guard/module.d.ts +59 -28
  34. package/dist/typings/src/IdentityBinding/businessRequest.d.ts +1 -1
  35. package/dist/typings/src/Invitation/interface.d.ts +1 -1
  36. package/dist/typings/src/Login/core/eyWithWeComQrcode.d.ts +1 -0
  37. package/dist/typings/src/Login/core/withAuthingOtpPush/types.d.ts +3 -3
  38. package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +12 -12
  39. package/dist/typings/src/Login/index.d.ts +4 -0
  40. package/dist/typings/src/MFA/BindPreCheck/index.d.ts +2 -0
  41. package/dist/typings/src/MFA/VerifyCodeInput/ey.d.ts +16 -0
  42. package/dist/typings/src/MFA/VerifyCodeInput/index.d.ts +5 -0
  43. package/dist/typings/src/MFA/businessRequest.d.ts +2 -1
  44. package/dist/typings/src/MFA/core/email.d.ts +1 -0
  45. package/dist/typings/src/MFA/core/passkey.d.ts +1 -1
  46. package/dist/typings/src/MFA/core/sms.d.ts +1 -0
  47. package/dist/typings/src/MFA/core/totp.d.ts +1 -0
  48. package/dist/typings/src/MFA/mfaMethods/index.d.ts +1 -0
  49. package/dist/typings/src/Qrcode/UiQrCode.d.ts +1 -1
  50. package/dist/typings/src/Qrcode/WorkQrCode.d.ts +2 -2
  51. package/dist/typings/src/Qrcode/hooks/useImage.d.ts +1 -1
  52. package/dist/typings/src/Qrcode/hooks/usePreQrCode.d.ts +2 -2
  53. package/dist/typings/src/Qrcode/index.d.ts +2 -2
  54. package/dist/typings/src/Register/utils.d.ts +1 -1
  55. package/dist/typings/src/SelfUnlock/core/selfUnlock.d.ts +1 -1
  56. package/dist/typings/src/SendCode/SendCodeBtn.d.ts +2 -1
  57. package/dist/typings/src/SendCode/index.d.ts +1 -0
  58. package/dist/typings/src/TenantPortalSelect/interface.d.ts +1 -1
  59. package/dist/typings/src/Type/application.d.ts +28 -19
  60. package/dist/typings/src/ValidatorRules/index.d.ts +1 -1
  61. package/dist/typings/src/_utils/config/index.d.ts +35 -78
  62. package/dist/typings/src/_utils/context.d.ts +76 -40
  63. package/dist/typings/src/_utils/http.d.ts +7 -7
  64. package/dist/typings/src/_utils/index.d.ts +4 -2
  65. package/dist/typings/src/_utils/responseManagement/interface.d.ts +15 -5
  66. package/dist/typings/src/_utils/signRequestParams.d.ts +8 -0
  67. package/package.json +2 -2
@@ -0,0 +1,16 @@
1
+ import { React } from 'shim-react';
2
+ import './style.less';
3
+ interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ beforeSend: () => Promise<boolean>;
5
+ verifyType: 'emailCode' | 'phoneCode';
6
+ length?: number;
7
+ size?: string;
8
+ gutter?: string;
9
+ onEenter?: Function;
10
+ showDivider?: boolean;
11
+ onChange?: any;
12
+ value?: string;
13
+ onFinish?: any;
14
+ }
15
+ export declare const EyVerifyCodeInput: React.ForwardRefExoticComponent<VerifyCodeInputProps & React.RefAttributes<any>>;
16
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { React } from 'shim-react';
2
+ import { SlotProps } from 'input-otp';
2
3
  import './style.less';
3
4
  interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
4
5
  length?: number;
@@ -9,6 +10,10 @@ interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
9
10
  onChange?: any;
10
11
  value?: string;
11
12
  onFinish?: any;
13
+ ResentBtnSort?: () => JSX.Element;
12
14
  }
15
+ export declare const SoltInput: (solt: SlotProps & {
16
+ style: any;
17
+ }) => JSX.Element;
13
18
  export declare const VerifyCodeInput: React.FC<VerifyCodeInputProps>;
14
19
  export {};
@@ -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;
@@ -47,6 +47,7 @@ interface GetPasskeyVerifyChallengeParams {
47
47
  mfaToken: string;
48
48
  }
49
49
  export declare const VerifyEmail: (content: VerifyEmailContent) => Promise<AuthingGuardResponse<any>>;
50
+ export declare const checkEmailOrSms: (content: any) => Promise<AuthingGuardResponse<any>>;
50
51
  export declare const VerifySms: (content: VerifySmsContent) => Promise<AuthingGuardResponse<any>>;
51
52
  export declare const VerifyTotp: (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
52
53
  export declare const VerifyFace: (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
@@ -20,4 +20,5 @@ export declare const MFAEmail: React.FC<{
20
20
  mfaLogin: any;
21
21
  config: MFAConfig;
22
22
  }>;
23
+ export declare const EmailPreCheck: React.FC<any>;
23
24
  export {};
@@ -9,7 +9,7 @@ interface VerifyPasskeyProps {
9
9
  mfaToken: string;
10
10
  mfaLogin: (code: any, data: any, message?: string) => void;
11
11
  }
12
- export declare type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
12
+ export type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
13
13
  passkeyEnabled: boolean;
14
14
  };
15
15
  export declare const MFAPasskey: React.FC<MFAPasskeyProps>;
@@ -28,3 +28,4 @@ export declare const MFASms: React.FC<{
28
28
  initData: GuardMFAInitData;
29
29
  mfaConfigsMap: Map<MFAType, boolean>;
30
30
  }>;
31
+ export declare const SmsPreCheck: React.FC<any>;
@@ -18,3 +18,4 @@ export interface MFATotpProps {
18
18
  mfaLogin: any;
19
19
  }
20
20
  export declare const MFATotp: React.FC<MFATotpProps>;
21
+ export declare const TotpPreCheck: (props: any) => JSX.Element;
@@ -4,5 +4,6 @@ import './style.less';
4
4
  export interface MFAMethodsProps {
5
5
  method: MFAType;
6
6
  onChangeMethod: (type: MFAType) => void;
7
+ beforeBind?: any;
7
8
  }
8
9
  export declare const MFAMethods: React.FC<MFAMethodsProps>;
@@ -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;
@@ -39,6 +39,6 @@ interface WorkQrCodeProps extends Omit<UiQrProps, 'description' | 'status'> {
39
39
  }
40
40
  declare const WorkQrCode: React.ForwardRefExoticComponent<WorkQrCodeProps & React.RefAttributes<any>>;
41
41
  declare const WorkGeneQrCode: React.ForwardRefExoticComponent<WorkQrCodeProps & {
42
- authorizationUrl?: string | undefined;
42
+ authorizationUrl?: string;
43
43
  } & React.RefAttributes<any>>;
44
44
  export { WorkQrCode, WorkGeneQrCode };
@@ -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;
@@ -1 +1 @@
1
- export declare const useIsChangeComplete: (currentMode: 'phone' | 'email' | string) => boolean;
1
+ export declare const useIsChangeComplete: (currentMode: "phone" | "email" | string) => boolean;
@@ -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;
@@ -6,5 +6,6 @@ export interface SendCodeProps extends ButtonProps {
6
6
  btnRef?: React.RefObject<HTMLButtonElement>;
7
7
  setSent?: (value: boolean) => void;
8
8
  sendDesc?: string;
9
+ timerTime?: number;
9
10
  }
10
- export declare const SendCodeBtn: React.FC<SendCodeProps>;
11
+ export declare const SendCodeBtn: React.ForwardRefExoticComponent<SendCodeProps & React.RefAttributes<unknown>>;
@@ -5,5 +5,6 @@ export interface SendPhoneCodeProps extends InputProps {
5
5
  form?: any;
6
6
  beforeSend?: any;
7
7
  autoSubmit?: boolean;
8
+ timerTime?: number;
8
9
  }
9
10
  export declare const SendCode: React.FC<SendPhoneCodeProps>;
@@ -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,4 +1,4 @@
1
- export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
1
+ export type Lang = 'zh-CN' | 'en-US';
2
2
  import { MFAType } from '../MFA/interface';
3
3
  import { PasswordStrength } from '../_utils';
4
4
  export * from 'authing-js-sdk';
@@ -7,17 +7,22 @@ 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",
20
- ZJZWFWQrcode = "zjzwfw-qrcode"
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
+ WECHATWORKQRCONNECTOFAUTHINGAGENCY = "wechatwork-authing-agency-qrcode",// 代开发形式的以 authing 作为内部应用
17
+ WECHATWORKAGENCYQRCONNECT = "wechatwork-agency-qrcode",// 代开发形式的内部应用
18
+ DingTalkQrcode = "dingtalk-qrcode",//钉钉扫码
19
+ Passkey = "passkey",// passkey
20
+ ZJZWFWQrcode = "zjzwfw-qrcode",// 浙江政务钉
21
+ /**
22
+ * ey
23
+ */
24
+ EYWechatworkCorpQrconnect = "wechatwork-service-provider-qrconnect",// 微信企业扫码关注登录
25
+ WechatworkCorpQrconnectNew = "wechatwork-service-provider-qrconnect-v2"
21
26
  }
22
27
  export declare enum OIDCConnectionMode {
23
28
  FRONT_CHANNEL = "FRONT_CHANNEL",
@@ -37,8 +42,8 @@ export declare enum SocialConnectionProvider {
37
42
  WECHATWORK_ADDRESS_BOOK = "wechatwork:addressbook",
38
43
  WECHATWORK_CORP_QRCONNECT = "wechatwork:corp:qrconnect",
39
44
  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",
45
+ WECHATWORK_QRCONNECT_OF_AUTHING_AGENCY = "wechatwork:qrconnect:of:authing:agency",// 代开发形式的以 authing 作为内部应用
46
+ WECHATWORK_AGENCY_QRCONNECT = "wechatwork:agency:qrconnect",// 代开发形式的内部应用
42
47
  DINGTALK = "dingtalk",
43
48
  WEIBO = "weibo",
44
49
  APPLE = "apple",
@@ -135,7 +140,7 @@ export interface QrCodeItem {
135
140
  authorizationUrl?: string;
136
141
  };
137
142
  }
138
- export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
143
+ export type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
139
144
  export interface OidcClientMetadata {
140
145
  grant_types: string[];
141
146
  client_id: string;
@@ -170,7 +175,7 @@ export interface UserExtendsField {
170
175
  required: boolean;
171
176
  validateRules: any[];
172
177
  }
173
- export declare type ExtendsField = InternalExtendsField | UserExtendsField;
178
+ export type ExtendsField = InternalExtendsField | UserExtendsField;
174
179
  export interface ApplicationPasswordTabConfig {
175
180
  enabledLoginMethods?: PasswordLoginMethods[];
176
181
  validRegisterMethods?: string[];
@@ -188,9 +193,9 @@ export interface Agreement {
188
193
  lang: Lang;
189
194
  availableAt?: number;
190
195
  }
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';
196
+ export type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
197
+ export type VerifyLoginMethods = 'email-code' | 'phone-code';
198
+ export type ComplateFiledsPlace = 'register' | 'login';
194
199
  export interface TabFieldsI18nItem {
195
200
  key: string;
196
201
  label: string;
@@ -362,6 +367,10 @@ export interface ApplicationConfig {
362
367
  appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
363
368
  /** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
364
369
  userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
370
+ /**
371
+ * 是否为官方应用
372
+ */
373
+ isOfficial?: boolean;
365
374
  /** 加入租户校验企业邮箱 */
366
375
  enableVerifyDomainInJoinTenant: boolean;
367
376
  passkeyEnabled: boolean;
@@ -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;
@@ -19,90 +19,47 @@ export declare const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, co
19
19
  export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string, config?: GuardLocalConfig, httpClient?: GuardHttp, setError?: any) => {
20
20
  finallyConfig: {
21
21
  host: string;
22
- isSSO?: boolean | undefined;
23
- defaultScenes?: import("../..").GuardModuleType | undefined;
22
+ isInvited?: boolean;
23
+ isSSO?: boolean;
24
+ defaultScenes?: import("../..").GuardModuleType;
24
25
  defaultInitData?: any;
25
- showLoading?: boolean | undefined;
26
+ showLoading?: boolean;
26
27
  loadingComponent?: React.ReactNode;
27
- openEventsMapping?: boolean | undefined;
28
- disableRegister?: boolean | undefined;
29
- registerMethods?: string[] | undefined;
30
- defaultRegisterMethod?: string | undefined;
31
- publicKey?: string | undefined;
32
- agreementEnabled?: boolean | undefined;
33
- agreements?: import("../../Type").Agreement[] | undefined;
28
+ openEventsMapping?: boolean;
29
+ disableRegister?: boolean;
30
+ registerMethods?: string[];
31
+ defaultRegisterMethod?: string;
32
+ publicKey?: string;
33
+ agreementEnabled?: boolean;
34
+ agreements?: import("../../Type").Agreement[];
34
35
  registerContext?: any;
35
- title?: string | undefined;
36
- logo?: string | undefined;
37
- lang?: string | undefined;
38
- langRange?: import("../../Type").Lang[] | undefined;
39
- isHost?: boolean | undefined;
36
+ title?: string;
37
+ logo?: string;
38
+ lang?: string;
39
+ langRange?: import("../../Type").Lang[];
40
+ isHost?: boolean;
40
41
  mode: import("../../Type").GuardMode;
41
42
  clickCloseable: boolean;
42
43
  escCloseable: boolean;
43
- userpool?: string | undefined;
44
- contentCss?: string | undefined;
45
- target?: string | HTMLElement | undefined;
46
- style?: React.CSSProperties | undefined;
47
- __internalRequest__?: boolean | undefined;
48
- __singleComponent__?: boolean | undefined;
49
- __unAuthFlow__?: boolean | undefined;
50
- autoRegister?: boolean | undefined;
51
- disableResetPwd?: boolean | undefined;
52
- defaultLoginMethod?: LoginMethods | undefined;
53
- loginMethods?: LoginMethods[] | undefined;
54
- passwordLoginMethods?: string[] | undefined;
55
- socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
56
- socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
57
- enterpriseConnections?: string[] | undefined;
58
- qrCodeScanOptions?: {
59
- extIdpConnId?: string | undefined;
60
- autoExchangeUserInfo?: boolean | undefined;
61
- size?: {
62
- height: number;
63
- width: number;
64
- } | undefined;
65
- containerSize?: {
66
- height: number;
67
- width: number;
68
- } | undefined;
69
- interval?: number | undefined;
70
- onStart?: ((timer: any) => any) | undefined;
71
- onResult?: ((data: import("authing-js-sdk/build/main/lib/authentication/types").QRCodeStatus) => any) | undefined;
72
- onScanned?: ((userInfo: import("authing-js-sdk/build/main/lib/authentication/types").QRCodeUserInfo) => any) | undefined;
73
- onSuccess?: ((userInfo: import("authing-js-sdk/build/main/lib/authentication/types").QRCodeUserInfo, ticket: string) => any) | undefined;
74
- onCancel?: (() => any) | undefined;
75
- onError?: ((message: string) => any) | undefined;
76
- onExpired?: (() => any) | undefined;
77
- onCodeShow?: ((random: string, url: string) => any) | undefined;
78
- onCodeLoaded?: ((random: string, url: string) => any) | undefined;
79
- onCodeLoadFailed?: ((message: string) => any) | undefined;
80
- onCodeDestroyed?: ((random: string) => any) | undefined;
81
- onRetry?: (() => any) | undefined;
82
- onMfa?: ((code: number, message: string, data: Record<string, any>) => {}) | undefined;
83
- tips?: {
84
- title?: string | undefined;
85
- scanned?: string | undefined;
86
- succeed?: string | undefined;
87
- canceled?: string | undefined;
88
- expired?: string | undefined;
89
- retry?: string | undefined;
90
- failed?: string | undefined;
91
- middleTitle?: string | undefined;
92
- referText?: string | undefined;
93
- } | undefined;
94
- onAuthFlow?: ((flow: Record<string, any>) => {}) | undefined;
95
- customData?: {
96
- [x: string]: any;
97
- } | undefined;
98
- context?: {
99
- [x: string]: any;
100
- } | undefined;
101
- withCustomData?: boolean | undefined;
102
- } | undefined;
103
- _closeLoopCheckQrcode?: boolean | undefined;
104
- loginHint?: string | undefined;
105
- goBack?: (() => void) | null | undefined;
44
+ userpool?: string;
45
+ contentCss?: string;
46
+ target?: HTMLElement | string;
47
+ style?: React.CSSProperties;
48
+ __internalRequest__?: boolean;
49
+ __singleComponent__?: boolean;
50
+ __unAuthFlow__?: boolean;
51
+ autoRegister?: boolean;
52
+ disableResetPwd?: boolean;
53
+ defaultLoginMethod?: LoginMethods;
54
+ loginMethods?: LoginMethods[];
55
+ passwordLoginMethods?: string[];
56
+ socialConnections?: import("../../Type").SocialConnectionProvider[];
57
+ socialConnectionsBtnShape?: "default" | "button" | "icon";
58
+ enterpriseConnections?: string[];
59
+ qrCodeScanOptions?: Parameters<import("authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient").QrCodeAuthenticationClient["startScanning"]>[1];
60
+ _closeLoopCheckQrcode?: boolean;
61
+ loginHint?: string;
62
+ goBack?: null | (() => void);
106
63
  };
107
64
  guardPageConfig: GuardPageConfig;
108
65
  } | {
@@ -51,6 +51,8 @@ export interface IGuardContext {
51
51
  tenantInstance?: MultipleTenant;
52
52
  /** 特殊浏览器,身份源无法弹窗,非托管模式不显示身份源图标 */
53
53
  isSpecialBrowser: boolean;
54
+ /** 判断是否是国外的用户池 */
55
+ isForeignUserpool: boolean;
54
56
  }
55
57
  export declare const createGuardXContext: () => {
56
58
  Provider: React.FC<{
@@ -90,7 +92,50 @@ export declare const useGuardModule: () => {
90
92
  backModule: (() => void) | undefined;
91
93
  currentModule: ModuleState;
92
94
  };
93
- export declare const useGuardFinallyConfig: () => GuardLocalConfig;
95
+ export declare const useGuardFinallyConfig: () => {
96
+ title: string;
97
+ isInvited?: boolean;
98
+ isSSO?: boolean;
99
+ defaultScenes?: GuardModuleType;
100
+ defaultInitData?: any;
101
+ showLoading?: boolean;
102
+ loadingComponent?: ReactNode;
103
+ openEventsMapping?: boolean;
104
+ disableRegister?: boolean;
105
+ registerMethods?: string[];
106
+ defaultRegisterMethod?: string;
107
+ publicKey?: string;
108
+ agreementEnabled?: boolean;
109
+ agreements?: import("../Type").Agreement[];
110
+ registerContext?: any;
111
+ logo?: string;
112
+ lang?: string;
113
+ langRange?: Lang[];
114
+ host: string;
115
+ isHost?: boolean;
116
+ mode: import("../Type").GuardMode;
117
+ clickCloseable: boolean;
118
+ escCloseable: boolean;
119
+ userpool?: string;
120
+ contentCss?: string;
121
+ target?: HTMLElement | string;
122
+ style?: React.CSSProperties;
123
+ __internalRequest__?: boolean;
124
+ __singleComponent__?: boolean;
125
+ __unAuthFlow__?: boolean;
126
+ autoRegister?: boolean;
127
+ disableResetPwd?: boolean;
128
+ defaultLoginMethod?: import("../Type").LoginMethods;
129
+ loginMethods?: import("../Type").LoginMethods[];
130
+ passwordLoginMethods?: string[];
131
+ socialConnections?: import("../Type").SocialConnectionProvider[];
132
+ socialConnectionsBtnShape?: "default" | "button" | "icon";
133
+ enterpriseConnections?: string[];
134
+ qrCodeScanOptions?: Parameters<import("authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient").QrCodeAuthenticationClient["startScanning"]>[1];
135
+ _closeLoopCheckQrcode?: boolean;
136
+ loginHint?: string;
137
+ goBack?: null | (() => void);
138
+ };
94
139
  export declare const useGuardContextLoaded: () => boolean;
95
140
  export declare const useGuardIsAuthFlow: () => boolean;
96
141
  export declare const useGuardPageConfig: () => Partial<GuardPageConfig>;
@@ -106,53 +151,42 @@ export declare const useGuardAccountSelectInstance: () => {
106
151
  * when: 多账号页面跳转进入登录页面
107
152
  * 携带的回填数据信息
108
153
  */
109
- multipleAccountData?: BackFillMultipleState | undefined;
154
+ multipleAccountData?: BackFillMultipleState;
155
+ /**
156
+ * 多账号 store 实例
157
+ */
158
+ instance?: StoreInstance;
159
+ /**
160
+ * 切换多账号 isMultipleAccount 状态
161
+ */
162
+ referMultipleState?: (type: "login" | "multiple") => void;
163
+ /**
164
+ * 清空回填数据
165
+ */
166
+ clearBackFillData?: () => void;
167
+ };
168
+ export declare const useGuardMultipleInstance: () => {
169
+ /**
170
+ * 多账号相关
171
+ */
172
+ isMultipleAccount: boolean;
173
+ /**
174
+ * when: 多账号页面跳转进入登录页面
175
+ * 携带的回填数据信息
176
+ */
177
+ multipleAccountData?: BackFillMultipleState;
110
178
  /**
111
179
  * 多账号 store 实例
112
180
  */
113
- instance?: {
114
- initStore: (appId: string, options: {
115
- serverSideLoginMethods: import("../Guard/core/hooks/useMultipleAccounts").LoginWay[];
116
- isInternationSms: boolean;
117
- }) => void;
118
- setLoginWay: (tab: "input" | "qrcode", way: import("../Guard/core/hooks/useMultipleAccounts").LoginWay, id?: string | undefined, internation?: {
119
- phoneCountryCode: string;
120
- areaCode: string;
121
- } | undefined) => void;
122
- setUserInfo: (user: Omit<import("../Guard/core/hooks/useMultipleAccounts").User & {
123
- id: string;
124
- loginAccount?: string | undefined;
125
- usertype?: string | undefined;
126
- }, "tab" | "way" | "phoneCountryCode">) => void;
127
- setLoginWayByHttpData: (account: string, data: {
128
- username?: string | undefined;
129
- phone?: string | undefined;
130
- email?: string | undefined;
131
- }) => void;
132
- setLoginWayByLDAPData: (account: string, data: {
133
- name?: string | undefined;
134
- phone?: string | undefined;
135
- email?: string | undefined;
136
- }) => void;
137
- getMemoUser: (excludeWays?: import("../Guard/core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
138
- getMemoSingleUser: (id: string) => {
139
- way: import("../Guard/core/hooks/useMultipleAccounts").LoginWay;
140
- account: string;
141
- } | undefined;
142
- delUserById: (id: string) => string;
143
- getMemberState: () => boolean;
144
- getFirstBackFillData: () => BackFillMultipleState | undefined;
145
- getOriginAccount: () => string;
146
- getOriginWay: () => string;
147
- } | undefined;
181
+ instance?: StoreInstance;
148
182
  /**
149
183
  * 切换多账号 isMultipleAccount 状态
150
184
  */
151
- referMultipleState?: ((type: 'login' | 'multiple') => void) | undefined;
185
+ referMultipleState?: (type: "login" | "multiple") => void;
152
186
  /**
153
187
  * 清空回填数据
154
188
  */
155
- clearBackFillData?: (() => void) | undefined;
189
+ clearBackFillData?: () => void;
156
190
  };
157
191
  export declare const useGuardPhoneRegex: () => RegExp | null;
158
192
  /**
@@ -163,5 +197,7 @@ export declare const useGuardDefaultLanguage: () => Lang;
163
197
  export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
164
198
  /** 当前人机验证策略 */
165
199
  export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
200
+ /** 当前用户池是否是国外用户池 */
201
+ export declare const useIsForeignUserpool: () => boolean;
166
202
  /** 当前应用是否开启人机验证策略 */
167
- export declare const useCaptchaCheck: (sence: 'login' | 'register') => boolean;
203
+ export declare const useCaptchaCheck: (sence: "login" | "register") => boolean;
@@ -1,14 +1,14 @@
1
1
  import { CodeAction } from './responseManagement/interface';
2
2
  import { AxiosRequestConfig } from 'axios';
3
3
  export declare const requestClient: {
4
- (input: string | URL | Request, init?: RequestInit | undefined): Promise<any>;
4
+ (input: URL | RequestInfo, init?: RequestInit | undefined): Promise<any>;
5
5
  get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig): Promise<AuthingResponse<T>>;
6
- post<T_1>(path: string, data: any, config?: {
6
+ post<T>(path: string, data: any, config?: {
7
7
  headers: any;
8
- } | undefined): Promise<AuthingResponse<T_1>>;
9
- postForm<T_2>(path: string, formData: any, config?: {
8
+ }): Promise<AuthingResponse<T>>;
9
+ postForm<T>(path: string, formData: any, config?: {
10
10
  headers: any;
11
- }): Promise<AuthingResponse<T_2>>;
11
+ }): Promise<AuthingResponse<T>>;
12
12
  baseUrl: string;
13
13
  setBaseUrl(base: string): void;
14
14
  langHeader: string;
@@ -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;
@@ -28,6 +28,6 @@ export interface AuthingResponse<T = any> {
28
28
  flowHandle?: string;
29
29
  }
30
30
  export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
31
- onGuardHandling?: () => CodeAction;
31
+ onGuardHandling?: (initData?: any) => CodeAction;
32
32
  isFlowEnd?: boolean;
33
33
  }
@@ -14,7 +14,7 @@ export declare const validate: (type: keyof typeof VALIDATE_PATTERN, val: string
14
14
  export declare const getRequiredRules: (msg: string) => Rule[];
15
15
  export declare const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string) => Rule[];
16
16
  export declare function getDeviceName(): string | null | undefined;
17
- export declare type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
17
+ export type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
18
18
  export declare const insertStyles: (styles: string | any, recordKey?: STYLE_RECORD_KEY) => void;
19
19
  export declare const removeStyles: (recordKey: STYLE_RECORD_KEY) => void;
20
20
  export declare const getClassnames: (classnames: (string | boolean | undefined)[]) => string;
@@ -57,8 +57,10 @@ export declare const getPasswordValidateRules: (strength?: PasswordStrength, cus
57
57
  export declare const sleep: (delay: number) => Promise<unknown>;
58
58
  export declare const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean) => boolean;
59
59
  export declare const transformMethod: (method: RegisterMethods | string) => string;
60
+ export declare const transformSortMethod: (method: RegisterSortMethods | string) => string;
60
61
  export declare const mailDesensitization: (mail: string) => string;
61
62
  export declare const phoneDesensitization: (phone: string) => string;
63
+ export declare const getHundreds: (num: number) => number;
62
64
  export declare const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
63
65
  export declare const getDocumentNode: (node: Node & ParentNode) => Document;
64
66
  export declare const getLoginTypePipe: (publicConfig: ApplicationConfig, registerMethod: RegisterMethods) => {
@@ -76,7 +78,7 @@ export declare const getSortLabels: (methods: string[], i18nConfig: Map<string,
76
78
  export declare const getSortTabs: (tabs: string[], tab?: string) => string[];
77
79
  export declare const isDisabled: (values: Record<string, any>, requireNames?: string[]) => boolean;
78
80
  export declare const isWeComOrigin: (event: MessageEvent) => boolean;
79
- export declare const isDingTalkOrigin: (origin: string) => boolean;
81
+ export declare const isDingTalkOrigin: (origin: string) => origin is "https://login.dingtalk.com";
80
82
  export * from './popupCenter';
81
83
  export * from './clipboard';
82
84
  export * from './locales';