@authing/react-ui-components 3.1.25-rc.1 → 3.1.26-rc.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.
package/lib/index.d.ts CHANGED
@@ -1100,6 +1100,33 @@ declare module '@authing/react-ui-components/components/Back/index' {
1100
1100
  }
1101
1101
  export const BackCustom: React.FC<BackCustomProps>;
1102
1102
 
1103
+ }
1104
+ declare module '@authing/react-ui-components/components/BindTotp/api/constant' {
1105
+ export const mfaAuthenticatorUrl: () => string;
1106
+ export const mfaTotpAssociateUrl: () => string;
1107
+
1108
+ }
1109
+ declare module '@authing/react-ui-components/components/BindTotp/api/index' {
1110
+ import { AxiosRequestConfig } from 'axios';
1111
+ export { authFlowByAxios } from 'service/api';
1112
+ /**
1113
+ * 验证是否已登陆
1114
+ * @param data
1115
+ * @param config
1116
+ */
1117
+ export const mfaTotpAuthenticatorByAxios: (params: {
1118
+ source: string;
1119
+ }, config: AxiosRequestConfig) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1120
+ /**
1121
+ * 已登陆 totp 拉取二维码、Secret 信息
1122
+ * @param data
1123
+ * @param config
1124
+ * @returns
1125
+ */
1126
+ export const mfaTotpAssociateByAxios: (data: {
1127
+ source: string;
1128
+ }, config: AxiosRequestConfig) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1129
+
1103
1130
  }
