@authing/react-ui-components 3.0.33 → 3.1.0-rc.10
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 +562 -181
- package/lib/index.min.css +2 -2
- package/lib/index.min.js +1 -1
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -1056,6 +1056,14 @@ declare module '@authing/react-ui-components/components/AuthingTabs/index' {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
export const AuthingTabs: FC<AuthingTabsProps>;
|
|
1058
1058
|
|
|
1059
|
+
}
|
|
1060
|
+
declare module '@authing/react-ui-components/components/BindTotp/businessRequest' {
|
|
1061
|
+
export enum BindTotpBusinessAction {
|
|
1062
|
+
VerifyTotpFirstTime = "verify-totp-first-time",
|
|
1063
|
+
ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
|
|
1064
|
+
}
|
|
1065
|
+
export const authFlow: (action: BindTotpBusinessAction, content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1066
|
+
|
|
1059
1067
|
}
|
|
1060
1068
|
declare module '@authing/react-ui-components/components/BindTotp/core/bindSuccess' {
|
|
1061
1069
|
import React from 'react';
|
|
@@ -1079,9 +1087,8 @@ declare module '@authing/react-ui-components/components/BindTotp/core/securityCo
|
|
|
1079
1087
|
}
|
|
1080
1088
|
declare module '@authing/react-ui-components/components/BindTotp/index' {
|
|
1081
1089
|
import React from 'react';
|
|
1082
|
-
import { GuardBindTotpViewProps } from '@authing/react-ui-components/components/BindTotp/interface';
|
|
1083
1090
|
import './styles.less';
|
|
1084
|
-
export const GuardBindTotpView: React.FC
|
|
1091
|
+
export const GuardBindTotpView: React.FC;
|
|
1085
1092
|
|
|
1086
1093
|
}
|
|
1087
1094
|
declare module '@authing/react-ui-components/components/BindTotp/interface' {
|
|
@@ -1111,15 +1118,24 @@ declare module '@authing/react-ui-components/components/ChangeLanguage/index' {
|
|
|
1111
1118
|
/// <reference types="react" />
|
|
1112
1119
|
export const ChangeLanguage: (props: any) => JSX.Element;
|
|
1113
1120
|
|
|
1121
|
+
}
|
|
1122
|
+
declare module '@authing/react-ui-components/components/ChangePassword/businessRequest' {
|
|
1123
|
+
export enum ChangePasswordBusinessAction {
|
|
1124
|
+
ResetPassword = "reset-password-first-time",
|
|
1125
|
+
FirstLoginReset = "reset-password-forced"
|
|
1126
|
+
}
|
|
1127
|
+
export const authFlow: (action: ChangePasswordBusinessAction, content: {
|
|
1128
|
+
password: string;
|
|
1129
|
+
oldPassword?: string;
|
|
1130
|
+
}) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1131
|
+
|
|
1114
1132
|
}
|
|
1115
1133
|
declare module '@authing/react-ui-components/components/ChangePassword/core/firstLoginReset' {
|
|
1116
|
-
|
|
1134
|
+
import React from 'react';
|
|
1117
1135
|
interface FirstLoginResetProps {
|
|
1118
1136
|
onReset: any;
|
|
1119
|
-
publicConfig: any;
|
|
1120
|
-
initData: any;
|
|
1121
1137
|
}
|
|
1122
|
-
export const FirstLoginReset:
|
|
1138
|
+
export const FirstLoginReset: React.FC<FirstLoginResetProps>;
|
|
1123
1139
|
export {};
|
|
1124
1140
|
|
|
1125
1141
|
}
|
|
@@ -1127,29 +1143,37 @@ declare module '@authing/react-ui-components/components/ChangePassword/core/rota
|
|
|
1127
1143
|
/// <reference types="react" />
|
|
1128
1144
|
interface RotateResetProps {
|
|
1129
1145
|
onReset: any;
|
|
1130
|
-
publicConfig: any;
|
|
1131
|
-
initData: any;
|
|
1132
1146
|
}
|
|
1133
1147
|
export const RotateReset: (props: RotateResetProps) => JSX.Element;
|
|
1134
1148
|
export {};
|
|
1135
1149
|
|
|
1136
1150
|
}
|
|
1137
1151
|
declare module '@authing/react-ui-components/components/ChangePassword/index' {
|
|
1138
|
-
|
|
1139
|
-
export const GuardChangePassword:
|
|
1152
|
+
import React from 'react';
|
|
1153
|
+
export const GuardChangePassword: React.FC<{
|
|
1154
|
+
title: string;
|
|
1155
|
+
explain: string;
|
|
1156
|
+
}>;
|
|
1157
|
+
export const GuardFirstLoginPasswordResetView: React.FC;
|
|
1158
|
+
export const GuardForcedPasswordResetView: React.FC;
|
|
1159
|
+
|
|
1160
|
+
}
|
|
1161
|
+
declare module '@authing/react-ui-components/components/CompleteInfo/businessRequest' {
|
|
1162
|
+
import { CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1163
|
+
export enum CompleteInfoAuthFlowAction {
|
|
1164
|
+
Complete = "complete-completion",
|
|
1165
|
+
Skip = "skip-completion"
|
|
1166
|
+
}
|
|
1167
|
+
export const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1168
|
+
export const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: 'registerByEmail' | 'registerByPhoneCode', registerContent: any, registerProfile?: any) => Promise<import("authing-js-sdk").User | undefined>;
|
|
1140
1169
|
|
|
1141
1170
|
}
|
|
1142
1171
|
declare module '@authing/react-ui-components/components/CompleteInfo/core/completeInfo' {
|
|
1143
1172
|
import React from 'react';
|
|
1144
|
-
import {
|
|
1145
|
-
import { GuardCompleteInfoViewProps } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1146
|
-
import { User } from 'authing-js-sdk';
|
|
1173
|
+
import { CompleteInfoMetaData, CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1147
1174
|
export interface CompleteInfoProps {
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
extendsFields: ExtendsField[];
|
|
1151
|
-
onRegisterInfoCompleted?: GuardCompleteInfoViewProps['onRegisterInfoCompleted'];
|
|
1152
|
-
onRegisterInfoCompletedError?: GuardCompleteInfoViewProps['onRegisterInfoCompletedError'];
|
|
1175
|
+
metaData: CompleteInfoMetaData[];
|
|
1176
|
+
businessRequest: (data: CompleteInfoRequest) => Promise<void>;
|
|
1153
1177
|
}
|
|
1154
1178
|
export interface FieldMetadata {
|
|
1155
1179
|
key: string;
|
|
@@ -1160,9 +1184,16 @@ declare module '@authing/react-ui-components/components/CompleteInfo/core/comple
|
|
|
1160
1184
|
}
|
|
1161
1185
|
declare module '@authing/react-ui-components/components/CompleteInfo/index' {
|
|
1162
1186
|
import React from 'react';
|
|
1163
|
-
import {
|
|
1187
|
+
import { CompleteInfoMetaData, CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1164
1188
|
import './styles.less';
|
|
1165
|
-
|
|
1189
|
+
import { CompleteInfoAuthFlowAction } from '@authing/react-ui-components/components/CompleteInfo/businessRequest';
|
|
1190
|
+
export const GuardCompleteInfo: React.FC<{
|
|
1191
|
+
metaData: CompleteInfoMetaData[];
|
|
1192
|
+
skipComplateFileds: boolean;
|
|
1193
|
+
businessRequest: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<void>;
|
|
1194
|
+
}>;
|
|
1195
|
+
export const GuardLoginCompleteInfoView: React.FC;
|
|
1196
|
+
export const GuardRegisterCompleteInfoView: React.FC;
|
|
1166
1197
|
|
|
1167
1198
|
}
|
|
1168
1199
|
declare module '@authing/react-ui-components/components/CompleteInfo/interface' {
|
|
@@ -1198,12 +1229,86 @@ declare module '@authing/react-ui-components/components/CompleteInfo/interface'
|
|
|
1198
1229
|
required: boolean;
|
|
1199
1230
|
validateRules: any[];
|
|
1200
1231
|
}
|
|
1232
|
+
export enum FormValidateRule {
|
|
1233
|
+
NONE = "none",
|
|
1234
|
+
EMAIL = "email",
|
|
1235
|
+
PHONE = "phone",
|
|
1236
|
+
IS_NUMBER = "isNumber",
|
|
1237
|
+
REG_EXP = "regExp"
|
|
1238
|
+
}
|
|
1239
|
+
export interface CompleteInfoRule {
|
|
1240
|
+
type: FormValidateRule;
|
|
1241
|
+
content: string;
|
|
1242
|
+
errorMessage?: string;
|
|
1243
|
+
}
|
|
1244
|
+
export interface CompleteInfoSelectOption {
|
|
1245
|
+
value: string;
|
|
1246
|
+
label: string;
|
|
1247
|
+
}
|
|
1248
|
+
export interface CompleteInfoMetaData {
|
|
1249
|
+
type: CompleteInfoBaseControls | CompleteInfoExtendsControls;
|
|
1250
|
+
label: string;
|
|
1251
|
+
name: string;
|
|
1252
|
+
required: boolean;
|
|
1253
|
+
validateRules: CompleteInfoRule[];
|
|
1254
|
+
options?: CompleteInfoSelectOption[];
|
|
1255
|
+
}
|
|
1256
|
+
export enum CompleteInfoBaseControls {
|
|
1257
|
+
USERNAME = "username",
|
|
1258
|
+
PHONE = "phone",
|
|
1259
|
+
EMAIL = "email"
|
|
1260
|
+
}
|
|
1261
|
+
export enum CompleteInfoExtendsControls {
|
|
1262
|
+
IMAGE = "image",
|
|
1263
|
+
NUMBER = "number",
|
|
1264
|
+
DATE = "date",
|
|
1265
|
+
DATE_TIME = "dateTime",
|
|
1266
|
+
SELECT = "select",
|
|
1267
|
+
DROPDOWN = "dropdown",
|
|
1268
|
+
BOOLEAN = "boolean",
|
|
1269
|
+
STRING = "string",
|
|
1270
|
+
TEXT = "text",
|
|
1271
|
+
GENDER = "gender",
|
|
1272
|
+
COUNTRY = "country"
|
|
1273
|
+
}
|
|
1274
|
+
export interface CompleteInfoInitData {
|
|
1275
|
+
skip: boolean;
|
|
1276
|
+
metaData: CompleteInfoMetaData[];
|
|
1277
|
+
}
|
|
1278
|
+
export interface RegisterCompleteInfoInitData {
|
|
1279
|
+
content: any;
|
|
1280
|
+
businessRequestName: 'registerByEmail' | 'registerByPhoneCode';
|
|
1281
|
+
}
|
|
1282
|
+
export interface CompleteInfoRequest {
|
|
1283
|
+
fieldValues: {
|
|
1284
|
+
name: string;
|
|
1285
|
+
value: string;
|
|
1286
|
+
code?: string;
|
|
1287
|
+
}[];
|
|
1288
|
+
}
|
|
1289
|
+
export enum OmitCompleteInfo {
|
|
1290
|
+
'registerByEmail' = "email",
|
|
1291
|
+
'registerByPhoneCode' = "phone"
|
|
1292
|
+
}
|
|
1201
1293
|
|
|
1202
1294
|
}
|
|
1203
1295
|
declare module '@authing/react-ui-components/components/CompleteInfo/utils' {
|
|
1204
1296
|
import { User } from 'authing-js-sdk';
|
|
1205
|
-
import {
|
|
1297
|
+
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
1298
|
+
import { CompleteInfoMetaData, ExtendsField } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1206
1299
|
export const completeFieldsFilter: (user: User, field: ExtendsField) => boolean;
|
|
1300
|
+
export const extendsFieldsToMetaData: (extendsFields: import("@authing/react-ui-components/components/AuthingGuard/api/index").ExtendsField[] | undefined, selectOptions: {
|
|
1301
|
+
key: string;
|
|
1302
|
+
options: {
|
|
1303
|
+
value: string;
|
|
1304
|
+
label: string;
|
|
1305
|
+
}[];
|
|
1306
|
+
}[]) => CompleteInfoMetaData[];
|
|
1307
|
+
export const fieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: {
|
|
1308
|
+
name: string;
|
|
1309
|
+
value: string;
|
|
1310
|
+
code?: string | undefined;
|
|
1311
|
+
}[] | undefined) => Record<string, any>;
|
|
1207
1312
|
|
|
1208
1313
|
}
|
|
1209
1314
|
declare module '@authing/react-ui-components/components/CopyAbleText/index' {
|
|
@@ -1216,9 +1321,8 @@ declare module '@authing/react-ui-components/components/CopyAbleText/index' {
|
|
|
1216
1321
|
}
|
|
1217
1322
|
declare module '@authing/react-ui-components/components/DownloadAuthenticator/index' {
|
|
1218
1323
|
import React from 'react';
|
|
1219
|
-
import { GuardDownloadATViewProps } from '@authing/react-ui-components/components/DownloadAuthenticator/interface';
|
|
1220
1324
|
import './styles.less';
|
|
1221
|
-
export const GuardDownloadATView: React.FC
|
|
1325
|
+
export const GuardDownloadATView: React.FC;
|
|
1222
1326
|
|
|
1223
1327
|
}
|
|
1224
1328
|
declare module '@authing/react-ui-components/components/DownloadAuthenticator/interface' {
|
|
@@ -1238,14 +1342,13 @@ declare module '@authing/react-ui-components/components/DownloadAuthenticator/in
|
|
|
1238
1342
|
}
|
|
1239
1343
|
declare module '@authing/react-ui-components/components/Error/index' {
|
|
1240
1344
|
import React from 'react';
|
|
1241
|
-
import { GuardErrorViewProps } from '@authing/react-ui-components/components/Error/interface';
|
|
1242
1345
|
import './styles.less';
|
|
1243
|
-
export const GuardErrorView: React.FC
|
|
1346
|
+
export const GuardErrorView: React.FC;
|
|
1244
1347
|
|
|
1245
1348
|
}
|
|
1246
1349
|
declare module '@authing/react-ui-components/components/Error/interface' {
|
|
1247
1350
|
export interface ErrorInitData {
|
|
1248
|
-
|
|
1351
|
+
error?: Error;
|
|
1249
1352
|
}
|
|
1250
1353
|
export interface GuardErrorProps {
|
|
1251
1354
|
initData?: ErrorInitData;
|
|
@@ -1272,8 +1375,7 @@ declare module '@authing/react-ui-components/components/ForgetPassword/core/rese
|
|
|
1272
1375
|
}
|
|
1273
1376
|
declare module '@authing/react-ui-components/components/ForgetPassword/index' {
|
|
1274
1377
|
import React from 'react';
|
|
1275
|
-
|
|
1276
|
-
export const GuardForgetPassword: React.FC<ForgetPasswordViewProps>;
|
|
1378
|
+
export const GuardForgetPassword: React.FC;
|
|
1277
1379
|
|
|
1278
1380
|
}
|
|
1279
1381
|
declare module '@authing/react-ui-components/components/ForgetPassword/interface' {
|
|
@@ -1302,24 +1404,56 @@ declare module '@authing/react-ui-components/components/Guard/Guard' {
|
|
|
1302
1404
|
import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
|
|
1303
1405
|
import { IG2FCProps } from '@authing/react-ui-components/components/Type/index';
|
|
1304
1406
|
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
1305
|
-
import './styles.less';
|
|
1306
1407
|
import 'moment/locale/zh-cn';
|
|
1307
|
-
export enum LangMAP {
|
|
1308
|
-
zhCn = "zh-CN",
|
|
1309
|
-
enUs = "en-US"
|
|
1310
|
-
}
|
|
1311
1408
|
export interface GuardProps extends GuardEvents, IG2FCProps {
|
|
1312
|
-
tenantId?: string;
|
|
1313
1409
|
config?: Partial<GuardLocalConfig>;
|
|
1314
|
-
visible?: boolean;
|
|
1315
1410
|
}
|
|
1316
1411
|
export const Guard: (props: GuardProps) => JSX.Element;
|
|
1317
1412
|
|
|
1413
|
+
}
|
|
1414
|
+
declare module '@authing/react-ui-components/components/Guard/GuardModule/stateMachine' {
|
|
1415
|
+
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
1416
|
+
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
1417
|
+
export interface ModuleState {
|
|
1418
|
+
moduleName: GuardModuleType;
|
|
1419
|
+
initData?: any;
|
|
1420
|
+
}
|
|
1421
|
+
export enum ActionType {
|
|
1422
|
+
ChangeModule = "ChangeModule",
|
|
1423
|
+
Back = "Back",
|
|
1424
|
+
Init = "Init"
|
|
1425
|
+
}
|
|
1426
|
+
export interface StateMachineLog {
|
|
1427
|
+
action: ActionType;
|
|
1428
|
+
date: number;
|
|
1429
|
+
dataSource: ModuleState;
|
|
1430
|
+
}
|
|
1431
|
+
export type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
|
|
1432
|
+
export class GuardStateMachine {
|
|
1433
|
+
private order;
|
|
1434
|
+
private config;
|
|
1435
|
+
private moduleStateHistory;
|
|
1436
|
+
private changeModuleEvent;
|
|
1437
|
+
private stateMachineLog;
|
|
1438
|
+
constructor(changeModuleEvent: ChangeModuleEvent, initData: ModuleState);
|
|
1439
|
+
globalWindow: () => Window | undefined;
|
|
1440
|
+
next: (nextModule: GuardModuleType, initData: any) => void;
|
|
1441
|
+
back: (initData?: any) => void;
|
|
1442
|
+
end: () => void;
|
|
1443
|
+
historyPush: (data: ModuleState, actionType?: ActionType) => void;
|
|
1444
|
+
historyBack: (data: ModuleState) => void;
|
|
1445
|
+
setConfig: (config: GuardLocalConfig) => void;
|
|
1446
|
+
}
|
|
1447
|
+
export const useHistoryHijack: (back?: (() => void) | undefined) => ((state?: any) => void)[];
|
|
1448
|
+
export const initGuardStateMachine: (changeMouleEvent: ChangeModuleEvent, initData: ModuleState) => GuardStateMachine;
|
|
1449
|
+
export const getGuardStateMachine: () => GuardStateMachine;
|
|
1450
|
+
export const useGuardStateMachine: () => GuardStateMachine;
|
|
1451
|
+
|
|
1318
1452
|
}
|
|
1319
1453
|
declare module '@authing/react-ui-components/components/Guard/authClient' {
|
|
1320
1454
|
import { AuthenticationClient } from 'authing-js-sdk';
|
|
1321
1455
|
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
1322
|
-
export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string | undefined) => AuthenticationClient;
|
|
1456
|
+
export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, websocketHost: string, tenantId?: string | undefined) => AuthenticationClient;
|
|
1323
1457
|
export const getGuardAuthClient: () => AuthenticationClient;
|
|
1324
1458
|
export const useGuardAuthClient: () => AuthenticationClient;
|
|
1325
1459
|
|
|
@@ -1329,7 +1463,7 @@ declare module '@authing/react-ui-components/components/Guard/config' {
|
|
|
1329
1463
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
|
|
1330
1464
|
import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
|
|
1331
1465
|
import { RegisterConfig } from '@authing/react-ui-components/components/Register/interface';
|
|
1332
|
-
export interface
|
|
1466
|
+
export interface GuardComponentConfig extends Partial<GuardLocalConfig> {
|
|
1333
1467
|
}
|
|
1334
1468
|
export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
|
|
1335
1469
|
isSSO?: boolean;
|
|
@@ -1344,14 +1478,46 @@ declare module '@authing/react-ui-components/components/Guard/config' {
|
|
|
1344
1478
|
}
|
|
1345
1479
|
export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
|
|
1346
1480
|
|
|
1481
|
+
}
|
|
1482
|
+
declare module '@authing/react-ui-components/components/Guard/core/index' {
|
|
1483
|
+
/// <reference types="react" />
|
|
1484
|
+
import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
|
|
1485
|
+
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
1486
|
+
export const useRenderGuardCore: (props: GuardProps, initState: ModuleState) => JSX.Element;
|
|
1487
|
+
|
|
1488
|
+
}
|
|
1489
|
+
declare module '@authing/react-ui-components/components/Guard/core/renderContext' {
|
|
1490
|
+
import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
|
|
1491
|
+
import React from 'react';
|
|
1492
|
+
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
1493
|
+
export const RenderContext: React.FC<{
|
|
1494
|
+
guardProps: GuardProps;
|
|
1495
|
+
initState: ModuleState;
|
|
1496
|
+
}>;
|
|
1497
|
+
|
|
1498
|
+
}
|
|
1499
|
+
declare module '@authing/react-ui-components/components/Guard/core/renderModule' {
|
|
1500
|
+
import React from 'react';
|
|
1501
|
+
import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
|
|
1502
|
+
import '../styles.less';
|
|
1503
|
+
export enum LangMAP {
|
|
1504
|
+
zhCn = "zh-CN",
|
|
1505
|
+
enUs = "en-US"
|
|
1506
|
+
}
|
|
1507
|
+
export const RenderModule: React.FC<{
|
|
1508
|
+
guardProps: GuardProps;
|
|
1509
|
+
}>;
|
|
1510
|
+
|
|
1347
1511
|
}
|
|
1348
1512
|
declare module '@authing/react-ui-components/components/Guard/event' {
|
|
1349
1513
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
|
|
1350
1514
|
import { CompleteInfoEvents } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1351
1515
|
import { ForgetPasswordEvents } from '@authing/react-ui-components/components/ForgetPassword/interface';
|
|
1516
|
+
import { IdentityBindingEvents } from '@authing/react-ui-components/components/IdentityBinding/interface';
|
|
1517
|
+
import { IdentityBindingAskEvents } from '@authing/react-ui-components/components/IdentityBindingAsk/index';
|
|
1352
1518
|
import { LoginEvents } from '@authing/react-ui-components/components/Login/interface';
|
|
1353
1519
|
import { RegisterEvents } from '@authing/react-ui-components/components/Register/interface';
|
|
1354
|
-
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents {
|
|
1520
|
+
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
|
|
1355
1521
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
1356
1522
|
}
|
|
1357
1523
|
export const guardEventsFilter: (props: any, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
@@ -1372,11 +1538,13 @@ declare module '@authing/react-ui-components/components/Guard/module' {
|
|
|
1372
1538
|
REGISTER = "register",
|
|
1373
1539
|
MFA = "mfa",
|
|
1374
1540
|
FORGET_PWD = "forgetPassword",
|
|
1375
|
-
|
|
1541
|
+
FORCED_PASSWORD_RESET = "forcedPasswordReset",
|
|
1542
|
+
FIRST_LOGIN_PASSWORD = "firstLoginPassword",
|
|
1376
1543
|
DOWNLOAD_AT = "downloadAT",
|
|
1377
1544
|
BIND_TOTP = "bindTotp",
|
|
1378
1545
|
ANY_QUESTIONS = "anyQuestions",
|
|
1379
|
-
|
|
1546
|
+
LOGIN_COMPLETE_INFO = "loginCompleteInfo",
|
|
1547
|
+
REGISTER_COMPLETE_INFO = "registerCompleteInfo",
|
|
1380
1548
|
RECOVERY_CODE = "recoveryCode",
|
|
1381
1549
|
SUBMIT_SUCCESS = "submitSuccess",
|
|
1382
1550
|
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
@@ -1409,46 +1577,7 @@ declare module '@authing/react-ui-components/components/Guard/sso' {
|
|
|
1409
1577
|
};
|
|
1410
1578
|
userInfo?: User;
|
|
1411
1579
|
}
|
|
1412
|
-
export const trackSession: () => Promise<import("@authing/react-ui-components/components/_utils/http").
|
|
1413
|
-
|
|
1414
|
-
}
|
|
1415
|
-
declare module '@authing/react-ui-components/components/Guard/stateMachine' {
|
|
1416
|
-
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
1417
|
-
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
1418
|
-
export interface ModuleState {
|
|
1419
|
-
moduleName: GuardModuleType;
|
|
1420
|
-
initData?: any;
|
|
1421
|
-
}
|
|
1422
|
-
export enum ActionType {
|
|
1423
|
-
ChangeModule = "ChangeModule",
|
|
1424
|
-
Back = "Back",
|
|
1425
|
-
Init = "Init"
|
|
1426
|
-
}
|
|
1427
|
-
export interface StateMachineLog {
|
|
1428
|
-
action: ActionType;
|
|
1429
|
-
date: number;
|
|
1430
|
-
dataSource: ModuleState;
|
|
1431
|
-
}
|
|
1432
|
-
export type ChangeModuleEvent = (nextModelu: GuardModuleType, initData?: any) => void;
|
|
1433
|
-
export class GuardStateMachine {
|
|
1434
|
-
private order;
|
|
1435
|
-
private config;
|
|
1436
|
-
private moduleStateHistory;
|
|
1437
|
-
private changeMouleEvent;
|
|
1438
|
-
private stateMachineLog;
|
|
1439
|
-
constructor(changeMouleEvent: ChangeModuleEvent, initData: ModuleState);
|
|
1440
|
-
globalWindow: () => Window | undefined;
|
|
1441
|
-
next: (nextModelu: GuardModuleType, initData: any) => void;
|
|
1442
|
-
back: (initData?: any) => void;
|
|
1443
|
-
end: () => void;
|
|
1444
|
-
historyPush: (data: ModuleState, actionType?: ActionType) => void;
|
|
1445
|
-
historyBack: (data: ModuleState) => void;
|
|
1446
|
-
setConfig: (config: GuardLocalConfig) => void;
|
|
1447
|
-
}
|
|
1448
|
-
export const useHistoryHijack: (back?: (() => void) | undefined) => ((state?: any) => void)[];
|
|
1449
|
-
export const initGuardStateMachine: (changeMouleEvent: ChangeModuleEvent, initData: ModuleState) => GuardStateMachine;
|
|
1450
|
-
export const getGuardStateMachine: () => GuardStateMachine;
|
|
1451
|
-
export const useGuardStateMachine: () => GuardStateMachine;
|
|
1580
|
+
export const trackSession: () => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<SessionData>>;
|
|
1452
1581
|
|
|
1453
1582
|
}
|
|
1454
1583
|
declare module '@authing/react-ui-components/components/IconFont/iconfont' {
|
|
@@ -1472,9 +1601,37 @@ declare module '@authing/react-ui-components/components/IconFont/svg' {
|
|
|
1472
1601
|
}
|
|
1473
1602
|
declare module '@authing/react-ui-components/components/IdentityBinding/IdentityBinding' {
|
|
1474
1603
|
import React from 'react';
|
|
1475
|
-
import { GuardIdentityBindingViewProps } from '@authing/react-ui-components/components/IdentityBinding/interface';
|
|
1476
1604
|
import './styles.less';
|
|
1477
|
-
export const GuardIdentityBindingView: React.FC
|
|
1605
|
+
export const GuardIdentityBindingView: React.FC;
|
|
1606
|
+
|
|
1607
|
+
}
|
|
1608
|
+
declare module '@authing/react-ui-components/components/IdentityBinding/businessRequest' {
|
|
1609
|
+
export enum IdentityBindingBusinessAction {
|
|
1610
|
+
PhoneCode = "phone-code",
|
|
1611
|
+
EmailCode = "emial-code",
|
|
1612
|
+
Password = "password"
|
|
1613
|
+
}
|
|
1614
|
+
export interface PhoneCodeParams {
|
|
1615
|
+
phone: string;
|
|
1616
|
+
code: string;
|
|
1617
|
+
phoneCountryCode?: string;
|
|
1618
|
+
}
|
|
1619
|
+
export interface EmailCodeParams {
|
|
1620
|
+
email: string;
|
|
1621
|
+
code: string;
|
|
1622
|
+
}
|
|
1623
|
+
export interface PasswordParams {
|
|
1624
|
+
account: string;
|
|
1625
|
+
password: string;
|
|
1626
|
+
}
|
|
1627
|
+
export const PhoneCode: (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1628
|
+
export const EmailCode: (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1629
|
+
export const Password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1630
|
+
export const useIdentityBindingBusinessRequest: () => {
|
|
1631
|
+
"phone-code": (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1632
|
+
"emial-code": (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1633
|
+
password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1634
|
+
};
|
|
1478
1635
|
|
|
1479
1636
|
}
|
|
1480
1637
|
declare module '@authing/react-ui-components/components/IdentityBinding/index' {
|
|
@@ -1514,9 +1671,8 @@ declare module '@authing/react-ui-components/components/IdentityBinding/interfac
|
|
|
1514
1671
|
}
|
|
1515
1672
|
declare module '@authing/react-ui-components/components/IdentityBindingAsk/IdentityBindingAsk' {
|
|
1516
1673
|
import React from 'react';
|
|
1517
|
-
import { GuardIdentityBindingAskViewProps } from '@authing/react-ui-components/components/IdentityBindingAsk/interface';
|
|
1518
1674
|
import './styles.less';
|
|
1519
|
-
export const GuardIdentityBindingAskView: React.FC
|
|
1675
|
+
export const GuardIdentityBindingAskView: React.FC;
|
|
1520
1676
|
|
|
1521
1677
|
}
|
|
1522
1678
|
declare module '@authing/react-ui-components/components/IdentityBindingAsk/index' {
|
|
@@ -1591,7 +1747,8 @@ declare module '@authing/react-ui-components/components/Login/core/withAD' {
|
|
|
1591
1747
|
interface LoginWithADProps {
|
|
1592
1748
|
publicKey: string;
|
|
1593
1749
|
autoRegister?: boolean;
|
|
1594
|
-
|
|
1750
|
+
onLoginSuccess: any;
|
|
1751
|
+
onLoginFailed: any;
|
|
1595
1752
|
onBeforeLogin: any;
|
|
1596
1753
|
agreements: Agreement[];
|
|
1597
1754
|
}
|
|
@@ -1602,7 +1759,7 @@ declare module '@authing/react-ui-components/components/Login/core/withAD' {
|
|
|
1602
1759
|
declare module '@authing/react-ui-components/components/Login/core/withAppQrcode' {
|
|
1603
1760
|
/// <reference types="react" />
|
|
1604
1761
|
interface LoginWithAppQrcodeProps {
|
|
1605
|
-
|
|
1762
|
+
onLoginSuccess: any;
|
|
1606
1763
|
canLoop: boolean;
|
|
1607
1764
|
qrCodeScanOptions: any;
|
|
1608
1765
|
}
|
|
@@ -1617,7 +1774,8 @@ declare module '@authing/react-ui-components/components/Login/core/withLDAP' {
|
|
|
1617
1774
|
publicKey: string;
|
|
1618
1775
|
autoRegister?: boolean;
|
|
1619
1776
|
host?: string;
|
|
1620
|
-
|
|
1777
|
+
onLoginSuccess: any;
|
|
1778
|
+
onLoginFailed: any;
|
|
1621
1779
|
onBeforeLogin: any;
|
|
1622
1780
|
agreements: Agreement[];
|
|
1623
1781
|
}
|
|
@@ -1664,8 +1822,9 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
|
|
|
1664
1822
|
publicKey: string;
|
|
1665
1823
|
autoRegister?: boolean;
|
|
1666
1824
|
host?: string;
|
|
1667
|
-
onLogin: any;
|
|
1668
1825
|
onBeforeLogin?: any;
|
|
1826
|
+
onLoginSuccess?: any;
|
|
1827
|
+
onLoginFailed?: any;
|
|
1669
1828
|
onLoginRequest?: (loginInfo: any) => Promise<AuthingResponse>;
|
|
1670
1829
|
passwordLoginMethods: PasswordLoginMethods[];
|
|
1671
1830
|
agreements: Agreement[];
|
|
@@ -1729,7 +1888,7 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
|
|
|
1729
1888
|
declare module '@authing/react-ui-components/components/Login/core/withWechatMiniQrcode' {
|
|
1730
1889
|
/// <reference types="react" />
|
|
1731
1890
|
interface LoginWithWechatMiniQrcodeProps {
|
|
1732
|
-
|
|
1891
|
+
onLoginSuccess: any;
|
|
1733
1892
|
canLoop: boolean;
|
|
1734
1893
|
qrCodeScanOptions: any;
|
|
1735
1894
|
}
|
|
@@ -1740,7 +1899,7 @@ declare module '@authing/react-ui-components/components/Login/core/withWechatMin
|
|
|
1740
1899
|
declare module '@authing/react-ui-components/components/Login/core/withWechatmpQrcode' {
|
|
1741
1900
|
/// <reference types="react" />
|
|
1742
1901
|
interface LoginWithWechatmpQrcodeProps {
|
|
1743
|
-
|
|
1902
|
+
onLoginSuccess: any;
|
|
1744
1903
|
canLoop: boolean;
|
|
1745
1904
|
qrCodeScanOptions: any;
|
|
1746
1905
|
}
|
|
@@ -1750,9 +1909,8 @@ declare module '@authing/react-ui-components/components/Login/core/withWechatmpQ
|
|
|
1750
1909
|
}
|
|
1751
1910
|
declare module '@authing/react-ui-components/components/Login/index' {
|
|
1752
1911
|
/// <reference types="react" />
|
|
1753
|
-
import { GuardLoginViewProps } from '@authing/react-ui-components/components/Login/interface';
|
|
1754
1912
|
import './styles.less';
|
|
1755
|
-
export const GuardLoginView: (
|
|
1913
|
+
export const GuardLoginView: () => JSX.Element;
|
|
1756
1914
|
|
|
1757
1915
|
}
|
|
1758
1916
|
declare module '@authing/react-ui-components/components/Login/interface' {
|
|
@@ -1763,12 +1921,12 @@ declare module '@authing/react-ui-components/components/Login/interface' {
|
|
|
1763
1921
|
import { PasswordLoginParams, LDAPLoginParams, ADLoginParams, PhoneCodeLoginParams, AuthenticationClient, User } from '@authing/react-ui-components/components/index';
|
|
1764
1922
|
import { LoginMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
|
|
1765
1923
|
export interface LoginConfig extends IG2Config {
|
|
1766
|
-
autoRegister
|
|
1767
|
-
disableResetPwd
|
|
1768
|
-
disableRegister
|
|
1769
|
-
defaultLoginMethod
|
|
1770
|
-
loginMethods
|
|
1771
|
-
passwordLoginMethods
|
|
1924
|
+
autoRegister?: boolean;
|
|
1925
|
+
disableResetPwd?: boolean;
|
|
1926
|
+
disableRegister?: boolean;
|
|
1927
|
+
defaultLoginMethod?: LoginMethods;
|
|
1928
|
+
loginMethods?: LoginMethods[];
|
|
1929
|
+
passwordLoginMethods?: PasswordLoginMethods[];
|
|
1772
1930
|
socialConnections?: SocialConnectionProvider[];
|
|
1773
1931
|
socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
|
|
1774
1932
|
enterpriseConnections?: string[];
|
|
@@ -1800,17 +1958,28 @@ declare module '@authing/react-ui-components/components/Login/socialLogin/IdpBut
|
|
|
1800
1958
|
declare module '@authing/react-ui-components/components/Login/socialLogin/index' {
|
|
1801
1959
|
import React from 'react';
|
|
1802
1960
|
import { ApplicationConfig, SocialConnectionItem } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
1803
|
-
import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
|
|
1804
1961
|
import './style.less';
|
|
1962
|
+
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/index';
|
|
1805
1963
|
export interface SocialLoginProps {
|
|
1806
1964
|
appId: string;
|
|
1807
|
-
config:
|
|
1808
|
-
|
|
1965
|
+
config: GuardLocalConfig;
|
|
1966
|
+
onLoginFailed: any;
|
|
1967
|
+
onLoginSuccess: any;
|
|
1809
1968
|
enterpriseConnectionObjs: ApplicationConfig['identityProviders'];
|
|
1810
1969
|
socialConnectionObjs: SocialConnectionItem[];
|
|
1811
1970
|
}
|
|
1812
1971
|
export const SocialLogin: React.FC<SocialLoginProps>;
|
|
1813
1972
|
|
|
1973
|
+
}
|
|
1974
|
+
declare module '@authing/react-ui-components/components/Login/socialLogin/postMessage' {
|
|
1975
|
+
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
1976
|
+
export const usePostMessage: () => (evt: MessageEvent) => import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any> | {
|
|
1977
|
+
code: any;
|
|
1978
|
+
data: any;
|
|
1979
|
+
onGuardHandling: undefined;
|
|
1980
|
+
} | undefined;
|
|
1981
|
+
export const useErrorHandling: () => (res: AuthingResponse) => import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>;
|
|
1982
|
+
|
|
1814
1983
|
}
|
|
1815
1984
|
declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/VerifyCodeFormItem' {
|
|
1816
1985
|
import { FormItemProps } from 'antd/lib/form';
|
|
@@ -1839,6 +2008,55 @@ declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/inde
|
|
|
1839
2008
|
export const VerifyCodeInput: FC<VerifyCodeInputProps>;
|
|
1840
2009
|
export {};
|
|
1841
2010
|
|
|
2011
|
+
}
|
|
2012
|
+
declare module '@authing/react-ui-components/components/MFA/businessRequest' {
|
|
2013
|
+
export enum MfaBusinessAction {
|
|
2014
|
+
VerifyEmail = "verify-email",
|
|
2015
|
+
VerifySms = "verify-sms",
|
|
2016
|
+
VerifyTotp = "verify-totp",
|
|
2017
|
+
VerifyFace = "verify-face",
|
|
2018
|
+
AssociateFace = "associate-face"
|
|
2019
|
+
}
|
|
2020
|
+
export const authFlow: (action: MfaBusinessAction, content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2021
|
+
interface VerifySmsContent {
|
|
2022
|
+
phone: string;
|
|
2023
|
+
code: string;
|
|
2024
|
+
mfaToken?: string;
|
|
2025
|
+
phoneCountryCode?: string;
|
|
2026
|
+
}
|
|
2027
|
+
interface VerifyEmailContent {
|
|
2028
|
+
email: string;
|
|
2029
|
+
code: string;
|
|
2030
|
+
mfaToken?: string;
|
|
2031
|
+
}
|
|
2032
|
+
interface VerifyTotpContent {
|
|
2033
|
+
totp: string;
|
|
2034
|
+
mfaToken?: string;
|
|
2035
|
+
}
|
|
2036
|
+
interface VerifyFaceContent {
|
|
2037
|
+
photo: string;
|
|
2038
|
+
mfaToken?: string;
|
|
2039
|
+
}
|
|
2040
|
+
interface AssociateFaceContent {
|
|
2041
|
+
photoA: string;
|
|
2042
|
+
photoB: string;
|
|
2043
|
+
isExternalPhoto?: boolean;
|
|
2044
|
+
mfaToken?: string;
|
|
2045
|
+
}
|
|
2046
|
+
export const VerifyEmail: (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2047
|
+
export const VerifySms: (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2048
|
+
export const VerifyTotp: (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2049
|
+
export const VerifyFace: (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2050
|
+
export const AssociateFace: (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2051
|
+
export const useMfaBusinessRequest: () => {
|
|
2052
|
+
"verify-email": (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2053
|
+
"verify-sms": (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2054
|
+
"verify-totp": (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2055
|
+
"verify-face": (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2056
|
+
"associate-face": (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2057
|
+
};
|
|
2058
|
+
export {};
|
|
2059
|
+
|
|
1842
2060
|
}
|
|
1843
2061
|
declare module '@authing/react-ui-components/components/MFA/codemap' {
|
|
1844
2062
|
import { GuardModuleAction } from '@authing/react-ui-components/components/Guard/module';
|
|
@@ -1912,6 +2130,7 @@ declare module '@authing/react-ui-components/components/MFA/core/sms' {
|
|
|
1912
2130
|
areaCode: string;
|
|
1913
2131
|
phoneCountryCode?: string;
|
|
1914
2132
|
isInternationSms: boolean;
|
|
2133
|
+
userPhone?: string;
|
|
1915
2134
|
}
|
|
1916
2135
|
export const VerifyMFASms: React.FC<VerifyMFASmsProps>;
|
|
1917
2136
|
export const MFASms: React.FC<{
|
|
@@ -1946,14 +2165,13 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
|
|
|
1946
2165
|
}
|
|
1947
2166
|
declare module '@authing/react-ui-components/components/MFA/index' {
|
|
1948
2167
|
import React from 'react';
|
|
1949
|
-
import { GuardMFAViewProps } from '@authing/react-ui-components/components/MFA/interface';
|
|
1950
2168
|
import './styles.less';
|
|
1951
2169
|
interface MFABackStateContextType {
|
|
1952
2170
|
setMfaBackState: React.Dispatch<React.SetStateAction<string>>;
|
|
1953
2171
|
mfaBackState: string;
|
|
1954
2172
|
}
|
|
1955
2173
|
export const MFABackStateContext: React.Context<MFABackStateContextType | undefined>;
|
|
1956
|
-
export const GuardMFAView: React.FC
|
|
2174
|
+
export const GuardMFAView: React.FC;
|
|
1957
2175
|
export {};
|
|
1958
2176
|
|
|
1959
2177
|
}
|
|
@@ -2002,10 +2220,9 @@ declare module '@authing/react-ui-components/components/MFA/interface' {
|
|
|
2002
2220
|
}
|
|
2003
2221
|
declare module '@authing/react-ui-components/components/MFA/mfaMethods/index' {
|
|
2004
2222
|
import React from 'react';
|
|
2005
|
-
import {
|
|
2223
|
+
import { MFAType } from '@authing/react-ui-components/components/MFA/interface';
|
|
2006
2224
|
import './style.less';
|
|
2007
2225
|
export interface MFAMethodsProps {
|
|
2008
|
-
applicationMfa: GuardMFAInitData['applicationMfa'];
|
|
2009
2226
|
method: MFAType;
|
|
2010
2227
|
onChangeMethod: (type: MFAType) => void;
|
|
2011
2228
|
}
|
|
@@ -2027,6 +2244,14 @@ declare module '@authing/react-ui-components/components/NeedHelpView/index' {
|
|
|
2027
2244
|
/// <reference types="react" />
|
|
2028
2245
|
export const GuardNeedHelpView: (props: any) => JSX.Element;
|
|
2029
2246
|
|
|
2247
|
+
}
|
|
2248
|
+
declare module '@authing/react-ui-components/components/RecoveryCode/businessRequest' {
|
|
2249
|
+
export enum TotpRecoveryCodeBusinessAction {
|
|
2250
|
+
RecoveryTotp = "recovery-totp",
|
|
2251
|
+
ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
|
|
2252
|
+
}
|
|
2253
|
+
export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, content: any): Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
|
|
2254
|
+
|
|
2030
2255
|
}
|
|
2031
2256
|
declare module '@authing/react-ui-components/components/RecoveryCode/core/saveCode' {
|
|
2032
2257
|
import React from 'react';
|
|
@@ -2041,20 +2266,21 @@ declare module '@authing/react-ui-components/components/RecoveryCode/core/useCod
|
|
|
2041
2266
|
import { User } from '@authing/react-ui-components/components/index';
|
|
2042
2267
|
export interface UseCodeProps {
|
|
2043
2268
|
mfaToken: string;
|
|
2044
|
-
onSubmit: (recoveryCode: string, user
|
|
2269
|
+
onSubmit: (recoveryCode: string, user?: User) => void;
|
|
2045
2270
|
}
|
|
2046
2271
|
export const UseCode: React.FC<UseCodeProps>;
|
|
2047
2272
|
|
|
2048
2273
|
}
|
|
2049
2274
|
declare module '@authing/react-ui-components/components/RecoveryCode/index' {
|
|
2050
2275
|
import React from 'react';
|
|
2051
|
-
import { GuardRecoveryCodeViewProps } from '@authing/react-ui-components/components/RecoveryCode/interface';
|
|
2052
2276
|
import './style.less';
|
|
2053
|
-
export const
|
|
2277
|
+
export const RecoveryCode: React.FC;
|
|
2278
|
+
export const RecoveryCodeAuthFlow: React.FC;
|
|
2279
|
+
export const GuardRecoveryCodeView: React.FC;
|
|
2054
2280
|
|
|
2055
2281
|
}
|
|
2056
2282
|
declare module '@authing/react-ui-components/components/RecoveryCode/interface' {
|
|
2057
|
-
import { IG2Config, IG2Events
|
|
2283
|
+
import { IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
|
|
2058
2284
|
import { AuthenticationClient, User } from '@authing/react-ui-components/components/index';
|
|
2059
2285
|
export interface RecoveryCodeConfig extends IG2Config {
|
|
2060
2286
|
}
|
|
@@ -2062,17 +2288,6 @@ declare module '@authing/react-ui-components/components/RecoveryCode/interface'
|
|
|
2062
2288
|
export interface RecoveryCodeEvents extends IG2Events {
|
|
2063
2289
|
onLogin?: (user: User, authClient: AuthenticationClient) => void;
|
|
2064
2290
|
}
|
|
2065
|
-
export interface GuardRecoveryCodeInitData {
|
|
2066
|
-
mfaToken: string;
|
|
2067
|
-
}
|
|
2068
|
-
export interface GuardRecoveryCodeProps extends IG2FCProps, RecoveryCodeEvents {
|
|
2069
|
-
config: Partial<RecoveryCodeConfig>;
|
|
2070
|
-
initData: GuardRecoveryCodeInitData;
|
|
2071
|
-
}
|
|
2072
|
-
export interface GuardRecoveryCodeViewProps extends GuardRecoveryCodeProps {
|
|
2073
|
-
config: RecoveryCodeConfig;
|
|
2074
|
-
initData: GuardRecoveryCodeInitData;
|
|
2075
|
-
}
|
|
2076
2291
|
|
|
2077
2292
|
}
|
|
2078
2293
|
declare module '@authing/react-ui-components/components/Register/codemap' {
|
|
@@ -2098,7 +2313,8 @@ declare module '@authing/react-ui-components/components/Register/core/WithEmail'
|
|
|
2098
2313
|
import React from 'react';
|
|
2099
2314
|
import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2100
2315
|
export interface RegisterWithEmailProps {
|
|
2101
|
-
|
|
2316
|
+
onRegisterSuccess: Function;
|
|
2317
|
+
onRegisterFailed: Function;
|
|
2102
2318
|
onBeforeRegister?: Function;
|
|
2103
2319
|
publicConfig?: ApplicationConfig;
|
|
2104
2320
|
agreements: Agreement[];
|
|
@@ -2111,7 +2327,8 @@ declare module '@authing/react-ui-components/components/Register/core/WithPhone'
|
|
|
2111
2327
|
import React from 'react';
|
|
2112
2328
|
import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2113
2329
|
export interface RegisterWithPhoneProps {
|
|
2114
|
-
|
|
2330
|
+
onRegisterSuccess: Function;
|
|
2331
|
+
onRegisterFailed: Function;
|
|
2115
2332
|
agreements: Agreement[];
|
|
2116
2333
|
publicConfig?: ApplicationConfig;
|
|
2117
2334
|
registeContext?: any;
|
|
@@ -2121,8 +2338,7 @@ declare module '@authing/react-ui-components/components/Register/core/WithPhone'
|
|
|
2121
2338
|
}
|
|
2122
2339
|
declare module '@authing/react-ui-components/components/Register/index' {
|
|
2123
2340
|
import React from 'react';
|
|
2124
|
-
|
|
2125
|
-
export const GuardRegisterView: React.FC<GuardRegisterViewProps>;
|
|
2341
|
+
export const GuardRegisterView: React.FC;
|
|
2126
2342
|
|
|
2127
2343
|
}
|
|
2128
2344
|
declare module '@authing/react-ui-components/components/Register/interface' {
|
|
@@ -2131,13 +2347,13 @@ declare module '@authing/react-ui-components/components/Register/interface' {
|
|
|
2131
2347
|
import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams } from '@authing/react-ui-components/components/index';
|
|
2132
2348
|
import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2133
2349
|
export interface RegisterConfig extends IG2Config {
|
|
2134
|
-
disableRegister
|
|
2135
|
-
registerMethods
|
|
2136
|
-
defaultRegisterMethod
|
|
2350
|
+
disableRegister?: boolean;
|
|
2351
|
+
registerMethods?: RegisterMethods[];
|
|
2352
|
+
defaultRegisterMethod?: RegisterMethods;
|
|
2137
2353
|
publicKey?: string;
|
|
2138
2354
|
agreementEnabled?: boolean;
|
|
2139
2355
|
agreements?: Agreement[];
|
|
2140
|
-
|
|
2356
|
+
registerContext?: any;
|
|
2141
2357
|
}
|
|
2142
2358
|
export interface RegisterEvents extends IG2Events {
|
|
2143
2359
|
onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
|
|
@@ -2153,6 +2369,10 @@ declare module '@authing/react-ui-components/components/Register/interface' {
|
|
|
2153
2369
|
}
|
|
2154
2370
|
export const getDefaultRegisterConfig: () => RegisterConfig;
|
|
2155
2371
|
|
|
2372
|
+
}
|
|
2373
|
+
declare module '@authing/react-ui-components/components/Register/utils' {
|
|
2374
|
+
export const useIsChangeComplete: (currentMode: 'phone' | 'email') => boolean;
|
|
2375
|
+
|
|
2156
2376
|
}
|
|
2157
2377
|
declare module '@authing/react-ui-components/components/SendCode/SendCodeBtn' {
|
|
2158
2378
|
import React, { FC } from 'react';
|
|
@@ -2224,9 +2444,9 @@ declare module '@authing/react-ui-components/components/ShieldSpin/index' {
|
|
|
2224
2444
|
|
|
2225
2445
|
}
|
|
2226
2446
|
declare module '@authing/react-ui-components/components/SingleComponent/SingleComponent' {
|
|
2227
|
-
|
|
2228
|
-
import { IG2FCProps } from '@authing/react-ui-components/components/index';
|
|
2229
|
-
export function SingleComponent<T extends IG2FCProps>(props: T,
|
|
2447
|
+
/// <reference types="react" />
|
|
2448
|
+
import { GuardModuleType, IG2FCProps } from '@authing/react-ui-components/components/index';
|
|
2449
|
+
export function SingleComponent<T extends IG2FCProps>(props: T, guardModuleType: GuardModuleType, initData?: any): JSX.Element;
|
|
2230
2450
|
|
|
2231
2451
|
}
|
|
2232
2452
|
declare module '@authing/react-ui-components/components/SingleComponent/index' {
|
|
@@ -2248,8 +2468,7 @@ declare module '@authing/react-ui-components/components/SubmitButton/index' {
|
|
|
2248
2468
|
}
|
|
2249
2469
|
declare module '@authing/react-ui-components/components/SubmitSuccess/index' {
|
|
2250
2470
|
import React from 'react';
|
|
2251
|
-
|
|
2252
|
-
export const GuardSubmitSuccessView: React.FC<GuardSubmitSuccessViewProps>;
|
|
2471
|
+
export const GuardSubmitSuccessView: React.FC;
|
|
2253
2472
|
|
|
2254
2473
|
}
|
|
2255
2474
|
declare module '@authing/react-ui-components/components/SubmitSuccess/interface' {
|
|
@@ -2275,19 +2494,21 @@ declare module '@authing/react-ui-components/components/SubmitSuccess/interface'
|
|
|
2275
2494
|
declare module '@authing/react-ui-components/components/Type/index' {
|
|
2276
2495
|
import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
|
|
2277
2496
|
import { Lang } from 'authing-js-sdk/build/main/types';
|
|
2278
|
-
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2279
2497
|
import { GuardMode } from '@authing/react-ui-components/components/AuthingGuard/types/GuardConfig';
|
|
2280
2498
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
2281
2499
|
export interface IG2FCProps extends IG2Events {
|
|
2282
2500
|
appId: string;
|
|
2501
|
+
tenantId?: string;
|
|
2283
2502
|
config?: Partial<IG2Config>;
|
|
2503
|
+
visible?: boolean;
|
|
2504
|
+
initData?: any;
|
|
2284
2505
|
}
|
|
2285
2506
|
export interface IG2FCViewProps extends IG2FCProps {
|
|
2286
2507
|
config: IG2Config;
|
|
2287
2508
|
}
|
|
2288
2509
|
export interface IG2Config {
|
|
2289
|
-
title
|
|
2290
|
-
logo
|
|
2510
|
+
title?: string;
|
|
2511
|
+
logo?: string;
|
|
2291
2512
|
lang: Lang;
|
|
2292
2513
|
langRange: Lang[];
|
|
2293
2514
|
host: string;
|
|
@@ -2298,10 +2519,9 @@ declare module '@authing/react-ui-components/components/Type/index' {
|
|
|
2298
2519
|
userpool?: string;
|
|
2299
2520
|
contentCss?: string;
|
|
2300
2521
|
target?: HTMLElement | string;
|
|
2301
|
-
__appHost__?: string;
|
|
2302
|
-
__pageConfig__?: GuardPageConfig;
|
|
2303
|
-
__publicConfig__?: ApplicationConfig;
|
|
2304
2522
|
__internalRequest__?: boolean;
|
|
2523
|
+
__singleComponent__?: boolean;
|
|
2524
|
+
__unAuthFlow__?: boolean;
|
|
2305
2525
|
}
|
|
2306
2526
|
export interface IG2Events {
|
|
2307
2527
|
onLoad?: (authClient: AuthenticationClient) => void;
|
|
@@ -2316,14 +2536,6 @@ declare module '@authing/react-ui-components/components/Type/index' {
|
|
|
2316
2536
|
EmailCode = "email-code",
|
|
2317
2537
|
PhoneCode = "phone-code"
|
|
2318
2538
|
}
|
|
2319
|
-
export enum GuardPageSene {
|
|
2320
|
-
Global = "global"
|
|
2321
|
-
}
|
|
2322
|
-
export interface GuardPageConfig {
|
|
2323
|
-
[GuardPageSene.Global]: {
|
|
2324
|
-
showChangeLanguage: boolean;
|
|
2325
|
-
};
|
|
2326
|
-
}
|
|
2327
2539
|
|
|
2328
2540
|
}
|
|
2329
2541
|
declare module '@authing/react-ui-components/components/ValidatorRules/PasswordFormItem' {
|
|
@@ -2337,10 +2549,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/PasswordF
|
|
|
2337
2549
|
}
|
|
2338
2550
|
declare module '@authing/react-ui-components/components/ValidatorRules/ValidatorFormItem' {
|
|
2339
2551
|
import React from 'react';
|
|
2340
|
-
import {
|
|
2341
|
-
export const EmailFormItem: React.
|
|
2342
|
-
export const PhoneFormItem: React.
|
|
2343
|
-
export const UserNameFormItem: React.
|
|
2552
|
+
import { ValidatorFormItemProps } from '@authing/react-ui-components/components/ValidatorRules/index';
|
|
2553
|
+
export const EmailFormItem: React.FC<ValidatorFormItemProps>;
|
|
2554
|
+
export const PhoneFormItem: React.FC<ValidatorFormItemProps>;
|
|
2555
|
+
export const UserNameFormItem: React.FC<ValidatorFormItemProps>;
|
|
2344
2556
|
|
|
2345
2557
|
}
|
|
2346
2558
|
declare module '@authing/react-ui-components/components/ValidatorRules/index' {
|
|
@@ -2373,6 +2585,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/index' {
|
|
|
2373
2585
|
const CustomFormItem: FormItemInterface;
|
|
2374
2586
|
export default CustomFormItem;
|
|
2375
2587
|
|
|
2588
|
+
}
|
|
2589
|
+
declare module '@authing/react-ui-components/components/ValidatorRules/useCheckRepeat' {
|
|
2590
|
+
export const useCheckRepeat: (checkFn: (value: any, resolve: (value: unknown) => void, reject: (reason?: any) => void) => void) => (_: any, value: any) => Promise<unknown>;
|
|
2591
|
+
|
|
2376
2592
|
}
|
|
2377
2593
|
declare module '@authing/react-ui-components/components/VerifyCodeInput/index' {
|
|
2378
2594
|
import React, { FC } from 'react';
|
|
@@ -2404,6 +2620,98 @@ declare module '@authing/react-ui-components/components/_utils/GuardErrorCode' {
|
|
|
2404
2620
|
declare module '@authing/react-ui-components/components/_utils/clipboard' {
|
|
2405
2621
|
export const copyToClipboard: (str: string) => void;
|
|
2406
2622
|
|
|
2623
|
+
}
|
|
2624
|
+
declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
2625
|
+
/// <reference types="react" />
|
|
2626
|
+
import { RegisterMethods } from 'authing-js-sdk';
|
|
2627
|
+
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2628
|
+
import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
2629
|
+
import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
|
|
2630
|
+
export const getPublicConfig: (appId: string) => ApplicationConfig;
|
|
2631
|
+
export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
|
|
2632
|
+
export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
|
|
2633
|
+
export const useMergePublicConfig: (appId: string, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, serError?: any) => {
|
|
2634
|
+
host: string;
|
|
2635
|
+
isSSO?: boolean | undefined;
|
|
2636
|
+
defaultScenes?: import("@authing/react-ui-components/components/index").GuardModuleType | undefined;
|
|
2637
|
+
defaultInitData?: any;
|
|
2638
|
+
showLoading?: boolean | undefined;
|
|
2639
|
+
loadingComponent?: import("react").ReactNode;
|
|
2640
|
+
openEventsMapping?: boolean | undefined;
|
|
2641
|
+
disableRegister?: boolean | undefined;
|
|
2642
|
+
registerMethods?: RegisterMethods[] | undefined;
|
|
2643
|
+
defaultRegisterMethod?: RegisterMethods | undefined;
|
|
2644
|
+
publicKey?: string | undefined;
|
|
2645
|
+
agreementEnabled?: boolean | undefined;
|
|
2646
|
+
agreements?: import("@authing/react-ui-components/components/AuthingGuard/api/index").Agreement[] | undefined;
|
|
2647
|
+
registerContext?: any;
|
|
2648
|
+
title?: string | undefined;
|
|
2649
|
+
logo?: string | undefined;
|
|
2650
|
+
lang: import("@authing/react-ui-components/components/index").Lang;
|
|
2651
|
+
langRange: import("@authing/react-ui-components/components/index").Lang[];
|
|
2652
|
+
isHost?: boolean | undefined;
|
|
2653
|
+
mode: import("@authing/react-ui-components/components/index").GuardMode;
|
|
2654
|
+
clickCloseable: boolean;
|
|
2655
|
+
escCloseable: boolean;
|
|
2656
|
+
userpool?: string | undefined;
|
|
2657
|
+
contentCss?: string | undefined;
|
|
2658
|
+
target?: string | HTMLElement | undefined;
|
|
2659
|
+
__internalRequest__?: boolean | undefined;
|
|
2660
|
+
__singleComponent__?: boolean | undefined;
|
|
2661
|
+
__unAuthFlow__?: boolean | undefined;
|
|
2662
|
+
autoRegister?: boolean | undefined;
|
|
2663
|
+
disableResetPwd?: boolean | undefined;
|
|
2664
|
+
defaultLoginMethod?: import("@authing/react-ui-components/components/index").LoginMethods | undefined;
|
|
2665
|
+
loginMethods?: import("@authing/react-ui-components/components/index").LoginMethods[] | undefined;
|
|
2666
|
+
passwordLoginMethods?: import("@authing/react-ui-components/components/AuthingGuard/api/index").PasswordLoginMethods[] | undefined;
|
|
2667
|
+
socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
|
|
2668
|
+
socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
|
|
2669
|
+
enterpriseConnections?: string[] | undefined;
|
|
2670
|
+
qrCodeScanOptions?: {
|
|
2671
|
+
extIdpConnId?: string | undefined;
|
|
2672
|
+
autoExchangeUserInfo?: boolean | undefined;
|
|
2673
|
+
size?: {
|
|
2674
|
+
height: number;
|
|
2675
|
+
width: number;
|
|
2676
|
+
} | undefined;
|
|
2677
|
+
containerSize?: {
|
|
2678
|
+
height: number;
|
|
2679
|
+
width: number;
|
|
2680
|
+
} | undefined;
|
|
2681
|
+
interval?: number | undefined;
|
|
2682
|
+
onStart?: ((timer: any) => any) | undefined;
|
|
2683
|
+
onResult?: ((data: import("authing-js-sdk").QRCodeStatus) => any) | undefined;
|
|
2684
|
+
onScanned?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo) => any) | undefined;
|
|
2685
|
+
onSuccess?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo, ticket: string) => any) | undefined;
|
|
2686
|
+
onCancel?: (() => any) | undefined;
|
|
2687
|
+
onError?: ((message: string) => any) | undefined;
|
|
2688
|
+
onExpired?: (() => any) | undefined;
|
|
2689
|
+
onCodeShow?: ((random: string, url: string) => any) | undefined;
|
|
2690
|
+
onCodeLoaded?: ((random: string, url: string) => any) | undefined;
|
|
2691
|
+
onCodeLoadFailed?: ((message: string) => any) | undefined;
|
|
2692
|
+
onCodeDestroyed?: ((random: string) => any) | undefined;
|
|
2693
|
+
onRetry?: (() => any) | undefined;
|
|
2694
|
+
onMfa?: ((code: number, message: string, data: Record<string, any>) => {}) | undefined;
|
|
2695
|
+
tips?: {
|
|
2696
|
+
title?: string | undefined;
|
|
2697
|
+
scanned?: string | undefined;
|
|
2698
|
+
succeed?: string | undefined;
|
|
2699
|
+
canceled?: string | undefined;
|
|
2700
|
+
expired?: string | undefined;
|
|
2701
|
+
retry?: string | undefined;
|
|
2702
|
+
failed?: string | undefined;
|
|
2703
|
+
} | undefined;
|
|
2704
|
+
onAuthFlow?: ((flow: Record<string, any>) => {}) | undefined;
|
|
2705
|
+
customData?: {
|
|
2706
|
+
[x: string]: any;
|
|
2707
|
+
} | undefined;
|
|
2708
|
+
context?: {
|
|
2709
|
+
[x: string]: any;
|
|
2710
|
+
} | undefined;
|
|
2711
|
+
withCustomData?: boolean | undefined;
|
|
2712
|
+
} | undefined;
|
|
2713
|
+
} | undefined;
|
|
2714
|
+
|
|
2407
2715
|
}
|
|
2408
2716
|
declare module '@authing/react-ui-components/components/_utils/config' {
|
|
2409
2717
|
import { IG2Config } from '@authing/react-ui-components/components/Type/index';
|
|
@@ -2417,13 +2725,44 @@ declare module '@authing/react-ui-components/components/_utils/config' {
|
|
|
2417
2725
|
}
|
|
2418
2726
|
declare module '@authing/react-ui-components/components/_utils/context' {
|
|
2419
2727
|
import React from 'react';
|
|
2728
|
+
import { GuardEvents, GuardLocalConfig, GuardModuleType } from '@authing/react-ui-components/components/index';
|
|
2420
2729
|
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2730
|
+
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
2731
|
+
import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
|
|
2732
|
+
export interface IGuardContext {
|
|
2733
|
+
finallyConfig: GuardLocalConfig;
|
|
2734
|
+
defaultMergedConfig: GuardLocalConfig;
|
|
2735
|
+
publicConfig: ApplicationConfig;
|
|
2736
|
+
httpClient: GuardHttp;
|
|
2737
|
+
appId: string;
|
|
2738
|
+
initData: any;
|
|
2739
|
+
currentModule: ModuleState;
|
|
2740
|
+
events: Partial<GuardEvents>;
|
|
2741
|
+
changeModule?: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
|
|
2742
|
+
backModule?: () => void;
|
|
2743
|
+
isAuthFlow: boolean;
|
|
2744
|
+
contextLoaded: boolean;
|
|
2745
|
+
}
|
|
2746
|
+
export const createGuardXContext: () => {
|
|
2747
|
+
Provider: React.FC<{
|
|
2748
|
+
value: Partial<IGuardContext>;
|
|
2749
|
+
}>;
|
|
2750
|
+
Consumer: React.Consumer<IGuardContext>;
|
|
2751
|
+
};
|
|
2752
|
+
export const useGuardPublicConfig: () => ApplicationConfig;
|
|
2753
|
+
export const useGuardHttpClient: () => GuardHttp;
|
|
2754
|
+
export const useGuardDefaultMergedConfig: () => GuardLocalConfig;
|
|
2755
|
+
export const useGuardAppId: () => string;
|
|
2756
|
+
export function useGuardInitData<T>(): T;
|
|
2757
|
+
export const useGuardCurrentModule: () => ModuleState;
|
|
2758
|
+
export const useGuardEvents: () => Partial<GuardEvents>;
|
|
2759
|
+
export const useGuardModule: () => {
|
|
2760
|
+
changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
|
|
2761
|
+
backModule: (() => void) | undefined;
|
|
2425
2762
|
};
|
|
2426
|
-
export const
|
|
2763
|
+
export const useGuardFinallyConfig: () => GuardLocalConfig;
|
|
2764
|
+
export const useGuardContextLoaded: () => boolean;
|
|
2765
|
+
export const useGuardIsAuthFlow: () => boolean;
|
|
2427
2766
|
|
|
2428
2767
|
}
|
|
2429
2768
|
declare module '@authing/react-ui-components/components/_utils/corsVerification' {
|
|
@@ -2455,29 +2794,30 @@ declare module '@authing/react-ui-components/components/_utils/errorFace' {
|
|
|
2455
2794
|
export {};
|
|
2456
2795
|
|
|
2457
2796
|
}
|
|
2458
|
-
declare module '@authing/react-ui-components/components/_utils/
|
|
2459
|
-
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
2797
|
+
declare module '@authing/react-ui-components/components/_utils/guardHttp' {
|
|
2798
|
+
import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
2460
2799
|
import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
2461
2800
|
export class GuardHttp {
|
|
2462
2801
|
private requestClient;
|
|
2463
2802
|
private headers;
|
|
2464
2803
|
private responseInterceptorMap;
|
|
2465
|
-
constructor(baseUrl
|
|
2804
|
+
constructor(baseUrl?: string);
|
|
2466
2805
|
private getRequestClient;
|
|
2467
2806
|
setUserpoolId(userpoolId: string): this;
|
|
2468
2807
|
setAppId(appId: string): this;
|
|
2469
2808
|
setTenantId(tenantId: string): this;
|
|
2470
2809
|
setBaseUrl(baseUrl: string): this;
|
|
2471
2810
|
getHeaders: () => Record<string, string>;
|
|
2472
|
-
get: <T>(path: string, query?: Record<string, any>, config?: RequestInit | undefined) => Promise<
|
|
2473
|
-
post: <T>(path: string, data: any, config?: {
|
|
2811
|
+
get: <T = any>(path: string, query?: Record<string, any>, config?: RequestInit | undefined) => Promise<AuthingGuardResponse<T>>;
|
|
2812
|
+
post: <T = any>(path: string, data: any, config?: {
|
|
2474
2813
|
headers: any;
|
|
2475
|
-
} | undefined) => Promise<
|
|
2476
|
-
postForm: <T>(path: string, formData: any, config?: {
|
|
2814
|
+
} | undefined) => Promise<AuthingGuardResponse<T>>;
|
|
2815
|
+
postForm: <T = any>(path: string, formData: any, config?: {
|
|
2477
2816
|
headers: any;
|
|
2478
|
-
} | undefined) => Promise<
|
|
2479
|
-
|
|
2480
|
-
|
|
2817
|
+
} | undefined) => Promise<AuthingGuardResponse<T>>;
|
|
2818
|
+
authFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
|
|
2819
|
+
initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => this | undefined;
|
|
2820
|
+
responseIntercept: (res: AuthingResponse) => AuthingGuardResponse;
|
|
2481
2821
|
}
|
|
2482
2822
|
export const initGuardHttp: (baseUrl: string) => GuardHttp;
|
|
2483
2823
|
export const getGuardHttp: () => GuardHttp;
|
|
@@ -2486,7 +2826,8 @@ declare module '@authing/react-ui-components/components/_utils/guradHttp' {
|
|
|
2486
2826
|
}
|
|
2487
2827
|
declare module '@authing/react-ui-components/components/_utils/hooks/index' {
|
|
2488
2828
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
2489
|
-
import {
|
|
2829
|
+
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2830
|
+
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/index';
|
|
2490
2831
|
export interface PhoneValidResult {
|
|
2491
2832
|
isValid: boolean;
|
|
2492
2833
|
phoneNumber: string;
|
|
@@ -2512,10 +2853,7 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
|
|
|
2512
2853
|
* @returns
|
|
2513
2854
|
*/
|
|
2514
2855
|
export const parsePhone: (isInternationSms: boolean, fieldValue: string, areaCode?: string) => {
|
|
2515
|
-
|
|
2516
|
-
countryCode: undefined;
|
|
2517
|
-
} | {
|
|
2518
|
-
countryCode: string;
|
|
2856
|
+
countryCode: string | undefined;
|
|
2519
2857
|
phoneNumber: string;
|
|
2520
2858
|
};
|
|
2521
2859
|
/**
|
|
@@ -2523,10 +2861,14 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
|
|
|
2523
2861
|
* @param config
|
|
2524
2862
|
* @returns[socialConnectionObjs 社交身份源连接对象 enterpriseConnectionObjs 企业身份源连接对象 isNoMethod 是否没有身份源 ]
|
|
2525
2863
|
*/
|
|
2526
|
-
export const useMethod: (
|
|
2864
|
+
export const useMethod: (params: {
|
|
2865
|
+
config: GuardLocalConfig;
|
|
2866
|
+
publicConfig: ApplicationConfig;
|
|
2867
|
+
}) => any;
|
|
2527
2868
|
|
|
2528
2869
|
}
|
|
2529
2870
|
declare module '@authing/react-ui-components/components/_utils/http' {
|
|
2871
|
+
import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
2530
2872
|
export const requestClient: {
|
|
2531
2873
|
(input: RequestInfo, init?: RequestInit | undefined): Promise<any>;
|
|
2532
2874
|
get<T>(path: string, query?: Record<string, any>, init?: RequestInit | undefined): Promise<AuthingResponse<T>>;
|
|
@@ -2553,6 +2895,10 @@ declare module '@authing/react-ui-components/components/_utils/http' {
|
|
|
2553
2895
|
messages?: string;
|
|
2554
2896
|
message?: string;
|
|
2555
2897
|
}
|
|
2898
|
+
export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
|
|
2899
|
+
onGuardHandling?: () => CodeAction;
|
|
2900
|
+
isFlowEnd?: boolean;
|
|
2901
|
+
}
|
|
2556
2902
|
|
|
2557
2903
|
}
|
|
2558
2904
|
declare module '@authing/react-ui-components/components/_utils/index' {
|
|
@@ -2596,8 +2942,8 @@ declare module '@authing/react-ui-components/components/_utils/index' {
|
|
|
2596
2942
|
key: string;
|
|
2597
2943
|
value: string | string[] | qs.ParsedQs | qs.ParsedQs[] | undefined;
|
|
2598
2944
|
}[];
|
|
2599
|
-
export const
|
|
2600
|
-
export const isLarkBrowser: () => boolean
|
|
2945
|
+
export const isWeChatBrowser: () => boolean;
|
|
2946
|
+
export const isLarkBrowser: () => boolean;
|
|
2601
2947
|
export const assembledAppHost: (identifier: string, host: string) => string;
|
|
2602
2948
|
export const assembledRequestHost: (requestHostname: string, configHost: string) => string;
|
|
2603
2949
|
export enum PasswordStrength {
|
|
@@ -2644,6 +2990,32 @@ declare module '@authing/react-ui-components/components/_utils/locales/zh/index'
|
|
|
2644
2990
|
import map from '@authing/react-ui-components/components/_utils/locales/zh/map/index';
|
|
2645
2991
|
export { common, login, user, map };
|
|
2646
2992
|
|
|
2993
|
+
}
|
|
2994
|
+
declare module '@authing/react-ui-components/components/_utils/logger/index' {
|
|
2995
|
+
import { LoggerType } from '@authing/react-ui-components/components/_utils/logger/interface';
|
|
2996
|
+
export class Logger {
|
|
2997
|
+
static printType: LoggerType[];
|
|
2998
|
+
/**
|
|
2999
|
+
* 打印日志
|
|
3000
|
+
* @param message 日志信息
|
|
3001
|
+
* @param type 日志类型
|
|
3002
|
+
*/
|
|
3003
|
+
static log(message: string, type?: LoggerType): void;
|
|
3004
|
+
static info(message: string): void;
|
|
3005
|
+
static warn(message: string): void;
|
|
3006
|
+
static error(message: string): void;
|
|
3007
|
+
}
|
|
3008
|
+
export const getLogger: () => Logger;
|
|
3009
|
+
export const useLogger: () => Logger;
|
|
3010
|
+
|
|
3011
|
+
}
|
|
3012
|
+
declare module '@authing/react-ui-components/components/_utils/logger/interface' {
|
|
3013
|
+
export enum LoggerType {
|
|
3014
|
+
INFO = "INFO",
|
|
3015
|
+
WARN = "WARN",
|
|
3016
|
+
ERROR = "ERROR"
|
|
3017
|
+
}
|
|
3018
|
+
|
|
2647
3019
|
}
|
|
2648
3020
|
declare module '@authing/react-ui-components/components/_utils/popupCenter' {
|
|
2649
3021
|
/**
|
|
@@ -2658,20 +3030,28 @@ declare module '@authing/react-ui-components/components/_utils/popupCenter' {
|
|
|
2658
3030
|
|
|
2659
3031
|
}
|
|
2660
3032
|
declare module '@authing/react-ui-components/components/_utils/responseManagement/index' {
|
|
2661
|
-
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
3033
|
+
import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
2662
3034
|
import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
2663
|
-
export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) =>
|
|
3035
|
+
export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => AuthingResponse<any>;
|
|
2664
3036
|
|
|
2665
3037
|
}
|
|
2666
3038
|
declare module '@authing/react-ui-components/components/_utils/responseManagement/interface' {
|
|
2667
3039
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
|
|
2668
3040
|
export enum CodeAction {
|
|
2669
3041
|
CHANGE_MODULE = "changeModule",
|
|
2670
|
-
RENDER_MESSAGE = "renderMessage"
|
|
3042
|
+
RENDER_MESSAGE = "renderMessage",
|
|
3043
|
+
FLOW_END = "flowEnd"
|
|
2671
3044
|
}
|
|
2672
3045
|
export enum ApiCode {
|
|
2673
|
-
IDENTITY_BINDING_ASK =
|
|
2674
|
-
IDENTITY_BINDING =
|
|
3046
|
+
IDENTITY_BINDING_ASK = 1641,
|
|
3047
|
+
IDENTITY_BINDING = 1640,
|
|
3048
|
+
APP_MFA = 1636,
|
|
3049
|
+
MFA = 1635,
|
|
3050
|
+
ABORT_FLOW = 1699,
|
|
3051
|
+
COMPLETE_INFO = 1642,
|
|
3052
|
+
FLOW_END = 1600,
|
|
3053
|
+
FIRST_LOGIN_PASSWORD = 1639,
|
|
3054
|
+
FORCED_PASSWORD_RESET = 2058
|
|
2675
3055
|
}
|
|
2676
3056
|
export const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
|
2677
3057
|
|
|
@@ -2752,6 +3132,7 @@ declare module '@authing/react-ui-components/components/context/module/context'
|
|
|
2752
3132
|
}
|
|
2753
3133
|
declare module '@authing/react-ui-components/components/index' {
|
|
2754
3134
|
export * from '@authing/react-ui-components/components/_utils/config';
|
|
3135
|
+
export * from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
2755
3136
|
export type { AuthenticationClientOptions } from 'authing-js-sdk';
|
|
2756
3137
|
export * from '@authing/react-ui-components/components/AuthingGuard/types/index';
|
|
2757
3138
|
export * from '@authing/react-ui-components/components/AuthingGuard/hooks/index';
|
|
@@ -2767,7 +3148,7 @@ declare module '@authing/react-ui-components/components/version/index' {
|
|
|
2767
3148
|
|
|
2768
3149
|
}
|
|
2769
3150
|
declare module '@authing/react-ui-components/components/version/version' {
|
|
2770
|
-
const _default: "3.0.
|
|
3151
|
+
const _default: "3.1.0-rc.10";
|
|
2771
3152
|
export default _default;
|
|
2772
3153
|
|
|
2773
3154
|
}
|
|
@@ -2813,7 +3194,7 @@ declare module '@authing/react-ui-components/config/jest/fileTransform' {
|
|
|
2813
3194
|
|
|
2814
3195
|
}
|
|
2815
3196
|
declare module '@authing/react-ui-components/config/modules' {
|
|
2816
|
-
export const additionalModulePaths: string[] |
|
|
3197
|
+
export const additionalModulePaths: "" | string[] | null;
|
|
2817
3198
|
export const hasTsConfig: boolean;
|
|
2818
3199
|
export const webpackAliases: {
|
|
2819
3200
|
src?: undefined;
|