@authing/react-ui-components 3.1.29 → 3.1.30-beta.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
@@ -521,6 +521,7 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/appConf
521
521
  websocket: string;
522
522
  welcomeMessage: any;
523
523
  skipComplateFileds: boolean;
524
+ selfUnlockStrategy: 'captcha' | 'password-captcha';
524
525
  }
525
526
  export const fetchAppConfig: (appId: string) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingResponse<ApplicationConfig>>;
526
527
 
@@ -1101,6 +1102,33 @@ declare module '@authing/react-ui-components/components/Back/index' {
1101
1102
  }
1102
1103
  export const BackCustom: React.FC<BackCustomProps>;
1103
1104
 
1105
+ }
1106
+ declare module '@authing/react-ui-components/components/BindTotp/api/constant' {
1107
+ export const mfaAuthenticatorUrl: () => string;
1108
+ export const mfaTotpAssociateUrl: () => string;
1109
+
1110
+ }
1111
+ declare module '@authing/react-ui-components/components/BindTotp/api/index' {
1112
+ import { AxiosRequestConfig } from 'axios';
1113
+ export { authFlowByAxios } from 'service/api';
1114
+ /**
1115
+ * 验证是否已登陆
1116
+ * @param data
1117
+ * @param config
1118
+ */
1119
+ export const mfaTotpAuthenticatorByAxios: (params: {
1120
+ source: string;
1121
+ }, config: AxiosRequestConfig) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1122
+ /**
1123
+ * 已登陆 totp 拉取二维码、Secret 信息
1124
+ * @param data
1125
+ * @param config
1126
+ * @returns
1127
+ */
1128
+ export const mfaTotpAssociateByAxios: (data: {
1129
+ source: string;
1130
+ }, config: AxiosRequestConfig) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1131
+
1104
1132
  }
1105
1133
  declare module '@authing/react-ui-components/components/BindTotp/businessRequest' {
1106
1134
  export enum BindTotpBusinessAction {
@@ -1163,8 +1191,15 @@ declare module '@authing/react-ui-components/components/ChangeLanguage/index' {
1163
1191
  /// <reference types="react" />
1164
1192
  export const ChangeLanguage: (props: any) => JSX.Element | null;
1165
1193
 
1194
+ }
1195
+ declare module '@authing/react-ui-components/components/ChangePassword/api/index' {
1196
+ import { registerEmailCodeByAxios } from '@authing/react-ui-components/components/Register/api/index';
1197
+ import { authFlowByAxios } from 'service/api';
1198
+ export { authFlowByAxios, registerEmailCodeByAxios };
1199
+
1166
1200
  }
1167
1201
  declare module '@authing/react-ui-components/components/ChangePassword/businessRequest' {
1202
+ import { AxiosRequestConfig } from 'axios';
1168
1203
  export enum ChangePasswordBusinessAction {
1169
1204
  ResetPassword = "reset-password-first-time",
1170
1205
  FirstLoginReset = "reset-password-forced",
@@ -1173,7 +1208,7 @@ declare module '@authing/react-ui-components/components/ChangePassword/businessR
1173
1208
  export const authFlow: (action: ChangePasswordBusinessAction, content: {
1174
1209
  password: string;
1175
1210
  oldPassword?: string;
1176
- }) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1211
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1177
1212
 
1178
1213
  }
1179
1214
  declare module '@authing/react-ui-components/components/ChangePassword/core/PasswordNotSafeReset' {
@@ -1187,6 +1222,12 @@ declare module '@authing/react-ui-components/components/ChangePassword/core/Pass
1187
1222
  }
1188
1223
  declare module '@authing/react-ui-components/components/ChangePassword/core/completePassword' {
1189
1224
  import React from 'react';
1225
+ /**
1226
+ * 注册补全密码
1227
+ * 进入流程:
1228
+ * 1. 控制台登陆方式 短信验证码 && 手机号密码
1229
+ * 2. 注册方式 短信验证码
1230
+ */
1190
1231
  export const CompletePassword: React.FC;
1191
1232
 
1192
1233
  }
@@ -1215,23 +1256,63 @@ declare module '@authing/react-ui-components/components/ChangePassword/index' {
1215
1256
  title: string;
1216
1257
  explain: string;
1217
1258
  }>;
1259
+ /**
1260
+ * 首次登陆重制密码
1261
+ * @returns
1262
+ */
1218
1263
  export const GuardFirstLoginPasswordResetView: React.FC;
1219
1264
  export const GuardPasswordNotSafeResetView: React.FC;
1220
1265
  export const GuardForcedPasswordResetView: React.FC;
1266
+ /**
1267
+ * 提示修改密码
1268
+ * @returns
1269
+ */
1221
1270
  export const GuardNoticePasswordResetView: React.FC;
1271
+ /**
1272
+ * 注册密码补全
1273
+ * @returns
1274
+ */
1222
1275
  export const GuardRegisterCompletePasswordView: React.FC;
1223
1276
 
1277
+ }
1278
+ declare module '@authing/react-ui-components/components/CompleteInfo/api/constant' {
1279
+ export const getCompletionMetaDataUrl: () => string;
1280
+
1281
+ }
1282
+ declare module '@authing/react-ui-components/components/CompleteInfo/api/index' {
1283
+ import { authFlowByAxios, getCountryLists, validateAccountByAxios, validateEmailCodeByAxios, validatePhoneCodeByAxios } from 'service/api';
1284
+ import { registerEmailCodeByAxios } from '@authing/react-ui-components/components/Register/api/index';
1285
+ import { getRegisterMetadata } from '@authing/react-ui-components/components/CompleteInfo/api/request';
1286
+ export { registerEmailCodeByAxios, authFlowByAxios, getCountryLists, validateAccountByAxios, validateEmailCodeByAxios, validatePhoneCodeByAxios, getRegisterMetadata, };
1287
+
1288
+ }
1289
+ declare module '@authing/react-ui-components/components/CompleteInfo/api/request' {
1290
+ import { AxiosRequestConfig } from 'axios';
1291
+ /**
1292
+ * 获取注册信息补全元数据
1293
+ * @param params
1294
+ * @param config
1295
+ * @returns
1296
+ */
1297
+ export const getRegisterMetadata: (params?: any, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1298
+
1224
1299
  }
1225
1300
  declare module '@authing/react-ui-components/components/CompleteInfo/businessRequest' {
1226
- import { User } from 'authing-js-sdk';
1301
+ import { AxiosRequestConfig } from 'axios';
1227
1302
  import { CompleteInfoRequest, RegisterCompleteInfoInitData } from '@authing/react-ui-components/components/CompleteInfo/interface';
1228
1303
  export enum CompleteInfoAuthFlowAction {
1229
1304
  Complete = "complete-completion",
1230
1305
  Skip = "skip-completion"
1231
1306
  }
1232
- export const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1233
- export const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>> | Promise<User> | undefined;
1234
- 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>;
1307
+ export const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1308
+ /**
1309
+ * 注册点击跳过
1310
+ * @param fnName
1311
+ * @param content
1312
+ * @returns
1313
+ */
1314
+ export const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>> | Promise<import("authing-js-sdk").User> | undefined;
1315
+ export const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<import("authing-js-sdk").User | import("../_utils/http").AuthingGuardResponse<any> | undefined>;
1235
1316
 
1236
1317
  }
1237
1318
  declare module '@authing/react-ui-components/components/CompleteInfo/core/completeInfo' {
@@ -1245,6 +1326,11 @@ declare module '@authing/react-ui-components/components/CompleteInfo/core/comple
1245
1326
  key: string;
1246
1327
  options: any;
1247
1328
  }
1329
+ /**
1330
+ * 信息补全
1331
+ * @param props
1332
+ * @returns
1333
+ */
1248
1334
  export const CompleteInfo: React.FC<CompleteInfoProps>;
1249
1335
 
1250
1336
  }
@@ -1253,12 +1339,23 @@ declare module '@authing/react-ui-components/components/CompleteInfo/index' {
1253
1339
  import { CompleteInfoMetaData, CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
1254
1340
  import './styles.less';
1255
1341
  import { CompleteInfoAuthFlowAction } from '@authing/react-ui-components/components/CompleteInfo/businessRequest';
1342
+ /**
1343
+ * 登录时信息补全
1344
+ * @param param0
1345
+ * @returns
1346
+ */
1256
1347
  export const GuardCompleteInfo: React.FC<{
1257
1348
  metaData: CompleteInfoMetaData[];
1258
1349
  skipComplateFileds: boolean;
1259
1350
  businessRequest: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<void>;
1260
1351
  }>;
1352
+ /**
1353
+ * 登录信息补全
1354
+ */
1261
1355
  export const GuardLoginCompleteInfoView: React.FC;
1356
+ /**
1357
+ * 注册信息补全
1358
+ */
1262
1359
  export const GuardRegisterCompleteInfoView: React.FC;
1263
1360
 
1264
1361
  }
@@ -1450,6 +1547,9 @@ declare module '@authing/react-ui-components/components/ForgetPassword/core/rese
1450
1547
  }
1451
1548
  declare module '@authing/react-ui-components/components/ForgetPassword/index' {
1452
1549
  import React from 'react';
1550
+ /**
1551
+ * 忘记密码
1552
+ */
1453
1553
  export const GuardForgetPassword: React.FC;
1454
1554
 
1455
1555
  }
@@ -1527,6 +1627,27 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
1527
1627
  export const getGuardStateMachine: () => GuardStateMachine;
1528
1628
  export const useGuardStateMachine: () => GuardStateMachine;
1529
1629
 
1630
+ }
1631
+ declare module '@authing/react-ui-components/components/Guard/api/constant' {
1632
+ export const publishConfig: (appId: string) => string;
1633
+ export const pageConfig: (appId: string) => string;
1634
+
1635
+ }
1636
+ declare module '@authing/react-ui-components/components/Guard/api/index' {
1637
+ import { AxiosRequestConfig } from 'axios';
1638
+ /**
1639
+ * 获取应用配置信息
1640
+ * @param appId 当前应用配置信息
1641
+ * @returns
1642
+ */
1643
+ export const getPublishConfigByAxios: <T>(appId: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
1644
+ /**
1645
+ * 获取页面配置
1646
+ * @param appId 当前应用配置信息
1647
+ * @returns
1648
+ */
1649
+ export const getPageConfigByAxios: <T>(appId: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
1650
+
1530
1651
  }
1531
1652
  declare module '@authing/react-ui-components/components/Guard/authClient' {
1532
1653
  import { AuthenticationClient } from 'authing-js-sdk';
@@ -1574,6 +1695,107 @@ declare module '@authing/react-ui-components/components/Guard/config' {
1574
1695
  }
1575
1696
  export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
1576
1697
 
1698
+ }
1699
+ declare module '@authing/react-ui-components/components/Guard/core/componentsMapping' {
1700
+ import React from 'react';
1701
+ import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
1702
+ /**
1703
+ * 组件映射表
1704
+ * TODO: 斟酌下是否和上层 module.ts 放在一起的单个文件夹中 感觉可放可不放
1705
+ */
1706
+ const ComponentsMapping: Record<GuardModuleType, (key: string) => React.ReactNode>;
1707
+ export default ComponentsMapping;
1708
+
1709
+ }
1710
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useBusinessRequest' {
1711
+ import { AuthenticationClient } from 'authing-js-sdk';
1712
+ import { GuardLocalConfig } from 'components/Guard/config';
1713
+ import { GuardEvents } from 'components/Guard/event';
1714
+ import { GuardHttp } from 'components/_utils/guardHttp';
1715
+ export default function useBusinessRequestByAxios(appId: string | undefined, options: {
1716
+ events?: GuardEvents;
1717
+ tenantId?: string;
1718
+ sdkClient?: AuthenticationClient;
1719
+ defaultMergedConfig?: GuardLocalConfig;
1720
+ httpClient?: GuardHttp;
1721
+ finallyConfig?: any;
1722
+ }): {
1723
+ axiosClient: boolean | undefined;
1724
+ };
1725
+
1726
+ }
1727
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useCss' {
1728
+ /**
1729
+ * 自定义 CSS 相关,finallyConfig 类型待补充
1730
+ * @param finallyConfig
1731
+ */
1732
+ export default function useCss(finallyConfig: any): void;
1733
+
1734
+ }
1735
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useEvents' {
1736
+ /// <reference types="react" />
1737
+ import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
1738
+ import { GuardProps } from '@authing/react-ui-components/components/Guard/Guard';
1739
+ /**
1740
+ * 初始化事件
1741
+ * @param guardProps
1742
+ * @param openEventsMapping
1743
+ * @returns
1744
+ */
1745
+ export default function useEvents(guardProps: GuardProps, openEventsMapping?: boolean): {
1746
+ events: GuardEvents | undefined;
1747
+ setEvents: import("react").Dispatch<import("react").SetStateAction<GuardEvents | undefined>>;
1748
+ initEvents: () => void;
1749
+ };
1750
+
1751
+ }
1752
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useFDA' {
1753
+ /// <reference types="react" />
1754
+ import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
1755
+ import { GuardStateMachine, ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
1756
+ import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
1757
+ import { ChangeModuleCore } from '@authing/react-ui-components/components/Guard/core/hooks/useModule';
1758
+ /**
1759
+ * 初始化 FDA ,后续 Guard 渲染全部按照 FDA API 执行
1760
+ * @param onChangeModule FDA 内部更新组件核心方法
1761
+ * @param initState 初始化状态
1762
+ * @returns { guardStateMachine,setGuardStateMachine }
1763
+ */
1764
+ export default function useFDA(onChangeModule: ChangeModuleCore, initState: ModuleState, events?: GuardEvents, authFlow?: boolean): {
1765
+ isAuthFlow: boolean;
1766
+ guardStateMachine: GuardStateMachine | undefined;
1767
+ setGuardStateMachine: import("react").Dispatch<import("react").SetStateAction<GuardStateMachine | undefined>>;
1768
+ moduleEvents: {
1769
+ changeModule: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
1770
+ backModule: () => void;
1771
+ } | undefined;
1772
+ };
1773
+
1774
+ }
1775
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useI18n' {
1776
+ import { GuardLocalConfig } from 'components/Guard/config';
1777
+ const useI18i: (config?: Partial<GuardLocalConfig> | undefined) => void;
1778
+ export { useI18i };
1779
+
1780
+ }
1781
+ declare module '@authing/react-ui-components/components/Guard/core/hooks/useModule' {
1782
+ import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
1783
+ import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
1784
+ import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
1785
+ export interface ChangeModuleCore {
1786
+ (type: GuardModuleType, initData?: any): Promise<void>;
1787
+ }
1788
+ /**
1789
+ * Guard 组件渲染状态
1790
+ * @param initializeState 初始化数据
1791
+ * @param events Guard 事件对象
1792
+ * @returns moduleState 组件当前渲染状态,onChangeModule 切换状态方法
1793
+ */
1794
+ export default function useModule(initializeState: ModuleState, events?: GuardEvents): {
1795
+ moduleState: ModuleState;
1796
+ onChangeModule: ChangeModuleCore;
1797
+ };
1798
+
1577
1799
  }