1104
1131
  declare module '@authing/react-ui-components/components/BindTotp/businessRequest' {
1105
1132
  export enum BindTotpBusinessAction {
@@ -1162,30 +1189,42 @@ declare module '@authing/react-ui-components/components/ChangeLanguage/index' {
1162
1189
  /// <reference types="react" />
1163
1190
  export const ChangeLanguage: (props: any) => JSX.Element | null;
1164
1191
 
1192
+ }
1193
+ declare module '@authing/react-ui-components/components/ChangePassword/api/constant' {
1194
+ export const registerEmailCodeUrl: () => string;
1195
+
1196
+ }
1197
+ declare module '@authing/react-ui-components/components/ChangePassword/api/index' {
1198
+ import { AxiosRequestConfig } from 'axios';
1199
+ export { authFlowByAxios } from 'service/api';
1200
+ /**
1201
+ * 邮箱注册时,补全密码接口
1202
+ * @param data any 后期补充 interface,这数据我不知道格式
1203
+ * @param config
1204
+ */
1205
+ export const registerEmailCodeByAxios: (data: any, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1206
+
1165
1207
  }
1166
1208
  declare module '@authing/react-ui-components/components/ChangePassword/businessRequest' {
1209
+ import { AxiosRequestConfig } from 'axios';
1167
1210
  export enum ChangePasswordBusinessAction {
1168
1211
  ResetPassword = "reset-password-first-time",
1169
- FirstLoginReset = "reset-password-forced",
1170
- ResetPasswordStrengthDetection = "reset-password-strength-detection"
1212
+ FirstLoginReset = "reset-password-forced"
1171
1213
  }
1172
1214
  export const authFlow: (action: ChangePasswordBusinessAction, content: {
1173
1215
  password: string;
1174
1216
  oldPassword?: string;
1175
- }) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1176
-
1177
- }
1178
- declare module '@authing/react-ui-components/components/ChangePassword/core/PasswordNotSafeReset' {
1179
- import React from 'react';
1180
- interface PasswordNotSafeResetProps {
1181
- onReset: any;
1182
- }
1183
- export const PasswordNotSafeReset: React.FC<PasswordNotSafeResetProps>;
1184
- export {};
1217
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1185
1218
 
1186
1219
  }
1187
1220
  declare module '@authing/react-ui-components/components/ChangePassword/core/completePassword' {
1188
1221
  import React from 'react';
1222
+ /**
1223
+ * 注册补全密码
1224
+ * 进入流程:
1225
+ * 1. 控制台登陆方式 短信验证码 && 手机号密码
1226
+ * 2. 注册方式 短信验证码
1227
+ */
1189
1228
  export const CompletePassword: React.FC;
1190
1229
 
1191
1230
  }
@@ -1214,21 +1253,41 @@ declare module '@authing/react-ui-components/components/ChangePassword/index' {
1214
1253
  title: string;
1215
1254
  explain: string;
1216
1255
  }>;
1256
+ /**
1257
+ * 首次登陆重制密码
1258
+ * @returns
1259
+ */
1217
1260
  export const GuardFirstLoginPasswordResetView: React.FC;
1218
- export const GuardPasswordNotSafeResetView: React.FC;
1261
+ /**
1262
+ * 登陆安全策略 密码轮换
1263
+ * @returns
1264
+ */
1219
1265
  export const GuardForcedPasswordResetView: React.FC;
1266
+ /**
1267
+ * 提示修改密码
1268
+ * @returns
1269
+ */
1220
1270
  export const GuardNoticePasswordResetView: React.FC;
1271
+ /**
1272
+ * 注册密码补全
1273
+ * @returns
1274
+ */
1221
1275
  export const GuardRegisterCompletePasswordView: React.FC;
1222
1276
 
1277
+ }
1278
+ declare module '@authing/react-ui-components/components/CompleteInfo/api/index' {
1279
+ export { authFlowByAxios, getCountryLists, validateAccountByAxios, validateEmailCodeByAxios, validatePhoneCodeByAxios, } from 'service/api';
1280
+
1223
1281
  }
1224
1282
  declare module '@authing/react-ui-components/components/CompleteInfo/businessRequest' {
1225
1283
  import { User } from 'authing-js-sdk';
1284
+ import { AxiosRequestConfig } from 'axios';
1226
1285
  import { CompleteInfoRequest, RegisterCompleteInfoInitData } from '@authing/react-ui-components/components/CompleteInfo/interface';
1227
1286
  export enum CompleteInfoAuthFlowAction {
1228
1287
  Complete = "complete-completion",
1229
1288
  Skip = "skip-completion"
1230
1289
  }
1231
- export const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1290
+ export const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1232
1291
  export const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>> | Promise<User> | undefined;
1233
1292
  export const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any> | undefined>;
1234
1293
 
@@ -1244,6 +1303,11 @@ declare module '@authing/react-ui-components/components/CompleteInfo/core/comple
1244
1303
  key: string;
1245
1304
  options: any;
1246
1305
  }
1306
+ /**
1307
+ * 信息补全
1308
+ * @param props
1309
+ * @returns
1310
+ */
1247
1311
  export const CompleteInfo: React.FC<CompleteInfoProps>;
1248
1312
 
1249
1313
  }
@@ -1252,12 +1316,23 @@ declare module '@authing/react-ui-components/components/CompleteInfo/index' {
1252
1316
  import { CompleteInfoMetaData, CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
1253
1317
  import './styles.less';
1254
1318
  import { CompleteInfoAuthFlowAction } from '@authing/react-ui-components/components/CompleteInfo/businessRequest';
1319
+ /**
1320
+ * 登录时信息补全
1321
+ * @param param0
1322
+ * @returns
1323
+ */
1255
1324
  export const GuardCompleteInfo: React.FC<{
1256
1325
  metaData: CompleteInfoMetaData[];
1257
1326
  skipComplateFileds: boolean;
1258
1327
  businessRequest: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<void>;
1259
1328
  }>;
1329
+ /**
1330
+ * 登录信息补全
1331
+ */
1260
1332
  export const GuardLoginCompleteInfoView: React.FC;
1333
+ /**
1334
+ * 注册信息补全
1335
+ */
1261
1336
  export const GuardRegisterCompleteInfoView: React.FC;
1262
1337
 
1263
1338
  }
@@ -1449,6 +1524,9 @@ declare module '@authing/react-ui-components/components/ForgetPassword/core/rese
1449
1524
  }
1450
1525
  declare module '@authing/react-ui-components/components/ForgetPassword/index' {
1451
1526
  import React from 'react';
1527
+ /**
1528
+ * 忘记密码
1529
+ */
1452
1530
  export const GuardForgetPassword: React.FC;
1453
1531
 
1454
1532
  }
@@ -1526,6 +1604,27 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
1526
1604
  export const getGuardStateMachine: () => GuardStateMachine;
1527
1605
  export const useGuardStateMachine: () => GuardStateMachine;
1528
1606
 
1607
+ }
1608
+ declare module '@authing/react-ui-components/components/Guard/api/constant' {
1609
+ export const publishConfig: (appId: string) => string;
1610
+ export const pageConfig: (appId: string) => string;
1611
+
1612
+ }
1613
+ declare module '@authing/react-ui-components/components/Guard/api/index' {
1614
+ import { AxiosRequestConfig } from 'axios';
1615
+ /**
1616
+ * 获取应用配置信息
1617
+ * @param appId 当前应用配置信息
1618
+ * @returns
1619
+ */
1620
+ export const getPublishConfigByAxios: <T>(appId: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
1621
+ /**
1622
+ * 获取页面配置
1623
+ * @param appId 当前应用配置信息
1624
+ * @returns
1625
+ */
1626
+ export const getPageConfigByAxios: <T>(appId: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
1627
+
1529
1628
  }
1530
1629
  declare module '@authing/react-ui-components/components/Guard/authClient' {
1531
1630
  import { AuthenticationClient } from 'authing-js-sdk';
@@ -1573,6 +1672,93 @@ declare module '@authing/react-ui-components/components/Guard/config' {
1573
1672
  }
1574
1673
  export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
1575
1674
 
1675
+ }
1676
+ declare module '@authing/react-ui-components/components/Guard/core/componentsMapping' {
1677
+ import React from 'react';
1678
+ import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
1679
+ /**
1680
+ * 组件映射表
1681
+ * TODO: 斟酌下是否和上层 module.ts 放在一起的单个文件夹中 感觉可放可不放
1682
+ */
1683
+ const ComponentsMapping: Record<GuardModuleType, (key: string) => React.ReactNode>;
1684
+ export default ComponentsMapping;
1685
+
1686
+ }
1687
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useBusinessRequest' {
1688
+ import { AuthenticationClient } from 'authing-js-sdk';
1689
+ import { GuardLocalConfig } from 'components/Guard/config';
1690
+ import { GuardEvents } from 'components/Guard/event';
1691
+ export default function useBusinessRequestByAxios(appId?: string, events?: GuardEvents, tenantId?: string, sdkClient?: AuthenticationClient, defaultConfig?: GuardLocalConfig): {
1692
+ axiosClient: boolean | undefined;
1693
+ };
1694
+
1695
+ }
1696
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useCss' {
1697
+ /**
1698
+ * 自定义 CSS 相关,finallyConfig 类型待补充
1699
+ * @param finallyConfig
1700
+ */
1701
+ export default function useCss(finallyConfig: any): void;
1702
+
1703
+ }
1704
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useEvents' {
1705
+ /// <reference types="react" />
1706
+ import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
1707
+ import { GuardProps } from '@authing/react-ui-components/components/Guard/Guard';
1708
+ /**
1709
+ * 初始化事件
1710
+ * @param guardProps
1711
+ * @param openEventsMapping
1712
+ * @returns
1713
+ */
1714
+ export default function useEvents(guardProps: GuardProps, openEventsMapping?: boolean): {
1715
+ events: GuardEvents | undefined;
1716
+ setEvents: import("react").Dispatch<import("react").SetStateAction<GuardEvents | undefined>>;
1717
+ initEvents: () => void;
1718
+ };
1719
+
1720
+ }
1721
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useFDA' {
1722
+ /// <reference types="react" />
1723
+ import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
1724
+ import { GuardStateMachine, ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
1725
+ import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
1726
+ import { ChangeModuleCore } from '@authing/react-ui-components/components/Guard/core/hooks/useModule';
1727
+ /**
1728
+ * 初始化 FDA ,后续 Guard 渲染全部按照 FDA API 执行
1729
+ * @param onChangeModule FDA 内部更新组件核心方法
1730
+ * @param initState 初始化状态
1731
+ * @returns { guardStateMachine,setGuardStateMachine }
1732
+ */
1733
+ export default function useFDA(onChangeModule: ChangeModuleCore, initState: ModuleState, events?: GuardEvents, authFlow?: boolean): {
1734
+ isAuthFlow: boolean;
1735
+ guardStateMachine: GuardStateMachine | undefined;
1736
+ setGuardStateMachine: import("react").Dispatch<import("react").SetStateAction<GuardStateMachine | undefined>>;
1737
+ moduleEvents: {
1738
+ changeModule: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
1739
+ backModule: () => void;
1740
+ } | undefined;
1741
+ };
1742
+
1743
+ }
1744
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useModule' {
1745
+ import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
1746
+ import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
1747
+ import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
1748
+ export interface ChangeModuleCore {
1749
+ (type: GuardModuleType, initData?: any): Promise<void>;
1750
+ }
1751
+ /**
1752
+ * Guard 组件渲染状态
1753
+ * @param initializeState 初始化数据
1754
+ * @param events Guard 事件对象
1755
+ * @returns moduleState 组件当前渲染状态,onChangeModule 切换状态方法
1756
+ */
1757
+ export default function useModule(initializeState: ModuleState, events?: GuardEvents): {
1758
+ moduleState: ModuleState;
1759
+ onChangeModule: ChangeModuleCore;
1760
+ };
1761
+
1576
1762
  }
