@authing/react-ui-components 3.1.29-alpha.2 → 3.1.30-beta.1
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 +1224 -617
- package/lib/index.min.css +2 -2
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.LICENSE.txt +16 -0
- package/package.json +3 -2
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 {
|
|
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
|
-
|
|
1234
|
-
|
|
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
|
}
|
|
@@ -1431,6 +1528,41 @@ declare module '@authing/react-ui-components/components/Error/interface' {
|
|
|
1431
1528
|
export interface GuardErrorViewProps extends GuardErrorProps {
|
|
1432
1529
|
}
|
|
1433
1530
|
|
|
1531
|
+
}
|
|
1532
|
+
declare module '@authing/react-ui-components/components/ForgetPassword/api/constant' {
|
|
1533
|
+
export const resetPasswordUrl: () => string;
|
|
1534
|
+
|
|
1535
|
+
}
|
|
1536
|
+
declare module '@authing/react-ui-components/components/ForgetPassword/api/index' {
|
|
1537
|
+
export * from '@authing/react-ui-components/components/ForgetPassword/api/request';
|
|
1538
|
+
|
|
1539
|
+
}
|
|
1540
|
+
declare module '@authing/react-ui-components/components/ForgetPassword/api/request' {
|
|
1541
|
+
import { AxiosRequestConfig } from 'axios';
|
|
1542
|
+
/**
|
|
1543
|
+
* 忘记密码-重置密码 邮箱
|
|
1544
|
+
* @param data
|
|
1545
|
+
* @param config
|
|
1546
|
+
* @returns
|
|
1547
|
+
*/
|
|
1548
|
+
export const resetPwdEmailByAxios: (data: {
|
|
1549
|
+
email: string;
|
|
1550
|
+
code: string;
|
|
1551
|
+
newPassword: string;
|
|
1552
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1553
|
+
/**
|
|
1554
|
+
* 忘记密码-重置密码 手机号
|
|
1555
|
+
* @param data
|
|
1556
|
+
* @param config
|
|
1557
|
+
* @returns
|
|
1558
|
+
*/
|
|
1559
|
+
export const restPwdPhoneByAxios: (data: {
|
|
1560
|
+
phone: string;
|
|
1561
|
+
code: string;
|
|
1562
|
+
newPassword: string;
|
|
1563
|
+
phoneCountryCode?: string;
|
|
1564
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1565
|
+
|
|
1434
1566
|
}
|
|
1435
1567
|
declare module '@authing/react-ui-components/components/ForgetPassword/core/resetPassword' {
|
|
1436
1568
|
/// <reference types="react" />
|
|
@@ -1450,6 +1582,9 @@ declare module '@authing/react-ui-components/components/ForgetPassword/core/rese
|
|
|
1450
1582
|
}
|
|
1451
1583
|
declare module '@authing/react-ui-components/components/ForgetPassword/index' {
|
|
1452
1584
|
import React from 'react';
|
|
1585
|
+
/**
|
|
1586
|
+
* 忘记密码
|
|
1587
|
+
*/
|
|
1453
1588
|
export const GuardForgetPassword: React.FC;
|
|
1454
1589
|
|
|
1455
1590
|
}
|
|
@@ -1527,6 +1662,27 @@ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateM
|
|
|
1527
1662
|
export const getGuardStateMachine: () => GuardStateMachine;
|
|
1528
1663
|
export const useGuardStateMachine: () => GuardStateMachine;
|
|
1529
1664
|
|
|
1665
|
+
}
|
|
1666
|
+
declare module '@authing/react-ui-components/components/Guard/api/constant' {
|
|
1667
|
+
export const publishConfig: (appId: string) => string;
|
|
1668
|
+
export const pageConfig: (appId: string) => string;
|
|
1669
|
+
|
|
1670
|
+
}
|
|
1671
|
+
declare module '@authing/react-ui-components/components/Guard/api/index' {
|
|
1672
|
+
import { AxiosRequestConfig } from 'axios';
|
|
1673
|
+
/**
|
|
1674
|
+
* 获取应用配置信息
|
|
1675
|
+
* @param appId 当前应用配置信息
|
|
1676
|
+
* @returns
|
|
1677
|
+
*/
|
|
1678
|
+
export const getPublishConfigByAxios: <T>(appId: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
|
|
1679
|
+
/**
|
|
1680
|
+
* 获取页面配置
|
|
1681
|
+
* @param appId 当前应用配置信息
|
|
1682
|
+
* @returns
|
|
1683
|
+
*/
|
|
1684
|
+
export const getPageConfigByAxios: <T>(appId: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
|
|
1685
|
+
|
|
1530
1686
|
}
|
|
1531
1687
|
declare module '@authing/react-ui-components/components/Guard/authClient' {
|
|
1532
1688
|
import { AuthenticationClient } from 'authing-js-sdk';
|
|
@@ -1575,291 +1731,105 @@ declare module '@authing/react-ui-components/components/Guard/config' {
|
|
|
1575
1731
|
export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
|
|
1576
1732
|
|
|
1577
1733
|
}
|
|
1578
|
-
declare module '@authing/react-ui-components/components/Guard/core/
|
|
1579
|
-
import
|
|
1580
|
-
|
|
1734
|
+
declare module '@authing/react-ui-components/components/Guard/core/componentsMapping' {
|
|
1735
|
+
import React from 'react';
|
|
1736
|
+
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
1581
1737
|
/**
|
|
1582
|
-
*
|
|
1738
|
+
* 组件映射表
|
|
1739
|
+
* TODO: 斟酌下是否和上层 module.ts 放在一起的单个文件夹中 感觉可放可不放
|
|
1583
1740
|
*/
|
|
1584
|
-
|
|
1741
|
+
const ComponentsMapping: Record<GuardModuleType, (key: string) => React.ReactNode>;
|
|
1742
|
+
export default ComponentsMapping;
|
|
1743
|
+
|
|
1744
|
+
}
|
|
1745
|
+
declare module '@authing/react-ui-components/components/Guard/core/hooks/useBusinessRequest' {
|
|
1746
|
+
import { AuthenticationClient } from 'authing-js-sdk';
|
|
1747
|
+
import { GuardLocalConfig } from 'components/Guard/config';
|
|
1748
|
+
import { GuardEvents } from 'components/Guard/event';
|
|
1749
|
+
import { GuardHttp } from 'components/_utils/guardHttp';
|
|
1750
|
+
export default function useBusinessRequestByAxios(appId: string | undefined, options: {
|
|
1751
|
+
events?: GuardEvents;
|
|
1752
|
+
tenantId?: string;
|
|
1753
|
+
sdkClient?: AuthenticationClient;
|
|
1754
|
+
defaultMergedConfig?: GuardLocalConfig;
|
|
1755
|
+
httpClient?: GuardHttp;
|
|
1756
|
+
finallyConfig?: any;
|
|
1757
|
+
}): {
|
|
1758
|
+
axiosClient: boolean | undefined;
|
|
1759
|
+
};
|
|
1760
|
+
|
|
1761
|
+
}
|
|
1762
|
+
declare module '@authing/react-ui-components/components/Guard/core/hooks/useCss' {
|
|
1585
1763
|
/**
|
|
1586
|
-
*
|
|
1587
|
-
*
|
|
1764
|
+
* 自定义 CSS 相关,finallyConfig 类型待补充
|
|
1765
|
+
* @param finallyConfig
|
|
1588
1766
|
*/
|
|
1589
|
-
export
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
}
|
|
1767
|
+
export default function useCss(finallyConfig: any): void;
|
|
1768
|
+
|
|
1769
|
+
}
|
|
1770
|
+
declare module '@authing/react-ui-components/components/Guard/core/hooks/useEvents' {
|
|
1771
|
+
/// <reference types="react" />
|
|
1772
|
+
import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
|
|
1773
|
+
import { GuardProps } from '@authing/react-ui-components/components/Guard/Guard';
|
|
1595
1774
|
/**
|
|
1596
|
-
*
|
|
1775
|
+
* 初始化事件
|
|
1776
|
+
* @param guardProps
|
|
1777
|
+
* @param openEventsMapping
|
|
1778
|
+
* @returns
|
|
1597
1779
|
*/
|
|
1598
|
-
export
|
|
1780
|
+
export default function useEvents(guardProps: GuardProps, openEventsMapping?: boolean): {
|
|
1781
|
+
events: GuardEvents | undefined;
|
|
1782
|
+
setEvents: import("react").Dispatch<import("react").SetStateAction<GuardEvents | undefined>>;
|
|
1783
|
+
initEvents: () => void;
|
|
1784
|
+
};
|
|
1785
|
+
|
|
1786
|
+
}
|
|
1787
|
+
declare module '@authing/react-ui-components/components/Guard/core/hooks/useFDA' {
|
|
1788
|
+
/// <reference types="react" />
|
|
1789
|
+
import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
|
|
1790
|
+
import { GuardStateMachine, ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
1791
|
+
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
1792
|
+
import { ChangeModuleCore } from '@authing/react-ui-components/components/Guard/core/hooks/useModule';
|
|
1599
1793
|
/**
|
|
1600
|
-
*
|
|
1794
|
+
* 初始化 FDA ,后续 Guard 渲染全部按照 FDA API 执行
|
|
1795
|
+
* @param onChangeModule FDA 内部更新组件核心方法
|
|
1796
|
+
* @param initState 初始化状态
|
|
1797
|
+
* @returns { guardStateMachine,setGuardStateMachine }
|
|
1601
1798
|
*/
|
|
1602
|
-
export
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
nickname?: string | null;
|
|
1626
|
-
/**
|
|
1627
|
-
* 用户名
|
|
1628
|
-
*/
|
|
1629
|
-
username?: string | null;
|
|
1630
|
-
/**
|
|
1631
|
-
* 手机号
|
|
1632
|
-
*/
|
|
1633
|
-
phone?: string | null;
|
|
1634
|
-
/**
|
|
1635
|
-
* 邮箱
|
|
1636
|
-
*/
|
|
1637
|
-
email?: string | null;
|
|
1638
|
-
/**
|
|
1639
|
-
* 头像
|
|
1640
|
-
*/
|
|
1641
|
-
photo?: string | null;
|
|
1642
|
-
/**
|
|
1643
|
-
* qrCodeId 对应的ID
|
|
1644
|
-
*/
|
|
1645
|
-
qrCodeId?: string;
|
|
1646
|
-
/**
|
|
1647
|
-
* 国际化短信区号
|
|
1648
|
-
*/
|
|
1649
|
-
phoneCountryCode?: string;
|
|
1650
|
-
/**
|
|
1651
|
-
* 国际化短信选择框回填
|
|
1652
|
-
*/
|
|
1653
|
-
areaCode?: string;
|
|
1654
|
-
/**
|
|
1655
|
-
* 登录时间
|
|
1656
|
-
*/
|
|
1657
|
-
_updateTime?: string;
|
|
1658
|
-
}
|
|
1659
|
-
class MultipleAccount {
|
|
1660
|
-
/**
|
|
1661
|
-
* 原始的 localStore 值
|
|
1662
|
-
*/
|
|
1663
|
-
private originStore;
|
|
1664
|
-
/**
|
|
1665
|
-
* 当前 AppId Store
|
|
1666
|
-
*/
|
|
1667
|
-
private currentStore;
|
|
1668
|
-
/**
|
|
1669
|
-
* 单账号直接回填
|
|
1670
|
-
*/
|
|
1671
|
-
private firstBackFillData?;
|
|
1672
|
-
/**
|
|
1673
|
-
* server 返回支持的登录方式
|
|
1674
|
-
*/
|
|
1675
|
-
private serverSideLoginMethods;
|
|
1676
|
-
/**
|
|
1677
|
-
* 是否显示多账号登录页面
|
|
1678
|
-
* true 存在
|
|
1679
|
-
*/
|
|
1680
|
-
private memberState;
|
|
1681
|
-
/**
|
|
1682
|
-
* 二维码登录时的ID
|
|
1683
|
-
*/
|
|
1684
|
-
private qrCodeId?;
|
|
1685
|
-
/**
|
|
1686
|
-
* 国际化短信前缀 区号
|
|
1687
|
-
*/
|
|
1688
|
-
private phoneCountryCode?;
|
|
1689
|
-
/**
|
|
1690
|
-
* 国际化短信前缀 选中地区编号
|
|
1691
|
-
*/
|
|
1692
|
-
private areaCode?;
|
|
1693
|
-
private tabStatus?;
|
|
1694
|
-
/**
|
|
1695
|
-
* 当前登录二级状态
|
|
1696
|
-
*/
|
|
1697
|
-
private loginWay?;
|
|
1698
|
-
private appId;
|
|
1699
|
-
/**
|
|
1700
|
-
* 是否开启国际化短信
|
|
1701
|
-
*/
|
|
1702
|
-
private isInternationSms?;
|
|
1703
|
-
constructor();
|
|
1704
|
-
/**
|
|
1705
|
-
* 页面首次加载时初始化 Store
|
|
1706
|
-
* 从 LocalStore 中拿值 放到这里来
|
|
1707
|
-
*/
|
|
1708
|
-
private initStore;
|
|
1709
|
-
/**
|
|
1710
|
-
* 初始化记住账号相关信息
|
|
1711
|
-
* @param normalCount
|
|
1712
|
-
* @returns
|
|
1713
|
-
*/
|
|
1714
|
-
private initMemberState;
|
|
1715
|
-
/**
|
|
1716
|
-
* 获取当前ID下有效账号个数
|
|
1717
|
-
* @returns qrCount 有效的二维码登录个数 normalCount 有效的账号登录方式
|
|
1718
|
-
*/
|
|
1719
|
-
private memberStateCount;
|
|
1720
|
-
/**
|
|
1721
|
-
* 初始化第一次的数据 TODO: 逻辑有点脏 待整理
|
|
1722
|
-
*/
|
|
1723
|
-
private initBackfillData;
|
|
1724
|
-
/**
|
|
1725
|
-
* 根据前端存储的登录方式返回后端映射方式
|
|
1726
|
-
* @param front
|
|
1727
|
-
*/
|
|
1728
|
-
private getServerLoginMethodByFront;
|
|
1729
|
-
/**
|
|
1730
|
-
* 当前 Store DONE
|
|
1731
|
-
*/
|
|
1732
|
-
private getCurrentStore;
|
|
1733
|
-
/**
|
|
1734
|
-
* 国际化短信过滤
|
|
1735
|
-
* true 表示通过 需要保留
|
|
1736
|
-
* false 表示不通过 需要过滤
|
|
1737
|
-
*/
|
|
1738
|
-
private validateInternationSms;
|
|
1739
|
-
/**
|
|
1740
|
-
* 校验有效的登录方式账号
|
|
1741
|
-
* @param user
|
|
1742
|
-
* @param serverSideLoginMethods
|
|
1743
|
-
* @returns
|
|
1744
|
-
*/
|
|
1745
|
-
private validateMethod;
|
|
1746
|
-
/**
|
|
1747
|
-
*
|
|
1748
|
-
* @param tab 一级Tab状态
|
|
1749
|
-
* @param way 二级Tab状态
|
|
1750
|
-
* @param id 二维码登录时 记录对应的二维码 ID
|
|
1751
|
-
*/
|
|
1752
|
-
private setLoginWay;
|
|
1753
|
-
/**
|
|
1754
|
-
* 设置/更新 store 内的用户信息
|
|
1755
|
-
*/
|
|
1756
|
-
private setUserInfo;
|
|
1757
|
-
/**
|
|
1758
|
-
* 持久化保存
|
|
1759
|
-
*/
|
|
1760
|
-
private saveStore;
|
|
1761
|
-
/**
|
|
1762
|
-
* 根据登录的 account 判断本次登录的方式
|
|
1763
|
-
* @param account 登录输入的账号
|
|
1764
|
-
* @param param1 登录成功返回的相关信息 用户名/手机号/邮箱
|
|
1765
|
-
* @returns
|
|
1766
|
-
*/
|
|
1767
|
-
private setLoginWayByHttpData;
|
|
1768
|
-
/**
|
|
1769
|
-
* 根据用户 ID 删除 localStorage 中当前用户 ID
|
|
1770
|
-
*/
|
|
1771
|
-
private delUserById;
|
|
1772
|
-
/**
|
|
1773
|
-
* 获得多账号登录页面的所有用户列表
|
|
1774
|
-
* @param excludeWays
|
|
1775
|
-
*/
|
|
1776
|
-
private getMemoUser;
|
|
1777
|
-
/**
|
|
1778
|
-
* 根据 id 获得当前已登录的用户信息
|
|
1779
|
-
* @param userId
|
|
1780
|
-
* @returns User / undefined
|
|
1781
|
-
*/
|
|
1782
|
-
private getMemoSingleUser;
|
|
1783
|
-
/**
|
|
1784
|
-
* 该方法仅仅需要回填账号的登录方式,其他都不计入
|
|
1785
|
-
* 当用户名/手机号/邮箱/AD/LDAP 相同时,根据登录顺序匹配不同的账号
|
|
1786
|
-
* 根据记住的用户登录方式获取对应的登录账户名
|
|
1787
|
-
* @param way
|
|
1788
|
-
* @param user
|
|
1789
|
-
* @returns
|
|
1790
|
-
*/
|
|
1791
|
-
private getAccountByWay;
|
|
1792
|
-
private _mappingUser;
|
|
1793
|
-
/**
|
|
1794
|
-
* 外部暴露方法
|
|
1795
|
-
*/
|
|
1796
|
-
getStore: () => {
|
|
1797
|
-
initStore: (appId: string, options: {
|
|
1798
|
-
serverSideLoginMethods: LoginWay[];
|
|
1799
|
-
isInternationSms: boolean;
|
|
1800
|
-
}) => void;
|
|
1801
|
-
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string | undefined, internation?: {
|
|
1802
|
-
phoneCountryCode: string;
|
|
1803
|
-
areaCode: string;
|
|
1804
|
-
} | undefined) => void;
|
|
1805
|
-
setUserInfo: (user: Pick<User & {
|
|
1806
|
-
id: string;
|
|
1807
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
1808
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
1809
|
-
username?: string | undefined;
|
|
1810
|
-
phone?: string | undefined;
|
|
1811
|
-
email?: string | undefined;
|
|
1812
|
-
}) => void;
|
|
1813
|
-
getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
|
|
1814
|
-
getMemoSingleUser: (id: string) => {
|
|
1815
|
-
way: LoginWay;
|
|
1816
|
-
account: string;
|
|
1817
|
-
} | undefined;
|
|
1818
|
-
delUserById: (id: string) => string;
|
|
1819
|
-
getMemberState: () => boolean;
|
|
1820
|
-
getFirstBackFillData: () => BackFillMultipleState | undefined;
|
|
1821
|
-
};
|
|
1799
|
+
export default function useFDA(onChangeModule: ChangeModuleCore, initState: ModuleState, events?: GuardEvents, authFlow?: boolean): {
|
|
1800
|
+
isAuthFlow: boolean;
|
|
1801
|
+
guardStateMachine: GuardStateMachine | undefined;
|
|
1802
|
+
setGuardStateMachine: import("react").Dispatch<import("react").SetStateAction<GuardStateMachine | undefined>>;
|
|
1803
|
+
moduleEvents: {
|
|
1804
|
+
changeModule: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
|
|
1805
|
+
backModule: () => void;
|
|
1806
|
+
} | undefined;
|
|
1807
|
+
};
|
|
1808
|
+
|
|
1809
|
+
}
|
|
1810
|
+
declare module '@authing/react-ui-components/components/Guard/core/hooks/useI18n' {
|
|
1811
|
+
import { GuardLocalConfig } from 'components/Guard/config';
|
|
1812
|
+
const useI18i: (config?: Partial<GuardLocalConfig> | undefined) => void;
|
|
1813
|
+
export { useI18i };
|
|
1814
|
+
|
|
1815
|
+
}
|
|
1816
|
+
declare module '@authing/react-ui-components/components/Guard/core/hooks/useModule' {
|
|
1817
|
+
import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
|
|
1818
|
+
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
1819
|
+
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
1820
|
+
export interface ChangeModuleCore {
|
|
1821
|
+
(type: GuardModuleType, initData?: any): Promise<void>;
|
|
1822
1822
|
}
|
|
1823
1823
|
/**
|
|
1824
|
-
*
|
|
1825
|
-
*
|
|
1824
|
+
* Guard 组件渲染状态
|
|
1825
|
+
* @param initializeState 初始化数据
|
|
1826
|
+
* @param events Guard 事件对象
|
|
1827
|
+
* @returns moduleState 组件当前渲染状态,onChangeModule 切换状态方法
|
|
1826
1828
|
*/
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
}) => {
|
|
1831
|
-
instance: {
|
|
1832
|
-
initStore: (appId: string, options: {
|
|
1833
|
-
serverSideLoginMethods: LoginWay[];
|
|
1834
|
-
isInternationSms: boolean;
|
|
1835
|
-
}) => void;
|
|
1836
|
-
setLoginWay: (tab: 'input' | 'qrcode', way: LoginWay, id?: string | undefined, internation?: {
|
|
1837
|
-
phoneCountryCode: string;
|
|
1838
|
-
areaCode: string;
|
|
1839
|
-
} | undefined) => void;
|
|
1840
|
-
setUserInfo: (user: Pick<User & {
|
|
1841
|
-
id: string;
|
|
1842
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
1843
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
1844
|
-
username?: string | undefined;
|
|
1845
|
-
phone?: string | undefined;
|
|
1846
|
-
email?: string | undefined;
|
|
1847
|
-
}) => void;
|
|
1848
|
-
getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
|
|
1849
|
-
getMemoSingleUser: (id: string) => {
|
|
1850
|
-
way: LoginWay;
|
|
1851
|
-
account: string;
|
|
1852
|
-
} | undefined;
|
|
1853
|
-
delUserById: (id: string) => string;
|
|
1854
|
-
getMemberState: () => boolean;
|
|
1855
|
-
getFirstBackFillData: () => BackFillMultipleState | undefined;
|
|
1856
|
-
} | undefined;
|
|
1857
|
-
isMultipleAccount: boolean;
|
|
1858
|
-
referMultipleState: (type: 'login' | 'multiple', data?: BackFillMultipleState | undefined) => void;
|
|
1859
|
-
multipleAccountData: BackFillMultipleState | undefined;
|
|
1860
|
-
clearBackFillData: () => void;
|
|
1829
|
+
export default function useModule(initializeState: ModuleState, events?: GuardEvents): {
|
|
1830
|
+
moduleState: ModuleState;
|
|
1831
|
+
onChangeModule: ChangeModuleCore;
|
|
1861
1832
|
};
|
|
1862
|
-
export default useMultipleAccounts;
|
|
1863
1833
|
|
|
1864
1834
|
}
|
|
1865
1835
|
declare module '@authing/react-ui-components/components/Guard/core/index' {
|
|
@@ -1873,7 +1843,7 @@ declare module '@authing/react-ui-components/components/Guard/core/index' {
|
|
|
1873
1843
|
export const GuardCore: (props: GuardCoreProps) => JSX.Element;
|
|
1874
1844
|
|
|
1875
1845
|
}
|
|
1876
|
-
declare module '@authing/react-ui-components/components/Guard/core/renderContext' {
|
|
1846
|
+
declare module '@authing/react-ui-components/components/Guard/core/renderContext-1' {
|
|
1877
1847
|
import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
|
|
1878
1848
|
import React from 'react';
|
|
1879
1849
|
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
@@ -1920,32 +1890,7 @@ declare module '@authing/react-ui-components/components/Guard/event' {
|
|
|
1920
1890
|
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
|
|
1921
1891
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
1922
1892
|
}
|
|
1923
|
-
export const guardEventsFilter: (props: any,
|
|
1924
|
-
initStore: (appId: string, options: {
|
|
1925
|
-
serverSideLoginMethods: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[];
|
|
1926
|
-
isInternationSms: boolean;
|
|
1927
|
-
}) => void;
|
|
1928
|
-
setLoginWay: (tab: "input" | "qrcode", way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay, id?: string | undefined, internation?: {
|
|
1929
|
-
phoneCountryCode: string;
|
|
1930
|
-
areaCode: string;
|
|
1931
|
-
} | undefined) => void;
|
|
1932
|
-
setUserInfo: (user: Pick<import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").User & {
|
|
1933
|
-
id: string;
|
|
1934
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
1935
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
1936
|
-
username?: string | undefined;
|
|
1937
|
-
phone?: string | undefined;
|
|
1938
|
-
email?: string | undefined;
|
|
1939
|
-
}) => void;
|
|
1940
|
-
getMemoUser: (excludeWays?: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
|
|
1941
|
-
getMemoSingleUser: (id: string) => {
|
|
1942
|
-
way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay;
|
|
1943
|
-
account: string;
|
|
1944
|
-
} | undefined;
|
|
1945
|
-
delUserById: (id: string) => string;
|
|
1946
|
-
getMemberState: () => boolean;
|
|
1947
|
-
getFirstBackFillData: () => import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").BackFillMultipleState | undefined;
|
|
1948
|
-
} | undefined, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
1893
|
+
export const guardEventsFilter: (props: any, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
1949
1894
|
export const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
1950
1895
|
export const GuardEventsCamelToKebabMapping: {
|
|
1951
1896
|
readonly onLoad: "load";
|
|
@@ -2088,8 +2033,21 @@ declare module '@authing/react-ui-components/components/IconFont/useGuardIconfon
|
|
|
2088
2033
|
declare module '@authing/react-ui-components/components/IdentityBinding/IdentityBinding' {
|
|
2089
2034
|
import React from 'react';
|
|
2090
2035
|
import './styles.less';
|
|
2036
|
+
/**
|
|
2037
|
+
* 身份源绑定 第三方登陆时
|
|
2038
|
+
* 需要身份源绑定相关 Authing 账号
|
|
2039
|
+
* @returns
|
|
2040
|
+
*/
|
|
2091
2041
|
export const GuardIdentityBindingView: React.FC;
|
|
2092
2042
|
|
|
2043
|
+
}
|
|
2044
|
+
declare module '@authing/react-ui-components/components/IdentityBinding/api/index' {
|
|
2045
|
+
export * from '@authing/react-ui-components/components/IdentityBinding/api/request';
|
|
2046
|
+
|
|
2047
|
+
}
|
|
2048
|
+
declare module '@authing/react-ui-components/components/IdentityBinding/api/request' {
|
|
2049
|
+
export { authFlowByAxios } from 'service/api';
|
|
2050
|
+
|
|
2093
2051
|
}
|
|
2094
2052
|
declare module '@authing/react-ui-components/components/IdentityBinding/businessRequest' {
|
|
2095
2053
|
export enum IdentityBindingBusinessAction {
|
|
@@ -2117,13 +2075,10 @@ declare module '@authing/react-ui-components/components/IdentityBinding/business
|
|
|
2117
2075
|
BindByPhoneCode = "bind-identity-by-phone-code",
|
|
2118
2076
|
BindByEmailCode = "bind-identity-by-email-code"
|
|
2119
2077
|
}
|
|
2120
|
-
export const PhoneCode: (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2121
|
-
export const EmailCode: (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2122
|
-
export const Password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2123
2078
|
export const useIdentityBindingBusinessRequest: () => {
|
|
2124
|
-
"phone-code": (
|
|
2125
|
-
"emial-code": (
|
|
2126
|
-
password: (
|
|
2079
|
+
"phone-code": (data: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2080
|
+
"emial-code": (data: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2081
|
+
password: (data: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2127
2082
|
};
|
|
2128
2083
|
|
|
2129
2084
|
}
|
|
@@ -2167,6 +2122,18 @@ declare module '@authing/react-ui-components/components/IdentityBindingAsk/Ident
|
|
|
2167
2122
|
import './styles.less';
|
|
2168
2123
|
export const GuardIdentityBindingAskView: React.FC;
|
|
2169
2124
|
|
|
2125
|
+
}
|
|
2126
|
+
declare module '@authing/react-ui-components/components/IdentityBindingAsk/api/index' {
|
|
2127
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2128
|
+
/**
|
|
2129
|
+
* 状态机
|
|
2130
|
+
* @param action
|
|
2131
|
+
* @param config
|
|
2132
|
+
* @returns
|
|
2133
|
+
*/
|
|
2134
|
+
const authFlow: (action: string, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2135
|
+
export { authFlow };
|
|
2136
|
+
|
|
2170
2137
|
}
|
|
2171
2138
|
declare module '@authing/react-ui-components/components/IdentityBindingAsk/index' {
|
|
2172
2139
|
export * from '@authing/react-ui-components/components/IdentityBindingAsk/IdentityBindingAsk';
|
|
@@ -2229,43 +2196,162 @@ declare module '@authing/react-ui-components/components/InputPassword/index' {
|
|
|
2229
2196
|
export const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
|
|
2230
2197
|
|
|
2231
2198
|
}
|
|
2232
|
-
declare module '@authing/react-ui-components/components/Login/
|
|
2233
|
-
|
|
2234
|
-
export const
|
|
2199
|
+
declare module '@authing/react-ui-components/components/Login/api/constant' {
|
|
2200
|
+
export const loginUrlByPassword: (isAdWay: boolean) => "/api/v2/login/ad-all-in-one" | "/api/v2/login/account";
|
|
2201
|
+
export const loginUrlByPhoneCode: () => string;
|
|
2202
|
+
export const loginUrlByEmailCode: () => string;
|
|
2203
|
+
export const loginUrlByAD: () => string;
|
|
2204
|
+
export const loginUrlByLDAP: () => string;
|
|
2205
|
+
export const preLoginUrlByOIDC: () => string;
|
|
2235
2206
|
|
|
2236
2207
|
}
|
|
2237
|
-
declare module '@authing/react-ui-components/components/Login/
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
onLoginSuccess: any;
|
|
2245
|
-
onLoginFailed: any;
|
|
2246
|
-
onBeforeLogin: any;
|
|
2247
|
-
agreements: Agreement[];
|
|
2208
|
+
declare module '@authing/react-ui-components/components/Login/api/index' {
|
|
2209
|
+
export * from '@authing/react-ui-components/components/Login/api/request';
|
|
2210
|
+
|
|
2211
|
+
}
|
|
2212
|
+
declare module '@authing/react-ui-components/components/Login/api/request' {
|
|
2213
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2214
|
+
export interface LoginParams<T = any> {
|
|
2248
2215
|
/**
|
|
2249
|
-
*
|
|
2216
|
+
* 登陆自定义参数
|
|
2250
2217
|
*/
|
|
2251
|
-
|
|
2218
|
+
customData: T;
|
|
2252
2219
|
/**
|
|
2253
|
-
*
|
|
2220
|
+
* 是否自动注册
|
|
2254
2221
|
*/
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2222
|
+
autoRegister?: boolean;
|
|
2223
|
+
/**
|
|
2224
|
+
* 是否携带自定义数据
|
|
2225
|
+
*/
|
|
2226
|
+
withCustomData?: boolean;
|
|
2227
|
+
}
|
|
2228
|
+
/**
|
|
2229
|
+
* 密码登陆请求参数
|
|
2230
|
+
*/
|
|
2231
|
+
export interface LoginParamsWithPassword<T = any> extends LoginParams<T> {
|
|
2232
|
+
/**
|
|
2233
|
+
* 账号
|
|
2234
|
+
*/
|
|
2235
|
+
account: string;
|
|
2236
|
+
/**
|
|
2237
|
+
* 密码
|
|
2238
|
+
*/
|
|
2239
|
+
password: string;
|
|
2240
|
+
/**
|
|
2241
|
+
* 验证码
|
|
2242
|
+
*/
|
|
2243
|
+
captchaCode: string;
|
|
2244
|
+
}
|
|
2245
|
+
/**
|
|
2246
|
+
* 密码登陆
|
|
2247
|
+
*/
|
|
2248
|
+
export const loginRequestByAxios: <T>(data: LoginParams, way?: boolean, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
|
|
2249
|
+
/**
|
|
2250
|
+
* 手机登陆请求参数
|
|
2251
|
+
*/
|
|
2252
|
+
export interface LoginParamsWithPhone<T = any> extends LoginParams<T> {
|
|
2253
|
+
/**
|
|
2254
|
+
* 手机号
|
|
2255
|
+
*/
|
|
2256
|
+
phone: string;
|
|
2257
|
+
/**
|
|
2258
|
+
* 验证码
|
|
2259
|
+
*/
|
|
2260
|
+
code: string;
|
|
2261
|
+
/**
|
|
2262
|
+
* 手机前位数
|
|
2263
|
+
*/
|
|
2264
|
+
phoneCountryCode?: number;
|
|
2265
|
+
}
|
|
2266
|
+
/**
|
|
2267
|
+
* 手机验证码登陆
|
|
2268
|
+
* @param data
|
|
2269
|
+
* @returns
|
|
2270
|
+
*/
|
|
2271
|
+
export const mobileLoginByAxios: (data: LoginParamsWithPhone, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2272
|
+
/**
|
|
2273
|
+
* 手机登陆请求参数
|
|
2274
|
+
*/
|
|
2275
|
+
export interface LoginParamsWithEmail<T = any> extends LoginParams<T> {
|
|
2276
|
+
/**
|
|
2277
|
+
* 邮箱号
|
|
2278
|
+
*/
|
|
2279
|
+
email: string;
|
|
2280
|
+
/**
|
|
2281
|
+
* 验证码
|
|
2282
|
+
*/
|
|
2283
|
+
code: string;
|
|
2284
|
+
}
|
|
2285
|
+
/**
|
|
2286
|
+
* 邮箱登陆
|
|
2287
|
+
* @param data
|
|
2288
|
+
* @param config
|
|
2289
|
+
* @returns
|
|
2290
|
+
*/
|
|
2291
|
+
export const emailLoginByAxios: (data: LoginParamsWithEmail, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2292
|
+
/**
|
|
2293
|
+
* AD 登陆
|
|
2294
|
+
* @param data
|
|
2295
|
+
* @returns
|
|
2296
|
+
*/
|
|
2297
|
+
export const adLoginByAxios: (data: {
|
|
2298
|
+
username: string;
|
|
2299
|
+
password: string;
|
|
2300
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2301
|
+
/**
|
|
2302
|
+
* LDAP 登陆
|
|
2303
|
+
* @param data
|
|
2304
|
+
* @returns
|
|
2305
|
+
*/
|
|
2306
|
+
export const ldapLoginByAxios: (data: {
|
|
2307
|
+
username: string;
|
|
2308
|
+
password: string;
|
|
2309
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2310
|
+
interface PreOIDCParams {
|
|
2311
|
+
state: string;
|
|
2312
|
+
protocol: string;
|
|
2313
|
+
userPoolId: string;
|
|
2314
|
+
appId: string;
|
|
2315
|
+
referer: string;
|
|
2316
|
+
connection: {
|
|
2317
|
+
providerIentifier: any;
|
|
2318
|
+
};
|
|
2319
|
+
}
|
|
2320
|
+
/**
|
|
2321
|
+
* IDO -> OIDC 登陆前校验
|
|
2322
|
+
* @param data
|
|
2323
|
+
* @returns
|
|
2324
|
+
*/
|
|
2325
|
+
export const preLoginOIDCByAxios: (data: PreOIDCParams, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2326
|
+
export {};
|
|
2327
|
+
|
|
2328
|
+
}
|
|
2329
|
+
declare module '@authing/react-ui-components/components/Login/codemap' {
|
|
2330
|
+
import { GuardModuleAction } from '@authing/react-ui-components/components/Guard/module';
|
|
2331
|
+
export const codeMap: Record<number, GuardModuleAction>;
|
|
2332
|
+
|
|
2333
|
+
}
|
|
2334
|
+
declare module '@authing/react-ui-components/components/Login/core/withAD' {
|
|
2335
|
+
/// <reference types="react" />
|
|
2336
|
+
import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2337
|
+
interface LoginWithADProps {
|
|
2338
|
+
publicKey: string;
|
|
2339
|
+
autoRegister?: boolean;
|
|
2340
|
+
onLoginSuccess: any;
|
|
2341
|
+
onLoginFailed: any;
|
|
2342
|
+
onBeforeLogin: any;
|
|
2343
|
+
agreements: Agreement[];
|
|
2344
|
+
}
|
|
2345
|
+
export const LoginWithAD: (props: LoginWithADProps) => JSX.Element;
|
|
2258
2346
|
export {};
|
|
2259
2347
|
|
|
2260
2348
|
}
|
|
2261
2349
|
declare module '@authing/react-ui-components/components/Login/core/withAppQrcode' {
|
|
2262
2350
|
/// <reference types="react" />
|
|
2263
|
-
import { StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2264
2351
|
interface LoginWithAppQrcodeProps {
|
|
2265
2352
|
onLoginSuccess: any;
|
|
2266
2353
|
canLoop: boolean;
|
|
2267
2354
|
qrCodeScanOptions: any;
|
|
2268
|
-
multipleInstance?: StoreInstance;
|
|
2269
2355
|
}
|
|
2270
2356
|
export const LoginWithAppQrcode: (props: LoginWithAppQrcodeProps) => JSX.Element;
|
|
2271
2357
|
export {};
|
|
@@ -2274,7 +2360,6 @@ declare module '@authing/react-ui-components/components/Login/core/withAppQrcode
|
|
|
2274
2360
|
declare module '@authing/react-ui-components/components/Login/core/withLDAP' {
|
|
2275
2361
|
/// <reference types="react" />
|
|
2276
2362
|
import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2277
|
-
import { BackFillMultipleState, StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2278
2363
|
interface LoginWithLDAPProps {
|
|
2279
2364
|
publicKey: string;
|
|
2280
2365
|
autoRegister?: boolean;
|
|
@@ -2283,14 +2368,6 @@ declare module '@authing/react-ui-components/components/Login/core/withLDAP' {
|
|
|
2283
2368
|
onLoginFailed: any;
|
|
2284
2369
|
onBeforeLogin: any;
|
|
2285
2370
|
agreements: Agreement[];
|
|
2286
|
-
/**
|
|
2287
|
-
* 根据输入的账号 & 返回获得对应的登录方法
|
|
2288
|
-
*/
|
|
2289
|
-
multipleInstance?: StoreInstance;
|
|
2290
|
-
/**
|
|
2291
|
-
* 多账号回填的数据
|
|
2292
|
-
*/
|
|
2293
|
-
backfillData?: BackFillMultipleState;
|
|
2294
2371
|
}
|
|
2295
2372
|
export const LoginWithLDAP: (props: LoginWithLDAPProps) => JSX.Element;
|
|
2296
2373
|
export {};
|
|
@@ -2303,6 +2380,11 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
|
|
|
2303
2380
|
export interface FormItemAccountProps extends FormItemProps {
|
|
2304
2381
|
passwordLoginMethods: PasswordLoginMethods[];
|
|
2305
2382
|
}
|
|
2383
|
+
/**
|
|
2384
|
+
* 根据对应的配置:邮箱/用户名/Email渲染FormItem
|
|
2385
|
+
* @param props
|
|
2386
|
+
* @returns
|
|
2387
|
+
*/
|
|
2306
2388
|
export const FormItemAccount: React.FC<FormItemAccountProps>;
|
|
2307
2389
|
|
|
2308
2390
|
}
|
|
@@ -2313,6 +2395,11 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
|
|
|
2313
2395
|
verifyCodeUrl: string;
|
|
2314
2396
|
changeCode: () => void;
|
|
2315
2397
|
}
|
|
2398
|
+
/**
|
|
2399
|
+
* 图形验证码
|
|
2400
|
+
* @param props
|
|
2401
|
+
* @returns
|
|
2402
|
+
*/
|
|
2316
2403
|
export const GraphicVerifyCode: React.FC<GraphicVerifyCodeProps>;
|
|
2317
2404
|
|
|
2318
2405
|
}
|
|
@@ -2320,6 +2407,10 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
|
|
|
2320
2407
|
import { InputProps } from 'antd/lib/input';
|
|
2321
2408
|
import React from 'react';
|
|
2322
2409
|
import { PasswordLoginMethods } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2410
|
+
/**
|
|
2411
|
+
* 账号输入框
|
|
2412
|
+
* 根据邮箱/手机号/密码配置自适应
|
|
2413
|
+
*/
|
|
2323
2414
|
export interface InputAccountProps extends InputProps {
|
|
2324
2415
|
passwordLoginMethods: PasswordLoginMethods[];
|
|
2325
2416
|
}
|
|
@@ -2331,7 +2422,6 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
|
|
|
2331
2422
|
import { Agreement, PasswordLoginMethods } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2332
2423
|
import { LoginMethods } from '@authing/react-ui-components/components/index';
|
|
2333
2424
|
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
2334
|
-
import { BackFillMultipleState, StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2335
2425
|
interface LoginWithPasswordProps {
|
|
2336
2426
|
publicKey: string;
|
|
2337
2427
|
autoRegister?: boolean;
|
|
@@ -2345,15 +2435,12 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
|
|
|
2345
2435
|
loginWay?: LoginMethods;
|
|
2346
2436
|
submitButText?: string;
|
|
2347
2437
|
saveIdentify?: (type: LoginMethods, identity: string) => void;
|
|
2348
|
-
/**
|
|
2349
|
-
* 根据输入的账号 & 返回获得对应的登录方法
|
|
2350
|
-
*/
|
|
2351
|
-
multipleInstance?: StoreInstance;
|
|
2352
|
-
/**
|
|
2353
|
-
* 多账号回填的数据
|
|
2354
|
-
*/
|
|
2355
|
-
backfillData?: BackFillMultipleState;
|
|
2356
2438
|
}
|
|
2439
|
+
/**
|
|
2440
|
+
* 密码登陆
|
|
2441
|
+
* @param props
|
|
2442
|
+
* @returns
|
|
2443
|
+
*/
|
|
2357
2444
|
export const LoginWithPassword: (props: LoginWithPasswordProps) => JSX.Element;
|
|
2358
2445
|
export {};
|
|
2359
2446
|
|
|
@@ -2386,10 +2473,6 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
|
|
|
2386
2473
|
import React, { FC } from 'react';
|
|
2387
2474
|
import './styles.less';
|
|
2388
2475
|
export interface VirtualDropdownProps {
|
|
2389
|
-
/**
|
|
2390
|
-
* 回填的国际化区号
|
|
2391
|
-
*/
|
|
2392
|
-
regionCode?: string;
|
|
2393
2476
|
value?: string;
|
|
2394
2477
|
onChange?: (value: string) => void;
|
|
2395
2478
|
style?: React.CSSProperties;
|
|
@@ -2400,8 +2483,7 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
|
|
|
2400
2483
|
declare module '@authing/react-ui-components/components/Login/core/withVerifyCode/index' {
|
|
2401
2484
|
/// <reference types="react" />
|
|
2402
2485
|
import './styles.less';
|
|
2403
|
-
const LoginWithVerifyCode: (props: any) => JSX.Element;
|
|
2404
|
-
export { LoginWithVerifyCode };
|
|
2486
|
+
export const LoginWithVerifyCode: (props: any) => JSX.Element;
|
|
2405
2487
|
|
|
2406
2488
|
}
|
|
2407
2489
|
declare module '@authing/react-ui-components/components/Login/core/withVerifyCode/inputIdentify' {
|
|
@@ -2416,13 +2498,10 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
|
|
|
2416
2498
|
}
|
|
2417
2499
|
declare module '@authing/react-ui-components/components/Login/core/withWechatMiniQrcode' {
|
|
2418
2500
|
/// <reference types="react" />
|
|
2419
|
-
import { StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2420
2501
|
interface LoginWithWechatMiniQrcodeProps {
|
|
2421
2502
|
onLoginSuccess: any;
|
|
2422
2503
|
canLoop: boolean;
|
|
2423
2504
|
qrCodeScanOptions: any;
|
|
2424
|
-
id: string;
|
|
2425
|
-
multipleInstance?: StoreInstance;
|
|
2426
2505
|
}
|
|
2427
2506
|
export const LoginWithWechatMiniQrcode: (props: LoginWithWechatMiniQrcodeProps) => JSX.Element;
|
|
2428
2507
|
export {};
|
|
@@ -2430,78 +2509,14 @@ declare module '@authing/react-ui-components/components/Login/core/withWechatMin
|
|
|
2430
2509
|
}
|
|
2431
2510
|
declare module '@authing/react-ui-components/components/Login/core/withWechatmpQrcode' {
|
|
2432
2511
|
/// <reference types="react" />
|
|
2433
|
-
import { StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2434
2512
|
interface LoginWithWechatmpQrcodeProps {
|
|
2435
2513
|
onLoginSuccess: any;
|
|
2436
2514
|
canLoop: boolean;
|
|
2437
2515
|
qrCodeScanOptions: any;
|
|
2438
|
-
id: string;
|
|
2439
|
-
/**
|
|
2440
|
-
* 多账号存储实例
|
|
2441
|
-
*/
|
|
2442
|
-
multipleInstance?: StoreInstance;
|
|
2443
2516
|
}
|
|
2444
2517
|
export const LoginWithWechatmpQrcode: (props: LoginWithWechatmpQrcodeProps) => JSX.Element;
|
|
2445
2518
|
export {};
|
|
2446
2519
|
|
|
2447
|
-
}
|
|
2448
|
-
declare module '@authing/react-ui-components/components/Login/hooks/useLoginMultiple' {
|
|
2449
|
-
/// <reference types="react" />
|
|
2450
|
-
import { FormInstance } from 'antd/lib/form';
|
|
2451
|
-
import { BackFillMultipleState, LoginWay } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2452
|
-
/**
|
|
2453
|
-
* 多账号登录下 账户 & 登录方式自动回填
|
|
2454
|
-
* TODO: HOOK 参数有时间整理成为对象,开始没有想到有这么多
|
|
2455
|
-
* 调用地方 core 中需要回填的两个登录方式
|
|
2456
|
-
*/
|
|
2457
|
-
function useLoginMultipleBackFill(options: {
|
|
2458
|
-
form: FormInstance<any>;
|
|
2459
|
-
way: LoginWay;
|
|
2460
|
-
formKey: string;
|
|
2461
|
-
backfillData?: BackFillMultipleState;
|
|
2462
|
-
isOnlyInternationSms?: boolean;
|
|
2463
|
-
setAreaCode?: React.Dispatch<React.SetStateAction<string>>;
|
|
2464
|
-
cancelBackfill?: boolean;
|
|
2465
|
-
}): void;
|
|
2466
|
-
/**
|
|
2467
|
-
* 多账号统一状态管理
|
|
2468
|
-
* @param setLoginWay
|
|
2469
|
-
* @returns
|
|
2470
|
-
*/
|
|
2471
|
-
function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
|
|
2472
|
-
isMultipleAccount: boolean;
|
|
2473
|
-
multipleInstance: {
|
|
2474
|
-
initStore: (appId: string, options: {
|
|
2475
|
-
serverSideLoginMethods: LoginWay[];
|
|
2476
|
-
isInternationSms: boolean;
|
|
2477
|
-
}) => void;
|
|
2478
|
-
setLoginWay: (tab: "input" | "qrcode", way: LoginWay, id?: string | undefined, internation?: {
|
|
2479
|
-
phoneCountryCode: string;
|
|
2480
|
-
areaCode: string;
|
|
2481
|
-
} | undefined) => void;
|
|
2482
|
-
setUserInfo: (user: Pick<import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").User & {
|
|
2483
|
-
id: string;
|
|
2484
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
2485
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
2486
|
-
username?: string | undefined;
|
|
2487
|
-
phone?: string | undefined;
|
|
2488
|
-
email?: string | undefined;
|
|
2489
|
-
}) => void;
|
|
2490
|
-
getMemoUser: (excludeWays?: LoginWay[]) => import("@authing/react-ui-components/components/Login/multipleAccounts/panel").SelectOptions[];
|
|
2491
|
-
getMemoSingleUser: (id: string) => {
|
|
2492
|
-
way: LoginWay;
|
|
2493
|
-
account: string;
|
|
2494
|
-
} | undefined;
|
|
2495
|
-
delUserById: (id: string) => string;
|
|
2496
|
-
getMemberState: () => boolean;
|
|
2497
|
-
getFirstBackFillData: () => BackFillMultipleState | undefined;
|
|
2498
|
-
} | undefined;
|
|
2499
|
-
referMultipleState: ((type: "login" | "multiple") => void) | undefined;
|
|
2500
|
-
backfillData: BackFillMultipleState | undefined;
|
|
2501
|
-
defaultQrWay: string | undefined;
|
|
2502
|
-
};
|
|
2503
|
-
export { useLoginMultipleBackFill, useLoginMultiple };
|
|
2504
|
-
|
|
2505
2520
|
}
|
|
2506
2521
|
declare module '@authing/react-ui-components/components/Login/index' {
|
|
2507
2522
|
/// <reference types="react" />
|
|
@@ -2550,79 +2565,6 @@ declare module '@authing/react-ui-components/components/Login/interface' {
|
|
|
2550
2565
|
}
|
|
2551
2566
|
export const getDefaultLoginConfig: () => LoginConfig;
|
|
2552
2567
|
|
|
2553
|
-
}
|
|
2554
|
-
declare module '@authing/react-ui-components/components/Login/multipleAccounts/index' {
|
|
2555
|
-
import React from 'react';
|
|
2556
|
-
import { LoginWay, StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2557
|
-
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
|
|
2558
|
-
interface MultipleAccountsProps {
|
|
2559
|
-
/**
|
|
2560
|
-
* 多账号存储实例
|
|
2561
|
-
*/
|
|
2562
|
-
multipleInstance?: StoreInstance;
|
|
2563
|
-
/**
|
|
2564
|
-
* 切换 Guard 方法
|
|
2565
|
-
*/
|
|
2566
|
-
changeModule?: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
|
|
2567
|
-
/**
|
|
2568
|
-
* 切换多账号状态
|
|
2569
|
-
*/
|
|
2570
|
-
referMultipleState?: (type: 'login' | 'multiple', data?: {
|
|
2571
|
-
account: string;
|
|
2572
|
-
way: LoginWay;
|
|
2573
|
-
}) => void;
|
|
2574
|
-
}
|
|
2575
|
-
const MultipleAccounts: React.NamedExoticComponent<MultipleAccountsProps>;
|
|
2576
|
-
export { MultipleAccounts };
|
|
2577
|
-
|
|
2578
|
-
}
|
|
2579
|
-
declare module '@authing/react-ui-components/components/Login/multipleAccounts/panel' {
|
|
2580
|
-
import React from 'react';
|
|
2581
|
-
import './style.less';
|
|
2582
|
-
interface SelectPanelProps {
|
|
2583
|
-
lists: SelectOptions[];
|
|
2584
|
-
/**
|
|
2585
|
-
* 点击删除
|
|
2586
|
-
*/
|
|
2587
|
-
handleDel: (id: string) => void;
|
|
2588
|
-
/**
|
|
2589
|
-
* 点击 li
|
|
2590
|
-
*/
|
|
2591
|
-
onClick: (id: string) => void;
|
|
2592
|
-
}
|
|
2593
|
-
export interface SelectOptions {
|
|
2594
|
-
/**
|
|
2595
|
-
* 头像
|
|
2596
|
-
*/
|
|
2597
|
-
photo?: string;
|
|
2598
|
-
/**
|
|
2599
|
-
* 标题
|
|
2600
|
-
*/
|
|
2601
|
-
title?: string;
|
|
2602
|
-
/**
|
|
2603
|
-
* 描述
|
|
2604
|
-
*/
|
|
2605
|
-
description?: string;
|
|
2606
|
-
/**
|
|
2607
|
-
* 用户 ID 唯一标识符
|
|
2608
|
-
*/
|
|
2609
|
-
id: string | 'other';
|
|
2610
|
-
/**
|
|
2611
|
-
* 显示操作栏 default: true
|
|
2612
|
-
*/
|
|
2613
|
-
operation?: boolean;
|
|
2614
|
-
/**
|
|
2615
|
-
* 登录时间
|
|
2616
|
-
*/
|
|
2617
|
-
_updateTime: number;
|
|
2618
|
-
/**
|
|
2619
|
-
* 替代图片元素
|
|
2620
|
-
*/
|
|
2621
|
-
element?: React.ReactElement;
|
|
2622
|
-
}
|
|
2623
|
-
const SelectPanel: React.FC<SelectPanelProps>;
|
|
2624
|
-
export { SelectPanel };
|
|
2625
|
-
|
|
2626
2568
|
}
|
|
2627
2569
|
declare module '@authing/react-ui-components/components/Login/socialLogin/IdpButton/index' {
|
|
2628
2570
|
/// <reference types="react" />
|
|
@@ -2634,7 +2576,6 @@ declare module '@authing/react-ui-components/components/Login/socialLogin/index'
|
|
|
2634
2576
|
import { ApplicationConfig, SocialConnectionItem } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2635
2577
|
import './style.less';
|
|
2636
2578
|
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/index';
|
|
2637
|
-
import { StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
2638
2579
|
export interface SocialLoginProps {
|
|
2639
2580
|
appId: string;
|
|
2640
2581
|
config: GuardLocalConfig;
|
|
@@ -2642,10 +2583,6 @@ declare module '@authing/react-ui-components/components/Login/socialLogin/index'
|
|
|
2642
2583
|
onLoginSuccess: any;
|
|
2643
2584
|
enterpriseConnectionObjs: ApplicationConfig['identityProviders'];
|
|
2644
2585
|
socialConnectionObjs: SocialConnectionItem[];
|
|
2645
|
-
/**
|
|
2646
|
-
* 根据输入的账号 & 返回获得对应的登录方法
|
|
2647
|
-
*/
|
|
2648
|
-
multipleInstance?: StoreInstance;
|
|
2649
2586
|
}
|
|
2650
2587
|
export const SocialLogin: React.FC<SocialLoginProps>;
|
|
2651
2588
|
|
|
@@ -2687,6 +2624,23 @@ declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/inde
|
|
|
2687
2624
|
export const VerifyCodeInput: FC<VerifyCodeInputProps>;
|
|
2688
2625
|
export {};
|
|
2689
2626
|
|
|
2627
|
+
}
|
|
2628
|
+
declare module '@authing/react-ui-components/components/MFA/api/constant' {
|
|
2629
|
+
export const uploadFaceUrl: () => string;
|
|
2630
|
+
|
|
2631
|
+
}
|
|
2632
|
+
declare module '@authing/react-ui-components/components/MFA/api/index' {
|
|
2633
|
+
export { sendEmailCodeByAxios } from 'service/api';
|
|
2634
|
+
export * from '@authing/react-ui-components/components/MFA/api/request';
|
|
2635
|
+
|
|
2636
|
+
}
|
|
2637
|
+
declare module '@authing/react-ui-components/components/MFA/api/request' {
|
|
2638
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2639
|
+
/**
|
|
2640
|
+
* 上传绑定人脸识别的照片
|
|
2641
|
+
*/
|
|
2642
|
+
export const uploadFaceImageByAxios: <T = any>(data: FormData, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
|
|
2643
|
+
|
|
2690
2644
|
}
|
|
2691
2645
|
declare module '@authing/react-ui-components/components/MFA/businessRequest' {
|
|
2692
2646
|
export enum MfaBusinessAction {
|
|
@@ -2730,8 +2684,19 @@ declare module '@authing/react-ui-components/components/MFA/businessRequest' {
|
|
|
2730
2684
|
export const useMfaBusinessRequest: () => {
|
|
2731
2685
|
"verify-email": (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2732
2686
|
"verify-sms": (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2687
|
+
/**
|
|
2688
|
+
* Totp 状态请求
|
|
2689
|
+
* @param content
|
|
2690
|
+
* @returns
|
|
2691
|
+
*/
|
|
2733
2692
|
"verify-totp": (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2693
|
+
/**
|
|
2694
|
+
* 人脸验证
|
|
2695
|
+
*/
|
|
2734
2696
|
"verify-face": (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2697
|
+
/**
|
|
2698
|
+
* 人脸绑定
|
|
2699
|
+
*/
|
|
2735
2700
|
"associate-face": (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2736
2701
|
};
|
|
2737
2702
|
export {};
|
|
@@ -2750,6 +2715,11 @@ declare module '@authing/react-ui-components/components/MFA/core/email' {
|
|
|
2750
2715
|
onBind: (email: string) => void;
|
|
2751
2716
|
config: any;
|
|
2752
2717
|
}
|
|
2718
|
+
/**
|
|
2719
|
+
* 绑定邮箱页面
|
|
2720
|
+
* @param param0
|
|
2721
|
+
* @returns
|
|
2722
|
+
*/
|
|
2753
2723
|
export const BindMFAEmail: React.FC<BindMFAEmailProps>;
|
|
2754
2724
|
interface VerifyMFAEmailProps {
|
|
2755
2725
|
email: string;
|
|
@@ -2758,7 +2728,17 @@ declare module '@authing/react-ui-components/components/MFA/core/email' {
|
|
|
2758
2728
|
sendCodeRef: React.RefObject<HTMLButtonElement>;
|
|
2759
2729
|
codeLength: number;
|
|
2760
2730
|
}
|
|
2731
|
+
/**
|
|
2732
|
+
* 验证邮箱
|
|
2733
|
+
* @param param0
|
|
2734
|
+
* @returns
|
|
2735
|
+
*/
|
|
2761
2736
|
export const VerifyMFAEmail: React.FC<VerifyMFAEmailProps>;
|
|
2737
|
+
/**
|
|
2738
|
+
* 邮箱验证方式
|
|
2739
|
+
* @param param0
|
|
2740
|
+
* @returns
|
|
2741
|
+
*/
|
|
2762
2742
|
export const MFAEmail: React.FC<{
|
|
2763
2743
|
mfaToken: string;
|
|
2764
2744
|
email?: string;
|
|
@@ -2770,6 +2750,11 @@ declare module '@authing/react-ui-components/components/MFA/core/email' {
|
|
|
2770
2750
|
}
|
|
2771
2751
|
declare module '@authing/react-ui-components/components/MFA/core/face' {
|
|
2772
2752
|
/// <reference types="react" />
|
|
2753
|
+
/**
|
|
2754
|
+
* 面部认证
|
|
2755
|
+
* @param props
|
|
2756
|
+
* @returns
|
|
2757
|
+
*/
|
|
2773
2758
|
export const MFAFace: (props: any) => JSX.Element;
|
|
2774
2759
|
|
|
2775
2760
|
}
|
|
@@ -2781,7 +2766,13 @@ declare module '@authing/react-ui-components/components/MFA/core/face_deps' {
|
|
|
2781
2766
|
};
|
|
2782
2767
|
};
|
|
2783
2768
|
export const FACE_SCORE = 0.65;
|
|
2769
|
+
/**
|
|
2770
|
+
* 人脸检测配置
|
|
2771
|
+
*/
|
|
2784
2772
|
export function getFaceDetectorOptions(): any;
|
|
2773
|
+
/**
|
|
2774
|
+
* 获取 facePlugin tinyFaceDetector 微型人脸探测(三种方式之一)
|
|
2775
|
+
*/
|
|
2785
2776
|
export function getCurrentFaceDetectionNet(): any;
|
|
2786
2777
|
export function isFaceDetectionModelLoaded(): boolean;
|
|
2787
2778
|
export function dataURItoBlob(base64Data: any): Blob;
|
|
@@ -2798,6 +2789,11 @@ declare module '@authing/react-ui-components/components/MFA/core/sms' {
|
|
|
2798
2789
|
setAreaCode: (areaCode: string) => void;
|
|
2799
2790
|
isInternationSms: boolean;
|
|
2800
2791
|
}
|
|
2792
|
+
/**
|
|
2793
|
+
* 绑定手机号
|
|
2794
|
+
* @param param0
|
|
2795
|
+
* @returns
|
|
2796
|
+
*/
|
|
2801
2797
|
export const BindMFASms: React.FC<BindMFASmsProps>;
|
|
2802
2798
|
export interface VerifyMFASmsProps {
|
|
2803
2799
|
mfaToken: string;
|
|
@@ -2811,6 +2807,11 @@ declare module '@authing/react-ui-components/components/MFA/core/sms' {
|
|
|
2811
2807
|
userPhone?: string;
|
|
2812
2808
|
}
|
|
2813
2809
|
export const VerifyMFASms: React.FC<VerifyMFASmsProps>;
|
|
2810
|
+
/**
|
|
2811
|
+
* 手机 MFA
|
|
2812
|
+
* @param param0
|
|
2813
|
+
* @returns
|
|
2814
|
+
*/
|
|
2814
2815
|
export const MFASms: React.FC<{
|
|
2815
2816
|
mfaLogin: any;
|
|
2816
2817
|
config: MFAConfig;
|
|
@@ -2825,12 +2826,22 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
|
|
|
2825
2826
|
initData: GuardMFAInitData;
|
|
2826
2827
|
changeModule: any;
|
|
2827
2828
|
}
|
|
2829
|
+
/**
|
|
2830
|
+
* 绑定 ToTp 页面 跳转 Totp
|
|
2831
|
+
* @param param0
|
|
2832
|
+
* @returns
|
|
2833
|
+
*/
|
|
2828
2834
|
export const BindMFATotp: React.FC<BindMFATotpProps>;
|
|
2829
2835
|
export interface VerifyMFATotpProps {
|
|
2830
2836
|
mfaToken: string;
|
|
2831
2837
|
mfaLogin: any;
|
|
2832
2838
|
changeModule: any;
|
|
2833
2839
|
}
|
|
2840
|
+
/**
|
|
2841
|
+
* Totp 验证页面
|
|
2842
|
+
* @param param0
|
|
2843
|
+
* @returns
|
|
2844
|
+
*/
|
|
2834
2845
|
export const VerifyMFATotp: React.FC<VerifyMFATotpProps>;
|
|
2835
2846
|
export interface MFATotpProps {
|
|
2836
2847
|
changeModule: any;
|
|
@@ -2838,6 +2849,13 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
|
|
|
2838
2849
|
initData: GuardMFAInitData;
|
|
2839
2850
|
mfaLogin: any;
|
|
2840
2851
|
}
|
|
2852
|
+
/**
|
|
2853
|
+
* MFA Totp 页面
|
|
2854
|
+
* 开启 => 渲染 VerifyMFATotp 绑定
|
|
2855
|
+
* 不开启 => 渲染绑定页面
|
|
2856
|
+
* @param param
|
|
2857
|
+
* @returns
|
|
2858
|
+
*/
|
|
2841
2859
|
export const MFATotp: React.FC<MFATotpProps>;
|
|
2842
2860
|
|
|
2843
2861
|
}
|
|
@@ -2849,6 +2867,10 @@ declare module '@authing/react-ui-components/components/MFA/index' {
|
|
|
2849
2867
|
mfaBackState: string;
|
|
2850
2868
|
}
|
|
2851
2869
|
export const MFABackStateContext: React.Context<MFABackStateContextType | undefined>;
|
|
2870
|
+
/**
|
|
2871
|
+
* MFA 相关页面
|
|
2872
|
+
* @returns
|
|
2873
|
+
*/
|
|
2852
2874
|
export const GuardMFAView: React.FC;
|
|
2853
2875
|
export {};
|
|
2854
2876
|
|
|
@@ -2906,6 +2928,29 @@ declare module '@authing/react-ui-components/components/MFA/mfaMethods/index' {
|
|
|
2906
2928
|
}
|
|
2907
2929
|
export const MFAMethods: React.FC<MFAMethodsProps>;
|
|
2908
2930
|
|
|
2931
|
+
}
|
|
2932
|
+
declare module '@authing/react-ui-components/components/NeedHelpView/api/constant' {
|
|
2933
|
+
export const feedbackUrl: () => string;
|
|
2934
|
+
|
|
2935
|
+
}
|
|
2936
|
+
declare module '@authing/react-ui-components/components/NeedHelpView/api/index' {
|
|
2937
|
+
export * from '@authing/react-ui-components/components/NeedHelpView/api/request';
|
|
2938
|
+
|
|
2939
|
+
}
|
|
2940
|
+
declare module '@authing/react-ui-components/components/NeedHelpView/api/request' {
|
|
2941
|
+
/**
|
|
2942
|
+
* 问题反馈
|
|
2943
|
+
* @param data
|
|
2944
|
+
* @returns
|
|
2945
|
+
*/
|
|
2946
|
+
export const feedbackByAxios: (data: {
|
|
2947
|
+
type: number;
|
|
2948
|
+
description: string;
|
|
2949
|
+
phone: string;
|
|
2950
|
+
images: string[];
|
|
2951
|
+
appId: string;
|
|
2952
|
+
}) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2953
|
+
|
|
2909
2954
|
}
|
|
2910
2955
|
declare module '@authing/react-ui-components/components/NeedHelpView/core/describeQuestions' {
|
|
2911
2956
|
/// <reference types="react" />
|
|
@@ -2922,13 +2967,34 @@ declare module '@authing/react-ui-components/components/NeedHelpView/index' {
|
|
|
2922
2967
|
/// <reference types="react" />
|
|
2923
2968
|
export const GuardNeedHelpView: (props: any) => JSX.Element;
|
|
2924
2969
|
|
|
2970
|
+
}
|
|
2971
|
+
declare module '@authing/react-ui-components/components/RecoveryCode/api/constant' {
|
|
2972
|
+
export const recoverCodeUrl: () => string;
|
|
2973
|
+
|
|
2974
|
+
}
|
|
2975
|
+
declare module '@authing/react-ui-components/components/RecoveryCode/api/index' {
|
|
2976
|
+
export { authFlowByAxios } from 'service/api';
|
|
2977
|
+
|
|
2978
|
+
}
|
|
2979
|
+
declare module '@authing/react-ui-components/components/RecoveryCode/api/request' {
|
|
2980
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2981
|
+
/**
|
|
2982
|
+
* 不在流程中(AuthFlow)请求恢复 Totp 请求
|
|
2983
|
+
* @param data
|
|
2984
|
+
* @param config
|
|
2985
|
+
* @returns
|
|
2986
|
+
*/
|
|
2987
|
+
export const recoverCodeByAxios: (data: {
|
|
2988
|
+
recoveryCode: string;
|
|
2989
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2990
|
+
|
|
2925
2991
|
}
|
|
2926
2992
|
declare module '@authing/react-ui-components/components/RecoveryCode/businessRequest' {
|
|
2927
2993
|
export enum TotpRecoveryCodeBusinessAction {
|
|
2928
2994
|
RecoveryTotp = "recovery-totp",
|
|
2929
2995
|
ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
|
|
2930
2996
|
}
|
|
2931
|
-
export function authFlow<T>(action: TotpRecoveryCodeBusinessAction,
|
|
2997
|
+
export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, data: any): Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
|
|
2932
2998
|
|
|
2933
2999
|
}
|
|
2934
3000
|
declare module '@authing/react-ui-components/components/RecoveryCode/core/saveCode' {
|
|
@@ -2953,6 +3019,9 @@ declare module '@authing/react-ui-components/components/RecoveryCode/index' {
|
|
|
2953
3019
|
import React from 'react';
|
|
2954
3020
|
import './style.less';
|
|
2955
3021
|
export const RecoveryCode: React.FC;
|
|
3022
|
+
/**
|
|
3023
|
+
* authFlow 中恢复
|
|
3024
|
+
*/
|
|
2956
3025
|
export const RecoveryCodeAuthFlow: React.FC;
|
|
2957
3026
|
export const GuardRecoveryCodeView: React.FC;
|
|
2958
3027
|
|
|
@@ -2967,6 +3036,37 @@ declare module '@authing/react-ui-components/components/RecoveryCode/interface'
|
|
|
2967
3036
|
onLogin?: (user: User, authClient: AuthenticationClient) => void;
|
|
2968
3037
|
}
|
|
2969
3038
|
|
|
3039
|
+
}
|
|
3040
|
+
declare module '@authing/react-ui-components/components/Register/api/constant' {
|
|
3041
|
+
export const registerEmailCodeUrl: () => string;
|
|
3042
|
+
|
|
3043
|
+
}
|
|
3044
|
+
declare module '@authing/react-ui-components/components/Register/api/index' {
|
|
3045
|
+
import { registerEmailCodeByAxios } from '@authing/react-ui-components/components/Register/api/request';
|
|
3046
|
+
import { validatePhoneCodeByAxios, validateEmailCodeByAxios } from 'service/api';
|
|
3047
|
+
export { validatePhoneCodeByAxios, validateEmailCodeByAxios, registerEmailCodeByAxios, };
|
|
3048
|
+
|
|
3049
|
+
}
|
|
3050
|
+
declare module '@authing/react-ui-components/components/Register/api/request' {
|
|
3051
|
+
import { AxiosRequestConfig } from 'axios';
|
|
3052
|
+
/**
|
|
3053
|
+
* 邮箱注册
|
|
3054
|
+
* @param data
|
|
3055
|
+
* @param config
|
|
3056
|
+
* @returns
|
|
3057
|
+
*/
|
|
3058
|
+
export const registerEmailCodeByAxios: (data: {
|
|
3059
|
+
email: string;
|
|
3060
|
+
code: string;
|
|
3061
|
+
profile: {
|
|
3062
|
+
browser: string | null;
|
|
3063
|
+
device: string | null | undefined;
|
|
3064
|
+
};
|
|
3065
|
+
context: string;
|
|
3066
|
+
generateToken: boolean;
|
|
3067
|
+
password?: string;
|
|
3068
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
3069
|
+
|
|
2970
3070
|
}
|
|
2971
3071
|
declare module '@authing/react-ui-components/components/Register/codemap' {
|
|
2972
3072
|
import { GuardModuleAction } from '@authing/react-ui-components/components/Guard/module';
|
|
@@ -2990,58 +3090,43 @@ declare module '@authing/react-ui-components/components/Register/components/Agre
|
|
|
2990
3090
|
declare module '@authing/react-ui-components/components/Register/core/WithCode' {
|
|
2991
3091
|
import React from 'react';
|
|
2992
3092
|
import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
3093
|
+
import { GetRegisterEvent } from '@authing/react-ui-components/components/Register/interface';
|
|
2993
3094
|
export interface RegisterWithCodeProps {
|
|
2994
3095
|
onRegisterSuccess: Function;
|
|
2995
3096
|
onRegisterFailed: Function;
|
|
2996
|
-
onBeforeRegister?:
|
|
3097
|
+
onBeforeRegister?: GetRegisterEvent<'onBeforeRegister'>;
|
|
2997
3098
|
agreements: Agreement[];
|
|
2998
3099
|
publicConfig?: ApplicationConfig;
|
|
2999
3100
|
registeContext?: any;
|
|
3000
3101
|
methods: any[];
|
|
3001
3102
|
}
|
|
3103
|
+
/**
|
|
3104
|
+
* 验证码方式注册
|
|
3105
|
+
* @param param
|
|
3106
|
+
* @returns
|
|
3107
|
+
*/
|
|
3002
3108
|
export const RegisterWithCode: React.FC<RegisterWithCodeProps>;
|
|
3003
3109
|
|
|
3004
3110
|
}
|
|
3005
3111
|
declare module '@authing/react-ui-components/components/Register/core/WithEmail' {
|
|
3006
3112
|
import React from 'react';
|
|
3007
3113
|
import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
3114
|
+
import { GetRegisterEvent } from '@authing/react-ui-components/components/Register/interface';
|
|
3008
3115
|
export interface RegisterWithEmailProps {
|
|
3009
3116
|
onRegisterSuccess: Function;
|
|
3010
3117
|
onRegisterFailed: Function;
|
|
3011
|
-
onBeforeRegister?:
|
|
3118
|
+
onBeforeRegister?: GetRegisterEvent<'onBeforeRegister'>;
|
|
3012
3119
|
publicConfig?: ApplicationConfig;
|
|
3013
3120
|
agreements: Agreement[];
|
|
3014
3121
|
registeContext?: any;
|
|
3015
3122
|
}
|
|
3123
|
+
/**
|
|
3124
|
+
* 邮箱 + 密码注册 头部显示密码注册
|
|
3125
|
+
* @param param
|
|
3126
|
+
* @returns
|
|
3127
|
+
*/
|
|
3016
3128
|
export const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
|
|
3017
3129
|
|
|
3018
|
-
}
|
|
3019
|
-
declare module '@authing/react-ui-components/components/Register/core/WithEmailCode' {
|
|
3020
|
-
import React from 'react';
|
|
3021
|
-
import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
3022
|
-
export interface RegisterWithEmailCodeProps {
|
|
3023
|
-
onRegisterSuccess: Function;
|
|
3024
|
-
onRegisterFailed: Function;
|
|
3025
|
-
onBeforeRegister?: Function;
|
|
3026
|
-
agreements: Agreement[];
|
|
3027
|
-
publicConfig?: ApplicationConfig;
|
|
3028
|
-
registeContext?: any;
|
|
3029
|
-
}
|
|
3030
|
-
export const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
|
|
3031
|
-
|
|
3032
|
-
}
|
|
3033
|
-
declare module '@authing/react-ui-components/components/Register/core/WithPhone' {
|
|
3034
|
-
import React from 'react';
|
|
3035
|
-
import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
3036
|
-
export interface RegisterWithPhoneProps {
|
|
3037
|
-
onRegisterSuccess: Function;
|
|
3038
|
-
onRegisterFailed: Function;
|
|
3039
|
-
agreements: Agreement[];
|
|
3040
|
-
publicConfig?: ApplicationConfig;
|
|
3041
|
-
registeContext?: any;
|
|
3042
|
-
}
|
|
3043
|
-
export const RegisterWithPhone: React.FC<RegisterWithPhoneProps>;
|
|
3044
|
-
|
|
3045
3130
|
}
|
|
3046
3131
|
declare module '@authing/react-ui-components/components/Register/index' {
|
|
3047
3132
|
import React from 'react';
|
|
@@ -3050,7 +3135,7 @@ declare module '@authing/react-ui-components/components/Register/index' {
|
|
|
3050
3135
|
}
|
|
3051
3136
|
declare module '@authing/react-ui-components/components/Register/interface' {
|
|
3052
3137
|
import { IG2FCProps, IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
|
|
3053
|
-
import { AuthenticationClient, User,
|
|
3138
|
+
import { AuthenticationClient, User, RegisterMethods } from '@authing/react-ui-components/components/index';
|
|
3054
3139
|
import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
3055
3140
|
export interface RegisterConfig extends IG2Config {
|
|
3056
3141
|
disableRegister?: boolean;
|
|
@@ -3061,8 +3146,24 @@ declare module '@authing/react-ui-components/components/Register/interface' {
|
|
|
3061
3146
|
agreements?: Agreement[];
|
|
3062
3147
|
registerContext?: any;
|
|
3063
3148
|
}
|
|
3149
|
+
export type SupportRegisterMethods = 'email' | 'email-code' | 'phone-code';
|
|
3150
|
+
/**
|
|
3151
|
+
* 注册前回调事件接受参数
|
|
3152
|
+
*/
|
|
3153
|
+
export interface onBeforeRegisterParams {
|
|
3154
|
+
type: SupportRegisterMethods;
|
|
3155
|
+
data: {
|
|
3156
|
+
account: string;
|
|
3157
|
+
password?: string;
|
|
3158
|
+
code?: string;
|
|
3159
|
+
};
|
|
3160
|
+
}
|
|
3161
|
+
/**
|
|
3162
|
+
* 获取用户注册事件的类型
|
|
3163
|
+
*/
|
|
3164
|
+
export type GetRegisterEvent<T extends keyof RegisterEvents> = RegisterEvents[T];
|
|
3064
3165
|
export interface RegisterEvents extends IG2Events {
|
|
3065
|
-
onBeforeRegister?: (registerInfo:
|
|
3166
|
+
onBeforeRegister?: (registerInfo: onBeforeRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
|
|
3066
3167
|
onRegister?: (user: User, authClient: AuthenticationClient) => void;
|
|
3067
3168
|
onRegisterError?: (error: any) => void;
|
|
3068
3169
|
onRegisterTabChange?: (activeTab: RegisterMethods) => void;
|
|
@@ -3079,6 +3180,10 @@ declare module '@authing/react-ui-components/components/Register/interface' {
|
|
|
3079
3180
|
declare module '@authing/react-ui-components/components/Register/utils' {
|
|
3080
3181
|
export const useIsChangeComplete: (currentMode: 'phone' | 'email') => boolean;
|
|
3081
3182
|
|
|
3183
|
+
}
|
|
3184
|
+
declare module '@authing/react-ui-components/components/SelfUnlock/api/index' {
|
|
3185
|
+
export { authFlowByAxios } from 'service/api';
|
|
3186
|
+
|
|
3082
3187
|
}
|
|
3083
3188
|
declare module '@authing/react-ui-components/components/SelfUnlock/core/selfUnlock' {
|
|
3084
3189
|
import React from 'react';
|
|
@@ -3093,6 +3198,10 @@ declare module '@authing/react-ui-components/components/SelfUnlock/core/selfUnlo
|
|
|
3093
3198
|
}
|
|
3094
3199
|
declare module '@authing/react-ui-components/components/SelfUnlock/index' {
|
|
3095
3200
|
import React from 'react';
|
|
3201
|
+
/**
|
|
3202
|
+
* 自助解锁
|
|
3203
|
+
* @returns
|
|
3204
|
+
*/
|
|
3096
3205
|
export const GuardUnlockView: React.FC;
|
|
3097
3206
|
|
|
3098
3207
|
}
|
|
@@ -3145,7 +3254,7 @@ declare module '@authing/react-ui-components/components/SendCode/SendCodeByEmail
|
|
|
3145
3254
|
}
|
|
3146
3255
|
declare module '@authing/react-ui-components/components/SendCode/SendCodeByPhone' {
|
|
3147
3256
|
import { FC } from 'react';
|
|
3148
|
-
import { SceneType } from 'authing-
|
|
3257
|
+
import { SceneType } from '@authing/react-ui-components/components/Type/interface';
|
|
3149
3258
|
import './style.less';
|
|
3150
3259
|
import { InputProps } from 'antd/lib/input';
|
|
3151
3260
|
export interface SendCodeByPhoneProps extends InputProps {
|
|
@@ -3160,6 +3269,10 @@ declare module '@authing/react-ui-components/components/SendCode/SendCodeByPhone
|
|
|
3160
3269
|
}
|
|
3161
3270
|
export const SendCodeByPhone: FC<SendCodeByPhoneProps>;
|
|
3162
3271
|
|
|
3272
|
+
}
|
|
3273
|
+
declare module '@authing/react-ui-components/components/SendCode/api/index' {
|
|
3274
|
+
export { sendEmailCodeByAxios } from 'service/api';
|
|
3275
|
+
|
|
3163
3276
|
}
|
|
3164
3277
|
declare module '@authing/react-ui-components/components/SendCode/index' {
|
|
3165
3278
|
import { FC } from 'react';
|
|
@@ -3234,6 +3347,10 @@ declare module '@authing/react-ui-components/components/SubmitSuccess/interface'
|
|
|
3234
3347
|
|
|
3235
3348
|
}
|
|
3236
3349
|
declare module '@authing/react-ui-components/components/Type/index' {
|
|
3350
|
+
export * from '@authing/react-ui-components/components/Type/interface';
|
|
3351
|
+
|
|
3352
|
+
}
|
|
3353
|
+
declare module '@authing/react-ui-components/components/Type/interface' {
|
|
3237
3354
|
import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
|
|
3238
3355
|
import { Lang } from 'authing-js-sdk/build/main/types';
|
|
3239
3356
|
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
@@ -3312,6 +3429,20 @@ declare module '@authing/react-ui-components/components/Type/index' {
|
|
|
3312
3429
|
EMAIL_UNBIND_VERIFY_CODE = "EMAIL_UNBIND_VERIFY_CODE",
|
|
3313
3430
|
SELF_UNLOCKING_VERIFY_CODE = "SELF_UNLOCKING_VERIFY_CODE"
|
|
3314
3431
|
}
|
|
3432
|
+
/**
|
|
3433
|
+
* 验证码场景类型
|
|
3434
|
+
*/
|
|
3435
|
+
export enum SceneType {
|
|
3436
|
+
SCENE_TYPE_LOGIN = "login",
|
|
3437
|
+
SCENE_TYPE_REGISTER = "register",
|
|
3438
|
+
SCENE_TYPE_RESET = "reset",
|
|
3439
|
+
SCENE_TYPE_BIND = "bind",
|
|
3440
|
+
SCENE_TYPE_UNBIND = "unbind",
|
|
3441
|
+
SCENE_TYPE_MFA_BIND = "mfa-bind",
|
|
3442
|
+
SCENE_TYPE_MFA_VERIFY = "mfa-verify",
|
|
3443
|
+
SCENE_TYPE_MFA_UNBIND = "mfa-unbind",
|
|
3444
|
+
SCENE_TYPE_COMPLETE_PHONE = "complete-phone"
|
|
3445
|
+
}
|
|
3315
3446
|
|
|
3316
3447
|
}
|
|
3317
3448
|
declare module '@authing/react-ui-components/components/ValidatorRules/PasswordFormItem' {
|
|
@@ -3330,6 +3461,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/Validator
|
|
|
3330
3461
|
export const PhoneFormItem: React.FC<ValidatorFormItemProps>;
|
|
3331
3462
|
export const UserNameFormItem: React.FC<ValidatorFormItemProps>;
|
|
3332
3463
|
|
|
3464
|
+
}
|
|
3465
|
+
declare module '@authing/react-ui-components/components/ValidatorRules/api/index' {
|
|
3466
|
+
export { validateAccountByAxios } from 'service/api';
|
|
3467
|
+
|
|
3333
3468
|
}
|
|
3334
3469
|
declare module '@authing/react-ui-components/components/ValidatorRules/index' {
|
|
3335
3470
|
import { FormInstance, FormItemProps } from 'antd/lib/form';
|
|
@@ -3392,6 +3527,32 @@ declare module '@authing/react-ui-components/components/_utils/GuardErrorCode' {
|
|
|
3392
3527
|
ACCOUNT_LOCK = 2005
|
|
3393
3528
|
}
|
|
3394
3529
|
|
|
3530
|
+
}
|
|
3531
|
+
declare module '@authing/react-ui-components/components/_utils/actions/index' {
|
|
3532
|
+
/**
|
|
3533
|
+
* Response Action 是否为渲染信息
|
|
3534
|
+
* @param parseStatusCode
|
|
3535
|
+
* @returns
|
|
3536
|
+
*/
|
|
3537
|
+
export const isRenderMessageByStatusCode: (parseStatusCode: number) => boolean;
|
|
3538
|
+
/**
|
|
3539
|
+
* Response Action 是否为内部流程状态处理(交由业务处理)
|
|
3540
|
+
* @param parseStatusCode
|
|
3541
|
+
* @param apiCode
|
|
3542
|
+
*/
|
|
3543
|
+
export const isFlowBusinessByStatusCode: (parseStatusCode: number) => boolean;
|
|
3544
|
+
/**
|
|
3545
|
+
* Response Action 是否为流程结束
|
|
3546
|
+
* @param parseStatusCode
|
|
3547
|
+
* @param apiCode
|
|
3548
|
+
*/
|
|
3549
|
+
export const isFlowEndByStatusCode: (parseStatusCode: number, apiCode: number) => boolean;
|
|
3550
|
+
/**
|
|
3551
|
+
* Response Action 是否为下个流程
|
|
3552
|
+
* @param parseStatusCode
|
|
3553
|
+
*/
|
|
3554
|
+
export const isNextFlowByStatusCode: (parseStatusCode: number, apiCode: number) => boolean;
|
|
3555
|
+
|
|
3395
3556
|
}
|
|
3396
3557
|
declare module '@authing/react-ui-components/components/_utils/appendConfig' {
|
|
3397
3558
|
import { GuardAppendConfig } from '@authing/react-ui-components/components/index';
|
|
@@ -3414,6 +3575,14 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
3414
3575
|
export const getPublicConfig: (appId: string) => ApplicationConfig;
|
|
3415
3576
|
export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
|
|
3416
3577
|
export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
|
|
3578
|
+
/**
|
|
3579
|
+
*
|
|
3580
|
+
* @param appId
|
|
3581
|
+
* @param config 默认配置
|
|
3582
|
+
* @param httpClient
|
|
3583
|
+
* @param setError
|
|
3584
|
+
* @returns 合并后的 finallyConfig
|
|
3585
|
+
*/
|
|
3417
3586
|
export const useMergePublicConfig: (appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
|
|
3418
3587
|
host: string;
|
|
3419
3588
|
isSSO?: boolean | undefined;
|
|
@@ -3498,15 +3667,14 @@ declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
|
3498
3667
|
} | undefined;
|
|
3499
3668
|
export const getPageConfig: (appId: string) => GuardPageConfig;
|
|
3500
3669
|
export const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
|
|
3501
|
-
export const requestGuardPageConfig: (appId: string,
|
|
3502
|
-
export const useGuardPageConfig: (appId?: string | undefined,
|
|
3670
|
+
export const requestGuardPageConfig: (appId: string, baseURL?: string | undefined) => Promise<GuardPageConfig>;
|
|
3671
|
+
export const useGuardPageConfig: (appId?: string | undefined, defaultConfig?: GuardLocalConfig | undefined, serError?: any) => GuardPageConfig | undefined;
|
|
3503
3672
|
|
|
3504
3673
|
}
|
|
3505
3674
|
declare module '@authing/react-ui-components/components/_utils/context' {
|
|
3506
3675
|
import React from 'react';
|
|
3507
3676
|
import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '@authing/react-ui-components/components/index';
|
|
3508
3677
|
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
3509
|
-
import { BackFillMultipleState, StoreInstance } from '@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts';
|
|
3510
3678
|
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
3511
3679
|
import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
|
|
3512
3680
|
export interface IGuardContext {
|
|
@@ -3524,29 +3692,6 @@ declare module '@authing/react-ui-components/components/_utils/context' {
|
|
|
3524
3692
|
isAuthFlow: boolean;
|
|
3525
3693
|
contextLoaded: boolean;
|
|
3526
3694
|
guardPageConfig: Partial<GuardPageConfig>;
|
|
3527
|
-
multipleInstance: {
|
|
3528
|
-
/**
|
|
3529
|
-
* 多账号相关
|
|
3530
|
-
*/
|
|
3531
|
-
isMultipleAccount: boolean;
|
|
3532
|
-
/**
|
|
3533
|
-
* when: 多账号页面跳转进入登录页面
|
|
3534
|
-
* 携带的回填数据信息
|
|
3535
|
-
*/
|
|
3536
|
-
multipleAccountData?: BackFillMultipleState;
|
|
3537
|
-
/**
|
|
3538
|
-
* 多账号 store 实例
|
|
3539
|
-
*/
|
|
3540
|
-
instance?: StoreInstance;
|
|
3541
|
-
/**
|
|
3542
|
-
* 切换多账号 isMultipleAccount 状态
|
|
3543
|
-
*/
|
|
3544
|
-
referMultipleState?: (type: 'login' | 'multiple') => void;
|
|
3545
|
-
/**
|
|
3546
|
-
* 清空回填数据
|
|
3547
|
-
*/
|
|
3548
|
-
clearBackFillData?: () => void;
|
|
3549
|
-
};
|
|
3550
3695
|
}
|
|
3551
3696
|
export const createGuardXContext: () => {
|
|
3552
3697
|
Provider: React.FC<{
|
|
@@ -3584,60 +3729,6 @@ declare module '@authing/react-ui-components/components/_utils/context' {
|
|
|
3584
3729
|
export const useGuardContextLoaded: () => boolean;
|
|
3585
3730
|
export const useGuardIsAuthFlow: () => boolean;
|
|
3586
3731
|
export const useGuardPageConfig: () => Partial<GuardPageConfig>;
|
|
3587
|
-
/**
|
|
3588
|
-
* 多账号登录 store 实例
|
|
3589
|
-
*/
|
|
3590
|
-
export const useGuardMultipleInstance: () => {
|
|
3591
|
-
/**
|
|
3592
|
-
* 多账号相关
|
|
3593
|
-
*/
|
|
3594
|
-
isMultipleAccount: boolean;
|
|
3595
|
-
/**
|
|
3596
|
-
* when: 多账号页面跳转进入登录页面
|
|
3597
|
-
* 携带的回填数据信息
|
|
3598
|
-
*/
|
|
3599
|
-
multipleAccountData?: BackFillMultipleState | undefined;
|
|
3600
|
-
/**
|
|
3601
|
-
* 多账号 store 实例
|
|
3602
|
-
*/
|
|
3603
|
-
instance?: {
|
|
3604
|
-
initStore: (appId: string, options: {
|
|
3605
|
-
serverSideLoginMethods: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[];
|
|
3606
|
-
isInternationSms: boolean;
|
|
3607
|
-
}) => void;
|
|
3608
|
-
setLoginWay: (tab: "input" | "qrcode", way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay, id?: string | undefined, internation?: {
|
|
3609
|
-
phoneCountryCode: string;
|
|
3610
|
-
areaCode: string;
|
|
3611
|
-
} | undefined) => void;
|
|
3612
|
-
setUserInfo: (user: Pick<import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").User & {
|
|
3613
|
-
id: string;
|
|
3614
|
-
}, "email" | "username" | "phone" | "id" | "nickname" | "photo" | "name" | "_updateTime" | "qrCodeId" | "areaCode">) => void;
|
|
3615
|
-
setLoginWayByHttpData: (account: string, data: {
|
|
3616
|
-
username?: string | undefined;
|
|
3617
|
-
phone?: string | undefined;
|
|
3618
|
-
email?: string | undefined;
|
|
3619
|
-
}) => void;
|
|
3620
|
-
getMemoUser: (excludeWays?: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay[]) => import("../Login/multipleAccounts/panel").SelectOptions[];
|
|
3621
|
-
getMemoSingleUser: (id: string) => {
|
|
3622
|
-
way: import("@authing/react-ui-components/components/Guard/core/hooks/useMultipleAccounts").LoginWay;
|
|
3623
|
-
account: string;
|
|
3624
|
-
} | undefined;
|
|
3625
|
-
delUserById: (id: string) => string;
|
|
3626
|
-
getMemberState: () => boolean;
|
|
3627
|
-
getFirstBackFillData: () => BackFillMultipleState | undefined;
|
|
3628
|
-
} | undefined;
|
|
3629
|
-
/**
|
|
3630
|
-
* 切换多账号 isMultipleAccount 状态
|
|
3631
|
-
*/
|
|
3632
|
-
referMultipleState?: ((type: 'login' | 'multiple') => void) | undefined;
|
|
3633
|
-
/**
|
|
3634
|
-
* 清空回填数据
|
|
3635
|
-
*/
|
|
3636
|
-
clearBackFillData?: (() => void) | undefined;
|
|
3637
|
-
};
|
|
3638
|
-
/**
|
|
3639
|
-
* 登录页面状态
|
|
3640
|
-
// */
|
|
3641
3732
|
|
|
3642
3733
|
}
|
|
3643
3734
|
declare module '@authing/react-ui-components/components/_utils/corsVerification' {
|
|
@@ -3772,6 +3863,482 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
|
|
|
3772
3863
|
publicConfig: ApplicationConfig;
|
|
3773
3864
|
}) => any;
|
|
3774
3865
|
|
|
3866
|
+
}
|
|
3867
|
+
declare module '@authing/react-ui-components/components/_utils/http/api/constant' {
|
|
3868
|
+
export const authFlowUrl: () => string;
|
|
3869
|
+
export const VerifyEmailUrl: () => string;
|
|
3870
|
+
export const validateAccountUrl: () => string;
|
|
3871
|
+
export const countryListsUrl: () => string;
|
|
3872
|
+
export const validatePhoneCodeUrl: () => string;
|
|
3873
|
+
export const validateEmailCodeUrl: () => string;
|
|
3874
|
+
export const sendPhoneCodeUrl: () => string;
|
|
3875
|
+
|
|
3876
|
+
}
|
|
3877
|
+
declare module '@authing/react-ui-components/components/_utils/http/api/index' {
|
|
3878
|
+
export * from '@authing/react-ui-components/components/_utils/http/api/request';
|
|
3879
|
+
|
|
3880
|
+
}
|
|
3881
|
+
declare module '@authing/react-ui-components/components/_utils/http/api/request' {
|
|
3882
|
+
import { AxiosRequestConfig } from 'axios';
|
|
3883
|
+
import { EmailScene } from 'components/Type';
|
|
3884
|
+
import { SceneType } from '@authing/react-ui-components/components/Type/index';
|
|
3885
|
+
/**
|
|
3886
|
+
* AuthFlow 相关请求
|
|
3887
|
+
* @param data
|
|
3888
|
+
*/
|
|
3889
|
+
export const authFlowByAxios: <A = string, T = any>(data: {
|
|
3890
|
+
action: A;
|
|
3891
|
+
data?: any;
|
|
3892
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
|
|
3893
|
+
/**
|
|
3894
|
+
* 发送邮箱验证码
|
|
3895
|
+
* @param data
|
|
3896
|
+
*/
|
|
3897
|
+
export const sendEmailCodeByAxios: (data: {
|
|
3898
|
+
email: string;
|
|
3899
|
+
scene: EmailScene;
|
|
3900
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
3901
|
+
/**
|
|
3902
|
+
* 账号登陆前置校验
|
|
3903
|
+
*/
|
|
3904
|
+
export interface ValidateAccountParams<T = any> {
|
|
3905
|
+
/**
|
|
3906
|
+
* publicConfig.userPoolId
|
|
3907
|
+
*/
|
|
3908
|
+
userPoolId?: string;
|
|
3909
|
+
/**
|
|
3910
|
+
* 校验的输入值
|
|
3911
|
+
*/
|
|
3912
|
+
key: T;
|
|
3913
|
+
/**
|
|
3914
|
+
* 本次校验类型
|
|
3915
|
+
*/
|
|
3916
|
+
type: 'phone' | 'email' | 'username';
|
|
3917
|
+
}
|
|
3918
|
+
/**
|
|
3919
|
+
* 登陆/注册 前置,校验(用户/手机/邮箱)是否存在/用户是否不存在
|
|
3920
|
+
* @param params
|
|
3921
|
+
* @returns {Promise<boolean>} 是否通过
|
|
3922
|
+
*/
|
|
3923
|
+
export const validateAccountByAxios: <T = boolean>(params: ValidateAccountParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
|
|
3924
|
+
/**
|
|
3925
|
+
* 拉取国家列表
|
|
3926
|
+
*/
|
|
3927
|
+
export const getCountryLists: <T extends string>() => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<Record<T, {
|
|
3928
|
+
zh: {
|
|
3929
|
+
[props: string]: string;
|
|
3930
|
+
};
|
|
3931
|
+
cn: {
|
|
3932
|
+
[props: string]: string;
|
|
3933
|
+
};
|
|
3934
|
+
}>>>;
|
|
3935
|
+
/**
|
|
3936
|
+
* 验证手机号验证码是否正确
|
|
3937
|
+
*/
|
|
3938
|
+
export const validatePhoneCodeByAxios: (data: {
|
|
3939
|
+
phone: number | string;
|
|
3940
|
+
phoneCode: number | string;
|
|
3941
|
+
phoneCountryCode?: number | string;
|
|
3942
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
3943
|
+
/**
|
|
3944
|
+
* 验证邮箱验证码是否正确
|
|
3945
|
+
*/
|
|
3946
|
+
export const validateEmailCodeByAxios: (data: {
|
|
3947
|
+
email: number | string;
|
|
3948
|
+
emailCode: number | string;
|
|
3949
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
3950
|
+
export const sendSmsCodeByAxios: (data: {
|
|
3951
|
+
phone: string;
|
|
3952
|
+
phoneCountryCode?: string;
|
|
3953
|
+
scene?: SceneType;
|
|
3954
|
+
}, config?: AxiosRequestConfig<any> | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
3955
|
+
|
|
3956
|
+
}
|
|
3957
|
+
declare module '@authing/react-ui-components/components/_utils/http/base/index' {
|
|
3958
|
+
import { AuthenticationClient } from 'authing-js-sdk';
|
|
3959
|
+
/**
|
|
3960
|
+
* 修改 baseUrl 配置
|
|
3961
|
+
*/
|
|
3962
|
+
export const setBaseUrl: (baseUrl: string) => void;
|
|
3963
|
+
export const setAuthClient: (client: AuthenticationClient) => void;
|
|
3964
|
+
/**
|
|
3965
|
+
* 设置加密公钥
|
|
3966
|
+
*/
|
|
3967
|
+
export const setPublishByEncrypt: (publishKey?: string | undefined) => void;
|
|
3968
|
+
|
|
3969
|
+
}
|
|
3970
|
+
declare module '@authing/react-ui-components/components/_utils/http/constant' {
|
|
3971
|
+
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http/interceptors/response';
|
|
3972
|
+
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
3973
|
+
import JSEncrypt from 'jsencrypt';
|
|
3974
|
+
/**
|
|
3975
|
+
* 加密实例
|
|
3976
|
+
*/
|
|
3977
|
+
export const encryptedInstance: JSEncrypt;
|
|
3978
|
+
export enum CodeAction {
|
|
3979
|
+
CHANGE_MODULE = "changeModule",
|
|
3980
|
+
RENDER_MESSAGE = "renderMessage",
|
|
3981
|
+
INNER_MODULE = "innerModule",
|
|
3982
|
+
FLOW_END = "flowEnd"
|
|
3983
|
+
}
|
|
3984
|
+
export enum ApiCode {
|
|
3985
|
+
IDENTITY_BINDING_ASK = 1641,
|
|
3986
|
+
IDENTITY_BINDING = 1640,
|
|
3987
|
+
APP_MFA = 1636,
|
|
3988
|
+
MFA = 1635,
|
|
3989
|
+
ABORT_FLOW = 1699,
|
|
3990
|
+
COMPLETE_INFO = 1642,
|
|
3991
|
+
UNLOCK = 1643,
|
|
3992
|
+
FLOW_END = 1600,
|
|
3993
|
+
FIRST_LOGIN_PASSWORD = 1639,
|
|
3994
|
+
FORCED_PASSWORD_RESET = 2058
|
|
3995
|
+
}
|
|
3996
|
+
/**
|
|
3997
|
+
* APi Code 对应的模块映射
|
|
3998
|
+
*/
|
|
3999
|
+
export const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
|
4000
|
+
/**
|
|
4001
|
+
* 高阶函数 记录每次请求的 responseData
|
|
4002
|
+
* 同时根据返回的 apiCode 对应的 action 处理
|
|
4003
|
+
* @param responseData
|
|
4004
|
+
* @returns
|
|
4005
|
+
*/
|
|
4006
|
+
export const getCodeActionMapping: (responseData: AuthingResponse) => {
|
|
4007
|
+
/**
|
|
4008
|
+
* 返回的 apiCode 匹配跳转模块时
|
|
4009
|
+
* @param responseData
|
|
4010
|
+
* @returns
|
|
4011
|
+
*/
|
|
4012
|
+
changeModule: () => CodeAction;
|
|
4013
|
+
renderMessage: () => CodeAction;
|
|
4014
|
+
innerModule: () => CodeAction;
|
|
4015
|
+
flowEnd: () => CodeAction;
|
|
4016
|
+
};
|
|
4017
|
+
|
|
4018
|
+
}
|
|
4019
|
+
declare module '@authing/react-ui-components/components/_utils/http/events/index' {
|
|
4020
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
4021
|
+
import { AuthingGuardResponse } from 'components/_utils/http';
|
|
4022
|
+
import { setLoginEvents, setRegisterEvents } from '@authing/react-ui-components/components/_utils/http/events/utils';
|
|
4023
|
+
/**
|
|
4024
|
+
* 请求前置事件处理
|
|
4025
|
+
* 比如 beforeLogin / beforeRegister
|
|
4026
|
+
* @param config
|
|
4027
|
+
* @returns
|
|
4028
|
+
*/
|
|
4029
|
+
const processBeforeRequestEvent: (config: AxiosRequestConfig) => Promise<boolean>;
|
|
4030
|
+
/**
|
|
4031
|
+
* 响应器拦截 Events
|
|
4032
|
+
* @param response
|
|
4033
|
+
*/
|
|
4034
|
+
const processEventsByResponse: (response: AxiosResponse<AuthingGuardResponse>) => void;
|
|
4035
|
+
export { setLoginEvents, setRegisterEvents, processEventsByResponse, processBeforeRequestEvent, };
|
|
4036
|
+
|
|
4037
|
+
}
|
|
4038
|
+
declare module '@authing/react-ui-components/components/_utils/http/events/modal/login' {
|
|
4039
|
+
import { AuthenticationClient } from 'authing-js-sdk';
|
|
4040
|
+
import { AuthingResponse } from 'service/interceptors/response';
|
|
4041
|
+
class LoginEventsManage {
|
|
4042
|
+
private static instance;
|
|
4043
|
+
private successEvent;
|
|
4044
|
+
private failEvent;
|
|
4045
|
+
private constructor();
|
|
4046
|
+
/**
|
|
4047
|
+
* 设置登录成功的回调函数
|
|
4048
|
+
*/
|
|
4049
|
+
private setSuccessEvent;
|
|
4050
|
+
/**
|
|
4051
|
+
* 设置失败成功的回调函数
|
|
4052
|
+
*/
|
|
4053
|
+
private setFailEvent;
|
|
4054
|
+
/**
|
|
4055
|
+
* 获取登录成功的回调函数
|
|
4056
|
+
*/
|
|
4057
|
+
private getSuccessEvents;
|
|
4058
|
+
/**
|
|
4059
|
+
* 获取失败成功的回调函数
|
|
4060
|
+
*/
|
|
4061
|
+
private getFailEvents;
|
|
4062
|
+
/**
|
|
4063
|
+
* 判断本次响应是否算做成功的方法
|
|
4064
|
+
*/
|
|
4065
|
+
private isLoginSuccess;
|
|
4066
|
+
/**
|
|
4067
|
+
* 触发登录成功事件
|
|
4068
|
+
* @param responseData
|
|
4069
|
+
*/
|
|
4070
|
+
private emitSuccessEvent;
|
|
4071
|
+
/**
|
|
4072
|
+
* 触发登录失败事件
|
|
4073
|
+
* @param responseData
|
|
4074
|
+
*/
|
|
4075
|
+
private emitFailEvent;
|
|
4076
|
+
/**
|
|
4077
|
+
* 当前是否请求失败
|
|
4078
|
+
* statusCode 4xx 5xx 请求失败
|
|
4079
|
+
*/
|
|
4080
|
+
private isLoginFail;
|
|
4081
|
+
/**
|
|
4082
|
+
* 统一触发事件
|
|
4083
|
+
* @param responseData
|
|
4084
|
+
* @param client
|
|
4085
|
+
*/
|
|
4086
|
+
private emitEvents;
|
|
4087
|
+
/**
|
|
4088
|
+
* 获取登录事件实例
|
|
4089
|
+
*/
|
|
4090
|
+
static getInstance: () => LoginEventsManage;
|
|
4091
|
+
getCallableMethod(): {
|
|
4092
|
+
getSuccessEvents: () => ((user: import("authing-js-sdk").User, authClient: AuthenticationClient) => void) | null | undefined;
|
|
4093
|
+
setSuccessEvent: (successEvents: ((user: import("authing-js-sdk").User, authClient: AuthenticationClient) => void) | undefined) => void;
|
|
4094
|
+
setFailEvent: (failEvent: ((errorMessages: any) => void) | undefined) => void;
|
|
4095
|
+
emitSuccessEvent: (responseData: AuthingResponse<any>, client: AuthenticationClient) => void;
|
|
4096
|
+
emitFailEvent: (responseData: AuthingResponse<any>) => void;
|
|
4097
|
+
emitEvents: (responseData: AuthingResponse<any>, client: AuthenticationClient) => void;
|
|
4098
|
+
};
|
|
4099
|
+
}
|
|
4100
|
+
export { LoginEventsManage };
|
|
4101
|
+
|
|
4102
|
+
}
|
|
4103
|
+
declare module '@authing/react-ui-components/components/_utils/http/events/modal/register' {
|
|
4104
|
+
import { AuthenticationClient } from 'authing-js-sdk';
|
|
4105
|
+
import { AuthingResponse } from 'service/interceptors/response';
|
|
4106
|
+
type ConditionTypeFunction = (responseData: AuthingResponse) => boolean;
|
|
4107
|
+
class RegisterEventsManage {
|
|
4108
|
+
private static instance;
|
|
4109
|
+
private successEvent;
|
|
4110
|
+
private failEvent;
|
|
4111
|
+
private constructor();
|
|
4112
|
+
/**
|
|
4113
|
+
* 设置注册成功的回调函数
|
|
4114
|
+
*/
|
|
4115
|
+
private setSuccessEvent;
|
|
4116
|
+
/**
|
|
4117
|
+
* 设置失败成功的回调函数
|
|
4118
|
+
*/
|
|
4119
|
+
private setFailEvent;
|
|
4120
|
+
/**
|
|
4121
|
+
* 获取注册成功的回调函数
|
|
4122
|
+
*/
|
|
4123
|
+
private getSuccessEvents;
|
|
4124
|
+
/**
|
|
4125
|
+
* 获取失败成功的回调函数
|
|
4126
|
+
*/
|
|
4127
|
+
private getFailEvents;
|
|
4128
|
+
/**
|
|
4129
|
+
* 内置校验:判断本次响应是否算做成功的方法
|
|
4130
|
+
*/
|
|
4131
|
+
private isRegisterSuccess;
|
|
4132
|
+
/**
|
|
4133
|
+
* 触发注册成功事件
|
|
4134
|
+
* @param responseData
|
|
4135
|
+
* @param successCondition 自定义的注册成功事件
|
|
4136
|
+
*/
|
|
4137
|
+
private emitSuccessEvent;
|
|
4138
|
+
/**
|
|
4139
|
+
* 触发注册失败事件
|
|
4140
|
+
* @param responseData
|
|
4141
|
+
* @param failCondition 自定义的请求失败条件
|
|
4142
|
+
*/
|
|
4143
|
+
private emitFailEvent;
|
|
4144
|
+
/**
|
|
4145
|
+
* 内置校验:当前是否请求失败
|
|
4146
|
+
*/
|
|
4147
|
+
private isRegisterFail;
|
|
4148
|
+
/**
|
|
4149
|
+
* 统一触发事件
|
|
4150
|
+
* @param responseData
|
|
4151
|
+
* @param client
|
|
4152
|
+
*/
|
|
4153
|
+
private emitEvents;
|
|
4154
|
+
/**
|
|
4155
|
+
* 获取注册事件实例
|
|
4156
|
+
*/
|
|
4157
|
+
static getInstance: () => RegisterEventsManage;
|
|
4158
|
+
getCallableMethod(): {
|
|
4159
|
+
setSuccessEvent: (successEvents: ((user: import("authing-js-sdk").User, authClient: AuthenticationClient) => void) | undefined) => void;
|
|
4160
|
+
setFailEvent: (failEvent: ((error: any) => void) | undefined) => void;
|
|
4161
|
+
emitSuccessEvent: (params: {
|
|
4162
|
+
responseData: AuthingResponse<any>;
|
|
4163
|
+
client: AuthenticationClient;
|
|
4164
|
+
condition?: ConditionTypeFunction | undefined;
|
|
4165
|
+
}) => void;
|
|
4166
|
+
emitFailEvent: (params: {
|
|
4167
|
+
responseData: AuthingResponse<any>;
|
|
4168
|
+
condition?: ConditionTypeFunction | undefined;
|
|
4169
|
+
}) => void;
|
|
4170
|
+
emitEvents: (responseData: AuthingResponse<any>, client: AuthenticationClient, options?: {
|
|
4171
|
+
successCondition?: ConditionTypeFunction | undefined;
|
|
4172
|
+
failCondition?: ConditionTypeFunction | undefined;
|
|
4173
|
+
} | undefined) => void;
|
|
4174
|
+
};
|
|
4175
|
+
}
|
|
4176
|
+
export { RegisterEventsManage };
|
|
4177
|
+
|
|
4178
|
+
}
|
|
4179
|
+
declare module '@authing/react-ui-components/components/_utils/http/events/utils' {
|
|
4180
|
+
import { LoginEventsManage } from '@authing/react-ui-components/components/_utils/http/events/modal/login';
|
|
4181
|
+
import { RegisterEventsManage } from '@authing/react-ui-components/components/_utils/http/events/modal/register';
|
|
4182
|
+
/**
|
|
4183
|
+
* 内置的登录类型
|
|
4184
|
+
*/
|
|
4185
|
+
export const instanceEventMap: {
|
|
4186
|
+
login: typeof LoginEventsManage;
|
|
4187
|
+
register: typeof RegisterEventsManage;
|
|
4188
|
+
};
|
|
4189
|
+
/**
|
|
4190
|
+
* 设置登录事件
|
|
4191
|
+
* @returns
|
|
4192
|
+
*/
|
|
4193
|
+
export const setLoginEvents: () => {
|
|
4194
|
+
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);
|
|
4195
|
+
setFailEvent: ((failEvent: ((errorMessages: any) => void) | undefined) => void) | ((failEvent: ((error: any) => void) | undefined) => void);
|
|
4196
|
+
};
|
|
4197
|
+
/**
|
|
4198
|
+
* 设置注册事件
|
|
4199
|
+
* @returns
|
|
4200
|
+
*/
|
|
4201
|
+
export const setRegisterEvents: () => {
|
|
4202
|
+
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);
|
|
4203
|
+
setFailEvent: ((failEvent: ((errorMessages: any) => void) | undefined) => void) | ((failEvent: ((error: any) => void) | undefined) => void);
|
|
4204
|
+
};
|
|
4205
|
+
|
|
4206
|
+
}
|
|
4207
|
+
declare module '@authing/react-ui-components/components/_utils/http/header/index' {
|
|
4208
|
+
/**
|
|
4209
|
+
* 设置 version
|
|
4210
|
+
* @param value
|
|
4211
|
+
* @param key
|
|
4212
|
+
*/
|
|
4213
|
+
export const setVersionByHeader: (value: string, key?: string) => void;
|
|
4214
|
+
/**
|
|
4215
|
+
* 设置 sdk version
|
|
4216
|
+
* @param value
|
|
4217
|
+
* @param key
|
|
4218
|
+
*/
|
|
4219
|
+
export const setSdkVersionByHeader: (value: string, key?: string) => void;
|
|
4220
|
+
/**
|
|
4221
|
+
* 设置 AppId
|
|
4222
|
+
* @param value
|
|
4223
|
+
* @param key
|
|
4224
|
+
*/
|
|
4225
|
+
export const setAppIdByRequestHeader: (value: string, key?: string) => void;
|
|
4226
|
+
/**
|
|
4227
|
+
* 设置 x-authing-app-tenant-id 请求头
|
|
4228
|
+
* @param value
|
|
4229
|
+
* @param key
|
|
4230
|
+
*/
|
|
4231
|
+
export const setTenantIdByRequestHeader: (value?: string | undefined, key?: string) => void;
|
|
4232
|
+
/**
|
|
4233
|
+
* 根据 publishConfig 中的 userid 设置
|
|
4234
|
+
* @param value
|
|
4235
|
+
* @param key
|
|
4236
|
+
*/
|
|
4237
|
+
export const setUserPoolIdByRequestHeader: (value: string, key?: string) => void;
|
|
4238
|
+
export const setLanguageInRequestHeader: () => void;
|
|
4239
|
+
/**
|
|
4240
|
+
* 获取当前所有 headers
|
|
4241
|
+
*/
|
|
4242
|
+
export const getHeader: () => import("axios").HeadersDefaults;
|
|
4243
|
+
/**
|
|
4244
|
+
* 修改/设置请求头
|
|
4245
|
+
* @param key
|
|
4246
|
+
* @param value
|
|
4247
|
+
*/
|
|
4248
|
+
export const _setRequestHeader: (key: string, value: string) => void;
|
|
4249
|
+
|
|
4250
|
+
}
|
|
4251
|
+
declare module '@authing/react-ui-components/components/_utils/http/index' {
|
|
4252
|
+
import instance from '@authing/react-ui-components/components/_utils/http/instance';
|
|
4253
|
+
import * as httpHeaderMethods from '@authing/react-ui-components/components/_utils/http/header/index';
|
|
4254
|
+
import * as httpEvents from '@authing/react-ui-components/components/_utils/http/events/index';
|
|
4255
|
+
import * as httpBaseConfig from '@authing/react-ui-components/components/_utils/http/base/index';
|
|
4256
|
+
import * as commonRequest from '@authing/react-ui-components/components/_utils/http/api/index';
|
|
4257
|
+
export { instance, httpHeaderMethods, httpEvents, httpBaseConfig, commonRequest, };
|
|
4258
|
+
|
|
4259
|
+
}
|
|
4260
|
+
declare module '@authing/react-ui-components/components/_utils/http/instance' {
|
|
4261
|
+
const instance: import("axios").AxiosInstance;
|
|
4262
|
+
export default instance;
|
|
4263
|
+
|
|
4264
|
+
}
|
|
4265
|
+
declare module '@authing/react-ui-components/components/_utils/http/interceptors/request' {
|
|
4266
|
+
import { AxiosInstance } from 'axios';
|
|
4267
|
+
/**
|
|
4268
|
+
* 初始化请求拦截器
|
|
4269
|
+
* @param instance
|
|
4270
|
+
*/
|
|
4271
|
+
export const initRequestInterceptors: (instance: AxiosInstance) => void;
|
|
4272
|
+
|
|
4273
|
+
}
|
|
4274
|
+
declare module '@authing/react-ui-components/components/_utils/http/interceptors/response' {
|
|
4275
|
+
import { AxiosInstance } from 'axios';
|
|
4276
|
+
export interface AuthingResponse<T = any> {
|
|
4277
|
+
/**
|
|
4278
|
+
* 错误码
|
|
4279
|
+
*/
|
|
4280
|
+
code?: number;
|
|
4281
|
+
/**
|
|
4282
|
+
* 返回状态
|
|
4283
|
+
* 3XX:状态机流转
|
|
4284
|
+
* 4XX|6XX:错误处理
|
|
4285
|
+
*/
|
|
4286
|
+
statusCode?: number;
|
|
4287
|
+
/**
|
|
4288
|
+
* statusCode 3XX 时下个阶段的 code 码
|
|
4289
|
+
*/
|
|
4290
|
+
apiCode?: number;
|
|
4291
|
+
/**
|
|
4292
|
+
* 返回的数据
|
|
4293
|
+
*/
|
|
4294
|
+
data?: T;
|
|
4295
|
+
/**
|
|
4296
|
+
*
|
|
4297
|
+
*/
|
|
4298
|
+
messages?: string;
|
|
4299
|
+
/**
|
|
4300
|
+
*
|
|
4301
|
+
*/
|
|
4302
|
+
message?: string;
|
|
4303
|
+
/**
|
|
4304
|
+
* 当前流程 ID
|
|
4305
|
+
* ResponseData 返回则更新当前流程 ID
|
|
4306
|
+
*/
|
|
4307
|
+
flowHandle?: string;
|
|
4308
|
+
/**
|
|
4309
|
+
* 响应是否为当前业务内小状态处理
|
|
4310
|
+
* statusCode === 200 下进入该状态
|
|
4311
|
+
*/
|
|
4312
|
+
isBusiness?: boolean;
|
|
4313
|
+
}
|
|
4314
|
+
/**
|
|
4315
|
+
* 初始化响应拦截器
|
|
4316
|
+
*/
|
|
4317
|
+
export const initResponseInterceptors: (instance: AxiosInstance) => void;
|
|
4318
|
+
|
|
4319
|
+
}
|
|
4320
|
+
declare module '@authing/react-ui-components/components/_utils/http/utils' {
|
|
4321
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
4322
|
+
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http/interceptors/response';
|
|
4323
|
+
/**
|
|
4324
|
+
* 根据 Response 中的 apiCode & statusCode 做拦截
|
|
4325
|
+
* @param response
|
|
4326
|
+
* @returns
|
|
4327
|
+
*/
|
|
4328
|
+
export const processCodeByResponse: (response: AxiosResponse<AuthingResponse>) => AuthingResponse<any>;
|
|
4329
|
+
/**
|
|
4330
|
+
* 处理请求加密字段
|
|
4331
|
+
* @param config
|
|
4332
|
+
* @returns
|
|
4333
|
+
*/
|
|
4334
|
+
export const processEncryptRequestKey: (config: AxiosRequestConfig) => Promise<any>;
|
|
4335
|
+
/**
|
|
4336
|
+
* 处理 flowHandler
|
|
4337
|
+
* @param response
|
|
4338
|
+
* @returns
|
|
4339
|
+
*/
|
|
4340
|
+
export const processFlowHandler: (response: AuthingResponse) => AuthingResponse<any>;
|
|
4341
|
+
|
|
3775
4342
|
}
|
|
3776
4343
|
declare module '@authing/react-ui-components/components/_utils/http' {
|
|
3777
4344
|
import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
@@ -3804,18 +4371,36 @@ declare module '@authing/react-ui-components/components/_utils/http' {
|
|
|
3804
4371
|
flowHandle?: string;
|
|
3805
4372
|
}
|
|
3806
4373
|
export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
|
|
4374
|
+
/**
|
|
4375
|
+
* 根据 Server 返回状态进行的状态流转函数
|
|
4376
|
+
* 默认响应拦截器中自动调用
|
|
4377
|
+
*/
|
|
3807
4378
|
onGuardHandling?: () => CodeAction;
|
|
4379
|
+
/**
|
|
4380
|
+
* Response 返回 actions 是否需要模块内部处理
|
|
4381
|
+
* 根据 status === 200 判断
|
|
4382
|
+
*/
|
|
4383
|
+
isBusiness?: boolean;
|
|
4384
|
+
/**
|
|
4385
|
+
* 流程是否结束(兼容老版本字段)
|
|
4386
|
+
*/
|
|
3808
4387
|
isFlowEnd?: boolean;
|
|
4388
|
+
/**
|
|
4389
|
+
* 本次响应 Action 类型
|
|
4390
|
+
* see: packages/react-components/components/_utils/responseManagement/interface.ts
|
|
4391
|
+
*/
|
|
4392
|
+
responseActionType?: CodeAction;
|
|
3809
4393
|
}
|
|
3810
4394
|
|
|
3811
4395
|
}
|
|
3812
4396
|
declare module '@authing/react-ui-components/components/_utils/index' {
|
|
3813
|
-
import { Rule } from 'antd/lib/form';
|
|
4397
|
+
import { FormInstance, Rule, RuleObject } from 'antd/lib/form';
|
|
3814
4398
|
import qs from 'qs';
|
|
3815
4399
|
import { User } from 'authing-js-sdk';
|
|
3816
4400
|
import { ApplicationConfig, ComplateFiledsPlace } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
3817
4401
|
import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
|
|
3818
4402
|
import { LoginMethods, RegisterMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
|
|
4403
|
+
import { InputMethod } from 'components';
|
|
3819
4404
|
export * from '@authing/react-ui-components/components/_utils/popupCenter';
|
|
3820
4405
|
export * from '@authing/react-ui-components/components/_utils/clipboard';
|
|
3821
4406
|
export const VALIDATE_PATTERN: {
|
|
@@ -3828,6 +4413,20 @@ declare module '@authing/react-ui-components/components/_utils/index' {
|
|
|
3828
4413
|
export const validate: (type: keyof typeof VALIDATE_PATTERN, val: string) => boolean;
|
|
3829
4414
|
export const getRequiredRules: (msg: string) => Rule[];
|
|
3830
4415
|
export const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string | undefined) => Rule[];
|
|
4416
|
+
/**
|
|
4417
|
+
* 验证码是否正确
|
|
4418
|
+
* @param form form 实例
|
|
4419
|
+
* @param key 当前 FormItem 对应值的 key,比如当前为邮箱验证码就传入邮箱输入框的 formItem name
|
|
4420
|
+
* @returns Array
|
|
4421
|
+
*/
|
|
4422
|
+
export const fieldCodeCorrect: (form: FormInstance, key: string | undefined, options: {
|
|
4423
|
+
currentMethod: InputMethod;
|
|
4424
|
+
areaCode: string;
|
|
4425
|
+
isInternationSms?: boolean | undefined;
|
|
4426
|
+
}) => {
|
|
4427
|
+
validateTrigger: string[];
|
|
4428
|
+
validator: (rule: RuleObject, value: string) => Promise<void>;
|
|
4429
|
+
}[];
|
|
3831
4430
|
export function getDeviceName(): string | null | undefined;
|
|
3832
4431
|
export type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
|
|
3833
4432
|
export const insertStyles: (styles: string | any, recordKey?: "userConfig" | "appConfig" | undefined) => void;
|
|
@@ -3975,6 +4574,12 @@ declare module '@authing/react-ui-components/components/_utils/popupCenter' {
|
|
|
3975
4574
|
declare module '@authing/react-ui-components/components/_utils/responseManagement/index' {
|
|
3976
4575
|
import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
3977
4576
|
import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
4577
|
+
/**
|
|
4578
|
+
* 全局的错误拦截器
|
|
4579
|
+
* @param res
|
|
4580
|
+
* @param callBack
|
|
4581
|
+
* @returns
|
|
4582
|
+
*/
|
|
3978
4583
|
export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => AuthingResponse<any>;
|
|
3979
4584
|
|
|
3980
4585
|
}
|
|
@@ -4102,7 +4707,7 @@ declare module '@authing/react-ui-components/components/version/index' {
|
|
|
4102
4707
|
|
|
4103
4708
|
}
|
|
4104
4709
|
declare module '@authing/react-ui-components/components/version/version' {
|
|
4105
|
-
const _default: "3.1.
|
|
4710
|
+
const _default: "3.1.30-beta.1";
|
|
4106
4711
|
export default _default;
|
|
4107
4712
|
|
|
4108
4713
|
}
|
|
@@ -4231,11 +4836,13 @@ declare module '@authing/react-ui-components/config/webpack.config' {
|
|
|
4231
4836
|
modules: string[];
|
|
4232
4837
|
extensions: string[];
|
|
4233
4838
|
alias: {
|
|
4839
|
+
service: string;
|
|
4234
4840
|
src?: undefined;
|
|
4235
4841
|
'react-dom$'?: string;
|
|
4236
4842
|
'scheduler/tracing'?: string;
|
|
4237
4843
|
'react-native': string;
|
|
4238
4844
|
} | {
|
|
4845
|
+
service: string;
|
|
4239
4846
|
src: string;
|
|
4240
4847
|
'react-dom$'?: string;
|
|
4241
4848
|
'scheduler/tracing'?: string;
|