1578
1800
  declare module '@authing/react-ui-components/components/Guard/core/index' {
1579
1801
  /// <reference types="react" />
@@ -1586,7 +1808,7 @@ declare module '@authing/react-ui-components/components/Guard/core/index' {
1586
1808
  export const GuardCore: (props: GuardCoreProps) => JSX.Element;
1587
1809
 
1588
1810
  }
1589
- declare module '@authing/react-ui-components/components/Guard/core/renderContext' {
1811
+ declare module '@authing/react-ui-components/components/Guard/core/renderContext-1' {
1590
1812
  import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
1591
1813
  import React from 'react';
1592
1814
  import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
@@ -1776,8 +1998,21 @@ declare module '@authing/react-ui-components/components/IconFont/useGuardIconfon
1776
1998
  declare module '@authing/react-ui-components/components/IdentityBinding/IdentityBinding' {
1777
1999
  import React from 'react';
1778
2000
  import './styles.less';
2001
+ /**
2002
+ * 身份源绑定 第三方登陆时
2003
+ * 需要身份源绑定相关 Authing 账号
2004
+ * @returns
2005
+ */
1779
2006
  export const GuardIdentityBindingView: React.FC;
1780
2007
 
2008
+ }
2009
+ declare module '@authing/react-ui-components/components/IdentityBinding/api/index' {
2010
+ export * from '@authing/react-ui-components/components/IdentityBinding/api/request';
2011
+
2012
+ }
2013
+ declare module '@authing/react-ui-components/components/IdentityBinding/api/request' {
2014
+ export { authFlowByAxios } from 'service/api';
2015
+
1781
2016
  }
1782
2017
  declare module '@authing/react-ui-components/components/IdentityBinding/businessRequest' {
1783
2018
  export enum IdentityBindingBusinessAction {
@@ -1805,13 +2040,10 @@ declare module '@authing/react-ui-components/components/IdentityBinding/business
1805
2040
  BindByPhoneCode = "bind-identity-by-phone-code",
1806
2041
  BindByEmailCode = "bind-identity-by-email-code"
1807
2042
  }
1808
- export const PhoneCode: (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1809
- export const EmailCode: (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1810
- export const Password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1811
2043
  export const useIdentityBindingBusinessRequest: () => {
1812
- "phone-code": (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1813
- "emial-code": (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1814
- password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2044
+ "phone-code": (data: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2045
+ "emial-code": (data: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2046
+ password: (data: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1815
2047
  };
1816
2048
 
1817
2049
  }
@@ -1855,6 +2087,18 @@ declare module '@authing/react-ui-components/components/IdentityBindingAsk/Ident
1855
2087
  import './styles.less';
1856
2088
  export const GuardIdentityBindingAskView: React.FC;
1857
2089
 
2090
+ }
2091
+ declare module '@authing/react-ui-components/components/IdentityBindingAsk/api/index' {
2092
+ import { AxiosRequestConfig } from 'axios';
2093
+ /**
2094
+ * 状态机
2095
+ * @param action
2096
+ * @param config
2097
+ * @returns
2098
+ */
2099
+ const authFlow: (action: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2100
+ export { authFlow };
2101
+
1858
2102
  }
1859
2103
  declare module '@authing/react-ui-components/components/IdentityBindingAsk/index' {
1860
2104
  export * from '@authing/react-ui-components/components/IdentityBindingAsk/IdentityBindingAsk';
@@ -1916,6 +2160,136 @@ declare module '@authing/react-ui-components/components/InputPassword/index' {
1916
2160
  import React from 'react';
1917
2161
  export const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
1918
2162
 
2163
+ }
2164
+ declare module '@authing/react-ui-components/components/Login/api/constant' {
2165
+ export const loginUrlByPassword: (isAdWay: boolean) => "/api/v2/login/ad-all-in-one" | "/api/v2/login/account";
2166
+ export const loginUrlByPhoneCode: () => string;
2167
+ export const loginUrlByEmailCode: () => string;
2168
+ export const loginUrlByAD: () => string;
2169
+ export const loginUrlByLDAP: () => string;
2170
+ export const preLoginUrlByOIDC: () => string;
2171
+
2172
+ }
2173
+ declare module '@authing/react-ui-components/components/Login/api/index' {
2174
+ export * from '@authing/react-ui-components/components/Login/api/request';
2175
+
2176
+ }
2177
+ declare module '@authing/react-ui-components/components/Login/api/request' {
2178
+ import { AxiosRequestConfig } from 'axios';
2179
+ export interface LoginParams<T = any> {
2180
+ /**
2181
+ * 登陆自定义参数
2182
+ */
2183
+ customData: T;
2184
+ /**
2185
+ * 是否自动注册
2186
+ */
2187
+ autoRegister?: boolean;
2188
+ /**
2189
+ * 是否携带自定义数据
2190
+ */
2191
+ withCustomData?: boolean;
2192
+ }
2193
+ /**
2194
+ * 密码登陆请求参数
2195
+ */
2196
+ export interface LoginParamsWithPassword<T = any> extends LoginParams<T> {
2197
+ /**
2198
+ * 账号
2199
+ */
2200
+ account: string;
2201
+ /**
2202
+ * 密码
2203
+ */
2204
+ password: string;
2205
+ /**
2206
+ * 验证码
2207
+ */
2208
+ captchaCode: string;
2209
+ }
2210
+ /**
2211
+ * 密码登陆
2212
+ */
2213
+ export const loginRequestByAxios: <T>(data: LoginParams, way?: boolean, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2214
+ /**
2215
+ * 手机登陆请求参数
2216
+ */
2217
+ export interface LoginParamsWithPhone<T = any> extends LoginParams<T> {
2218
+ /**
2219
+ * 手机号
2220
+ */
2221
+ phone: string;
2222
+ /**
2223
+ * 验证码
2224
+ */
2225
+ code: string;
2226
+ /**
2227
+ * 手机前位数
2228
+ */
2229
+ phoneCountryCode?: number;
2230
+ }
2231
+ /**
2232
+ * 手机验证码登陆
2233
+ * @param data
2234
+ * @returns
2235
+ */
2236
+ export const mobileLoginByAxios: (data: LoginParamsWithPhone, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2237
+ /**
2238
+ * 手机登陆请求参数
2239
+ */
2240
+ export interface LoginParamsWithEmail<T = any> extends LoginParams<T> {
2241
+ /**
2242
+ * 邮箱号
2243
+ */
2244
+ email: string;
2245
+ /**
2246
+ * 验证码
2247
+ */
2248
+ code: string;
2249
+ }
2250
+ /**
2251
+ * 邮箱登陆
2252
+ * @param data
2253
+ * @param config
2254
+ * @returns
2255
+ */
2256
+ export const emailLoginByAxios: (data: LoginParamsWithEmail, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2257
+ /**
2258
+ * AD 登陆
2259
+ * @param data
2260
+ * @returns
2261
+ */
2262
+ export const adLoginByAxios: (data: {
2263
+ username: string;
2264
+ password: string;
2265
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2266
+ /**
2267
+ * LDAP 登陆
2268
+ * @param data
2269
+ * @returns
2270
+ */
2271
+ export const ldapLoginByAxios: (data: {
2272
+ username: string;
2273
+ password: string;
2274
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2275
+ interface PreOIDCParams {
2276
+ state: string;
2277
+ protocol: string;
2278
+ userPoolId: string;
2279
+ appId: string;
2280
+ referer: string;
2281
+ connection: {
2282
+ providerIentifier: any;
2283
+ };
2284
+ }
2285
+ /**
2286
+ * IDO -> OIDC 登陆前校验
2287
+ * @param data
2288
+ * @returns
2289
+ */
2290
+ export const preLoginOIDCByAxios: (data: PreOIDCParams, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2291
+ export {};
2292
+
1919
2293
  }
1920
2294
  declare module '@authing/react-ui-components/components/Login/codemap' {
1921
2295
  import { GuardModuleAction } from '@authing/react-ui-components/components/Guard/module';
@@ -1971,6 +2345,11 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
1971
2345
  export interface FormItemAccountProps extends FormItemProps {
1972
2346
  passwordLoginMethods: PasswordLoginMethods[];
1973
2347
  }
2348
+ /**
2349
+ * 根据对应的配置:邮箱/用户名/Email渲染FormItem
2350
+ * @param props
2351
+ * @returns
2352
+ */
1974
2353
  export const FormItemAccount: React.FC<FormItemAccountProps>;
1975
2354
 
1976
2355
  }
@@ -1981,6 +2360,11 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
1981
2360
  verifyCodeUrl: string;
1982
2361
  changeCode: () => void;
1983
2362
  }
2363
+ /**
2364
+ * 图形验证码
2365
+ * @param props
2366
+ * @returns
2367
+ */
1984
2368
  export const GraphicVerifyCode: React.FC<GraphicVerifyCodeProps>;
1985
2369
 
1986
2370
  }
@@ -1988,6 +2372,10 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
1988
2372
  import { InputProps } from 'antd/lib/input';
1989
2373
  import React from 'react';
1990
2374
  import { PasswordLoginMethods } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2375
+ /**
2376
+ * 账号输入框
2377
+ * 根据邮箱/手机号/密码配置自适应
2378
+ */
1991
2379
  export interface InputAccountProps extends InputProps {
1992
2380
  passwordLoginMethods: PasswordLoginMethods[];
1993
2381
  }
@@ -2013,6 +2401,11 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
2013
2401
  submitButText?: string;
2014
2402
  saveIdentify?: (type: LoginMethods, identity: string) => void;
2015
2403
  }
2404
+ /**
2405
+ * 密码登陆
2406
+ * @param props
2407
+ * @returns
2408
+ */
2016
2409
  export const LoginWithPassword: (props: LoginWithPasswordProps) => JSX.Element;
2017
2410
  export {};
2018
2411
 
@@ -2196,6 +2589,23 @@ declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/inde
2196
2589
  export const VerifyCodeInput: FC<VerifyCodeInputProps>;
2197
2590
  export {};
2198
2591
 
2592
+ }
2593
+ declare module '@authing/react-ui-components/components/MFA/api/constant' {
2594
+ export const uploadFaceUrl: () => string;
2595
+
2596
+ }
2597
+ declare module '@authing/react-ui-components/components/MFA/api/index' {
2598
+ export { sendEmailCodeByAxios } from 'service/api';
2599
+ export * from '@authing/react-ui-components/components/MFA/api/request';
2600
+
2601
+ }
2602
+ declare module '@authing/react-ui-components/components/MFA/api/request' {
2603
+ import { AxiosRequestConfig } from 'axios';
2604
+ /**
2605
+ * 上传绑定人脸识别的照片
2606
+ */
2607
+ export const uploadFaceImageByAxios: <T = any>(data: FormData, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2608
+
2199
2609
  }
2200
2610
  declare module '@authing/react-ui-components/components/MFA/businessRequest' {
2201
2611
  export enum MfaBusinessAction {
@@ -2239,8 +2649,19 @@ declare module '@authing/react-ui-components/components/MFA/businessRequest' {
2239
2649
  export const useMfaBusinessRequest: () => {
2240
2650
  "verify-email": (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2241
2651
  "verify-sms": (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2652
+ /**
2653
+ * Totp 状态请求
2654
+ * @param content
2655
+ * @returns
2656
+ */
2242
2657
  "verify-totp": (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2658
+ /**
2659
+ * 人脸验证
2660
+ */
2243
2661
  "verify-face": (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2662
+ /**
2663
+ * 人脸绑定
2664
+ */
2244
2665
  "associate-face": (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2245
2666
  };
2246
2667
  export {};
@@ -2259,6 +2680,11 @@ declare module '@authing/react-ui-components/components/MFA/core/email' {
2259
2680
  onBind: (email: string) => void;
2260
2681
  config: any;
2261
2682
  }
2683
+ /**
2684
+ * 绑定邮箱页面
2685
+ * @param param0
2686
+ * @returns
2687
+ */
2262
2688
  export const BindMFAEmail: React.FC<BindMFAEmailProps>;
2263
2689
  interface VerifyMFAEmailProps {
2264
2690
  email: string;
@@ -2267,7 +2693,17 @@ declare module '@authing/react-ui-components/components/MFA/core/email' {
2267
2693
  sendCodeRef: React.RefObject<HTMLButtonElement>;
2268
2694
  codeLength: number;
2269
2695
  }
2696
+ /**
2697
+ * 验证邮箱
2698
+ * @param param0
2699
+ * @returns
2700
+ */
2270
2701
  export const VerifyMFAEmail: React.FC<VerifyMFAEmailProps>;
2702
+ /**
2703
+ * 邮箱验证方式
2704
+ * @param param0
2705
+ * @returns
2706
+ */
2271
2707
  export const MFAEmail: React.FC<{
2272
2708
  mfaToken: string;
2273
2709
  email?: string;
@@ -2279,6 +2715,11 @@ declare module '@authing/react-ui-components/components/MFA/core/email' {
2279
2715
  }
2280
2716
  declare module '@authing/react-ui-components/components/MFA/core/face' {
2281
2717
  /// <reference types="react" />
2718
+ /**
2719
+ * 面部认证
2720
+ * @param props
2721
+ * @returns
2722
+ */
2282
2723
  export const MFAFace: (props: any) => JSX.Element;
2283
2724
 
2284
2725
  }
@@ -2290,7 +2731,13 @@ declare module '@authing/react-ui-components/components/MFA/core/face_deps' {
2290
2731
  };
2291
2732
  };
2292
2733
  export const FACE_SCORE = 0.65;
2734
+ /**
2735
+ * 人脸检测配置
2736
+ */
2293
2737
  export function getFaceDetectorOptions(): any;
2738
+ /**
2739
+ * 获取 facePlugin tinyFaceDetector 微型人脸探测(三种方式之一)
2740
+ */
2294
2741
  export function getCurrentFaceDetectionNet(): any;
2295
2742
  export function isFaceDetectionModelLoaded(): boolean;
2296
2743
  export function dataURItoBlob(base64Data: any): Blob;
@@ -2307,6 +2754,11 @@ declare module '@authing/react-ui-components/components/MFA/core/sms' {
2307
2754
  setAreaCode: (areaCode: string) => void;
2308
2755
  isInternationSms: boolean;
2309
2756
  }
2757
+ /**
2758
+ * 绑定手机号
2759
+ * @param param0
2760
+ * @returns
2761
+ */
2310
2762
  export const BindMFASms: React.FC<BindMFASmsProps>;
2311
2763
  export interface VerifyMFASmsProps {
2312
2764
  mfaToken: string;
@@ -2320,6 +2772,11 @@ declare module '@authing/react-ui-components/components/MFA/core/sms' {
2320
2772
  userPhone?: string;
2321
2773
  }
2322
2774
  export const VerifyMFASms: React.FC<VerifyMFASmsProps>;
2775
+ /**
2776
+ * 手机 MFA
2777
+ * @param param0
2778
+ * @returns
2779
+ */
2323
2780
  export const MFASms: React.FC<{
2324
2781
  mfaLogin: any;
2325
2782
  config: MFAConfig;
@@ -2334,12 +2791,22 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
2334
2791
  initData: GuardMFAInitData;
2335
2792
  changeModule: any;
2336
2793
  }
2794
+ /**
2795
+ * 绑定 ToTp 页面 跳转 Totp
2796
+ * @param param0
2797
+ * @returns
2798
+ */
2337
2799
  export const BindMFATotp: React.FC<BindMFATotpProps>;
2338
2800
  export interface VerifyMFATotpProps {
2339
2801
  mfaToken: string;
2340
2802
  mfaLogin: any;
2341
2803
  changeModule: any;
2342
2804
  }
2805
+ /**
2806
+ * Totp 验证页面
2807
+ * @param param0
2808
+ * @returns
2809
+ */
2343
2810
  export const VerifyMFATotp: React.FC<VerifyMFATotpProps>;
2344
2811
  export interface MFATotpProps {
2345
2812
  changeModule: any;
@@ -2347,6 +2814,13 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
2347
2814
  initData: GuardMFAInitData;
2348
2815
  mfaLogin: any;
2349
2816
  }
2817
+ /**
2818
+ * MFA Totp 页面
2819
+ * 开启 => 渲染 VerifyMFATotp 绑定
2820
+ * 不开启 => 渲染绑定页面
2821
+ * @param param
2822
+ * @returns
2823
+ */
2350
2824
  export const MFATotp: React.FC<MFATotpProps>;
2351
2825
 
2352
2826
  }
@@ -2358,6 +2832,10 @@ declare module '@authing/react-ui-components/components/MFA/index' {
2358
2832
  mfaBackState: string;
2359
2833
  }
2360
2834
  export const MFABackStateContext: React.Context<MFABackStateContextType | undefined>;
2835
+ /**
2836
+ * MFA 相关页面
2837
+ * @returns
2838
+ */
2361
2839
  export const GuardMFAView: React.FC;
2362
2840
  export {};
2363
2841
 
@@ -2415,6 +2893,29 @@ declare module '@authing/react-ui-components/components/MFA/mfaMethods/index' {
2415
2893
  }
2416
2894
  export const MFAMethods: React.FC<MFAMethodsProps>;
2417
2895
 
2896
+ }
2897
+ declare module '@authing/react-ui-components/components/NeedHelpView/api/constant' {
2898
+ export const feedbackUrl: () => string;
2899
+
2900
+ }
2901
+ declare module '@authing/react-ui-components/components/NeedHelpView/api/index' {
2902
+ export * from '@authing/react-ui-components/components/NeedHelpView/api/request';
2903
+
2904
+ }
2905
+ declare module '@authing/react-ui-components/components/NeedHelpView/api/request' {
2906
+ /**
2907
+ * 问题反馈
2908
+ * @param data
2909
+ * @returns
2910
+ */
2911
+ export const feedbackByAxios: (data: {
2912
+ type: number;
2913
+ description: string;
2914
+ phone: string;
2915
+ images: string[];
2916
+ appId: string;
2917
+ }) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2918
+
2418
2919
  }
2419
2920
  declare module '@authing/react-ui-components/components/NeedHelpView/core/describeQuestions' {
2420
2921
  /// <reference types="react" />
@@ -2431,13 +2932,34 @@ declare module '@authing/react-ui-components/components/NeedHelpView/index' {
2431
2932
  /// <reference types="react" />
2432
2933
  export const GuardNeedHelpView: (props: any) => JSX.Element;
2433
2934
 
2935
+ }
2936
+ declare module '@authing/react-ui-components/components/RecoveryCode/api/constant' {
2937
+ export const recoverCodeUrl: () => string;
2938
+
2939
+ }
2940
+ declare module '@authing/react-ui-components/components/RecoveryCode/api/index' {
2941
+ export { authFlowByAxios } from 'service/api';
2942
+
2943
+ }
2944
+ declare module '@authing/react-ui-components/components/RecoveryCode/api/request' {
2945
+ import { AxiosRequestConfig } from 'axios';
2946
+ /**
2947
+ * 不在流程中(AuthFlow)请求恢复 Totp 请求
2948
+ * @param data
2949
+ * @param config
2950
+ * @returns
2951
+ */
2952
+ export const recoverCodeByAxios: (data: {
2953
+ recoveryCode: string;
2954
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2955
+
2434
2956
  }
2435
2957
  declare module '@authing/react-ui-components/components/RecoveryCode/businessRequest' {
2436
2958
  export enum TotpRecoveryCodeBusinessAction {
2437
2959
  RecoveryTotp = "recovery-totp",
2438
2960
  ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
2439
2961
  }
2440
- export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, content: any): Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2962
+ export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, data: any): Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2441
2963
 
2442
2964
  }
2443
2965
  declare module '@authing/react-ui-components/components/RecoveryCode/core/saveCode' {
@@ -2462,6 +2984,9 @@ declare module '@authing/react-ui-components/components/RecoveryCode/index' {
2462
2984
  import React from 'react';
2463
2985
  import './style.less';
2464
2986
  export const RecoveryCode: React.FC;
2987
+ /**
2988
+ * authFlow 中恢复
2989
+ */
2465
2990
  export const RecoveryCodeAuthFlow: React.FC;
2466
2991
  export const GuardRecoveryCodeView: React.FC;
2467
2992
 
@@ -2476,6 +3001,37 @@ declare module '@authing/react-ui-components/components/RecoveryCode/interface'
2476
3001
  onLogin?: (user: User, authClient: AuthenticationClient) => void;
2477
3002
  }
2478
3003
 
3004
+ }
3005
+ declare module '@authing/react-ui-components/components/Register/api/constant' {
3006
+ export const registerEmailCodeUrl: () => string;
3007
+
3008
+ }
3009
+ declare module '@authing/react-ui-components/components/Register/api/index' {
3010
+ import { registerEmailCodeByAxios } from '@authing/react-ui-components/components/Register/api/request';
3011
+ import { validatePhoneCodeByAxios, validateEmailCodeByAxios } from 'service/api';
3012
+ export { validatePhoneCodeByAxios, validateEmailCodeByAxios, registerEmailCodeByAxios, };
3013
+
3014
+ }
3015
+ declare module '@authing/react-ui-components/components/Register/api/request' {
3016
+ import { AxiosRequestConfig } from 'axios';
3017
+ /**
3018
+ * 邮箱注册
3019
+ * @param data
3020
+ * @param config
3021
+ * @returns
3022
+ */
3023
+ export const registerEmailCodeByAxios: (data: {
3024
+ email: string;
3025
+ code: string;
3026
+ profile: {
3027
+ browser: string | null;
3028
+ device: string | null | undefined;
3029
+ };
3030
+ context: string;
3031
+ generateToken: boolean;
3032
+ password?: string;
3033
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
3034
+
2479
3035
  }
2480
3036
  declare module '@authing/react-ui-components/components/Register/codemap' {
2481
3037
  import { GuardModuleAction } from '@authing/react-ui-components/components/Guard/module';
@@ -2499,58 +3055,43 @@ declare module '@authing/react-ui-components/components/Register/components/Agre
2499
3055
  declare module '@authing/react-ui-components/components/Register/core/WithCode' {
2500
3056
  import React from 'react';
2501
3057
  import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
3058
+ import { GetRegisterEvent } from '@authing/react-ui-components/components/Register/interface';
2502
3059
  export interface RegisterWithCodeProps {
2503
3060
  onRegisterSuccess: Function;
2504
3061
  onRegisterFailed: Function;
2505
- onBeforeRegister?: Function;
3062
+ onBeforeRegister?: GetRegisterEvent<'onBeforeRegister'>;
2506
3063
  agreements: Agreement[];
2507
3064
  publicConfig?: ApplicationConfig;
2508
3065
  registeContext?: any;
2509
3066
  methods: any[];
2510
3067
  }
3068
+ /**
3069
+ * 验证码方式注册
3070
+ * @param param
3071
+ * @returns
3072
+ */
2511
3073
  export const RegisterWithCode: React.FC<RegisterWithCodeProps>;
2512
3074
 
2513
3075
  }
2514
3076
  declare module '@authing/react-ui-components/components/Register/core/WithEmail' {
2515
3077
  import React from 'react';
2516
3078
  import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
3079
+ import { GetRegisterEvent } from '@authing/react-ui-components/components/Register/interface';
2517
3080
  export interface RegisterWithEmailProps {
2518
3081
  onRegisterSuccess: Function;
2519
3082
  onRegisterFailed: Function;
2520
- onBeforeRegister?: Function;
3083
+ onBeforeRegister?: GetRegisterEvent<'onBeforeRegister'>;
2521
3084
  publicConfig?: ApplicationConfig;
2522
3085
  agreements: Agreement[];
2523
3086
  registeContext?: any;
2524
3087
  }
3088
+ /**
3089
+ * 邮箱 + 密码注册 头部显示密码注册
3090
+ * @param param
3091
+ * @returns
3092
+ */
2525
3093
  export const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
2526
3094
 
2527
- }
2528
- declare module '@authing/react-ui-components/components/Register/core/WithEmailCode' {
2529
- import React from 'react';
2530
- import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2531
- export interface RegisterWithEmailCodeProps {
2532
- onRegisterSuccess: Function;
2533
- onRegisterFailed: Function;
2534
- onBeforeRegister?: Function;
2535
- agreements: Agreement[];
2536
- publicConfig?: ApplicationConfig;
2537
- registeContext?: any;
2538
- }
2539
- export const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
2540
-
2541
- }
2542
- declare module '@authing/react-ui-components/components/Register/core/WithPhone' {
2543
- import React from 'react';
2544
- import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2545
- export interface RegisterWithPhoneProps {
2546
- onRegisterSuccess: Function;
2547
- onRegisterFailed: Function;
2548
- agreements: Agreement[];
2549
- publicConfig?: ApplicationConfig;
2550
- registeContext?: any;
2551
- }
2552
- export const RegisterWithPhone: React.FC<RegisterWithPhoneProps>;
2553
-
2554
3095
  }
2555
3096
  declare module '@authing/react-ui-components/components/Register/index' {
2556
3097
  import React from 'react';
@@ -2559,7 +3100,7 @@ declare module '@authing/react-ui-components/components/Register/index' {
2559
3100
  }
2560
3101
  declare module '@authing/react-ui-components/components/Register/interface' {
2561
3102
  import { IG2FCProps, IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
2562
- import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams, RegisterMethods } from '@authing/react-ui-components/components/index';
3103
+ import { AuthenticationClient, User, RegisterMethods } from '@authing/react-ui-components/components/index';
2563
3104
  import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2564
3105
  export interface RegisterConfig extends IG2Config {
2565
3106
  disableRegister?: boolean;
@@ -2570,8 +3111,24 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2570
3111
  agreements?: Agreement[];
2571
3112
  registerContext?: any;
2572
3113
  }
3114
+ export type SupportRegisterMethods = 'email' | 'email-code' | 'phone-code';
3115
+ /**
3116
+ * 注册前回调事件接受参数
3117
+ */
3118
+ export interface onBeforeRegisterParams {
3119
+ type: SupportRegisterMethods;
3120
+ data: {
3121
+ account: string;
3122
+ password?: string;
3123
+ code?: string;
3124
+ };
3125
+ }
3126
+ /**
3127
+ * 获取用户注册事件的类型
3128
+ */
3129
+ export type GetRegisterEvent<T extends keyof RegisterEvents> = RegisterEvents[T];
2573
3130
  export interface RegisterEvents extends IG2Events {
2574
- onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
3131
+ onBeforeRegister?: (registerInfo: onBeforeRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
2575
3132
  onRegister?: (user: User, authClient: AuthenticationClient) => void;
2576
3133
  onRegisterError?: (error: any) => void;
2577
3134
  onRegisterTabChange?: (activeTab: RegisterMethods) => void;
@@ -2588,6 +3145,10 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2588
3145
  declare module '@authing/react-ui-components/components/Register/utils' {
2589
3146
  export const useIsChangeComplete: (currentMode: 'phone' | 'email') => boolean;
2590
3147
 
3148
+ }
3149
+ declare module '@authing/react-ui-components/components/SelfUnlock/api/index' {
3150
+ export { authFlowByAxios } from 'service/api';
3151
+
2591
3152
  }
2592
3153
  declare module '@authing/react-ui-components/components/SelfUnlock/core/selfUnlock' {
2593
3154
  import React from 'react';
@@ -2602,6 +3163,10 @@ declare module '@authing/react-ui-components/components/SelfUnlock/core/selfUnlo
2602
3163
  }
2603
3164
  declare module '@authing/react-ui-components/components/SelfUnlock/index' {
2604
3165
  import React from 'react';
3166
+ /**
3167
+ * 自助解锁
3168
+ * @returns
3169
+ */
2605
3170
  export const GuardUnlockView: React.FC;
2606
3171
 
2607
3172
  }
@@ -2669,6 +3234,10 @@ declare module '@authing/react-ui-components/components/SendCode/SendCodeByPhone
2669
3234
  }
2670
3235
  export const SendCodeByPhone: FC<SendCodeByPhoneProps>;
2671
3236
 
3237
+ }
3238
+ declare module '@authing/react-ui-components/components/SendCode/api/index' {
3239
+ export { sendEmailCodeByAxios } from 'service/api';
3240
+
2672
3241
  }
2673
3242
  declare module '@authing/react-ui-components/components/SendCode/index' {
2674
3243
  import { FC } from 'react';
@@ -2839,6 +3408,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/Validator
2839
3408
  export const PhoneFormItem: React.FC<ValidatorFormItemProps>;
2840
3409
  export const UserNameFormItem: React.FC<ValidatorFormItemProps>;
2841
3410
 
3411
+ }
3412
+ declare module '@authing/react-ui-components/components/ValidatorRules/api/index' {
3413
+ export { validateAccountByAxios } from 'service/api';
3414
+
2842
3415
  }
2843
3416
  declare module '@authing/react-ui-components/components/ValidatorRules/index' {
2844
3417
  import { FormInstance, FormItemProps } from 'antd/lib/form';
@@ -2901,6 +3474,32 @@ declare module '@authing/react-ui-components/components/_utils/GuardErrorCode' {
2901
3474
  ACCOUNT_LOCK = 2005
2902
3475
  }
2903
3476
 
3477
+ }
3478
+ declare module '@authing/react-ui-components/components/_utils/actions/index' {
3479
+ /**
3480
+ * Response Action 是否为渲染信息
3481
+ * @param parseStatusCode
3482
+ * @returns
3483
+ */
3484
+ export const isRenderMessageByStatusCode: (parseStatusCode: number) => boolean;
3485
+ /**
3486
+ * Response Action 是否为内部流程状态处理(交由业务处理)
3487
+ * @param parseStatusCode
3488
+ * @param apiCode
3489
+ */
3490
+ export const isFlowBusinessByStatusCode: (parseStatusCode: number) => boolean;
3491
+ /**
3492
+ * Response Action 是否为流程结束
3493
+ * @param parseStatusCode
3494
+ * @param apiCode
3495
+ */
3496
+ export const isFlowEndByStatusCode: (parseStatusCode: number, apiCode: number) => boolean;
3497
+ /**
3498
+ * Response Action 是否为下个流程
3499
+ * @param parseStatusCode
3500
+ */
3501
+ export const isNextFlowByStatusCode: (parseStatusCode: number, apiCode: number) => boolean;
3502
+
2904
3503
  }
2905
3504
  declare module '@authing/react-ui-components/components/_utils/appendConfig' {
2906
3505
  import { GuardAppendConfig } from '@authing/react-ui-components/components/index';
@@ -2923,6 +3522,14 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
2923
3522
  export const getPublicConfig: (appId: string) => ApplicationConfig;
2924
3523
  export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2925
3524
  export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
3525
+ /**
3526
+ *
3527
+ * @param appId
3528
+ * @param config 默认配置
3529
+ * @param httpClient
3530
+ * @param setError
3531
+ * @returns 合并后的 finallyConfig
3532
+ */
2926
3533
  export const useMergePublicConfig: (appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
2927
3534
  host: string;
2928
3535
  isSSO?: boolean | undefined;
@@ -3007,8 +3614,8 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
3007
3614
  } | undefined;
3008
3615
  export const getPageConfig: (appId: string) => GuardPageConfig;
3009
3616
  export const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
3010
- export const requestGuardPageConfig: (appId: string, httpClient: GuardHttp) => Promise<GuardPageConfig>;
3011
- export const useGuardPageConfig: (appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
3617
+ export const requestGuardPageConfig: (appId: string, baseURL?: string | undefined) => Promise<GuardPageConfig>;
3618
+ export const useGuardPageConfig: (appId?: string | undefined, defaultConfig?: GuardLocalConfig | undefined, serError?: any) => GuardPageConfig | undefined;
3012
3619
 
3013
3620
  }
3014
3621
  declare module '@authing/react-ui-components/components/_utils/context' {
@@ -3203,6 +3810,475 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
3203
3810
  publicConfig: ApplicationConfig;
3204
3811
  }) => any;
3205
3812
 
3813
+ }
3814
+ declare module '@authing/react-ui-components/components/_utils/http/api/constant' {
3815
+ export const authFlowUrl: () => string;
3816
+ export const VerifyEmailUrl: () => string;
3817
+ export const validateAccountUrl: () => string;
3818
+ export const countryListsUrl: () => string;
3819
+ export const validatePhoneCodeUrl: () => string;
3820
+ export const validateEmailCodeUrl: () => string;
3821
+
3822
+ }
3823
+ declare module '@authing/react-ui-components/components/_utils/http/api/index' {
3824
+ export * from '@authing/react-ui-components/components/_utils/http/api/request';
3825
+
3826
+ }
3827
+ declare module '@authing/react-ui-components/components/_utils/http/api/request' {
3828
+ import { AxiosRequestConfig } from 'axios';
3829
+ import { EmailScene } from 'components/Type';
3830
+ /**
3831
+ * AuthFlow 相关请求
3832
+ * @param data
3833
+ */
3834
+ export const authFlowByAxios: <A = string, T = any>(data: {
3835
+ action: A;
3836
+ data?: any;
3837
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
3838
+ /**
3839
+ * 发送邮箱验证码
3840
+ * @param data
3841
+ */
3842
+ export const sendEmailCodeByAxios: (data: {
3843
+ email: string;
3844
+ scene: EmailScene;
3845
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
3846
+ /**
3847
+ * 账号登陆前置校验
3848
+ */
3849
+ export interface ValidateAccountParams<T = any> {
3850
+ /**
3851
+ * publicConfig.userPoolId
3852
+ */
3853
+ userPoolId?: string;
3854
+ /**
3855
+ * 校验的输入值
3856
+ */
3857
+ key: T;
3858
+ /**
3859
+ * 本次校验类型
3860
+ */
3861
+ type: 'phone' | 'email' | 'username';
3862
+ }
3863
+ /**
3864
+ * 登陆/注册 前置,校验(用户/手机/邮箱)是否存在/用户是否不存在
3865
+ * @param params
3866
+ * @returns {Promise<boolean>} 是否通过
3867
+ */
3868
+ export const validateAccountByAxios: <T = boolean>(params: ValidateAccountParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
3869
+ /**
3870
+ * 拉取国家列表
3871
+ */
3872
+ export const getCountryLists: <T extends string>() => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<Record<T, {
3873
+ zh: {
3874
+ [props: string]: string;
3875
+ };
3876
+ cn: {
3877
+ [props: string]: string;
3878
+ };
3879
+ }>>>;
3880
+ /**
3881
+ * 验证手机号验证码是否正确
3882
+ */
3883
+ export const validatePhoneCodeByAxios: (data: {
3884
+ phone: number | string;
3885
+ phoneCode: number | string;
3886
+ phoneCountryCode?: number | string;
3887
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
3888
+ /**
3889
+ * 验证邮箱验证码是否正确
3890
+ */
3891
+ export const validateEmailCodeByAxios: (data: {
3892
+ email: number | string;
3893
+ emailCode: number | string;
3894
+ }, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
3895
+
3896
+ }
3897
+ declare module '@authing/react-ui-components/components/_utils/http/base/index' {
3898
+ import { AuthenticationClient } from 'authing-js-sdk';
3899
+ /**
3900
+ * 修改 baseUrl 配置
3901
+ */
3902
+ export const setBaseUrl: (baseUrl: string) => void;
3903
+ export const setAuthClient: (client: AuthenticationClient) => void;
3904
+ /**
3905
+ * 设置加密公钥
3906
+ */
3907
+ export const setPublishByEncrypt: (publishKey?: string | undefined) => void;
3908
+
3909
+ }
3910
+ declare module '@authing/react-ui-components/components/_utils/http/constant' {
3911
+ import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http/interceptors/response';
3912
+ import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
3913
+ import JSEncrypt from 'jsencrypt';
3914
+ /**
3915
+ * 加密实例
3916
+ */
3917
+ export const encryptedInstance: JSEncrypt;
3918
+ export enum CodeAction {
3919
+ CHANGE_MODULE = "changeModule",
3920
+ RENDER_MESSAGE = "renderMessage",
3921
+ INNER_MODULE = "innerModule",
3922
+ FLOW_END = "flowEnd"
3923
+ }
3924
+ export enum ApiCode {
3925
+ IDENTITY_BINDING_ASK = 1641,
3926
+ IDENTITY_BINDING = 1640,
3927
+ APP_MFA = 1636,
3928
+ MFA = 1635,
3929
+ ABORT_FLOW = 1699,
3930
+ COMPLETE_INFO = 1642,
3931
+ UNLOCK = 1643,
3932
+ FLOW_END = 1600,
3933
+ FIRST_LOGIN_PASSWORD = 1639,
3934
+ FORCED_PASSWORD_RESET = 2058
3935
+ }
3936
+ /**
3937
+ * APi Code 对应的模块映射
3938
+ */
3939
+ export const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
3940
+ /**
3941
+ * 高阶函数 记录每次请求的 responseData
3942
+ * 同时根据返回的 apiCode 对应的 action 处理
3943
+ * @param responseData
3944
+ * @returns
3945
+ */
3946
+ export const getCodeActionMapping: (responseData: AuthingResponse) => {
3947
+ /**
3948
+ * 返回的 apiCode 匹配跳转模块时
3949
+ * @param responseData
3950
+ * @returns
3951
+ */
3952
+ changeModule: () => CodeAction;
3953
+ renderMessage: () => CodeAction;
3954
+ innerModule: () => CodeAction;
3955
+ flowEnd: () => CodeAction;
3956
+ };
3957
+
3958
+ }
3959
+ declare module '@authing/react-ui-components/components/_utils/http/events/index' {
3960
+ import { AxiosRequestConfig, AxiosResponse } from 'axios';
3961
+ import { AuthingGuardResponse } from 'components/_utils/http';
3962
+ import { setLoginEvents, setRegisterEvents } from '@authing/react-ui-components/components/_utils/http/events/utils';
3963
+ /**
3964
+ * 请求前置事件处理
3965
+ * 比如 beforeLogin / beforeRegister
3966
+ * @param config
3967
+ * @returns
3968
+ */
3969
+ const processBeforeRequestEvent: (config: AxiosRequestConfig) => Promise<boolean>;
3970
+ /**
3971
+ * 响应器拦截 Events
3972
+ * @param response
3973
+ */
3974
+ const processEventsByResponse: (response: AxiosResponse<AuthingGuardResponse>) => void;
3975
+ export { setLoginEvents, setRegisterEvents, processEventsByResponse, processBeforeRequestEvent, };
3976
+
3977
+ }
3978
+ declare module '@authing/react-ui-components/components/_utils/http/events/modal/login' {
3979
+ import { AuthenticationClient } from 'authing-js-sdk';
3980
+ import { AuthingResponse } from 'service/interceptors/response';
3981
+ class LoginEventsManage {
3982
+ private static instance;
3983
+ private successEvent;
3984
+ private failEvent;
3985
+ private constructor();
3986
+ /**
3987
+ * 设置登录成功的回调函数
3988
+ */
3989
+ private setSuccessEvent;
3990
+ /**
3991
+ * 设置失败成功的回调函数
3992
+ */
3993
+ private setFailEvent;
3994
+ /**
3995
+ * 获取登录成功的回调函数
3996
+ */
3997
+ private getSuccessEvents;
3998
+ /**
3999
+ * 获取失败成功的回调函数
4000
+ */
4001
+ private getFailEvents;
4002
+ /**
4003
+ * 判断本次响应是否算做成功的方法
4004
+ */
4005
+ private isLoginSuccess;
4006
+ /**
4007
+ * 触发登录成功事件
4008
+ * @param responseData
4009
+ */
4010
+ private emitSuccessEvent;
4011
+ /**
4012
+ * 触发登录失败事件
4013
+ * @param responseData
4014
+ */
4015
+ private emitFailEvent;
4016
+ /**
4017
+ * 当前是否请求失败
4018
+ * statusCode 4xx 5xx 请求失败
4019
+ */
4020
+ private isLoginFail;
4021
+ /**
4022
+ * 统一触发事件
4023
+ * @param responseData
4024
+ * @param client
4025
+ */
4026
+ private emitEvents;
4027
+ /**
4028
+ * 获取登录事件实例
4029
+ */
4030
+ static getInstance: () => LoginEventsManage;
4031
+ getCallableMethod(): {
4032
+ getSuccessEvents: () => ((user: import("authing-js-sdk").User, authClient: AuthenticationClient) => void) | null | undefined;
4033
+ setSuccessEvent: (successEvents: ((user: import("authing-js-sdk").User, authClient: AuthenticationClient) => void) | undefined) => void;
4034
+ setFailEvent: (failEvent: ((errorMessages: any) => void) | undefined) => void;
4035
+ emitSuccessEvent: (responseData: AuthingResponse<any>, client: AuthenticationClient) => void;
4036
+ emitFailEvent: (responseData: AuthingResponse<any>) => void;
4037
+ emitEvents: (responseData: AuthingResponse<any>, client: AuthenticationClient) => void;
4038
+ };
4039
+ }
4040
+ export { LoginEventsManage };
4041
+
4042
+ }
4043
+ declare module '@authing/react-ui-components/components/_utils/http/events/modal/register' {
4044
+ import { AuthenticationClient } from 'authing-js-sdk';
4045
+ import { AuthingResponse } from 'service/interceptors/response';
4046
+ type ConditionTypeFunction = (responseData: AuthingResponse) => boolean;
4047
+ class RegisterEventsManage {
4048
+ private static instance;
4049
+ private successEvent;
4050
+ private failEvent;
4051
+ private constructor();
4052
+ /**
4053
+ * 设置注册成功的回调函数
4054
+ */
4055
+ private setSuccessEvent;
4056
+ /**
4057
+ * 设置失败成功的回调函数
4058
+ */
4059
+ private setFailEvent;
4060
+ /**
4061
+ * 获取注册成功的回调函数
4062
+ */
4063
+ private getSuccessEvents;
4064
+ /**
4065
+ * 获取失败成功的回调函数
4066
+ */
4067
+ private getFailEvents;
4068
+ /**
4069
+ * 内置校验:判断本次响应是否算做成功的方法
4070
+ */
4071
+ private isRegisterSuccess;
4072
+ /**
4073
+ * 触发注册成功事件
4074
+ * @param responseData
4075
+ * @param successCondition 自定义的注册成功事件
4076
+ */
4077
+ private emitSuccessEvent;
4078
+ /**
4079
+ * 触发注册失败事件
4080
+ * @param responseData
4081
+ * @param failCondition 自定义的请求失败条件
4082
+ */
4083
+ private emitFailEvent;
4084
+ /**
4085
+ * 内置校验:当前是否请求失败
4086
+ */
4087
+ private isRegisterFail;
4088
+ /**
4089
+ * 统一触发事件
4090
+ * @param responseData
4091
+ * @param client
4092
+ */
4093
+ private emitEvents;
4094
+ /**
4095
+ * 获取注册事件实例
4096
+ */
4097
+ static getInstance: () => RegisterEventsManage;
4098
+ getCallableMethod(): {
4099
+ setSuccessEvent: (successEvents: ((user: import("authing-js-sdk").User, authClient: AuthenticationClient) => void) | undefined) => void;
4100
+ setFailEvent: (failEvent: ((error: any) => void) | undefined) => void;
4101
+ emitSuccessEvent: (params: {
4102
+ responseData: AuthingResponse<any>;
4103
+ client: AuthenticationClient;
4104
+ condition?: ConditionTypeFunction | undefined;
4105
+ }) => void;
4106
+ emitFailEvent: (params: {
4107
+ responseData: AuthingResponse<any>;
4108
+ condition?: ConditionTypeFunction | undefined;
4109
+ }) => void;
4110
+ emitEvents: (responseData: AuthingResponse<any>, client: AuthenticationClient, options?: {
4111
+ successCondition?: ConditionTypeFunction | undefined;
4112
+ failCondition?: ConditionTypeFunction | undefined;
4113
+ } | undefined) => void;
4114
+ };
4115
+ }
4116
+ export { RegisterEventsManage };
4117
+
4118
+ }
4119
+ declare module '@authing/react-ui-components/components/_utils/http/events/utils' {
4120
+ import { LoginEventsManage } from '@authing/react-ui-components/components/_utils/http/events/modal/login';
4121
+ import { RegisterEventsManage } from '@authing/react-ui-components/components/_utils/http/events/modal/register';
4122
+ /**
4123
+ * 内置的登录类型
4124
+ */
4125
+ export const instanceEventMap: {
4126
+ login: typeof LoginEventsManage;
4127
+ register: typeof RegisterEventsManage;
4128
+ };
4129
+ /**
4130
+ * 设置登录事件
4131
+ * @returns
4132
+ */
4133
+ export const setLoginEvents: () => {
4134
+ setSuccessEvent: ((successEvents: ((user: import("authing-js-sdk").User, authClient: import("authing-js-sdk").AuthenticationClient) => void) | undefined) => void) | ((successEvents: ((user: import("authing-js-sdk").User, authClient: import("authing-js-sdk").AuthenticationClient) => void) | undefined) => void);
4135
+ setFailEvent: ((failEvent: ((errorMessages: any) => void) | undefined) => void) | ((failEvent: ((error: any) => void) | undefined) => void);
4136
+ };
4137
+ /**
4138
+ * 设置注册事件
4139
+ * @returns
4140
+ */
4141
+ export const setRegisterEvents: () => {
4142
+ setSuccessEvent: ((successEvents: ((user: import("authing-js-sdk").User, authClient: import("authing-js-sdk").AuthenticationClient) => void) | undefined) => void) | ((successEvents: ((user: import("authing-js-sdk").User, authClient: import("authing-js-sdk").AuthenticationClient) => void) | undefined) => void);
4143
+ setFailEvent: ((failEvent: ((errorMessages: any) => void) | undefined) => void) | ((failEvent: ((error: any) => void) | undefined) => void);
4144
+ };
4145
+
4146
+ }
4147
+ declare module '@authing/react-ui-components/components/_utils/http/header/index' {
4148
+ /**
4149
+ * 设置 version
4150
+ * @param value
4151
+ * @param key
4152
+ */
4153
+ export const setVersionByHeader: (value: string, key?: string) => void;
4154
+ /**
4155
+ * 设置 sdk version
4156
+ * @param value
4157
+ * @param key
4158
+ */
4159
+ export const setSdkVersionByHeader: (value: string, key?: string) => void;
4160
+ /**
4161
+ * 设置 AppId
4162
+ * @param value
4163
+ * @param key
4164
+ */
4165
+ export const setAppIdByRequestHeader: (value: string, key?: string) => void;
4166
+ /**
4167
+ * 设置 x-authing-app-tenant-id 请求头
4168
+ * @param value
4169
+ * @param key
4170
+ */
4171
+ export const setTenantIdByRequestHeader: (value?: string | undefined, key?: string) => void;
4172
+ /**
4173
+ * 根据 publishConfig 中的 userid 设置
4174
+ * @param value
4175
+ * @param key
4176
+ */
4177
+ export const setUserPoolIdByRequestHeader: (value: string, key?: string) => void;
4178
+ export const setLanguageInRequestHeader: () => void;
4179
+ /**
4180
+ * 获取当前所有 headers
4181
+ */
4182
+ export const getHeader: () => import("axios").HeadersDefaults;
4183
+ /**
4184
+ * 修改/设置请求头
4185
+ * @param key
4186
+ * @param value
4187
+ */
4188
+ export const _setRequestHeader: (key: string, value: string) => void;
4189
+
4190
+ }
4191
+ declare module '@authing/react-ui-components/components/_utils/http/index' {
4192
+ import instance from '@authing/react-ui-components/components/_utils/http/instance';
4193
+ import * as httpHeaderMethods from '@authing/react-ui-components/components/_utils/http/header/index';
4194
+ import * as httpEvents from '@authing/react-ui-components/components/_utils/http/events/index';
4195
+ import * as httpBaseConfig from '@authing/react-ui-components/components/_utils/http/base/index';
4196
+ import * as commonRequest from '@authing/react-ui-components/components/_utils/http/api/index';
4197
+ export { instance, httpHeaderMethods, httpEvents, httpBaseConfig, commonRequest, };
4198
+
4199
+ }
4200
+ declare module '@authing/react-ui-components/components/_utils/http/instance' {
4201
+ const instance: import("axios").AxiosInstance;
4202
+ export default instance;
4203
+
4204
+ }
4205
+ declare module '@authing/react-ui-components/components/_utils/http/interceptors/request' {
4206
+ import { AxiosInstance } from 'axios';
4207
+ /**
4208
+ * 初始化请求拦截器
4209
+ * @param instance
4210
+ */
4211
+ export const initRequestInterceptors: (instance: AxiosInstance) => void;
4212
+
4213
+ }
4214
+ declare module '@authing/react-ui-components/components/_utils/http/interceptors/response' {
4215
+ import { AxiosInstance } from 'axios';
4216
+ export interface AuthingResponse<T = any> {
4217
+ /**
4218
+ * 错误码
4219
+ */
4220
+ code?: number;
4221
+ /**
4222
+ * 返回状态
4223
+ * 3XX:状态机流转
4224
+ * 4XX|6XX:错误处理
4225
+ */
4226
+ statusCode?: number;
4227
+ /**
4228
+ * statusCode 3XX 时下个阶段的 code 码
4229
+ */
4230
+ apiCode?: number;
4231
+ /**
4232
+ * 返回的数据
4233
+ */
4234
+ data?: T;
4235
+ /**
4236
+ *
4237
+ */
4238
+ messages?: string;
4239
+ /**
4240
+ *
4241
+ */
4242
+ message?: string;
4243
+ /**
4244
+ * 当前流程 ID
4245
+ * ResponseData 返回则更新当前流程 ID
4246
+ */
4247
+ flowHandle?: string;
4248
+ /**
4249
+ * 响应是否为当前业务内小状态处理
4250
+ * statusCode === 200 下进入该状态
4251
+ */
4252
+ isBusiness?: boolean;
4253
+ }
4254
+ /**
4255
+ * 初始化响应拦截器
4256
+ */
4257
+ export const initResponseInterceptors: (instance: AxiosInstance) => void;
4258
+
4259
+ }
4260
+ declare module '@authing/react-ui-components/components/_utils/http/utils' {
4261
+ import { AxiosRequestConfig, AxiosResponse } from 'axios';
4262
+ import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http/interceptors/response';
4263
+ /**
4264
+ * 根据 Response 中的 apiCode & statusCode 做拦截
4265
+ * @param response
4266
+ * @returns
4267
+ */
4268
+ export const processCodeByResponse: (response: AxiosResponse<AuthingResponse>) => AuthingResponse<any>;
4269
+ /**
4270
+ * 处理请求加密字段
4271
+ * @param config
4272
+ * @returns
4273
+ */
4274
+ export const processEncryptRequestKey: (config: AxiosRequestConfig) => Promise<any>;
4275
+ /**
4276
+ * 处理 flowHandler
4277
+ * @param response
4278
+ * @returns
4279
+ */
4280
+ export const processFlowHandler: (response: AuthingResponse) => AuthingResponse<any>;
4281
+
3206
4282
  }
3207
4283
  declare module '@authing/react-ui-components/components/_utils/http' {
3208
4284
  import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
@@ -3235,18 +4311,36 @@ declare module '@authing/react-ui-components/components/_utils/http' {
3235
4311
  flowHandle?: string;
3236
4312
  }
3237
4313
  export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
4314
+ /**
4315
+ * 根据 Server 返回状态进行的状态流转函数
4316
+ * 默认响应拦截器中自动调用
4317
+ */
3238
4318
  onGuardHandling?: () => CodeAction;
4319
+ /**
4320
+ * Response 返回 actions 是否需要模块内部处理
4321
+ * 根据 status === 200 判断
4322
+ */
4323
+ isBusiness?: boolean;
4324
+ /**
4325
+ * 流程是否结束(兼容老版本字段)
4326
+ */
3239
4327
  isFlowEnd?: boolean;
4328
+ /**
4329
+ * 本次响应 Action 类型
4330
+ * see: packages/react-components/components/_utils/responseManagement/interface.ts
4331
+ */
4332
+ responseActionType?: CodeAction;
3240
4333
  }
3241
4334
 
3242
4335
  }
3243
4336
  declare module '@authing/react-ui-components/components/_utils/index' {
3244
- import { Rule } from 'antd/lib/form';
4337
+ import { FormInstance, Rule, RuleObject } from 'antd/lib/form';
3245
4338
  import qs from 'qs';
3246
4339
  import { User } from 'authing-js-sdk';
3247
4340
  import { ApplicationConfig, ComplateFiledsPlace } from '@authing/react-ui-components/components/AuthingGuard/api/index';
3248
4341
  import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
3249
4342
  import { LoginMethods, RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
4343
+ import { InputMethod } from 'components';
3250
4344
  export * from '@authing/react-ui-components/components/_utils/popupCenter';
3251
4345
  export * from '@authing/react-ui-components/components/_utils/clipboard';
3252
4346
  export const VALIDATE_PATTERN: {
@@ -3259,6 +4353,20 @@ declare module '@authing/react-ui-components/components/_utils/index' {
3259
4353
  export const validate: (type: keyof typeof VALIDATE_PATTERN, val: string) => boolean;
3260
4354
  export const getRequiredRules: (msg: string) => Rule[];
3261
4355
  export const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string | undefined) => Rule[];
4356
+ /**
4357
+ * 验证码是否正确
4358
+ * @param form form 实例
4359
+ * @param key 当前 FormItem 对应值的 key,比如当前为邮箱验证码就传入邮箱输入框的 formItem name
4360
+ * @returns Array
4361
+ */
4362
+ export const fieldCodeCorrect: (form: FormInstance, key: string | undefined, options: {
4363
+ currentMethod: InputMethod;
4364
+ areaCode: string;
4365
+ isInternationSms?: boolean | undefined;
4366
+ }) => {
4367
+ validateTrigger: string[];
4368
+ validator: (rule: RuleObject, value: string) => Promise<void>;
4369
+ }[];
3262
4370
  export function getDeviceName(): string | null | undefined;
3263
4371
  export type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
3264
4372
  export const insertStyles: (styles: string | any, recordKey?: "userConfig" | "appConfig" | undefined) => void;
@@ -3406,6 +4514,12 @@ declare module '@authing/react-ui-components/components/_utils/popupCenter' {
3406
4514
  declare module '@authing/react-ui-components/components/_utils/responseManagement/index' {
3407
4515
  import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
3408
4516
  import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
4517
+ /**
4518
+ * 全局的错误拦截器
4519
+ * @param res
4520
+ * @param callBack
4521
+ * @returns
4522
+ */
3409
4523
  export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => AuthingResponse<any>;
3410
4524
 
3411
4525
  }
@@ -3533,7 +4647,7 @@ declare module '@authing/react-ui-components/components/version/index' {
3533
4647
 
3534
4648
  }
3535
4649
  declare module '@authing/react-ui-components/components/version/version' {
3536
- const _default: "3.1.29";
4650
+ const _default: "3.1.30-beta.0";
3537
4651
  export default _default;
3538
4652
 
3539
4653
  }
@@ -3662,11 +4776,13 @@ declare module '@authing/react-ui-components/config/webpack.config' {
3662
4776
  modules: string[];
3663
4777
  extensions: string[];
3664
4778
  alias: {
4779
+ service: string;
3665
4780
  src?: undefined;
3666
4781
  'react-dom$'?: string;
3667
4782
  'scheduler/tracing'?: string;
3668
4783
  'react-native': string;
3669
4784
  } | {
4785
+ service: string;
3670
4786
  src: string;
3671
4787
  'react-dom$'?: string;
3672
4788
  'scheduler/tracing'?: string;