1577
1763
  declare module '@authing/react-ui-components/components/Guard/core/index' {
1578
1764
  /// <reference types="react" />
@@ -1585,7 +1771,7 @@ declare module '@authing/react-ui-components/components/Guard/core/index' {
1585
1771
  export const GuardCore: (props: GuardCoreProps) => JSX.Element;
1586
1772
 
1587
1773
  }
1588
- declare module '@authing/react-ui-components/components/Guard/core/renderContext' {
1774
+ declare module '@authing/react-ui-components/components/Guard/core/renderContext-1' {
1589
1775
  import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
1590
1776
  import React from 'react';
1591
1777
  import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
@@ -1697,7 +1883,6 @@ declare module '@authing/react-ui-components/components/Guard/module' {
1697
1883
  FORCED_PASSWORD_RESET = "forcedPasswordReset",
1698
1884
  NOTICE_PASSWORD_RESET = "noticePasswordReset",
1699
1885
  FIRST_LOGIN_PASSWORD = "firstLoginPassword",
1700
- UNSAFE_PASSWORD_RESET = "unsafePasswordReset",
1701
1886
  DOWNLOAD_AT = "downloadAT",
1702
1887
  BIND_TOTP = "bindTotp",
1703
1888
  ANY_QUESTIONS = "anyQuestions",
@@ -1775,8 +1960,21 @@ declare module '@authing/react-ui-components/components/IconFont/useGuardIconfon
1775
1960
  declare module '@authing/react-ui-components/components/IdentityBinding/IdentityBinding' {
1776
1961
  import React from 'react';
1777
1962
  import './styles.less';
1963
+ /**
1964
+ * 身份源绑定 第三方登陆时
1965
+ * 需要身份源绑定相关 Authing 账号
1966
+ * @returns
1967
+ */
1778
1968
  export const GuardIdentityBindingView: React.FC;
1779
1969
 
1970
+ }
1971
+ declare module '@authing/react-ui-components/components/IdentityBinding/api/index' {
1972
+ export * from '@authing/react-ui-components/components/IdentityBinding/api/request';
1973
+
1974
+ }
1975
+ declare module '@authing/react-ui-components/components/IdentityBinding/api/request' {
1976
+ export { authFlowByAxios } from 'service/api';
1977
+
1780
1978
  }
1781
1979
  declare module '@authing/react-ui-components/components/IdentityBinding/businessRequest' {
1782
1980
  export enum IdentityBindingBusinessAction {
@@ -1804,13 +2002,10 @@ declare module '@authing/react-ui-components/components/IdentityBinding/business
1804
2002
  BindByPhoneCode = "bind-identity-by-phone-code",
1805
2003
  BindByEmailCode = "bind-identity-by-email-code"
1806
2004
  }
1807
- export const PhoneCode: (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1808
- export const EmailCode: (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1809
- export const Password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1810
2005
  export const useIdentityBindingBusinessRequest: () => {
1811
- "phone-code": (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1812
- "emial-code": (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1813
- password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2006
+ "phone-code": (data: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2007
+ "emial-code": (data: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2008
+ password: (data: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1814
2009
  };
1815
2010
 
1816
2011
  }
@@ -1854,6 +2049,18 @@ declare module '@authing/react-ui-components/components/IdentityBindingAsk/Ident
1854
2049
  import './styles.less';
1855
2050
  export const GuardIdentityBindingAskView: React.FC;
1856
2051
 
2052
+ }
2053
+ declare module '@authing/react-ui-components/components/IdentityBindingAsk/api/index' {
2054
+ import { AxiosRequestConfig } from 'axios';
2055
+ /**
2056
+ * 状态机
2057
+ * @param action
2058
+ * @param config
2059
+ * @returns
2060
+ */
2061
+ const authFlow: (action: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2062
+ export { authFlow };
2063
+
1857
2064
  }
1858
2065
  declare module '@authing/react-ui-components/components/IdentityBindingAsk/index' {
1859
2066
  export * from '@authing/react-ui-components/components/IdentityBindingAsk/IdentityBindingAsk';
@@ -1915,6 +2122,136 @@ declare module '@authing/react-ui-components/components/InputPassword/index' {
1915
2122
  import React from 'react';
1916
2123
  export const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
1917
2124
 
2125
+ }
2126
+ declare module '@authing/react-ui-components/components/Login/api/constant' {
2127
+ export const loginUrlByPassword: () => string;
2128
+ export const loginUrlByPhoneCode: () => string;
2129
+ export const loginUrlByEmailCode: () => string;
2130
+ export const loginUrlByAD: () => string;
2131
+ export const loginUrlByLDAP: () => string;
2132
+ export const preLoginUrlByOIDC: () => string;
2133
+
2134
+ }
2135
+ declare module '@authing/react-ui-components/components/Login/api/index' {
2136
+ export * from '@authing/react-ui-components/components/Login/api/request';
2137
+
2138
+ }
2139
+ declare module '@authing/react-ui-components/components/Login/api/request' {
2140
+ import { AxiosRequestConfig } from 'axios';
2141
+ export interface LoginParams<T = any> {
2142
+ /**
2143
+ * 登陆自定义参数
2144
+ */
2145
+ customData: T;
2146
+ /**
2147
+ * 是否自动注册
2148
+ */
2149
+ autoRegister?: boolean;
2150
+ /**
2151
+ * 是否携带自定义数据
2152
+ */
2153
+ withCustomData?: boolean;
2154
+ }
2155
+ /**
2156
+ * 密码登陆请求参数
2157
+ */
2158
+ export interface LoginParamsWithPassword<T = any> extends LoginParams<T> {
2159
+ /**
2160
+ * 账号
2161
+ */
2162
+ account: string;
2163
+ /**
2164
+ * 密码
2165
+ */
2166
+ password: string;
2167
+ /**
2168
+ * 验证码
2169
+ */
2170
+ captchaCode: string;
2171
+ }
2172
+ /**
2173
+ * 密码登陆
2174
+ */
2175
+ export const loginRequestByAxios: <T>(data: LoginParams, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2176
+ /**
2177
+ * 手机登陆请求参数
2178
+ */
2179
+ export interface LoginParamsWithPhone<T = any> extends LoginParams<T> {
2180
+ /**
2181
+ * 手机号
2182
+ */
2183
+ phone: string;
2184
+ /**
2185
+ * 验证码
2186
+ */
2187
+ code: string;
2188
+ /**
2189
+ * 手机前位数
2190
+ */
2191
+ phoneCountryCode?: number;
2192
+ }
2193
+ /**
2194
+ * 手机验证码登陆
2195
+ * @param data
2196
+ * @returns
2197
+ */
2198
+ export const mobileLoginByAxios: (data: LoginParamsWithPhone, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2199
+ /**
2200
+ * 手机登陆请求参数
2201
+ */
2202
+ export interface LoginParamsWithEmail<T = any> extends LoginParams<T> {
2203
+ /**
2204
+ * 邮箱号
2205
+ */
2206
+ email: string;
2207
+ /**
2208
+ * 验证码
2209
+ */
2210
+ code: string;
2211
+ }
2212
+ /**
2213
+ * 邮箱登陆
2214
+ * @param data
2215
+ * @param config
2216
+ * @returns
2217
+ */
2218
+ export const emailLoginByAxios: (data: LoginParamsWithEmail, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2219
+ /**
2220
+ * AD 登陆
2221
+ * @param data
2222
+ * @returns
2223
+ */
2224
+ export const adLoginByAxios: (data: {
2225
+ username: string;
2226
+ password: string;
2227
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2228
+ /**
2229
+ * LDAP 登陆
2230
+ * @param data
2231
+ * @returns
2232
+ */
2233
+ export const ldapLoginByAxios: (data: {
2234
+ username: string;
2235
+ password: string;
2236
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2237
+ interface PreOIDCParams {
2238
+ state: string;
2239
+ protocol: string;
2240
+ userPoolId: string;
2241
+ appId: string;
2242
+ referer: string;
2243
+ connection: {
2244
+ providerIentifier: any;
2245
+ };
2246
+ }
2247
+ /**
2248
+ * IDO -> OIDC 登陆前校验
2249
+ * @param data
2250
+ * @returns
2251
+ */
2252
+ export const preLoginOIDCByAxios: (data: PreOIDCParams, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2253
+ export {};
2254
+
1918
2255
  }
1919
2256
  declare module '@authing/react-ui-components/components/Login/codemap' {
1920
2257
  import { GuardModuleAction } from '@authing/react-ui-components/components/Guard/module';
@@ -1970,6 +2307,11 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
1970
2307
  export interface FormItemAccountProps extends FormItemProps {
1971
2308
  passwordLoginMethods: PasswordLoginMethods[];
1972
2309
  }
2310
+ /**
2311
+ * 根据对应的配置:邮箱/用户名/Email渲染FormItem
2312
+ * @param props
2313
+ * @returns
2314
+ */
1973
2315
  export const FormItemAccount: React.FC<FormItemAccountProps>;
1974
2316
 
1975
2317
  }
@@ -1980,6 +2322,11 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
1980
2322
  verifyCodeUrl: string;
1981
2323
  changeCode: () => void;
1982
2324
  }
2325
+ /**
2326
+ * 图形验证码
2327
+ * @param props
2328
+ * @returns
2329
+ */
1983
2330
  export const GraphicVerifyCode: React.FC<GraphicVerifyCodeProps>;
1984
2331
 
1985
2332
  }
@@ -1987,6 +2334,10 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
1987
2334
  import { InputProps } from 'antd/lib/input';
1988
2335
  import React from 'react';
1989
2336
  import { PasswordLoginMethods } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2337
+ /**
2338
+ * 账号输入框
2339
+ * 根据邮箱/手机号/密码配置自适应
2340
+ */
1990
2341
  export interface InputAccountProps extends InputProps {
1991
2342
  passwordLoginMethods: PasswordLoginMethods[];
1992
2343
  }
@@ -2010,8 +2361,12 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
2010
2361
  agreements: Agreement[];
2011
2362
  loginWay?: LoginMethods;
2012
2363
  submitButText?: string;
2013
- saveIdentify?: (type: LoginMethods, identity: string) => void;
2014
2364
  }
2365
+ /**
2366
+ * 密码登陆
2367
+ * @param props
2368
+ * @returns
2369
+ */
2015
2370
  export const LoginWithPassword: (props: LoginWithPasswordProps) => JSX.Element;
2016
2371
  export {};
2017
2372
 
@@ -2195,6 +2550,23 @@ declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/inde
2195
2550
  export const VerifyCodeInput: FC<VerifyCodeInputProps>;
2196
2551
  export {};
2197
2552
 
2553
+ }
2554
+ declare module '@authing/react-ui-components/components/MFA/api/constant' {
2555
+ export const uploadFaceUrl: () => string;
2556
+
2557
+ }
2558
+ declare module '@authing/react-ui-components/components/MFA/api/index' {
2559
+ export { sendEmailCodeByAxios } from 'service/api';
2560
+ export * from '@authing/react-ui-components/components/MFA/api/request';
2561
+
2562
+ }
2563
+ declare module '@authing/react-ui-components/components/MFA/api/request' {
2564
+ import { AxiosRequestConfig } from 'axios';
2565
+ /**
2566
+ * 上传绑定人脸识别的照片
2567
+ */
2568
+ export const uploadFaceImageByAxios: <T = any>(data: FormData, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2569
+
2198
2570
  }
2199
2571
  declare module '@authing/react-ui-components/components/MFA/businessRequest' {
2200
2572
  export enum MfaBusinessAction {
@@ -2238,8 +2610,19 @@ declare module '@authing/react-ui-components/components/MFA/businessRequest' {
2238
2610
  export const useMfaBusinessRequest: () => {
2239
2611
  "verify-email": (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2240
2612
  "verify-sms": (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2613
+ /**
2614
+ * Totp 状态请求
2615
+ * @param content
2616
+ * @returns
2617
+ */
2241
2618
  "verify-totp": (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2619
+ /**
2620
+ * 人脸验证
2621
+ */
2242
2622
  "verify-face": (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2623
+ /**
2624
+ * 人脸绑定
2625
+ */
2243
2626
  "associate-face": (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2244
2627
  };
2245
2628
  export {};
@@ -2258,6 +2641,11 @@ declare module '@authing/react-ui-components/components/MFA/core/email' {
2258
2641
  onBind: (email: string) => void;
2259
2642
  config: any;
2260
2643
  }
2644
+ /**
2645
+ * 绑定邮箱页面
2646
+ * @param param0
2647
+ * @returns
2648
+ */
2261
2649
  export const BindMFAEmail: React.FC<BindMFAEmailProps>;
2262
2650
  interface VerifyMFAEmailProps {
2263
2651
  email: string;
@@ -2266,7 +2654,17 @@ declare module '@authing/react-ui-components/components/MFA/core/email' {
2266
2654
  sendCodeRef: React.RefObject<HTMLButtonElement>;
2267
2655
  codeLength: number;
2268
2656
  }
2657
+ /**
2658
+ * 验证邮箱
2659
+ * @param param0
2660
+ * @returns
2661
+ */
2269
2662
  export const VerifyMFAEmail: React.FC<VerifyMFAEmailProps>;
2663
+ /**
2664
+ * 邮箱验证方式
2665
+ * @param param0
2666
+ * @returns
2667
+ */
2270
2668
  export const MFAEmail: React.FC<{
2271
2669
  mfaToken: string;
2272
2670
  email?: string;
@@ -2278,6 +2676,11 @@ declare module '@authing/react-ui-components/components/MFA/core/email' {
2278
2676
  }
2279
2677
  declare module '@authing/react-ui-components/components/MFA/core/face' {
2280
2678
  /// <reference types="react" />
2679
+ /**
2680
+ * 面部认证
2681
+ * @param props
2682
+ * @returns
2683
+ */
2281
2684
  export const MFAFace: (props: any) => JSX.Element;
2282
2685
 
2283
2686
  }
@@ -2289,7 +2692,13 @@ declare module '@authing/react-ui-components/components/MFA/core/face_deps' {
2289
2692
  };
2290
2693
  };
2291
2694
  export const FACE_SCORE = 0.65;
2695
+ /**
2696
+ * 人脸检测配置
2697
+ */
2292
2698
  export function getFaceDetectorOptions(): any;
2699
+ /**
2700
+ * 获取 facePlugin tinyFaceDetector 微型人脸探测(三种方式之一)
2701
+ */
2293
2702
  export function getCurrentFaceDetectionNet(): any;
2294
2703
  export function isFaceDetectionModelLoaded(): boolean;
2295
2704
  export function dataURItoBlob(base64Data: any): Blob;
@@ -2306,6 +2715,11 @@ declare module '@authing/react-ui-components/components/MFA/core/sms' {
2306
2715
  setAreaCode: (areaCode: string) => void;
2307
2716
  isInternationSms: boolean;
2308
2717
  }
2718
+ /**
2719
+ * 绑定手机号
2720
+ * @param param0
2721
+ * @returns
2722
+ */
2309
2723
  export const BindMFASms: React.FC<BindMFASmsProps>;
2310
2724
  export interface VerifyMFASmsProps {
2311
2725
  mfaToken: string;
@@ -2319,6 +2733,11 @@ declare module '@authing/react-ui-components/components/MFA/core/sms' {
2319
2733
  userPhone?: string;
2320
2734
  }
2321
2735
  export const VerifyMFASms: React.FC<VerifyMFASmsProps>;
2736
+ /**
2737
+ * 手机 MFA
2738
+ * @param param0
2739
+ * @returns
2740
+ */
2322
2741
  export const MFASms: React.FC<{
2323
2742
  mfaLogin: any;
2324
2743
  config: MFAConfig;
@@ -2333,12 +2752,22 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
2333
2752
  initData: GuardMFAInitData;
2334
2753
  changeModule: any;
2335
2754
  }
2755
+ /**
2756
+ * 绑定 ToTp 页面 跳转 Totp
2757
+ * @param param0
2758
+ * @returns
2759
+ */
2336
2760
  export const BindMFATotp: React.FC<BindMFATotpProps>;
2337
2761
  export interface VerifyMFATotpProps {
2338
2762
  mfaToken: string;
2339
2763
  mfaLogin: any;
2340
2764
  changeModule: any;
2341
2765
  }
2766
+ /**
2767
+ * Totp 验证页面
2768
+ * @param param0
2769
+ * @returns
2770
+ */
2342
2771
  export const VerifyMFATotp: React.FC<VerifyMFATotpProps>;
2343
2772
  export interface MFATotpProps {
2344
2773
  changeModule: any;
@@ -2346,6 +2775,13 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
2346
2775
  initData: GuardMFAInitData;
2347
2776
  mfaLogin: any;
2348
2777
  }
2778
+ /**
2779
+ * MFA Totp 页面
2780
+ * 开启 => 渲染 VerifyMFATotp 绑定
2781
+ * 不开启 => 渲染绑定页面
2782
+ * @param param
2783
+ * @returns
2784
+ */
2349
2785
  export const MFATotp: React.FC<MFATotpProps>;
2350
2786
 
2351
2787
  }
@@ -2357,6 +2793,10 @@ declare module '@authing/react-ui-components/components/MFA/index' {
2357
2793
  mfaBackState: string;
2358
2794
  }
2359
2795
  export const MFABackStateContext: React.Context<MFABackStateContextType | undefined>;
2796
+ /**
2797
+ * MFA 相关页面
2798
+ * @returns
2799
+ */
2360
2800
  export const GuardMFAView: React.FC;
2361
2801
  export {};
2362
2802
 
@@ -2414,6 +2854,29 @@ declare module '@authing/react-ui-components/components/MFA/mfaMethods/index' {
2414
2854
  }
2415
2855
  export const MFAMethods: React.FC<MFAMethodsProps>;
2416
2856
 
2857
+ }
2858
+ declare module '@authing/react-ui-components/components/NeedHelpView/api/constant' {
2859
+ export const feedbackUrl: () => string;
2860
+
2861
+ }
2862
+ declare module '@authing/react-ui-components/components/NeedHelpView/api/index' {
2863
+ export * from '@authing/react-ui-components/components/NeedHelpView/api/request';
2864
+
2865
+ }
2866
+ declare module '@authing/react-ui-components/components/NeedHelpView/api/request' {
2867
+ /**
2868
+ * 问题反馈
2869
+ * @param data
2870
+ * @returns
2871
+ */
2872
+ export const feedbackByAxios: (data: {
2873
+ type: number;
2874
+ description: string;
2875
+ phone: string;
2876
+ images: string[];
2877
+ appId: string;
2878
+ }) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2879
+
2417
2880
  }
2418
2881
  declare module '@authing/react-ui-components/components/NeedHelpView/core/describeQuestions' {
2419
2882
  /// <reference types="react" />
@@ -2430,13 +2893,34 @@ declare module '@authing/react-ui-components/components/NeedHelpView/index' {
2430
2893
  /// <reference types="react" />
2431
2894
  export const GuardNeedHelpView: (props: any) => JSX.Element;
2432
2895
 
2896
+ }
2897
+ declare module '@authing/react-ui-components/components/RecoveryCode/api/constant' {
2898
+ export const recoverCodeUrl: () => string;
2899
+
2900
+ }
2901
+ declare module '@authing/react-ui-components/components/RecoveryCode/api/index' {
2902
+ export { authFlowByAxios } from 'service/api';
2903
+
2904
+ }
2905
+ declare module '@authing/react-ui-components/components/RecoveryCode/api/request' {
2906
+ import { AxiosRequestConfig } from 'axios';
2907
+ /**
2908
+ * 不在流程中(AuthFlow)请求恢复 Totp 请求
2909
+ * @param data
2910
+ * @param config
2911
+ * @returns
2912
+ */
2913
+ export const recoverCodeByAxios: (data: {
2914
+ recoveryCode: string;
2915
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2916
+
2433
2917
  }
2434
2918
  declare module '@authing/react-ui-components/components/RecoveryCode/businessRequest' {
2435
2919
  export enum TotpRecoveryCodeBusinessAction {
2436
2920
  RecoveryTotp = "recovery-totp",
2437
2921
  ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
2438
2922
  }
2439
- export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, content: any): Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2923
+ export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, data: any): Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2440
2924
 
2441
2925
  }
2442
2926
  declare module '@authing/react-ui-components/components/RecoveryCode/core/saveCode' {
@@ -2461,6 +2945,9 @@ declare module '@authing/react-ui-components/components/RecoveryCode/index' {
2461
2945
  import React from 'react';
2462
2946
  import './style.less';
2463
2947
  export const RecoveryCode: React.FC;
2948
+ /**
2949
+ * authFlow 中恢复
2950
+ */
2464
2951
  export const RecoveryCodeAuthFlow: React.FC;
2465
2952
  export const GuardRecoveryCodeView: React.FC;
2466
2953
 
@@ -2507,6 +2994,11 @@ declare module '@authing/react-ui-components/components/Register/core/WithCode'
2507
2994
  registeContext?: any;
2508
2995
  methods: any[];
2509
2996
  }
2997
+ /**
2998
+ * 验证码方式注册
2999
+ * @param param
3000
+ * @returns
3001
+ */
2510
3002
  export const RegisterWithCode: React.FC<RegisterWithCodeProps>;
2511
3003
 
2512
3004
  }
@@ -2521,6 +3013,11 @@ declare module '@authing/react-ui-components/components/Register/core/WithEmail'
2521
3013
  agreements: Agreement[];
2522
3014
  registeContext?: any;
2523
3015
  }
3016
+ /**
3017
+ * 邮箱 + 密码注册 头部显示密码注册
3018
+ * @param param
3019
+ * @returns
3020
+ */
2524
3021
  export const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
2525
3022
 
2526
3023
  }
@@ -2587,20 +3084,26 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2587
3084
  declare module '@authing/react-ui-components/components/Register/utils' {
2588
3085
  export const useIsChangeComplete: (currentMode: 'phone' | 'email') => boolean;
2589
3086
 
3087
+ }
3088
+ declare module '@authing/react-ui-components/components/SelfUnlock/api/index' {
3089
+ export { authFlowByAxios } from 'service/api';
3090
+
2590
3091
  }
2591
3092
  declare module '@authing/react-ui-components/components/SelfUnlock/core/selfUnlock' {
2592
- import React from 'react';
3093
+ /// <reference types="react" />
2593
3094
  export enum InputMethodMap {
2594
3095
  email = "email-code",
2595
3096
  phone = "phone-code"
2596
3097
  }
2597
- export const SelfUnlock: ({ identifyRef, }: {
2598
- identifyRef?: React.MutableRefObject<string> | undefined;
2599
- }) => JSX.Element;
3098
+ export const SelfUnlock: () => JSX.Element;
2600
3099
 
2601
3100
  }
2602
3101
  declare module '@authing/react-ui-components/components/SelfUnlock/index' {
2603
3102
  import React from 'react';
3103
+ /**
3104
+ * 自助解锁
3105
+ * @returns
3106
+ */
2604
3107
  export const GuardUnlockView: React.FC;
2605
3108
 
2606
3109
  }
@@ -2668,6 +3171,10 @@ declare module '@authing/react-ui-components/components/SendCode/SendCodeByPhone
2668
3171
  }
2669
3172
  export const SendCodeByPhone: FC<SendCodeByPhoneProps>;
2670
3173
 
3174
+ }
3175
+ declare module '@authing/react-ui-components/components/SendCode/api/index' {
3176
+ export { sendEmailCodeByAxios } from 'service/api';
3177
+
2671
3178
  }
2672
3179
  declare module '@authing/react-ui-components/components/SendCode/index' {
2673
3180
  import { FC } from 'react';
@@ -2838,6 +3345,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/Validator
2838
3345
  export const PhoneFormItem: React.FC<ValidatorFormItemProps>;
2839
3346
  export const UserNameFormItem: React.FC<ValidatorFormItemProps>;
2840
3347
 
3348
+ }
3349
+ declare module '@authing/react-ui-components/components/ValidatorRules/api/index' {
3350
+ export { validateAccountByAxios } from 'service/api';
3351
+
2841
3352
  }
2842
3353
  declare module '@authing/react-ui-components/components/ValidatorRules/index' {
2843
3354
  import { FormInstance, FormItemProps } from 'antd/lib/form';
@@ -2900,6 +3411,32 @@ declare module '@authing/react-ui-components/components/_utils/GuardErrorCode' {
2900
3411
  ACCOUNT_LOCK = 2005
2901
3412
  }
2902
3413
 
3414
+ }
3415
+ declare module '@authing/react-ui-components/components/_utils/actions/index' {
3416
+ /**
3417
+ * Response Action 是否为渲染信息
3418
+ * @param parseStatusCode
3419
+ * @returns
3420
+ */
3421
+ export const isRenderMessageByStatusCode: (parseStatusCode: number) => boolean;
3422
+ /**
3423
+ * Response Action 是否为内部流程状态处理(交由业务处理)
3424
+ * @param parseStatusCode
3425
+ * @param apiCode
3426
+ */
3427
+ export const isFlowBusinessByStatusCode: (parseStatusCode: number) => boolean;
3428
+ /**
3429
+ * Response Action 是否为流程结束
3430
+ * @param parseStatusCode
3431
+ * @param apiCode
3432
+ */
3433
+ export const isFlowEndByStatusCode: (parseStatusCode: number, apiCode: number) => boolean;
3434
+ /**
3435
+ * Response Action 是否为下个流程
3436
+ * @param parseStatusCode
3437
+ */
3438
+ export const isNextFlowByStatusCode: (parseStatusCode: number, apiCode: number) => boolean;
3439
+
2903
3440
  }
2904
3441
  declare module '@authing/react-ui-components/components/_utils/appendConfig' {
2905
3442
  import { GuardAppendConfig } from '@authing/react-ui-components/components/index';
@@ -2922,6 +3459,14 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2922
3459
  export const getPublicConfig: (appId: string) => ApplicationConfig;
2923
3460
  export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2924
3461
  export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
3462
+ /**
3463
+ *
3464
+ * @param appId
3465
+ * @param config 默认配置
3466
+ * @param httpClient
3467
+ * @param setError
3468
+ * @returns 合并后的 finallyConfig
3469
+ */
2925
3470
  export const useMergePublicConfig: (appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
2926
3471
  host: string;
2927
3472
  isSSO?: boolean | undefined;
@@ -3006,8 +3551,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
3006
3551
  } | undefined;
3007
3552
  export const getPageConfig: (appId: string) => GuardPageConfig;
3008
3553
  export const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
3009
- export const requestGuardPageConfig: (appId: string, httpClient: GuardHttp) => Promise<GuardPageConfig>;
3010
- export const useGuardPageConfig: (appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
3554
+ export const requestGuardPageConfig: (appId: string, baseURL?: string | undefined) => Promise<GuardPageConfig>;
3555
+ export const useGuardPageConfig: (appId?: string | undefined, defaultConfig?: GuardLocalConfig | undefined, serError?: any) => GuardPageConfig | undefined;
3011
3556
 
3012
3557
  }
3013
3558
  declare module '@authing/react-ui-components/components/_utils/context' {
@@ -3188,10 +3733,6 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
3188
3733
  countryCode: string | undefined;
3189
3734
  phoneNumber: string;
3190
3735
  };
3191
- export enum SocialConnectionEvent {
3192
- Message = "message",
3193
- Auth = "auth"
3194
- }
3195
3736
  /**
3196
3737
  *
3197
3738
  * @param config
@@ -3202,6 +3743,298 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
3202
3743
  publicConfig: ApplicationConfig;
3203
3744
  }) => any;
3204
3745
 
3746
+ }
3747
+ declare module '@authing/react-ui-components/components/_utils/http/api/constant' {
3748
+ export const authFlowUrl: () => string;
3749
+ export const VerifyEmailUrl: () => string;
3750
+ export const validateAccountUrl: () => string;
3751
+ export const countryListsUrl: () => string;
3752
+ export const validatePhoneCodeUrl: () => string;
3753
+ export const validateEmailCodeUrl: () => string;
3754
+
3755
+ }
3756
+ declare module '@authing/react-ui-components/components/_utils/http/api/index' {
3757
+ export * from '@authing/react-ui-components/components/_utils/http/api/request';
3758
+
3759
+ }
3760
+ declare module '@authing/react-ui-components/components/_utils/http/api/request' {
3761
+ import { AxiosRequestConfig } from 'axios';
3762
+ import { EmailScene } from 'components/Type';
3763
+ /**
3764
+ * AuthFlow 相关请求
3765
+ * @param data
3766
+ */
3767
+ export const authFlowByAxios: <A = string, T = any>(data: {
3768
+ action: A;
3769
+ data?: any;
3770
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
3771
+ /**
3772
+ * 发送邮箱验证码
3773
+ * @param data
3774
+ */
3775
+ export const sendEmailCodeByAxios: (data: {
3776
+ email: string;
3777
+ scene: EmailScene;
3778
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
3779
+ /**
3780
+ * 账号登陆前置校验
3781
+ */
3782
+ export interface ValidateAccountParams<T = any> {
3783
+ /**
3784
+ * publicConfig.userPoolId
3785
+ */
3786
+ userPoolId?: string;
3787
+ /**
3788
+ * 校验的输入值
3789
+ */
3790
+ key: T;
3791
+ /**
3792
+ * 本次校验类型
3793
+ */
3794
+ type: 'phone' | 'email' | 'username';
3795
+ }
3796
+ /**
3797
+ * 登陆/注册 前置,校验(用户/手机/邮箱)是否存在/用户是否不存在
3798
+ * @param params
3799
+ * @returns {Promise<boolean>} 是否通过
3800
+ */
3801
+ export const validateAccountByAxios: <T = boolean>(params: ValidateAccountParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
3802
+ /**
3803
+ * 拉取国家列表
3804
+ */
3805
+ export const getCountryLists: <T extends string>() => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<Record<T, {
3806
+ zh: {
3807
+ [props: string]: string;
3808
+ };
3809
+ cn: {
3810
+ [props: string]: string;
3811
+ };
3812
+ }>>>;
3813
+ /**
3814
+ * 验证手机号验证码是否正确
3815
+ */
3816
+ export const validatePhoneCodeByAxios: (data: {
3817
+ phone: number | string;
3818
+ phoneCode: number | string;
3819
+ phoneCountryCode?: number | string;
3820
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
3821
+ /**
3822
+ * 验证邮箱验证码是否正确
3823
+ */
3824
+ export const validateEmailCodeByAxios: (data: {
3825
+ email: number | string;
3826
+ emailCode: number | string;
3827
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
3828
+
3829
+ }
3830
+ declare module '@authing/react-ui-components/components/_utils/http/base/index' {
3831
+ import { AuthenticationClient } from 'authing-js-sdk';
3832
+ /**
3833
+ * 修改 baseUrl 配置
3834
+ */
3835
+ export const setBaseUrl: (baseUrl: string) => void;
3836
+ export const setAuthClient: (client: AuthenticationClient) => void;
3837
+ /**
3838
+ * 设置加密公钥
3839
+ */
3840
+ export const setPublishByEncrypt: (publishKey?: string | undefined) => void;
3841
+
3842
+ }
3843
+ declare module '@authing/react-ui-components/components/_utils/http/constant' {
3844
+ import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http/interceptors/response';
3845
+ import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
3846
+ export enum CodeAction {
3847
+ CHANGE_MODULE = "changeModule",
3848
+ RENDER_MESSAGE = "renderMessage",
3849
+ INNER_MODULE = "innerModule",
3850
+ FLOW_END = "flowEnd"
3851
+ }
3852
+ export enum ApiCode {
3853
+ IDENTITY_BINDING_ASK = 1641,
3854
+ IDENTITY_BINDING = 1640,
3855
+ APP_MFA = 1636,
3856
+ MFA = 1635,
3857
+ ABORT_FLOW = 1699,
3858
+ COMPLETE_INFO = 1642,
3859
+ UNLOCK = 1643,
3860
+ FLOW_END = 1600,
3861
+ FIRST_LOGIN_PASSWORD = 1639,
3862
+ FORCED_PASSWORD_RESET = 2058
3863
+ }
3864
+ /**
3865
+ * APi Code 对应的模块映射
3866
+ */
3867
+ export const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
3868
+ /**
3869
+ * 高阶函数 记录每次请求的 responseData
3870
+ * 同时根据返回的 apiCode 对应的 action 处理
3871
+ * @param responseData
3872
+ * @returns
3873
+ */
3874
+ export const getCodeActionMapping: (responseData: AuthingResponse) => {
3875
+ /**
3876
+ * 返回的 apiCode 匹配跳转模块时
3877
+ * @param responseData
3878
+ * @returns
3879
+ */
3880
+ changeModule: () => CodeAction;
3881
+ renderMessage: () => CodeAction;
3882
+ innerModule: () => CodeAction;
3883
+ flowEnd: () => CodeAction;
3884
+ };
3885
+
3886
+ }
3887
+ declare module '@authing/react-ui-components/components/_utils/http/events/index' {
3888
+ import { AxiosRequestConfig, AxiosResponse } from 'axios';
3889
+ import { AuthingGuardResponse } from 'components/_utils/http';
3890
+ /**
3891
+ * 请求前置事件处理
3892
+ * @param config
3893
+ * @returns
3894
+ */
3895
+ export const processBeforeRequestEvent: (config: AxiosRequestConfig) => Promise<boolean>;
3896
+ /**
3897
+ * 响应器拦截 login Events
3898
+ * @param response
3899
+ */
3900
+ export const processEventsByResponse: (response: AxiosResponse<AuthingGuardResponse>) => void;
3901
+
3902
+ }
3903
+ declare module '@authing/react-ui-components/components/_utils/http/header/index' {
3904
+ /**
3905
+ * 设置 version
3906
+ * @param value
3907
+ * @param key
3908
+ */
3909
+ export const setVersionByHeader: (value: string, key?: string) => void;
3910
+ /**
3911
+ * 设置 sdk version
3912
+ * @param value
3913
+ * @param key
3914
+ */
3915
+ export const setSdkVersionByHeader: (value: string, key?: string) => void;
3916
+ /**
3917
+ * 设置 AppId
3918
+ * @param value
3919
+ * @param key
3920
+ */
3921
+ export const setAppIdByRequestHeader: (value: string, key?: string) => void;
3922
+ /**
3923
+ * 设置 x-authing-app-tenant-id 请求头
3924
+ * @param value
3925
+ * @param key
3926
+ */
3927
+ export const setTenantIdByRequestHeader: (value?: string | undefined, key?: string) => void;
3928
+ /**
3929
+ * 根据 publishConfig 中的 userid 设置
3930
+ * @param value
3931
+ * @param key
3932
+ */
3933
+ export const setUserPoolIdByRequestHeader: (value: string, key?: string) => void;
3934
+ export const setLanguageInRequestHeader: () => void;
3935
+ /**
3936
+ * 获取当前所有 headers
3937
+ */
3938
+ export const getHeader: () => import("axios").HeadersDefaults;
3939
+ /**
3940
+ * 修改/设置请求头
3941
+ * @param key
3942
+ * @param value
3943
+ */
3944
+ export const _setRequestHeader: (key: string, value: string) => void;
3945
+
3946
+ }
3947
+ declare module '@authing/react-ui-components/components/_utils/http/index' {
3948
+ import instance from '@authing/react-ui-components/components/_utils/http/instance';
3949
+ import * as httpHeaderMethods from '@authing/react-ui-components/components/_utils/http/header/index';
3950
+ import * as httpEvents from '@authing/react-ui-components/components/_utils/http/events/index';
3951
+ import * as httpBaseConfig from '@authing/react-ui-components/components/_utils/http/base/index';
3952
+ import * as commonRequest from '@authing/react-ui-components/components/_utils/http/api/index';
3953
+ export { instance, httpHeaderMethods, httpEvents, httpBaseConfig, commonRequest, };
3954
+
3955
+ }
3956
+ declare module '@authing/react-ui-components/components/_utils/http/instance' {
3957
+ const instance: import("axios").AxiosInstance;
3958
+ export default instance;
3959
+
3960
+ }
3961
+ declare module '@authing/react-ui-components/components/_utils/http/interceptors/request' {
3962
+ import { AxiosInstance } from 'axios';
3963
+ /**
3964
+ * 初始化请求拦截器
3965
+ * @param instance
3966
+ */
3967
+ export const initRequestInterceptors: (instance: AxiosInstance) => void;
3968
+
3969
+ }
3970
+ declare module '@authing/react-ui-components/components/_utils/http/interceptors/response' {
3971
+ import { AxiosInstance } from 'axios';
3972
+ export interface AuthingResponse<T = any> {
3973
+ /**
3974
+ * 错误码
3975
+ */
3976
+ code?: number;
3977
+ /**
3978
+ * 返回状态
3979
+ * 3XX:状态机流转
3980
+ * 4XX|6XX:错误处理
3981
+ */
3982
+ statusCode?: number;
3983
+ /**
3984
+ * statusCode 3XX 时下个阶段的 code 码
3985
+ */
3986
+ apiCode?: number;
3987
+ /**
3988
+ * 返回的数据
3989
+ */
3990
+ data?: T;
3991
+ /**
3992
+ *
3993
+ */
3994
+ messages?: string;
3995
+ /**
3996
+ *
3997
+ */
3998
+ message?: string;
3999
+ /**
4000
+ * 当前流程 ID
4001
+ * ResponseData 返回则更新当前流程 ID
4002
+ */
4003
+ flowHandle?: string;
4004
+ /**
4005
+ * 响应是否为当前业务内小状态处理
4006
+ * statusCode === 200 下进入该状态
4007
+ */
4008
+ isBusiness?: boolean;
4009
+ }
4010
+ /**
4011
+ * 初始化响应拦截器
4012
+ */
4013
+ export const initResponseInterceptors: (instance: AxiosInstance) => void;
4014
+
4015
+ }
4016
+ declare module '@authing/react-ui-components/components/_utils/http/utils' {
4017
+ import { AxiosRequestConfig, AxiosResponse } from 'axios';
4018
+ import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http/interceptors/response';
4019
+ /**
4020
+ * 根据 Response 中的 apiCode & statusCode 做拦截
4021
+ * @param response
4022
+ * @returns
4023
+ */
4024
+ export const processCodeByResponse: (response: AxiosResponse<AuthingResponse>) => AuthingResponse<any>;
4025
+ /**
4026
+ * 处理请求加密字段
4027
+ * @param config
4028
+ * @returns
4029
+ */
4030
+ export const processEncryptRequestKey: (config: AxiosRequestConfig) => Promise<any>;
4031
+ /**
4032
+ * 处理 flowHandler
4033
+ * @param response
4034
+ * @returns
4035
+ */
4036
+ export const processFlowHandler: (response: AuthingResponse) => AuthingResponse<any>;
4037
+
3205
4038
  }
3206
4039
  declare module '@authing/react-ui-components/components/_utils/http' {
3207
4040
  import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
@@ -3233,8 +4066,25 @@ declare module '@authing/react-ui-components/components/_utils/http' {
3233
4066
  flowHandle?: string;
3234
4067
  }
3235
4068
  export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
4069
+ /**
4070
+ * 根据 Server 返回状态进行的状态流转函数
4071
+ * 默认响应拦截器中自动调用
4072
+ */
3236
4073
  onGuardHandling?: () => CodeAction;
4074
+ /**
4075
+ * Response 返回 actions 是否需要模块内部处理
4076
+ * 根据 status === 200 判断
4077
+ */
4078
+ isBusiness?: boolean;
4079
+ /**
4080
+ * 流程是否结束(兼容老版本字段)
4081
+ */
3237
4082
  isFlowEnd?: boolean;
4083
+ /**
4084
+ * 本次响应 Action 类型
4085
+ * see: packages/react-components/components/_utils/responseManagement/interface.ts
4086
+ */
4087
+ responseActionType?: CodeAction;
3238
4088
  }
3239
4089
 
3240
4090
  }
@@ -3326,7 +4176,6 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3326
4176
  specifyDefaultLoginMethod: LoginMethods;
3327
4177
  lockMethod?: undefined;
3328
4178
  } | undefined;
3329
- export const getPasswordIdentify: (identity: string) => string;
3330
4179
 
3331
4180
  }
3332
4181
  declare module '@authing/react-ui-components/components/_utils/initAppId' {
@@ -3404,6 +4253,12 @@ declare module '@authing/react-ui-components/components/_utils/popupCenter' {
3404
4253
  declare module '@authing/react-ui-components/components/_utils/responseManagement/index' {
3405
4254
  import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
3406
4255
  import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
4256
+ /**
4257
+ * 全局的错误拦截器
4258
+ * @param res
4259
+ * @param callBack
4260
+ * @returns
4261
+ */
3407
4262
  export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => AuthingResponse<any>;
3408
4263
 
3409
4264
  }
@@ -3424,20 +4279,10 @@ declare module '@authing/react-ui-components/components/_utils/responseManagemen
3424
4279
  UNLOCK = 1643,
3425
4280
  FLOW_END = 1600,
3426
4281
  FIRST_LOGIN_PASSWORD = 1639,
3427
- FORCED_PASSWORD_RESET = 2058,
3428
- UNSAFE_PASSWORD_TIP = 2061,
3429
- UNSAFE_PASSWORD_RESET = 2071
4282
+ FORCED_PASSWORD_RESET = 2058
3430
4283
  }
3431
4284
  export const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
3432
4285
 
3433
- }
3434
- declare module '@authing/react-ui-components/components/_utils/useErrorText' {
3435
- import React from 'react';
3436
- export const usePasswordErrorText: () => {
3437
- setPasswordErrorTextShow: React.Dispatch<React.SetStateAction<boolean>>;
3438
- getPassWordUnsafeText: () => JSX.Element;
3439
- };
3440
-
3441
4286
  }
3442
4287
  declare module '@authing/react-ui-components/components/context/base' {
3443
4288
  import React from 'react';
@@ -3531,7 +4376,7 @@ declare module '@authing/react-ui-components/components/version/index' {
3531
4376
 
3532
4377
  }
3533
4378
  declare module '@authing/react-ui-components/components/version/version' {
3534
- const _default: "3.1.25-rc.1";
4379
+ const _default: "3.1.26-rc.0";
3535
4380
  export default _default;
3536
4381
 
3537
4382
  }
@@ -3660,11 +4505,13 @@ declare module '@authing/react-ui-components/config/webpack.config' {
3660
4505
  modules: string[];
3661
4506
  extensions: string[];
3662
4507
  alias: {
4508
+ service: string;
3663
4509
  src?: undefined;
3664
4510
  'react-dom$'?: string;
3665
4511
  'scheduler/tracing'?: string;
3666
4512
  'react-native': string;
3667
4513
  } | {
4514
+ service: string;
3668
4515
  src: string;
3669
4516
  'react-dom$'?: string;
3670
4517
  'scheduler/tracing'?: string;