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