declare module '@approw/react-ui-components/common/ApprowDropdown/index' { import React, { FC } from 'react'; import './style.less'; /** * 不使用 antd 的 dropdown,因为里面会用 tooltip,体积过大 */ export const ApprowDropdown: FC<{ className?: string; menus: { label: React.ReactNode; key: string | number; onClick?: (key: string | number, evt: React.MouseEvent) => void; }[]; }>; } declare module '@approw/react-ui-components/common/ApprowTabs/index' { import React, { FC } from 'react'; import './style.less'; export interface ApprowTabsProps extends React.HTMLAttributes { activeKey?: string; onTabClick: (key: string) => void; showLen?: number; tabs: { key: string; label: string; component: JSX.Element; }[]; } export const ApprowTabs: FC; } declare module '@approw/react-ui-components/common/CopyAbleText/index' { import React, { FC } from 'react'; import './style.less'; export interface CopyTextProps extends React.HTMLAttributes { } export const CopyAbleText: FC; } declare module '@approw/react-ui-components/common/VerifyCodeInput/index' { import React, { FC } from 'react'; import './style.less'; interface VerifyCodeInputProps extends React.HTMLAttributes { verifyCode: string[]; setVerifyCode: (code: string[]) => void; length?: number; onEnter?: Function; } export const VerifyCodeInput: FC; export {}; } declare module '@approw/react-ui-components/components/ApprowGuard/AppMFALayout/index' { import { FC } from 'react'; import './style.less'; export interface MfaLayoutProps { } export const AppMfaLayout: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/CompleteUserInfoLayout/index' { import { FC } from 'react'; import './style.less'; export const CompleteUserInfoLayout: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/ADLoginForm/index' { import { FormInstance } from 'antd/lib/form'; import React from 'react'; import { ADLoginFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const ADLoginForm: React.ForwardRefExoticComponent>>; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/CompleteUserInfoForm/index' { import { FC } from 'react'; import { CompleteUserInfoFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const CompleteUserInfoForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/EmailMfaVerifyForm/CheckEmailForm' { import { FC } from 'react'; import { MFACheckEmailFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const CheckEmailForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/EmailMfaVerifyForm/VerifyCodeForm' { import { FC } from 'react'; import { EmailMFAVerifyFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const VerifyCodeForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/EmailMfaVerifyForm/index' { import { FC } from 'react'; import { SmsMFAFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const EmailMfaVerifyForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/EmailRegisterForm/index' { import React from 'react'; import { FormInstance } from 'antd/lib/form'; import { EmailRegisterFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const EmailRegisterForm: React.ForwardRefExoticComponent>>; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/LdapLoginForm/index' { import { FormInstance } from 'antd/lib/form'; import React from 'react'; import { PasswordLoginFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const LdapLoginForm: React.ForwardRefExoticComponent>>; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/LoginFormFooter/index' { import { FC } from 'react'; import './style.less'; export interface LoginFormFooterProps { loading: boolean; needRestPwd?: boolean; needRegister?: boolean; } export const LoginFormFooter: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/MfaResetCodeForm/Step1' { import { FC } from 'react'; import { User } from 'approw-js-sdk'; export const MfaResetStep1: FC<{ mfaToken: string; onSuccess: (user: User & { recoveryCode: string; }) => void; goVerify: () => void; onFail?: (error: any) => void; }>; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/MfaResetCodeForm/Step2' { import { FC } from 'react'; export interface MfaResetStep2Props { recoverCode: string; onFinish: () => void; } export const MfaResetStep2: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/MfaResetCodeForm/index' { import { FC } from 'react'; import { MfaResetForm } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const MfaResetCodeForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/MfaVerifyForm/index' { import { FC } from 'react'; import { MfaVerifyForm } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const MFAVerifyForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/PasswordLoginForm/index' { import { FormInstance } from 'antd/lib/form'; import React from 'react'; import { PasswordLoginFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const PasswordLoginForm: React.ForwardRefExoticComponent>>; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/PhoneCodeLoginForm/index' { import React from 'react'; import { FormInstance } from 'antd/lib/form'; import { PhoneCodeLoginFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const PhoneCodeLoginForm: React.ForwardRefExoticComponent>>; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/PhoneRegisterForm/index' { import { FormInstance } from 'antd/lib/form'; import React from 'react'; import { PhoneRegisterFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const PhoneRegisterForm: React.ForwardRefExoticComponent>>; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/QrCodeLoginForm/index' { import { FC } from 'react'; import { QrLoginFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const QrCodeLoginForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/RegisterFormFooter/index' { import { FC } from 'react'; import './style.less'; export interface RegisterFormFooterProps { loading: boolean; } export const RegisterFormFooter: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/ResetPwdForm/Footer' { /// export const ResetPwdFormFooter: () => JSX.Element; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/ResetPwdForm/Step1' { import { FC } from 'react'; import { ResetPasswordStep1Props } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const ResetPasswordStep1: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/ResetPwdForm/Step2' { import { FC } from 'react'; import { ResetPasswordStep2Props } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const ResetPasswordStep2: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/ResetPwdForm/Step3' { import { FC } from 'react'; import { ResetPasswordStep3Props } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const ResetPasswordStep3: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/ResetPwdForm/Step4' { import { FC } from 'react'; export const ResetPasswordStep4: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/ResetPwdForm/index' { import { FC } from 'react'; import { ResetPasswordFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const ResetPasswordForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/SendPhoneCode/SendCodeBtn' { import React, { FC } from 'react'; export interface SendCodeProps { beforeSend: () => Promise; btnRef?: React.RefObject; } export const SendCodeBtn: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/SendPhoneCode/index' { import { FC } from 'react'; import { CommonMessage } from 'approw-js-sdk'; import './style.less'; export interface SendPhoneCodeProps { phone: string; onSend?: () => void; onError?: (error: CommonMessage) => void; } export const SendPhoneCode: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/SmsMfaVerifyForm/CheckPhoneForm' { import { FC } from 'react'; import { MFACheckPhoneFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const CheckPhoneForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/SmsMfaVerifyForm/VerifyCodeForm' { import { FC } from 'react'; import { SmsMFAVerifyFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const VerifyCodeForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/SmsMfaVerifyForm/index' { import { FC } from 'react'; import { SmsMFAFormProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const SmsMfaVerifyForm: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/SocialAndIdpLogin/index' { import { FC } from 'react'; import { SocialAndIdpLoginProps } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const SocialAndIdpLogin: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/UploadImage/index' { import { FC } from 'react'; export const UploadImage: FC<{ value?: string; onChange?: (value: string) => void; }>; } declare module '@approw/react-ui-components/components/ApprowGuard/Forms/index' { export * from '@approw/react-ui-components/components/ApprowGuard/Forms/ADLoginForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/ResetPwdForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/MfaVerifyForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/LdapLoginForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/QrCodeLoginForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/MfaResetCodeForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/EmailRegisterForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/PhoneRegisterForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/PasswordLoginForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/SocialAndIdpLogin/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/PhoneCodeLoginForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/SmsMfaVerifyForm/index'; export * from '@approw/react-ui-components/components/ApprowGuard/Forms/EmailMfaVerifyForm/index'; } declare module '@approw/react-ui-components/components/ApprowGuard/GuardLayout/index' { import React, { FC } from 'react'; import { Lang } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import './style.less'; export const GuardLayout: FC<{ visible?: boolean; className?: string; id?: string; style?: React.CSSProperties; lang?: Lang; }>; } declare module '@approw/react-ui-components/components/ApprowGuard/Header/index' { import React, { FC } from 'react'; import './style.less'; export interface HeaderProps extends React.HTMLAttributes { } export const GuardHeader: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/IconFont/iconfont' { export {}; } declare module '@approw/react-ui-components/components/ApprowGuard/IconFont/index' { import React, { FC } from 'react'; import './iconfont'; import './style.less'; export const IconFont: FC<{ type: string; style?: React.CSSProperties; className?: string; }>; } declare module '@approw/react-ui-components/components/ApprowGuard/IconFont/svg' { export const svgStr: ""; } declare module '@approw/react-ui-components/components/ApprowGuard/LoginLayout/index' { /// import './style.less'; export const LoginLayout: () => JSX.Element; } declare module '@approw/react-ui-components/components/ApprowGuard/MfaLayout/Steps' { export enum Steps { Verify = 0, Reset = 1 } } declare module '@approw/react-ui-components/components/ApprowGuard/MfaLayout/index' { import { FC } from 'react'; import './style.less'; export interface MfaLayoutProps { } export const MfaLayout: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/RegisterLayout/index' { import { FC } from 'react'; export const RegisterLayout: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/ResetPwdLayout/index' { /// export const ResetPwdLayout: () => JSX.Element; } declare module '@approw/react-ui-components/components/ApprowGuard/ToggleLang/index' { import { FC } from 'react'; export const ToggleLang: FC; } declare module '@approw/react-ui-components/components/ApprowGuard/api/appConfig' { import { Protocol } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import { IAzureAdConnectionConfig, ICasConnectionConfig, ISamlConnectionConfig, OIDCConnectionConfig, SocialConnectionItem } from '@approw/react-ui-components/components/ApprowGuard/api/userPoolConfig'; export enum ApplicationMfaType { SMS = "SMS", EMAIL = "EMAIL" } export const ApplicationMfaTypeLabel: () => Record; export interface OidcClientMetadata { grant_types: string[]; client_id: string; redirect_uris: string[]; scope: string; response_types: ResponseType[]; } export interface InternalExtendsField { type: 'internal'; name: string; label: string; inputType: string; } export interface UserExtendsField { type: 'user'; id: string; name: string; label: string; inputType: string; } export type ExtendsField = InternalExtendsField | UserExtendsField; export interface ApplicationConfig { id: string; cdnBase: string; userPoolId: string; rootUserPoolId: string; publicKey: string; css: string; name: string; logo: string; redirectUris: string[]; registerDisabled: boolean; registerTabs: { list: string[]; default: string; title: { [x: string]: string; }; }; loginTabs: { list: string[]; default: string; title: { [x: string]: string; }; }; socialConnections: SocialConnectionItem[]; extendsFieldsEnabled: boolean; extendsFields: ExtendsField[]; identityProviders: { identifier: string; protocol: Protocol; displayName: string; logo: string; config: ISamlConnectionConfig | OIDCConnectionConfig | ICasConnectionConfig | IAzureAdConnectionConfig; }[]; ssoPageComponentDisplay: { autoRegisterThenLoginHintInfo: boolean; forgetPasswordBtn: boolean; idpBtns: boolean; loginBtn: boolean; loginByPhoneCodeTab: boolean; loginByUserPasswordTab: boolean; loginMethodNav: boolean; phoneCodeInput: boolean; registerBtn: boolean; registerByEmailTab: boolean; registerByPhoneTab: boolean; registerMethodNav: boolean; socialLoginBtns: boolean; userPasswordInput: boolean; wxMpScanTab: boolean; }; protocol: Protocol; oidcConfig: OidcClientMetadata; } export const fetchAppConfig: (appId: string) => Promise>; } declare module '@approw/react-ui-components/components/ApprowGuard/api/http' { export const requestClient: { (input: RequestInfo, init?: RequestInit | undefined): Promise; get(path: string, query?: Record, init?: RequestInit | undefined): Promise>; post(path: string, data: any, config?: { headers: any; } | undefined): Promise>; baseUrl: string; setBaseUrl(base: string): void; langHeader: string; setLangHeader(key: string | undefined): void; }; export interface ApprowResponse { code: number; message?: string; data?: T; } } declare module '@approw/react-ui-components/components/ApprowGuard/api/index' { export * from '@approw/react-ui-components/components/ApprowGuard/api/sso'; export * from '@approw/react-ui-components/components/ApprowGuard/api/appConfig'; export * from '@approw/react-ui-components/components/ApprowGuard/api/userPoolConfig'; } declare module '@approw/react-ui-components/components/ApprowGuard/api/sso' { import { User } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export interface SessionData { session: null | { _id: string; cookie: { originalMaxAge: number; expires: Date; secure: boolean; httpOnly: boolean; path: string; sameSite: string; }; appId?: string; type: string; userId: string; }; userInfo?: User; } export const trackSession: () => Promise>; } declare module '@approw/react-ui-components/components/ApprowGuard/api/userPoolConfig' { import { Lang, Protocol } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import { SocialConnectionProvider } from 'approw-js-sdk'; export interface OIDCConnectionConfig { issuerUrl: string; authorizationEdpoint: string; responseType: string; mode: OIDCConnectionMode; clientId: string; clientSecret: string; scopes: string; redirectUri: string; } export interface IOAuthConnectionConfig { authEndPoint: string; tokenEndPoint: string; scope: string; clientId: string; clientSecret: string; authUrlTemplate: string; codeToTokenScript: string; tokenToUserInfoScript: string; tokenToUserInfoScriptFuncId: string; codeToTokenScriptFuncId: string; authUrl?: string; } export interface IAzureAdConnectionConfig { microsoftAzureAdDomain: string; clientId: string; syncUserProfileOnLogin: string; emailVerifiedDefault: boolean; authorizationUrl: string; callbackUrl: string; } export enum OIDCConnectionMode { FRONT_CHANNEL = "FRONT_CHANNEL", BACK_CHANNEL = "BACK_CHANNEL" } export interface ISamlConnectionConfig { signInEndPoint: string; samlRequest?: string; samlIdpCert: string; samlSpCert: string; samlSpKey: string; signOutEndPoint: string; signSamlRequest: boolean; signatureAlgorithm: string; digestAlgorithm: string; protocolBinding: string; } export interface ICasConnectionConfig { casConnectionLoginUrl: string; } export interface SocialConnectionItem { name: string; logo: string; description: string; provider: SocialConnectionProvider; authorizationUrl: string; tooltip: Record; } export interface EnterpriseConnectionItem { id: string; createdAt: Date; updatedAt: Date; userPoolId: string; protocol: Protocol; identifier: string; displayName: string; logo: string; enabled: boolean; config: OIDCConnectionConfig | ISamlConnectionConfig | ICasConnectionConfig | IAzureAdConnectionConfig | IOAuthConnectionConfig; } export interface UserPoolConfig { name: string; logo: string; socialConnections: SocialConnectionItem[]; enterpriseConnections: EnterpriseConnectionItem[]; } } declare module '@approw/react-ui-components/components/ApprowGuard/constants' { import { UserConfig, LocalesConfig } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const OTP_MFA_CODE = 1635; export const APP_MFA_CODE = 1636; export const NEED_CAPTCHA = 2000; export const LOGIN_METHODS_MAP: () => { password: string; "phone-code": string; "app-qrcode": string; "wechat-miniprogram-qrcode": string; ldap: string; ad: string; }; export const REGISTER_METHODS_MAP: () => { email: string; phone: string; }; export const HIDE_SOCIALS: string[]; export enum ApplicationMfaType { SMS = "SMS", EMAIL = "EMAIL" } export const defaultGuardConfig: Partial; export const defaultLocalesConfig: LocalesConfig; export const defaultHeaders: { 'userpool-id': string; 'app-id': string; 'sdk-version': string; 'request-from': string; lang: string; }; } declare module '@approw/react-ui-components/components/ApprowGuard/hooks/index' { import { AuthenticationClient, AuthenticationClientOptions } from 'approw-js-sdk'; export interface AuthClientConfig extends AuthenticationClientOptions { /** * @deprecated 使用 appHost */ appDomain?: string; /** * @deprecated 无需传入 */ isSSO?: boolean; /** * @deprecated 使用 appHost */ host?: string; } export const initAuthClient: (config: AuthClientConfig) => AuthenticationClient; export const useApprow: (config?: AuthClientConfig | undefined) => { authClient: AuthenticationClient | null; }; export const getAuthClient: (config?: AuthClientConfig | undefined) => AuthenticationClient | null; } declare module '@approw/react-ui-components/components/ApprowGuard/hooks/useScreenSize' { export enum ScreenSize { Mobile = "mobile", Desktop = "desktop" } export const SCREEN_SIZE_RANG: { size: ScreenSize; range: [number, number]; }[]; export const getScreenSize: () => ScreenSize; export const useScreenSize: () => ScreenSize[]; } declare module '@approw/react-ui-components/components/ApprowGuard/index' { import { FC } from 'react'; import { UserConfig, GuardEventsHandler } from '@approw/react-ui-components/components/ApprowGuard/types/GuardConfig'; import './style.less'; interface ApprowGuardProps extends GuardEventsHandler { appId: string; config?: UserConfig; visible?: boolean; className?: string; id?: string; } export const ApprowGuard: FC; export {}; } declare module '@approw/react-ui-components/components/ApprowGuard/locales/en/index' { import common from '@approw/react-ui-components/components/ApprowGuard/locales/en/common.json/index'; import login from '@approw/react-ui-components/components/ApprowGuard/locales/en/login.json/index'; import user from '@approw/react-ui-components/components/ApprowGuard/locales/en/user.json/index'; import map from '@approw/react-ui-components/components/ApprowGuard/locales/en/map.json/index'; export { common, login, user, map }; } declare module '@approw/react-ui-components/components/ApprowGuard/locales/index' { import i18n from 'i18next'; import { LocalesConfig, Lang } from '@approw/react-ui-components/components/ApprowGuard/types/index'; export const changeLang: (lang: Lang) => void; const initI18n: (localesConfig: LocalesConfig, lang?: Lang | undefined) => void; export { i18n, initI18n }; } declare module '@approw/react-ui-components/components/ApprowGuard/locales/zh/index' { import common from '@approw/react-ui-components/components/ApprowGuard/locales/zh/common.json/index'; import login from '@approw/react-ui-components/components/ApprowGuard/locales/zh/login.json/index'; import user from '@approw/react-ui-components/components/ApprowGuard/locales/zh/user.json/index'; import map from '@approw/react-ui-components/components/ApprowGuard/locales/zh/map.json/index'; export { common, login, user, map }; } declare module '@approw/react-ui-components/components/ApprowGuard/types/Forms' { /// import { User } from 'approw-js-sdk'; import { LoginMethods } from '@approw/react-ui-components/components/ApprowGuard/types/GuardConfig'; import { ResetPwdMethods } from '@approw/react-ui-components/components/ApprowGuard/types/GuardConfig'; export interface BaseFormProps extends React.HTMLAttributes { onSuccess?: (user: User) => void; onFail?: (error: any) => void; } export interface CompleteUserInfoFormProps extends BaseFormProps { } export interface PasswordLoginFormProps extends BaseFormProps { onValidateFail?: (error: any) => void; } export interface ADLoginFormProps extends BaseFormProps { onValidateFail?: (error: any) => void; } export interface PhoneCodeLoginFormProps extends BaseFormProps { onValidateFail?: (error: any) => void; } export interface LdapLoginFormProps extends BaseFormProps { onValidateFail?: (error: any) => void; } export interface QrLoginFormProps extends BaseFormProps { type: LoginMethods.AppQr | LoginMethods.WxMinQr; } export interface EmailRegisterFormProps extends BaseFormProps { onValidateFail?: (error: any) => void; } export interface PhoneRegisterFormProps extends BaseFormProps { onValidateFail?: (error: any) => void; } export interface ResetPasswordFormProps { onSuccess?: () => void; onFail?: (error: any) => void; } export interface ResetPasswordStep1Props { onSuccess: (resetMethod: ResetPwdMethods, val: string) => void; } export interface ResetPasswordStep2Props { phone: string; onSuccess: () => void; onFail?: (error: any) => void; } export interface ResetPasswordStep3Props { email: string; onSuccess: () => void; onFail?: (error: any) => void; } export interface SocialAndIdpLoginProps extends BaseFormProps { } export interface MfaVerifyForm extends BaseFormProps { goReset: () => void; } export interface SmsMFAVerifyFormProps extends BaseFormProps { phone?: string; mfaToken: string; sendCodeRef: React.RefObject; } export interface SmsMFAFormProps extends BaseFormProps { } export interface MFACheckPhoneFormProps { mfaToken: string; onSuccess: (phone: string) => void; } export interface EmailMFAVerifyFormProps extends BaseFormProps { email?: string; mfaToken: string; sendCodeRef: React.RefObject; } export interface EmailMFAFormProps extends BaseFormProps { } export interface MFACheckEmailFormProps { mfaToken: string; onSuccess: (email: string) => void; } export interface MfaResetForm extends BaseFormProps { goVerify: () => void; } } declare module '@approw/react-ui-components/components/ApprowGuard/types/GuardConfig' { import { AuthenticationClient, CommonMessage, SocialConnectionProvider, User } from 'approw-js-sdk'; import { QrCodeAuthenticationClient } from 'approw-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient'; import { SocialConnectionItem, EnterpriseConnectionItem, ApplicationConfig } from '@approw/react-ui-components/components/ApprowGuard/api/index'; import { Lang } from '@approw/react-ui-components/components/ApprowGuard/types/Locales'; export type { AuthenticationClient, CommonMessage, User } from 'approw-js-sdk'; export enum GuardMode { Modal = "modal", Normal = "normal" } export enum LoginMethods { LDAP = "ldap", AppQr = "app-qrcode", Password = "password", PhoneCode = "phone-code", WxMinQr = "wechat-miniprogram-qrcode", AD = "ad" } export enum RegisterMethods { Email = "email", Phone = "phone" } export enum GuardScenes { Login = "login", Register = "register", MfaVerify = "mfaVerify", AppMfaVerify = "appMfaVerify", RestPassword = "restPassword", CompleteUserInfo = "completeUserInfo" } export enum ResetPwdMethods { Email = "email", Phone = "phone" } export enum SocialConnections { Qq = "qq", Weibo = "weibo", Github = "github", Google = "google", WxPc = "wechat:pc", Dingtalk = "dingtalk", WxWCorpQr = "wechatwork:corp:qrconnect", WxWSPQr = "wechatwork:service-provider:qrconnect", WxWSPAuth = "wechatwork:service-provider:authorization", AlipayWeb = "alipay:web", AppleWeb = "apple:web", Baidu = "baidu", LarkInternalApp = "lark-internal", LarkMarketPlaceApp = "lark-public" } export enum Protocol { AD = "ad", CAS = "cas", LDAP = "ldap", OIDC = "oidc", SAML = "saml", OAUTH = "oauth", AZURE_AD = "azure-ad" } export const GuardEventsCamelToKebabMap: { readonly onLoad: "load"; readonly onLoadError: "load-error"; readonly onLogin: "login"; readonly onLoginError: "login-error"; readonly onRegister: "register"; readonly onRegisterError: "register-error"; readonly onPwdEmailSend: "pwd-email-send"; readonly onPwdEmailSendError: "pwd-email-send-error"; readonly onPwdPhoneSend: "pwd-phone-send"; readonly onPwdPhoneSendError: "pwd-phone-send-error"; readonly onPwdReset: "pwd-reset"; readonly onPwdResetError: "pwd-reset-error"; readonly onClose: "close"; readonly onLoginTabChange: "login-tab-change"; readonly onRegisterTabChange: "register-tab-change"; readonly onRegisterInfoCompleted: "register-info-completed"; readonly onRegisterInfoCompletedError: "register-info-completed-error"; }; export interface GuardEventsHandlerKebab { load: GuardEventsHandler['onLoad']; 'load-error': GuardEventsHandler['onLoadError']; login: GuardEventsHandler['onLogin']; 'login-error': GuardEventsHandler['onLoginError']; register: GuardEventsHandler['onRegister']; 'register-error': GuardEventsHandler['onRegisterError']; 'pwd-email-send': GuardEventsHandler['onPwdEmailSend']; 'pwd-email-send-error': GuardEventsHandler['onPwdEmailSendError']; 'pwd-phone-send': GuardEventsHandler['onPwdPhoneSend']; 'pwd-phone-send-error': GuardEventsHandler['onPwdPhoneSendError']; 'pwd-reset': GuardEventsHandler['onPwdReset']; 'pwd-reset-error': GuardEventsHandler['onPwdResetError']; close: GuardEventsHandler['onClose']; 'login-tab-change': GuardEventsHandler['onLoginTabChange']; 'register-tab-change': GuardEventsHandler['onRegisterTabChange']; 'register-info-completed': GuardEventsHandler['onRegisterInfoCompleted']; 'register-info-completed-error': GuardEventsHandler['onRegisterInfoCompletedError']; } export interface GuardEventsHandler { onLoad?: (authClient: AuthenticationClient) => void; onLoadError?: (error: CommonMessage) => void; onLogin?: (user: User, authClient: AuthenticationClient) => void; onLoginError?: (user: User, authClient: AuthenticationClient) => void; onRegister?: (user: User, authClient: AuthenticationClient) => void; onRegisterError?: (user: User, authClient: AuthenticationClient) => void; onPwdEmailSend?: (authClient: AuthenticationClient) => void; onPwdEmailSendError?: (error: CommonMessage, authClient: AuthenticationClient) => void; onPwdPhoneSend?: (authClient: AuthenticationClient) => void; onPwdPhoneSendError?: (error: CommonMessage, authClient: AuthenticationClient) => void; onPwdReset?: (authClient: AuthenticationClient) => void; onPwdResetError?: (error: CommonMessage, authClient: AuthenticationClient) => void; onClose?: () => void; onLoginTabChange?: (activeTab: LoginMethods) => void; onRegisterTabChange?: (activeTab: RegisterMethods) => void; onRegisterInfoCompleted?: (user: User, udfs: { definition: any; value: any; }[], authClient: AuthenticationClient) => void; onRegisterInfoCompletedError?: (error: CommonMessage, udfs: { definition: any; value: any; }[], authClient: AuthenticationClient) => void; } export interface UserConfig { logo?: string; title?: string; zIndex?: number; isSSO?: boolean; mode?: GuardMode; /** * @deprecated 使用 appHost */ apiHost?: string; /** * @deprecated 使用 appHost */ appDomain?: string; appHost?: string; contentCss?: string; text?: { loginBtn?: { normal?: string; loading?: string; }; registerBtn?: { normal?: string; loading?: string; }; loginTabs?: Partial>; }; escCloseable?: boolean; autoRegister?: boolean; clickCloseable?: boolean; disableResetPwd?: boolean; disableRegister?: boolean; defaultScenes?: GuardScenes; loginMethods?: LoginMethods[]; target?: string | HTMLElement; enterpriseConnections?: string[]; defaultLoginMethod?: LoginMethods; registerMethods?: RegisterMethods[]; socialConnections?: (SocialConnections | SocialConnectionProvider)[]; defaultRegisterMethod?: RegisterMethods; qrCodeScanOptions?: Parameters[1]; /** * 国际化处理 */ localesConfig?: LocalesConfig; lang?: Lang; } export interface GuardConfig extends UserConfig { socialConnectionObjs: SocialConnectionItem[]; enterpriseConnectionObjs: EnterpriseConnectionItem[]; extendsFields: ApplicationConfig['extendsFields']; } export interface LocalesConfig { defaultLang?: Lang; isShowChange?: boolean; onChange?: (lang: Lang) => void; } } declare module '@approw/react-ui-components/components/ApprowGuard/types/GuardState' { import { LoginMethods, RegisterMethods } from '@approw/react-ui-components/components/ApprowGuard/types/GuardConfig'; import { GuardScenes } from '@approw/react-ui-components/components/ApprowGuard/types/GuardConfig'; export interface ActiveTabs { [GuardScenes.Login]: LoginMethods; [GuardScenes.Register]: RegisterMethods; } } declare module '@approw/react-ui-components/components/ApprowGuard/types/Locales' { export type Lang = 'zh-CN' | 'en-US'; export const LANG_MAP: { label: string; value: string; }[]; } declare module '@approw/react-ui-components/components/ApprowGuard/types/index' { export * from '@approw/react-ui-components/components/ApprowGuard/types/Forms'; export * from '@approw/react-ui-components/components/ApprowGuard/types/GuardState'; export * from '@approw/react-ui-components/components/ApprowGuard/types/GuardConfig'; export * from '@approw/react-ui-components/components/ApprowGuard/types/Locales'; } declare module '@approw/react-ui-components/components/index' { import { ApprowGuard } from '@approw/react-ui-components/components/ApprowGuard/index'; export * from '@approw/react-ui-components/components/ApprowGuard/types/index'; export * from '@approw/react-ui-components/components/ApprowGuard/hooks/index'; export type { AuthenticationClientOptions } from 'approw-js-sdk'; export { ApprowGuard }; } declare module '@approw/react-ui-components/context/base' { import React from 'react'; export function createBaseContext(): readonly [React.Context, () => C]; export interface IBaseAction { type: ActionType & string; payload?: any; [key: string]: string; } export interface IBaseContext { state: S; [k: string]: any; } export type BaseContextComponent = React.PropsWithChildren; } declare module '@approw/react-ui-components/context/global/context' { /// import { IBaseContext, BaseContextComponent } from '@approw/react-ui-components/context/base'; import { IState } from '@approw/react-ui-components/context/global/reducer'; export interface IGuardContext extends IBaseContext { dispatch: Function; getValue: (key: keyof IState) => any; setValue: (key: keyof IState, value: any) => void; } export function useGuardContext(): IGuardContext; export function GuardContext({ children, value, }: BaseContextComponent>): JSX.Element; } declare module '@approw/react-ui-components/context/global/reducer' { import { GuardConfig, ActiveTabs, GuardScenes, UserConfig, GuardEventsHandler, LocalesConfig, Lang } from '@approw/react-ui-components/components/ApprowGuard/types/index'; import { AuthenticationClient } from 'approw-js-sdk'; import { IBaseAction } from '@approw/react-ui-components/context/base'; import { ApplicationMfaType } from '@approw/react-ui-components/components/ApprowGuard/api/appConfig'; export type IState = { config: GuardConfig; userConfig: UserConfig; authClient: AuthenticationClient; activeTabs: ActiveTabs; guardScenes: GuardScenes; guardTitle: string; mfaData: { mfaToken: string; phone?: string; email?: string; applicationMfa?: { status: 0 | 1; mfaPolicy: ApplicationMfaType; sort: number; }[]; }; userPoolId: string; appId: string; guardEvents: GuardEventsHandler; localesConfig: LocalesConfig; lang?: Lang; realHost: string; }; export const reducer: (state: IState, { type, ...payloads }: IBaseAction) => any; } declare module '@approw/react-ui-components/index' { export {}; } declare module '@approw/react-ui-components/reportWebVitals' { import { ReportHandler } from 'web-vitals'; const reportWebVitals: (onPerfEntry?: ReportHandler | undefined) => void; export default reportWebVitals; } declare module '@approw/react-ui-components/setupTests' { import '@testing-library/jest-dom'; } declare module '@approw/react-ui-components/utils/clipboard' { export const copyToClipboard: (str: string) => void; } declare module '@approw/react-ui-components/utils/index' { import { Rule } from 'antd/lib/form'; import qs from 'qs'; export * from '@approw/react-ui-components/utils/popupCenter'; export * from '@approw/react-ui-components/utils/clipboard'; export const VALIDATE_PATTERN: { readonly email: RegExp; readonly phone: RegExp; readonly ip: RegExp; readonly host: RegExp; }; export const validate: (type: keyof typeof VALIDATE_PATTERN, val: string) => boolean; export const getRequiredRules: (msg: string) => Rule[]; export function getDeviceName(): string | null; /** * 传对象 {'background-color': 'red'} * 传字符串 "CSS 样式" */ export const insertStyles: (styles: string | any) => void; export const useTitle: (title: string, prefix?: string | undefined) => void; export const getClassnames: (classnames: (string | boolean | undefined)[]) => string; /** * https://www.itranslater.com/qa/details/2115518846294557696 * Simple object check. * @param item * @returns {boolean} */ export function isObject(item: any): any; /** * https://www.itranslater.com/qa/details/2115518846294557696 * Deep merge two objects. * @param target * @param ...sources */ export function deepMerge(target: T, ...sources: any[]): T; export const getUserRegisterParams: () => { key: string; value: string | string[] | qs.ParsedQs | qs.ParsedQs[] | undefined; }[]; export const isWechatBrowser: () => boolean; } declare module '@approw/react-ui-components/utils/popupCenter' { /** * 在屏幕中心弹出新窗口加载 url * @param url * @param param1 */ export const popupCenter: (url: string, { w, h }?: { w: number; h: number; }) => void; } declare module '@approw/react-ui-components' { import main = require('@approw/react-ui-components/components/index'); export = main; }