@authing/react-ui-components 3.0.31 → 3.0.39-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +624 -171
- package/lib/index.min.css +2 -2
- package/lib/index.min.js +1 -1
- package/package.json +3 -4
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
+
declare module '@authing/react-ui-components/components/AccountMerge/UserRadio' {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { UserRadioItemProps, UserRadioProps } from '@authing/react-ui-components/components/AccountMerge/interface';
|
|
4
|
+
import './styles.less';
|
|
5
|
+
export const UserRadioItem: React.FC<UserRadioItemProps>;
|
|
6
|
+
export const UserRadio: React.FC<UserRadioProps>;
|
|
7
|
+
|
|
8
|
+
}
|
|
9
|
+
declare module '@authing/react-ui-components/components/AccountMerge/index' {
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import './styles.less';
|
|
12
|
+
export const GuardAccountMergeView: React.FC;
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
declare module '@authing/react-ui-components/components/AccountMerge/interface' {
|
|
16
|
+
export interface BriefUserInfo {
|
|
17
|
+
displayName: string;
|
|
18
|
+
avatar: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GuardAccountMergeInitData {
|
|
21
|
+
currentUserInfo: BriefUserInfo;
|
|
22
|
+
existingUserInfo: BriefUserInfo;
|
|
23
|
+
mergeToken?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface UserRadioProps {
|
|
26
|
+
currentUserInfo: BriefUserInfo;
|
|
27
|
+
existingUserInfo: BriefUserInfo;
|
|
28
|
+
onChange?: (value: any) => void;
|
|
29
|
+
value?: any;
|
|
30
|
+
}
|
|
31
|
+
export interface UserRadioItemProps extends BriefUserInfo {
|
|
32
|
+
value: boolean;
|
|
33
|
+
selected: boolean;
|
|
34
|
+
onClick: (value: boolean) => void;
|
|
35
|
+
}
|
|
36
|
+
export enum AuthFlowAction {
|
|
37
|
+
MERGE = "confirm-account-merge"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
declare module '@authing/react-ui-components/components/AccountMerge/utils' {
|
|
42
|
+
import { User } from 'authing-js-sdk';
|
|
43
|
+
export const getDisplayName: (user: User) => string;
|
|
44
|
+
export const getDisplayNameByEmail: (displayName: string) => string;
|
|
45
|
+
|
|
46
|
+
}
|
|
1
47
|
declare module '@authing/react-ui-components/components/AuthingDropdown/index' {
|
|
2
48
|
import React, { FC } from 'react';
|
|
3
49
|
import './style.less';
|
|
@@ -486,6 +532,9 @@ declare module '@authing/react-ui-components/components/AuthingGuard/api/appConf
|
|
|
486
532
|
verifyCodeLength: number;
|
|
487
533
|
websocket: string;
|
|
488
534
|
welcomeMessage: any;
|
|
535
|
+
userPortal?: {
|
|
536
|
+
mergeAccount?: boolean;
|
|
537
|
+
};
|
|
489
538
|
skipComplateFileds: boolean;
|
|
490
539
|
}
|
|
491
540
|
export const fetchAppConfig: (appId: string) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingResponse<ApplicationConfig>>;
|
|
@@ -1056,6 +1105,14 @@ declare module '@authing/react-ui-components/components/AuthingTabs/index' {
|
|
|
1056
1105
|
}
|
|
1057
1106
|
export const AuthingTabs: FC<AuthingTabsProps>;
|
|
1058
1107
|
|
|
1108
|
+
}
|
|
1109
|
+
declare module '@authing/react-ui-components/components/BindTotp/businessRequest' {
|
|
1110
|
+
export enum BindTotpBusinessAction {
|
|
1111
|
+
VerifyTotpFirstTime = "verify-totp-first-time",
|
|
1112
|
+
ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
|
|
1113
|
+
}
|
|
1114
|
+
export const authFlow: (action: BindTotpBusinessAction, content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1115
|
+
|
|
1059
1116
|
}
|
|
1060
1117
|
declare module '@authing/react-ui-components/components/BindTotp/core/bindSuccess' {
|
|
1061
1118
|
import React from 'react';
|
|
@@ -1079,9 +1136,8 @@ declare module '@authing/react-ui-components/components/BindTotp/core/securityCo
|
|
|
1079
1136
|
}
|
|
1080
1137
|
declare module '@authing/react-ui-components/components/BindTotp/index' {
|
|
1081
1138
|
import React from 'react';
|
|
1082
|
-
import { GuardBindTotpViewProps } from '@authing/react-ui-components/components/BindTotp/interface';
|
|
1083
1139
|
import './styles.less';
|
|
1084
|
-
export const GuardBindTotpView: React.FC
|
|
1140
|
+
export const GuardBindTotpView: React.FC;
|
|
1085
1141
|
|
|
1086
1142
|
}
|
|
1087
1143
|
declare module '@authing/react-ui-components/components/BindTotp/interface' {
|
|
@@ -1111,15 +1167,24 @@ declare module '@authing/react-ui-components/components/ChangeLanguage/index' {
|
|
|
1111
1167
|
/// <reference types="react" />
|
|
1112
1168
|
export const ChangeLanguage: (props: any) => JSX.Element;
|
|
1113
1169
|
|
|
1170
|
+
}
|
|
1171
|
+
declare module '@authing/react-ui-components/components/ChangePassword/businessRequest' {
|
|
1172
|
+
export enum ChangePasswordBusinessAction {
|
|
1173
|
+
ResetPassword = "reset-password-first-time",
|
|
1174
|
+
FirstLoginReset = "reset-password-forced"
|
|
1175
|
+
}
|
|
1176
|
+
export const authFlow: (action: ChangePasswordBusinessAction, content: {
|
|
1177
|
+
password: string;
|
|
1178
|
+
oldPassword?: string;
|
|
1179
|
+
}) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1180
|
+
|
|
1114
1181
|
}
|
|
1115
1182
|
declare module '@authing/react-ui-components/components/ChangePassword/core/firstLoginReset' {
|
|
1116
|
-
|
|
1183
|
+
import React from 'react';
|
|
1117
1184
|
interface FirstLoginResetProps {
|
|
1118
1185
|
onReset: any;
|
|
1119
|
-
publicConfig: any;
|
|
1120
|
-
initData: any;
|
|
1121
1186
|
}
|
|
1122
|
-
export const FirstLoginReset:
|
|
1187
|
+
export const FirstLoginReset: React.FC<FirstLoginResetProps>;
|
|
1123
1188
|
export {};
|
|
1124
1189
|
|
|
1125
1190
|
}
|
|
@@ -1127,29 +1192,37 @@ declare module '@authing/react-ui-components/components/ChangePassword/core/rota
|
|
|
1127
1192
|
/// <reference types="react" />
|
|
1128
1193
|
interface RotateResetProps {
|
|
1129
1194
|
onReset: any;
|
|
1130
|
-
publicConfig: any;
|
|
1131
|
-
initData: any;
|
|
1132
1195
|
}
|
|
1133
1196
|
export const RotateReset: (props: RotateResetProps) => JSX.Element;
|
|
1134
1197
|
export {};
|
|
1135
1198
|
|
|
1136
1199
|
}
|
|
1137
1200
|
declare module '@authing/react-ui-components/components/ChangePassword/index' {
|
|
1138
|
-
|
|
1139
|
-
export const GuardChangePassword:
|
|
1201
|
+
import React from 'react';
|
|
1202
|
+
export const GuardChangePassword: React.FC<{
|
|
1203
|
+
title: string;
|
|
1204
|
+
explain: string;
|
|
1205
|
+
}>;
|
|
1206
|
+
export const GuardFirstLoginPasswordResetView: React.FC;
|
|
1207
|
+
export const GuardForcedPasswordResetView: React.FC;
|
|
1208
|
+
|
|
1209
|
+
}
|
|
1210
|
+
declare module '@authing/react-ui-components/components/CompleteInfo/businessRequest' {
|
|
1211
|
+
import { CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1212
|
+
export enum CompleteInfoAuthFlowAction {
|
|
1213
|
+
Complete = "complete-completion",
|
|
1214
|
+
Skip = "skip-completion"
|
|
1215
|
+
}
|
|
1216
|
+
export const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1217
|
+
export const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: 'registerByEmail' | 'registerByPhoneCode', registerContent: any, registerProfile?: any) => Promise<import("authing-js-sdk").User | undefined>;
|
|
1140
1218
|
|
|
1141
1219
|
}
|
|
1142
1220
|
declare module '@authing/react-ui-components/components/CompleteInfo/core/completeInfo' {
|
|
1143
1221
|
import React from 'react';
|
|
1144
|
-
import {
|
|
1145
|
-
import { GuardCompleteInfoViewProps } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1146
|
-
import { User } from 'authing-js-sdk';
|
|
1222
|
+
import { CompleteInfoMetaData, CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1147
1223
|
export interface CompleteInfoProps {
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
extendsFields: ExtendsField[];
|
|
1151
|
-
onRegisterInfoCompleted?: GuardCompleteInfoViewProps['onRegisterInfoCompleted'];
|
|
1152
|
-
onRegisterInfoCompletedError?: GuardCompleteInfoViewProps['onRegisterInfoCompletedError'];
|
|
1224
|
+
metaData: CompleteInfoMetaData[];
|
|
1225
|
+
businessRequest: (data: CompleteInfoRequest) => Promise<void>;
|
|
1153
1226
|
}
|
|
1154
1227
|
export interface FieldMetadata {
|
|
1155
1228
|
key: string;
|
|
@@ -1160,14 +1233,23 @@ declare module '@authing/react-ui-components/components/CompleteInfo/core/comple
|
|
|
1160
1233
|
}
|
|
1161
1234
|
declare module '@authing/react-ui-components/components/CompleteInfo/index' {
|
|
1162
1235
|
import React from 'react';
|
|
1163
|
-
import {
|
|
1236
|
+
import { CompleteInfoMetaData, CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1164
1237
|
import './styles.less';
|
|
1165
|
-
|
|
1238
|
+
import { CompleteInfoAuthFlowAction } from '@authing/react-ui-components/components/CompleteInfo/businessRequest';
|
|
1239
|
+
export const GuardCompleteInfo: React.FC<{
|
|
1240
|
+
metaData: CompleteInfoMetaData[];
|
|
1241
|
+
skipComplateFileds: boolean;
|
|
1242
|
+
businessRequest: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<void>;
|
|
1243
|
+
}>;
|
|
1244
|
+
export const GuardLoginCompleteInfoView: React.FC;
|
|
1245
|
+
export const GuardRegisterCompleteInfoView: React.FC;
|
|
1246
|
+
export const GuardCustomCompleteInfoView: React.FC;
|
|
1166
1247
|
|
|
1167
1248
|
}
|
|
1168
1249
|
declare module '@authing/react-ui-components/components/CompleteInfo/interface' {
|
|
1169
1250
|
import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
|
|
1170
1251
|
import { IG2Config, IG2Events, IG2FCProps } from '@authing/react-ui-components/components/Type/index';
|
|
1252
|
+
import { CompleteInfoAuthFlowAction } from '@authing/react-ui-components/components/CompleteInfo/businessRequest';
|
|
1171
1253
|
export interface CompleteInfoConfig extends IG2Config {
|
|
1172
1254
|
}
|
|
1173
1255
|
export const getDefaultCompleteInfoConfig: () => CompleteInfoConfig;
|
|
@@ -1175,19 +1257,21 @@ declare module '@authing/react-ui-components/components/CompleteInfo/interface'
|
|
|
1175
1257
|
onRegisterInfoCompleted?: (user: User, udfs: {
|
|
1176
1258
|
definition: any;
|
|
1177
1259
|
value: any;
|
|
1178
|
-
}[], authClient: AuthenticationClient
|
|
1260
|
+
}[], authClient: AuthenticationClient, opts?: {
|
|
1261
|
+
phone?: string;
|
|
1262
|
+
canMergeUser?: boolean;
|
|
1263
|
+
}) => void;
|
|
1179
1264
|
onRegisterInfoCompletedError?: (error: CommonMessage, udfs: {
|
|
1180
1265
|
definition: any;
|
|
1181
1266
|
value: any;
|
|
1182
1267
|
}[], authClient: AuthenticationClient) => void;
|
|
1268
|
+
onCustomCompleteInfo?: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => void;
|
|
1183
1269
|
}
|
|
1184
1270
|
export interface GuardCompleteInfoProps extends IG2FCProps, CompleteInfoEvents {
|
|
1185
1271
|
config: Partial<CompleteInfoConfig>;
|
|
1186
1272
|
}
|
|
1187
1273
|
export interface GuardCompleteInfoViewProps extends GuardCompleteInfoProps {
|
|
1188
1274
|
config: CompleteInfoConfig;
|
|
1189
|
-
initData: any;
|
|
1190
|
-
onLogin?: any;
|
|
1191
1275
|
}
|
|
1192
1276
|
export type ExtendsFieldType = 'user' | 'internal';
|
|
1193
1277
|
export interface ExtendsField {
|
|
@@ -1198,12 +1282,86 @@ declare module '@authing/react-ui-components/components/CompleteInfo/interface'
|
|
|
1198
1282
|
required: boolean;
|
|
1199
1283
|
validateRules: any[];
|
|
1200
1284
|
}
|
|
1285
|
+
export enum FormValidateRule {
|
|
1286
|
+
NONE = "none",
|
|
1287
|
+
EMAIL = "email",
|
|
1288
|
+
PHONE = "phone",
|
|
1289
|
+
IS_NUMBER = "isNumber",
|
|
1290
|
+
REG_EXP = "regExp"
|
|
1291
|
+
}
|
|
1292
|
+
export interface CompleteInfoRule {
|
|
1293
|
+
type: FormValidateRule;
|
|
1294
|
+
content: string;
|
|
1295
|
+
errorMessage?: string;
|
|
1296
|
+
}
|
|
1297
|
+
export interface CompleteInfoSelectOption {
|
|
1298
|
+
value: string;
|
|
1299
|
+
label: string;
|
|
1300
|
+
}
|
|
1301
|
+
export interface CompleteInfoMetaData {
|
|
1302
|
+
type: CompleteInfoBaseControls | CompleteInfoExtendsControls;
|
|
1303
|
+
label: string;
|
|
1304
|
+
name: string;
|
|
1305
|
+
required: boolean;
|
|
1306
|
+
validateRules: CompleteInfoRule[];
|
|
1307
|
+
options?: CompleteInfoSelectOption[];
|
|
1308
|
+
}
|
|
1309
|
+
export enum CompleteInfoBaseControls {
|
|
1310
|
+
USERNAME = "username",
|
|
1311
|
+
PHONE = "phone",
|
|
1312
|
+
EMAIL = "email"
|
|
1313
|
+
}
|
|
1314
|
+
export enum CompleteInfoExtendsControls {
|
|
1315
|
+
IMAGE = "image",
|
|
1316
|
+
NUMBER = "number",
|
|
1317
|
+
DATE = "date",
|
|
1318
|
+
DATE_TIME = "dateTime",
|
|
1319
|
+
SELECT = "select",
|
|
1320
|
+
DROPDOWN = "dropdown",
|
|
1321
|
+
BOOLEAN = "boolean",
|
|
1322
|
+
STRING = "string",
|
|
1323
|
+
TEXT = "text",
|
|
1324
|
+
GENDER = "gender",
|
|
1325
|
+
COUNTRY = "country"
|
|
1326
|
+
}
|
|
1327
|
+
export interface CompleteInfoInitData {
|
|
1328
|
+
skip: boolean;
|
|
1329
|
+
metaData: CompleteInfoMetaData[];
|
|
1330
|
+
}
|
|
1331
|
+
export interface RegisterCompleteInfoInitData {
|
|
1332
|
+
content: any;
|
|
1333
|
+
businessRequestName: 'registerByEmail' | 'registerByPhoneCode';
|
|
1334
|
+
}
|
|
1335
|
+
export interface CompleteInfoRequest {
|
|
1336
|
+
fieldValues: {
|
|
1337
|
+
name: string;
|
|
1338
|
+
value: string;
|
|
1339
|
+
code?: string;
|
|
1340
|
+
}[];
|
|
1341
|
+
}
|
|
1342
|
+
export enum OmitCompleteInfo {
|
|
1343
|
+
'registerByEmail' = "email",
|
|
1344
|
+
'registerByPhoneCode' = "phone"
|
|
1345
|
+
}
|
|
1201
1346
|
|
|
1202
1347
|
}
|
|
1203
1348
|
declare module '@authing/react-ui-components/components/CompleteInfo/utils' {
|
|
1204
1349
|
import { User } from 'authing-js-sdk';
|
|
1205
|
-
import {
|
|
1350
|
+
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
1351
|
+
import { CompleteInfoMetaData, ExtendsField } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1206
1352
|
export const completeFieldsFilter: (user: User, field: ExtendsField) => boolean;
|
|
1353
|
+
export const extendsFieldsToMetaData: (extendsFields: import("@authing/react-ui-components/components/AuthingGuard/api/index").ExtendsField[] | undefined, selectOptions: {
|
|
1354
|
+
key: string;
|
|
1355
|
+
options: {
|
|
1356
|
+
value: string;
|
|
1357
|
+
label: string;
|
|
1358
|
+
}[];
|
|
1359
|
+
}[]) => CompleteInfoMetaData[];
|
|
1360
|
+
export const fieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: {
|
|
1361
|
+
name: string;
|
|
1362
|
+
value: string;
|
|
1363
|
+
code?: string | undefined;
|
|
1364
|
+
}[] | undefined) => Record<string, any>;
|
|
1207
1365
|
|
|
1208
1366
|
}
|
|
1209
1367
|
declare module '@authing/react-ui-components/components/CopyAbleText/index' {
|
|
@@ -1216,9 +1374,8 @@ declare module '@authing/react-ui-components/components/CopyAbleText/index' {
|
|
|
1216
1374
|
}
|
|
1217
1375
|
declare module '@authing/react-ui-components/components/DownloadAuthenticator/index' {
|
|
1218
1376
|
import React from 'react';
|
|
1219
|
-
import { GuardDownloadATViewProps } from '@authing/react-ui-components/components/DownloadAuthenticator/interface';
|
|
1220
1377
|
import './styles.less';
|
|
1221
|
-
export const GuardDownloadATView: React.FC
|
|
1378
|
+
export const GuardDownloadATView: React.FC;
|
|
1222
1379
|
|
|
1223
1380
|
}
|
|
1224
1381
|
declare module '@authing/react-ui-components/components/DownloadAuthenticator/interface' {
|
|
@@ -1238,14 +1395,13 @@ declare module '@authing/react-ui-components/components/DownloadAuthenticator/in
|
|
|
1238
1395
|
}
|
|
1239
1396
|
declare module '@authing/react-ui-components/components/Error/index' {
|
|
1240
1397
|
import React from 'react';
|
|
1241
|
-
import { GuardErrorViewProps } from '@authing/react-ui-components/components/Error/interface';
|
|
1242
1398
|
import './styles.less';
|
|
1243
|
-
export const GuardErrorView: React.FC
|
|
1399
|
+
export const GuardErrorView: React.FC;
|
|
1244
1400
|
|
|
1245
1401
|
}
|
|
1246
1402
|
declare module '@authing/react-ui-components/components/Error/interface' {
|
|
1247
1403
|
export interface ErrorInitData {
|
|
1248
|
-
|
|
1404
|
+
error?: Error;
|
|
1249
1405
|
}
|
|
1250
1406
|
export interface GuardErrorProps {
|
|
1251
1407
|
initData?: ErrorInitData;
|
|
@@ -1272,8 +1428,7 @@ declare module '@authing/react-ui-components/components/ForgetPassword/core/rese
|
|
|
1272
1428
|
}
|
|
1273
1429
|
declare module '@authing/react-ui-components/components/ForgetPassword/index' {
|
|
1274
1430
|
import React from 'react';
|
|
1275
|
-
|
|
1276
|
-
export const GuardForgetPassword: React.FC<ForgetPasswordViewProps>;
|
|
1431
|
+
export const GuardForgetPassword: React.FC;
|
|
1277
1432
|
|
|
1278
1433
|
}
|
|
1279
1434
|
declare module '@authing/react-ui-components/components/ForgetPassword/interface' {
|
|
@@ -1302,24 +1457,56 @@ declare module '@authing/react-ui-components/components/Guard/Guard' {
|
|
|
1302
1457
|
import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
|
|
1303
1458
|
import { IG2FCProps } from '@authing/react-ui-components/components/Type/index';
|
|
1304
1459
|
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
1305
|
-
import './styles.less';
|
|
1306
1460
|
import 'moment/locale/zh-cn';
|
|
1307
|
-
export enum LangMAP {
|
|
1308
|
-
zhCn = "zh-CN",
|
|
1309
|
-
enUs = "en-US"
|
|
1310
|
-
}
|
|
1311
1461
|
export interface GuardProps extends GuardEvents, IG2FCProps {
|
|
1312
|
-
tenantId?: string;
|
|
1313
1462
|
config?: Partial<GuardLocalConfig>;
|
|
1314
|
-
visible?: boolean;
|
|
1315
1463
|
}
|
|
1316
1464
|
export const Guard: (props: GuardProps) => JSX.Element;
|
|
1317
1465
|
|
|
1466
|
+
}
|
|
1467
|
+
declare module '@authing/react-ui-components/components/Guard/GuardModule/stateMachine' {
|
|
1468
|
+
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
1469
|
+
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
1470
|
+
export interface ModuleState {
|
|
1471
|
+
moduleName: GuardModuleType;
|
|
1472
|
+
initData?: any;
|
|
1473
|
+
}
|
|
1474
|
+
export enum ActionType {
|
|
1475
|
+
ChangeModule = "ChangeModule",
|
|
1476
|
+
Back = "Back",
|
|
1477
|
+
Init = "Init"
|
|
1478
|
+
}
|
|
1479
|
+
export interface StateMachineLog {
|
|
1480
|
+
action: ActionType;
|
|
1481
|
+
date: number;
|
|
1482
|
+
dataSource: ModuleState;
|
|
1483
|
+
}
|
|
1484
|
+
export type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
|
|
1485
|
+
export class GuardStateMachine {
|
|
1486
|
+
private order;
|
|
1487
|
+
private config;
|
|
1488
|
+
private moduleStateHistory;
|
|
1489
|
+
private changeModuleEvent;
|
|
1490
|
+
private stateMachineLog;
|
|
1491
|
+
constructor(changeModuleEvent: ChangeModuleEvent, initData: ModuleState);
|
|
1492
|
+
globalWindow: () => Window | undefined;
|
|
1493
|
+
next: (nextModule: GuardModuleType, initData: any) => void;
|
|
1494
|
+
back: (initData?: any) => void;
|
|
1495
|
+
end: () => void;
|
|
1496
|
+
historyPush: (data: ModuleState, actionType?: ActionType) => void;
|
|
1497
|
+
historyBack: (data: ModuleState) => void;
|
|
1498
|
+
setConfig: (config: GuardLocalConfig) => void;
|
|
1499
|
+
}
|
|
1500
|
+
export const useHistoryHijack: (back?: (() => void) | undefined) => ((state?: any) => void)[];
|
|
1501
|
+
export const initGuardStateMachine: (changeMouleEvent: ChangeModuleEvent, initData: ModuleState) => GuardStateMachine;
|
|
1502
|
+
export const getGuardStateMachine: () => GuardStateMachine;
|
|
1503
|
+
export const useGuardStateMachine: () => GuardStateMachine;
|
|
1504
|
+
|
|
1318
1505
|
}
|
|
1319
1506
|
declare module '@authing/react-ui-components/components/Guard/authClient' {
|
|
1320
1507
|
import { AuthenticationClient } from 'authing-js-sdk';
|
|
1321
1508
|
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
1322
|
-
export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string | undefined) => AuthenticationClient;
|
|
1509
|
+
export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, websocketHost: string, tenantId?: string | undefined) => AuthenticationClient;
|
|
1323
1510
|
export const getGuardAuthClient: () => AuthenticationClient;
|
|
1324
1511
|
export const useGuardAuthClient: () => AuthenticationClient;
|
|
1325
1512
|
|
|
@@ -1329,7 +1516,7 @@ declare module '@authing/react-ui-components/components/Guard/config' {
|
|
|
1329
1516
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
|
|
1330
1517
|
import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
|
|
1331
1518
|
import { RegisterConfig } from '@authing/react-ui-components/components/Register/interface';
|
|
1332
|
-
export interface
|
|
1519
|
+
export interface GuardComponentConfig extends Partial<GuardLocalConfig> {
|
|
1333
1520
|
}
|
|
1334
1521
|
export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
|
|
1335
1522
|
isSSO?: boolean;
|
|
@@ -1344,14 +1531,46 @@ declare module '@authing/react-ui-components/components/Guard/config' {
|
|
|
1344
1531
|
}
|
|
1345
1532
|
export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
|
|
1346
1533
|
|
|
1534
|
+
}
|
|
1535
|
+
declare module '@authing/react-ui-components/components/Guard/core/index' {
|
|
1536
|
+
/// <reference types="react" />
|
|
1537
|
+
import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
|
|
1538
|
+
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
1539
|
+
export const useRenderGuardCore: (props: GuardProps, initState: ModuleState) => JSX.Element;
|
|
1540
|
+
|
|
1541
|
+
}
|
|
1542
|
+
declare module '@authing/react-ui-components/components/Guard/core/renderContext' {
|
|
1543
|
+
import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
|
|
1544
|
+
import React from 'react';
|
|
1545
|
+
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
1546
|
+
export const RenderContext: React.FC<{
|
|
1547
|
+
guardProps: GuardProps;
|
|
1548
|
+
initState: ModuleState;
|
|
1549
|
+
}>;
|
|
1550
|
+
|
|
1551
|
+
}
|
|
1552
|
+
declare module '@authing/react-ui-components/components/Guard/core/renderModule' {
|
|
1553
|
+
import React from 'react';
|
|
1554
|
+
import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
|
|
1555
|
+
import '../styles.less';
|
|
1556
|
+
export enum LangMAP {
|
|
1557
|
+
zhCn = "zh-CN",
|
|
1558
|
+
enUs = "en-US"
|
|
1559
|
+
}
|
|
1560
|
+
export const RenderModule: React.FC<{
|
|
1561
|
+
guardProps: GuardProps;
|
|
1562
|
+
}>;
|
|
1563
|
+
|
|
1347
1564
|
}
|
|
1348
1565
|
declare module '@authing/react-ui-components/components/Guard/event' {
|
|
1349
1566
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
|
|
1350
1567
|
import { CompleteInfoEvents } from '@authing/react-ui-components/components/CompleteInfo/interface';
|
|
1351
1568
|
import { ForgetPasswordEvents } from '@authing/react-ui-components/components/ForgetPassword/interface';
|
|
1569
|
+
import { IdentityBindingEvents } from '@authing/react-ui-components/components/IdentityBinding/interface';
|
|
1570
|
+
import { IdentityBindingAskEvents } from '@authing/react-ui-components/components/IdentityBindingAsk/index';
|
|
1352
1571
|
import { LoginEvents } from '@authing/react-ui-components/components/Login/interface';
|
|
1353
1572
|
import { RegisterEvents } from '@authing/react-ui-components/components/Register/interface';
|
|
1354
|
-
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents {
|
|
1573
|
+
export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
|
|
1355
1574
|
onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
|
|
1356
1575
|
}
|
|
1357
1576
|
export const guardEventsFilter: (props: any, openEventsMapping?: boolean | undefined) => GuardEvents;
|
|
@@ -1372,15 +1591,19 @@ declare module '@authing/react-ui-components/components/Guard/module' {
|
|
|
1372
1591
|
REGISTER = "register",
|
|
1373
1592
|
MFA = "mfa",
|
|
1374
1593
|
FORGET_PWD = "forgetPassword",
|
|
1375
|
-
|
|
1594
|
+
FORCED_PASSWORD_RESET = "forcedPasswordReset",
|
|
1595
|
+
FIRST_LOGIN_PASSWORD = "firstLoginPassword",
|
|
1376
1596
|
DOWNLOAD_AT = "downloadAT",
|
|
1377
1597
|
BIND_TOTP = "bindTotp",
|
|
1378
1598
|
ANY_QUESTIONS = "anyQuestions",
|
|
1379
|
-
|
|
1599
|
+
LOGIN_COMPLETE_INFO = "loginCompleteInfo",
|
|
1600
|
+
REGISTER_COMPLETE_INFO = "registerCompleteInfo",
|
|
1601
|
+
CUSTOM_COMPLETE_INFO = "customCompleteInfo",
|
|
1380
1602
|
RECOVERY_CODE = "recoveryCode",
|
|
1381
1603
|
SUBMIT_SUCCESS = "submitSuccess",
|
|
1382
1604
|
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
1383
|
-
IDENTITY_BINDING = "identityBinding"
|
|
1605
|
+
IDENTITY_BINDING = "identityBinding",
|
|
1606
|
+
ACCOUNT_MERGE = "accountMerge"
|
|
1384
1607
|
}
|
|
1385
1608
|
export interface GuardModuleAction {
|
|
1386
1609
|
action: string;
|
|
@@ -1409,46 +1632,7 @@ declare module '@authing/react-ui-components/components/Guard/sso' {
|
|
|
1409
1632
|
};
|
|
1410
1633
|
userInfo?: User;
|
|
1411
1634
|
}
|
|
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;
|
|
1635
|
+
export const trackSession: () => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<SessionData>>;
|
|
1452
1636
|
|
|
1453
1637
|
}
|
|
1454
1638
|
declare module '@authing/react-ui-components/components/IconFont/iconfont' {
|
|
@@ -1472,9 +1656,37 @@ declare module '@authing/react-ui-components/components/IconFont/svg' {
|
|
|
1472
1656
|
}
|
|
1473
1657
|
declare module '@authing/react-ui-components/components/IdentityBinding/IdentityBinding' {
|
|
1474
1658
|
import React from 'react';
|
|
1475
|
-
import { GuardIdentityBindingViewProps } from '@authing/react-ui-components/components/IdentityBinding/interface';
|
|
1476
1659
|
import './styles.less';
|
|
1477
|
-
export const GuardIdentityBindingView: React.FC
|
|
1660
|
+
export const GuardIdentityBindingView: React.FC;
|
|
1661
|
+
|
|
1662
|
+
}
|
|
1663
|
+
declare module '@authing/react-ui-components/components/IdentityBinding/businessRequest' {
|
|
1664
|
+
export enum IdentityBindingBusinessAction {
|
|
1665
|
+
PhoneCode = "phone-code",
|
|
1666
|
+
EmailCode = "emial-code",
|
|
1667
|
+
Password = "password"
|
|
1668
|
+
}
|
|
1669
|
+
export interface PhoneCodeParams {
|
|
1670
|
+
phone: string;
|
|
1671
|
+
code: string;
|
|
1672
|
+
phoneCountryCode?: string;
|
|
1673
|
+
}
|
|
1674
|
+
export interface EmailCodeParams {
|
|
1675
|
+
email: string;
|
|
1676
|
+
code: string;
|
|
1677
|
+
}
|
|
1678
|
+
export interface PasswordParams {
|
|
1679
|
+
account: string;
|
|
1680
|
+
password: string;
|
|
1681
|
+
}
|
|
1682
|
+
export const PhoneCode: (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1683
|
+
export const EmailCode: (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1684
|
+
export const Password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1685
|
+
export const useIdentityBindingBusinessRequest: () => {
|
|
1686
|
+
"phone-code": (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1687
|
+
"emial-code": (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1688
|
+
password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
1689
|
+
};
|
|
1478
1690
|
|
|
1479
1691
|
}
|
|
1480
1692
|
declare module '@authing/react-ui-components/components/IdentityBinding/index' {
|
|
@@ -1514,9 +1726,8 @@ declare module '@authing/react-ui-components/components/IdentityBinding/interfac
|
|
|
1514
1726
|
}
|
|
1515
1727
|
declare module '@authing/react-ui-components/components/IdentityBindingAsk/IdentityBindingAsk' {
|
|
1516
1728
|
import React from 'react';
|
|
1517
|
-
import { GuardIdentityBindingAskViewProps } from '@authing/react-ui-components/components/IdentityBindingAsk/interface';
|
|
1518
1729
|
import './styles.less';
|
|
1519
|
-
export const GuardIdentityBindingAskView: React.FC
|
|
1730
|
+
export const GuardIdentityBindingAskView: React.FC;
|
|
1520
1731
|
|
|
1521
1732
|
}
|
|
1522
1733
|
declare module '@authing/react-ui-components/components/IdentityBindingAsk/index' {
|
|
@@ -1591,7 +1802,8 @@ declare module '@authing/react-ui-components/components/Login/core/withAD' {
|
|
|
1591
1802
|
interface LoginWithADProps {
|
|
1592
1803
|
publicKey: string;
|
|
1593
1804
|
autoRegister?: boolean;
|
|
1594
|
-
|
|
1805
|
+
onLoginSuccess: any;
|
|
1806
|
+
onLoginFailed: any;
|
|
1595
1807
|
onBeforeLogin: any;
|
|
1596
1808
|
agreements: Agreement[];
|
|
1597
1809
|
}
|
|
@@ -1602,7 +1814,7 @@ declare module '@authing/react-ui-components/components/Login/core/withAD' {
|
|
|
1602
1814
|
declare module '@authing/react-ui-components/components/Login/core/withAppQrcode' {
|
|
1603
1815
|
/// <reference types="react" />
|
|
1604
1816
|
interface LoginWithAppQrcodeProps {
|
|
1605
|
-
|
|
1817
|
+
onLoginSuccess: any;
|
|
1606
1818
|
canLoop: boolean;
|
|
1607
1819
|
qrCodeScanOptions: any;
|
|
1608
1820
|
}
|
|
@@ -1617,7 +1829,8 @@ declare module '@authing/react-ui-components/components/Login/core/withLDAP' {
|
|
|
1617
1829
|
publicKey: string;
|
|
1618
1830
|
autoRegister?: boolean;
|
|
1619
1831
|
host?: string;
|
|
1620
|
-
|
|
1832
|
+
onLoginSuccess: any;
|
|
1833
|
+
onLoginFailed: any;
|
|
1621
1834
|
onBeforeLogin: any;
|
|
1622
1835
|
agreements: Agreement[];
|
|
1623
1836
|
}
|
|
@@ -1664,8 +1877,9 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
|
|
|
1664
1877
|
publicKey: string;
|
|
1665
1878
|
autoRegister?: boolean;
|
|
1666
1879
|
host?: string;
|
|
1667
|
-
onLogin: any;
|
|
1668
1880
|
onBeforeLogin?: any;
|
|
1881
|
+
onLoginSuccess?: any;
|
|
1882
|
+
onLoginFailed?: any;
|
|
1669
1883
|
onLoginRequest?: (loginInfo: any) => Promise<AuthingResponse>;
|
|
1670
1884
|
passwordLoginMethods: PasswordLoginMethods[];
|
|
1671
1885
|
agreements: Agreement[];
|
|
@@ -1729,7 +1943,7 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
|
|
|
1729
1943
|
declare module '@authing/react-ui-components/components/Login/core/withWechatMiniQrcode' {
|
|
1730
1944
|
/// <reference types="react" />
|
|
1731
1945
|
interface LoginWithWechatMiniQrcodeProps {
|
|
1732
|
-
|
|
1946
|
+
onLoginSuccess: any;
|
|
1733
1947
|
canLoop: boolean;
|
|
1734
1948
|
qrCodeScanOptions: any;
|
|
1735
1949
|
}
|
|
@@ -1740,7 +1954,7 @@ declare module '@authing/react-ui-components/components/Login/core/withWechatMin
|
|
|
1740
1954
|
declare module '@authing/react-ui-components/components/Login/core/withWechatmpQrcode' {
|
|
1741
1955
|
/// <reference types="react" />
|
|
1742
1956
|
interface LoginWithWechatmpQrcodeProps {
|
|
1743
|
-
|
|
1957
|
+
onLoginSuccess: any;
|
|
1744
1958
|
canLoop: boolean;
|
|
1745
1959
|
qrCodeScanOptions: any;
|
|
1746
1960
|
}
|
|
@@ -1750,9 +1964,8 @@ declare module '@authing/react-ui-components/components/Login/core/withWechatmpQ
|
|
|
1750
1964
|
}
|
|
1751
1965
|
declare module '@authing/react-ui-components/components/Login/index' {
|
|
1752
1966
|
/// <reference types="react" />
|
|
1753
|
-
import { GuardLoginViewProps } from '@authing/react-ui-components/components/Login/interface';
|
|
1754
1967
|
import './styles.less';
|
|
1755
|
-
export const GuardLoginView: (
|
|
1968
|
+
export const GuardLoginView: () => JSX.Element;
|
|
1756
1969
|
|
|
1757
1970
|
}
|
|
1758
1971
|
declare module '@authing/react-ui-components/components/Login/interface' {
|
|
@@ -1763,12 +1976,12 @@ declare module '@authing/react-ui-components/components/Login/interface' {
|
|
|
1763
1976
|
import { PasswordLoginParams, LDAPLoginParams, ADLoginParams, PhoneCodeLoginParams, AuthenticationClient, User } from '@authing/react-ui-components/components/index';
|
|
1764
1977
|
import { LoginMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
|
|
1765
1978
|
export interface LoginConfig extends IG2Config {
|
|
1766
|
-
autoRegister
|
|
1767
|
-
disableResetPwd
|
|
1768
|
-
disableRegister
|
|
1769
|
-
defaultLoginMethod
|
|
1770
|
-
loginMethods
|
|
1771
|
-
passwordLoginMethods
|
|
1979
|
+
autoRegister?: boolean;
|
|
1980
|
+
disableResetPwd?: boolean;
|
|
1981
|
+
disableRegister?: boolean;
|
|
1982
|
+
defaultLoginMethod?: LoginMethods;
|
|
1983
|
+
loginMethods?: LoginMethods[];
|
|
1984
|
+
passwordLoginMethods?: PasswordLoginMethods[];
|
|
1772
1985
|
socialConnections?: SocialConnectionProvider[];
|
|
1773
1986
|
socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
|
|
1774
1987
|
enterpriseConnections?: string[];
|
|
@@ -1799,15 +2012,25 @@ declare module '@authing/react-ui-components/components/Login/socialLogin/IdpBut
|
|
|
1799
2012
|
}
|
|
1800
2013
|
declare module '@authing/react-ui-components/components/Login/socialLogin/index' {
|
|
1801
2014
|
import React from 'react';
|
|
2015
|
+
import { ApplicationConfig, SocialConnectionItem } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
1802
2016
|
import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
|
|
1803
2017
|
import './style.less';
|
|
1804
2018
|
export interface SocialLoginProps {
|
|
1805
2019
|
appId: string;
|
|
1806
2020
|
config: LoginConfig;
|
|
1807
|
-
|
|
2021
|
+
onLoginFailed: any;
|
|
2022
|
+
onLoginSuccess: any;
|
|
2023
|
+
enterpriseConnectionObjs: ApplicationConfig['identityProviders'];
|
|
2024
|
+
socialConnectionObjs: SocialConnectionItem[];
|
|
1808
2025
|
}
|
|
1809
2026
|
export const SocialLogin: React.FC<SocialLoginProps>;
|
|
1810
2027
|
|
|
2028
|
+
}
|
|
2029
|
+
declare module '@authing/react-ui-components/components/Login/socialLogin/postMessage' {
|
|
2030
|
+
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
2031
|
+
export const usePostMessage: () => (evt: MessageEvent) => import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any> | undefined;
|
|
2032
|
+
export const useErrorHandling: () => (res: AuthingResponse) => import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>;
|
|
2033
|
+
|
|
1811
2034
|
}
|
|
1812
2035
|
declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/VerifyCodeFormItem' {
|
|
1813
2036
|
import { FormItemProps } from 'antd/lib/form';
|
|
@@ -1836,6 +2059,55 @@ declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/inde
|
|
|
1836
2059
|
export const VerifyCodeInput: FC<VerifyCodeInputProps>;
|
|
1837
2060
|
export {};
|
|
1838
2061
|
|
|
2062
|
+
}
|
|
2063
|
+
declare module '@authing/react-ui-components/components/MFA/businessRequest' {
|
|
2064
|
+
export enum MfaBusinessAction {
|
|
2065
|
+
VerifyEmail = "verify-email",
|
|
2066
|
+
VerifySms = "verify-sms",
|
|
2067
|
+
VerifyTotp = "verify-totp",
|
|
2068
|
+
VerifyFace = "verify-face",
|
|
2069
|
+
AssociateFace = "associate-face"
|
|
2070
|
+
}
|
|
2071
|
+
export const authFlow: (action: MfaBusinessAction, content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2072
|
+
interface VerifySmsContent {
|
|
2073
|
+
phone: string;
|
|
2074
|
+
code: string;
|
|
2075
|
+
mfaToken?: string;
|
|
2076
|
+
phoneCountryCode?: string;
|
|
2077
|
+
}
|
|
2078
|
+
interface VerifyEmailContent {
|
|
2079
|
+
email: string;
|
|
2080
|
+
code: string;
|
|
2081
|
+
mfaToken?: string;
|
|
2082
|
+
}
|
|
2083
|
+
interface VerifyTotpContent {
|
|
2084
|
+
totp: string;
|
|
2085
|
+
mfaToken?: string;
|
|
2086
|
+
}
|
|
2087
|
+
interface VerifyFaceContent {
|
|
2088
|
+
photo: string;
|
|
2089
|
+
mfaToken?: string;
|
|
2090
|
+
}
|
|
2091
|
+
interface AssociateFaceContent {
|
|
2092
|
+
photoA: string;
|
|
2093
|
+
photoB: string;
|
|
2094
|
+
isExternalPhoto?: boolean;
|
|
2095
|
+
mfaToken?: string;
|
|
2096
|
+
}
|
|
2097
|
+
export const VerifyEmail: (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2098
|
+
export const VerifySms: (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2099
|
+
export const VerifyTotp: (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2100
|
+
export const VerifyFace: (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2101
|
+
export const AssociateFace: (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2102
|
+
export const useMfaBusinessRequest: () => {
|
|
2103
|
+
"verify-email": (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2104
|
+
"verify-sms": (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2105
|
+
"verify-totp": (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2106
|
+
"verify-face": (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2107
|
+
"associate-face": (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
|
|
2108
|
+
};
|
|
2109
|
+
export {};
|
|
2110
|
+
|
|
1839
2111
|
}
|
|
1840
2112
|
declare module '@authing/react-ui-components/components/MFA/codemap' {
|
|
1841
2113
|
import { GuardModuleAction } from '@authing/react-ui-components/components/Guard/module';
|
|
@@ -1943,14 +2215,13 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
|
|
|
1943
2215
|
}
|
|
1944
2216
|
declare module '@authing/react-ui-components/components/MFA/index' {
|
|
1945
2217
|
import React from 'react';
|
|
1946
|
-
import { GuardMFAViewProps } from '@authing/react-ui-components/components/MFA/interface';
|
|
1947
2218
|
import './styles.less';
|
|
1948
2219
|
interface MFABackStateContextType {
|
|
1949
2220
|
setMfaBackState: React.Dispatch<React.SetStateAction<string>>;
|
|
1950
2221
|
mfaBackState: string;
|
|
1951
2222
|
}
|
|
1952
2223
|
export const MFABackStateContext: React.Context<MFABackStateContextType | undefined>;
|
|
1953
|
-
export const GuardMFAView: React.FC
|
|
2224
|
+
export const GuardMFAView: React.FC;
|
|
1954
2225
|
export {};
|
|
1955
2226
|
|
|
1956
2227
|
}
|
|
@@ -1986,6 +2257,7 @@ declare module '@authing/react-ui-components/components/MFA/interface' {
|
|
|
1986
2257
|
nickme?: string;
|
|
1987
2258
|
username?: string;
|
|
1988
2259
|
current?: MFAType;
|
|
2260
|
+
thirdPartyOrigin?: boolean;
|
|
1989
2261
|
}
|
|
1990
2262
|
export interface GuardMFAProps extends IG2FCProps, MFAEvents {
|
|
1991
2263
|
config: Partial<MFAConfig>;
|
|
@@ -1999,10 +2271,9 @@ declare module '@authing/react-ui-components/components/MFA/interface' {
|
|
|
1999
2271
|
}
|
|
2000
2272
|
declare module '@authing/react-ui-components/components/MFA/mfaMethods/index' {
|
|
2001
2273
|
import React from 'react';
|
|
2002
|
-
import {
|
|
2274
|
+
import { MFAType } from '@authing/react-ui-components/components/MFA/interface';
|
|
2003
2275
|
import './style.less';
|
|
2004
2276
|
export interface MFAMethodsProps {
|
|
2005
|
-
applicationMfa: GuardMFAInitData['applicationMfa'];
|
|
2006
2277
|
method: MFAType;
|
|
2007
2278
|
onChangeMethod: (type: MFAType) => void;
|
|
2008
2279
|
}
|
|
@@ -2024,6 +2295,14 @@ declare module '@authing/react-ui-components/components/NeedHelpView/index' {
|
|
|
2024
2295
|
/// <reference types="react" />
|
|
2025
2296
|
export const GuardNeedHelpView: (props: any) => JSX.Element;
|
|
2026
2297
|
|
|
2298
|
+
}
|
|
2299
|
+
declare module '@authing/react-ui-components/components/RecoveryCode/businessRequest' {
|
|
2300
|
+
export enum TotpRecoveryCodeBusinessAction {
|
|
2301
|
+
RecoveryTotp = "recovery-totp",
|
|
2302
|
+
ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
|
|
2303
|
+
}
|
|
2304
|
+
export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, content: any): Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
|
|
2305
|
+
|
|
2027
2306
|
}
|
|
2028
2307
|
declare module '@authing/react-ui-components/components/RecoveryCode/core/saveCode' {
|
|
2029
2308
|
import React from 'react';
|
|
@@ -2038,20 +2317,21 @@ declare module '@authing/react-ui-components/components/RecoveryCode/core/useCod
|
|
|
2038
2317
|
import { User } from '@authing/react-ui-components/components/index';
|
|
2039
2318
|
export interface UseCodeProps {
|
|
2040
2319
|
mfaToken: string;
|
|
2041
|
-
onSubmit: (recoveryCode: string, user
|
|
2320
|
+
onSubmit: (recoveryCode: string, user?: User) => void;
|
|
2042
2321
|
}
|
|
2043
2322
|
export const UseCode: React.FC<UseCodeProps>;
|
|
2044
2323
|
|
|
2045
2324
|
}
|
|
2046
2325
|
declare module '@authing/react-ui-components/components/RecoveryCode/index' {
|
|
2047
2326
|
import React from 'react';
|
|
2048
|
-
import { GuardRecoveryCodeViewProps } from '@authing/react-ui-components/components/RecoveryCode/interface';
|
|
2049
2327
|
import './style.less';
|
|
2050
|
-
export const
|
|
2328
|
+
export const RecoveryCode: React.FC;
|
|
2329
|
+
export const RecoveryCodeAuthFlow: React.FC;
|
|
2330
|
+
export const GuardRecoveryCodeView: React.FC;
|
|
2051
2331
|
|
|
2052
2332
|
}
|
|
2053
2333
|
declare module '@authing/react-ui-components/components/RecoveryCode/interface' {
|
|
2054
|
-
import { IG2Config, IG2Events
|
|
2334
|
+
import { IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
|
|
2055
2335
|
import { AuthenticationClient, User } from '@authing/react-ui-components/components/index';
|
|
2056
2336
|
export interface RecoveryCodeConfig extends IG2Config {
|
|
2057
2337
|
}
|
|
@@ -2059,17 +2339,6 @@ declare module '@authing/react-ui-components/components/RecoveryCode/interface'
|
|
|
2059
2339
|
export interface RecoveryCodeEvents extends IG2Events {
|
|
2060
2340
|
onLogin?: (user: User, authClient: AuthenticationClient) => void;
|
|
2061
2341
|
}
|
|
2062
|
-
export interface GuardRecoveryCodeInitData {
|
|
2063
|
-
mfaToken: string;
|
|
2064
|
-
}
|
|
2065
|
-
export interface GuardRecoveryCodeProps extends IG2FCProps, RecoveryCodeEvents {
|
|
2066
|
-
config: Partial<RecoveryCodeConfig>;
|
|
2067
|
-
initData: GuardRecoveryCodeInitData;
|
|
2068
|
-
}
|
|
2069
|
-
export interface GuardRecoveryCodeViewProps extends GuardRecoveryCodeProps {
|
|
2070
|
-
config: RecoveryCodeConfig;
|
|
2071
|
-
initData: GuardRecoveryCodeInitData;
|
|
2072
|
-
}
|
|
2073
2342
|
|
|
2074
2343
|
}
|
|
2075
2344
|
declare module '@authing/react-ui-components/components/Register/codemap' {
|
|
@@ -2095,7 +2364,8 @@ declare module '@authing/react-ui-components/components/Register/core/WithEmail'
|
|
|
2095
2364
|
import React from 'react';
|
|
2096
2365
|
import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2097
2366
|
export interface RegisterWithEmailProps {
|
|
2098
|
-
|
|
2367
|
+
onRegisterSuccess: Function;
|
|
2368
|
+
onRegisterFailed: Function;
|
|
2099
2369
|
onBeforeRegister?: Function;
|
|
2100
2370
|
publicConfig?: ApplicationConfig;
|
|
2101
2371
|
agreements: Agreement[];
|
|
@@ -2108,7 +2378,8 @@ declare module '@authing/react-ui-components/components/Register/core/WithPhone'
|
|
|
2108
2378
|
import React from 'react';
|
|
2109
2379
|
import { Agreement, ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2110
2380
|
export interface RegisterWithPhoneProps {
|
|
2111
|
-
|
|
2381
|
+
onRegisterSuccess: Function;
|
|
2382
|
+
onRegisterFailed: Function;
|
|
2112
2383
|
agreements: Agreement[];
|
|
2113
2384
|
publicConfig?: ApplicationConfig;
|
|
2114
2385
|
registeContext?: any;
|
|
@@ -2118,8 +2389,7 @@ declare module '@authing/react-ui-components/components/Register/core/WithPhone'
|
|
|
2118
2389
|
}
|
|
2119
2390
|
declare module '@authing/react-ui-components/components/Register/index' {
|
|
2120
2391
|
import React from 'react';
|
|
2121
|
-
|
|
2122
|
-
export const GuardRegisterView: React.FC<GuardRegisterViewProps>;
|
|
2392
|
+
export const GuardRegisterView: React.FC;
|
|
2123
2393
|
|
|
2124
2394
|
}
|
|
2125
2395
|
declare module '@authing/react-ui-components/components/Register/interface' {
|
|
@@ -2128,13 +2398,13 @@ declare module '@authing/react-ui-components/components/Register/interface' {
|
|
|
2128
2398
|
import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams } from '@authing/react-ui-components/components/index';
|
|
2129
2399
|
import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2130
2400
|
export interface RegisterConfig extends IG2Config {
|
|
2131
|
-
disableRegister
|
|
2132
|
-
registerMethods
|
|
2133
|
-
defaultRegisterMethod
|
|
2401
|
+
disableRegister?: boolean;
|
|
2402
|
+
registerMethods?: RegisterMethods[];
|
|
2403
|
+
defaultRegisterMethod?: RegisterMethods;
|
|
2134
2404
|
publicKey?: string;
|
|
2135
2405
|
agreementEnabled?: boolean;
|
|
2136
2406
|
agreements?: Agreement[];
|
|
2137
|
-
|
|
2407
|
+
registerContext?: any;
|
|
2138
2408
|
}
|
|
2139
2409
|
export interface RegisterEvents extends IG2Events {
|
|
2140
2410
|
onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
|
|
@@ -2150,6 +2420,10 @@ declare module '@authing/react-ui-components/components/Register/interface' {
|
|
|
2150
2420
|
}
|
|
2151
2421
|
export const getDefaultRegisterConfig: () => RegisterConfig;
|
|
2152
2422
|
|
|
2423
|
+
}
|
|
2424
|
+
declare module '@authing/react-ui-components/components/Register/utils' {
|
|
2425
|
+
export const useIsChangeComplete: (currentMode: 'phone' | 'email') => boolean;
|
|
2426
|
+
|
|
2153
2427
|
}
|
|
2154
2428
|
declare module '@authing/react-ui-components/components/SendCode/SendCodeBtn' {
|
|
2155
2429
|
import React, { FC } from 'react';
|
|
@@ -2221,9 +2495,9 @@ declare module '@authing/react-ui-components/components/ShieldSpin/index' {
|
|
|
2221
2495
|
|
|
2222
2496
|
}
|
|
2223
2497
|
declare module '@authing/react-ui-components/components/SingleComponent/SingleComponent' {
|
|
2224
|
-
|
|
2225
|
-
import { IG2FCProps } from '@authing/react-ui-components/components/index';
|
|
2226
|
-
export function SingleComponent<T extends IG2FCProps>(props: T,
|
|
2498
|
+
/// <reference types="react" />
|
|
2499
|
+
import { GuardModuleType, IG2FCProps } from '@authing/react-ui-components/components/index';
|
|
2500
|
+
export function SingleComponent<T extends IG2FCProps>(props: T, guardModuleType: GuardModuleType, initData?: any): JSX.Element;
|
|
2227
2501
|
|
|
2228
2502
|
}
|
|
2229
2503
|
declare module '@authing/react-ui-components/components/SingleComponent/index' {
|
|
@@ -2245,8 +2519,7 @@ declare module '@authing/react-ui-components/components/SubmitButton/index' {
|
|
|
2245
2519
|
}
|
|
2246
2520
|
declare module '@authing/react-ui-components/components/SubmitSuccess/index' {
|
|
2247
2521
|
import React from 'react';
|
|
2248
|
-
|
|
2249
|
-
export const GuardSubmitSuccessView: React.FC<GuardSubmitSuccessViewProps>;
|
|
2522
|
+
export const GuardSubmitSuccessView: React.FC;
|
|
2250
2523
|
|
|
2251
2524
|
}
|
|
2252
2525
|
declare module '@authing/react-ui-components/components/SubmitSuccess/interface' {
|
|
@@ -2272,19 +2545,21 @@ declare module '@authing/react-ui-components/components/SubmitSuccess/interface'
|
|
|
2272
2545
|
declare module '@authing/react-ui-components/components/Type/index' {
|
|
2273
2546
|
import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
|
|
2274
2547
|
import { Lang } from 'authing-js-sdk/build/main/types';
|
|
2275
|
-
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2276
2548
|
import { GuardMode } from '@authing/react-ui-components/components/AuthingGuard/types/GuardConfig';
|
|
2277
2549
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
2278
2550
|
export interface IG2FCProps extends IG2Events {
|
|
2279
2551
|
appId: string;
|
|
2552
|
+
tenantId?: string;
|
|
2280
2553
|
config?: Partial<IG2Config>;
|
|
2554
|
+
visible?: boolean;
|
|
2555
|
+
initData?: any;
|
|
2281
2556
|
}
|
|
2282
2557
|
export interface IG2FCViewProps extends IG2FCProps {
|
|
2283
2558
|
config: IG2Config;
|
|
2284
2559
|
}
|
|
2285
2560
|
export interface IG2Config {
|
|
2286
|
-
title
|
|
2287
|
-
logo
|
|
2561
|
+
title?: string;
|
|
2562
|
+
logo?: string;
|
|
2288
2563
|
lang: Lang;
|
|
2289
2564
|
langRange: Lang[];
|
|
2290
2565
|
host: string;
|
|
@@ -2295,9 +2570,9 @@ declare module '@authing/react-ui-components/components/Type/index' {
|
|
|
2295
2570
|
userpool?: string;
|
|
2296
2571
|
contentCss?: string;
|
|
2297
2572
|
target?: HTMLElement | string;
|
|
2298
|
-
__appHost__?: string;
|
|
2299
|
-
__publicConfig__?: ApplicationConfig;
|
|
2300
2573
|
__internalRequest__?: boolean;
|
|
2574
|
+
__singleComponent__?: boolean;
|
|
2575
|
+
__unAuthFlow__?: boolean;
|
|
2301
2576
|
}
|
|
2302
2577
|
export interface IG2Events {
|
|
2303
2578
|
onLoad?: (authClient: AuthenticationClient) => void;
|
|
@@ -2325,10 +2600,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/PasswordF
|
|
|
2325
2600
|
}
|
|
2326
2601
|
declare module '@authing/react-ui-components/components/ValidatorRules/ValidatorFormItem' {
|
|
2327
2602
|
import React from 'react';
|
|
2328
|
-
import {
|
|
2329
|
-
export const EmailFormItem: React.
|
|
2330
|
-
export const PhoneFormItem: React.
|
|
2331
|
-
export const UserNameFormItem: React.
|
|
2603
|
+
import { ValidatorFormItemProps } from '@authing/react-ui-components/components/ValidatorRules/index';
|
|
2604
|
+
export const EmailFormItem: React.FC<ValidatorFormItemProps>;
|
|
2605
|
+
export const PhoneFormItem: React.FC<ValidatorFormItemProps>;
|
|
2606
|
+
export const UserNameFormItem: React.FC<ValidatorFormItemProps>;
|
|
2332
2607
|
|
|
2333
2608
|
}
|
|
2334
2609
|
declare module '@authing/react-ui-components/components/ValidatorRules/index' {
|
|
@@ -2361,6 +2636,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/index' {
|
|
|
2361
2636
|
const CustomFormItem: FormItemInterface;
|
|
2362
2637
|
export default CustomFormItem;
|
|
2363
2638
|
|
|
2639
|
+
}
|
|
2640
|
+
declare module '@authing/react-ui-components/components/ValidatorRules/useCheckRepeat' {
|
|
2641
|
+
export const useCheckRepeat: (checkFn: (value: any, resolve: (value: unknown) => void, reject: (reason?: any) => void) => void) => (_: any, value: any) => Promise<unknown>;
|
|
2642
|
+
|
|
2364
2643
|
}
|
|
2365
2644
|
declare module '@authing/react-ui-components/components/VerifyCodeInput/index' {
|
|
2366
2645
|
import React, { FC } from 'react';
|
|
@@ -2392,6 +2671,98 @@ declare module '@authing/react-ui-components/components/_utils/GuardErrorCode' {
|
|
|
2392
2671
|
declare module '@authing/react-ui-components/components/_utils/clipboard' {
|
|
2393
2672
|
export const copyToClipboard: (str: string) => void;
|
|
2394
2673
|
|
|
2674
|
+
}
|
|
2675
|
+
declare module '@authing/react-ui-components/components/_utils/config/index' {
|
|
2676
|
+
/// <reference types="react" />
|
|
2677
|
+
import { RegisterMethods } from 'authing-js-sdk';
|
|
2678
|
+
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2679
|
+
import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
|
|
2680
|
+
import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
|
|
2681
|
+
export const getPublicConfig: (appId: string) => ApplicationConfig;
|
|
2682
|
+
export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
|
|
2683
|
+
export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
|
|
2684
|
+
export const useMergePublicConfig: (appId: string, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, serError?: any) => {
|
|
2685
|
+
host: string;
|
|
2686
|
+
isSSO?: boolean | undefined;
|
|
2687
|
+
defaultScenes?: import("@authing/react-ui-components/components/index").GuardModuleType | undefined;
|
|
2688
|
+
defaultInitData?: any;
|
|
2689
|
+
showLoading?: boolean | undefined;
|
|
2690
|
+
loadingComponent?: import("react").ReactNode;
|
|
2691
|
+
openEventsMapping?: boolean | undefined;
|
|
2692
|
+
disableRegister?: boolean | undefined;
|
|
2693
|
+
registerMethods?: RegisterMethods[] | undefined;
|
|
2694
|
+
defaultRegisterMethod?: RegisterMethods | undefined;
|
|
2695
|
+
publicKey?: string | undefined;
|
|
2696
|
+
agreementEnabled?: boolean | undefined;
|
|
2697
|
+
agreements?: import("@authing/react-ui-components/components/AuthingGuard/api/index").Agreement[] | undefined;
|
|
2698
|
+
registerContext?: any;
|
|
2699
|
+
title?: string | undefined;
|
|
2700
|
+
logo?: string | undefined;
|
|
2701
|
+
lang: import("@authing/react-ui-components/components/index").Lang;
|
|
2702
|
+
langRange: import("@authing/react-ui-components/components/index").Lang[];
|
|
2703
|
+
isHost?: boolean | undefined;
|
|
2704
|
+
mode: import("@authing/react-ui-components/components/index").GuardMode;
|
|
2705
|
+
clickCloseable: boolean;
|
|
2706
|
+
escCloseable: boolean;
|
|
2707
|
+
userpool?: string | undefined;
|
|
2708
|
+
contentCss?: string | undefined;
|
|
2709
|
+
target?: string | HTMLElement | undefined;
|
|
2710
|
+
__internalRequest__?: boolean | undefined;
|
|
2711
|
+
__singleComponent__?: boolean | undefined;
|
|
2712
|
+
__unAuthFlow__?: boolean | undefined;
|
|
2713
|
+
autoRegister?: boolean | undefined;
|
|
2714
|
+
disableResetPwd?: boolean | undefined;
|
|
2715
|
+
defaultLoginMethod?: import("@authing/react-ui-components/components/index").LoginMethods | undefined;
|
|
2716
|
+
loginMethods?: import("@authing/react-ui-components/components/index").LoginMethods[] | undefined;
|
|
2717
|
+
passwordLoginMethods?: import("@authing/react-ui-components/components/AuthingGuard/api/index").PasswordLoginMethods[] | undefined;
|
|
2718
|
+
socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
|
|
2719
|
+
socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
|
|
2720
|
+
enterpriseConnections?: string[] | undefined;
|
|
2721
|
+
qrCodeScanOptions?: {
|
|
2722
|
+
extIdpConnId?: string | undefined;
|
|
2723
|
+
autoExchangeUserInfo?: boolean | undefined;
|
|
2724
|
+
size?: {
|
|
2725
|
+
height: number;
|
|
2726
|
+
width: number;
|
|
2727
|
+
} | undefined;
|
|
2728
|
+
containerSize?: {
|
|
2729
|
+
height: number;
|
|
2730
|
+
width: number;
|
|
2731
|
+
} | undefined;
|
|
2732
|
+
interval?: number | undefined;
|
|
2733
|
+
onStart?: ((timer: any) => any) | undefined;
|
|
2734
|
+
onResult?: ((data: import("authing-js-sdk").QRCodeStatus) => any) | undefined;
|
|
2735
|
+
onScanned?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo) => any) | undefined;
|
|
2736
|
+
onSuccess?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo, ticket: string) => any) | undefined;
|
|
2737
|
+
onCancel?: (() => any) | undefined;
|
|
2738
|
+
onError?: ((message: string) => any) | undefined;
|
|
2739
|
+
onExpired?: (() => any) | undefined;
|
|
2740
|
+
onCodeShow?: ((random: string, url: string) => any) | undefined;
|
|
2741
|
+
onCodeLoaded?: ((random: string, url: string) => any) | undefined;
|
|
2742
|
+
onCodeLoadFailed?: ((message: string) => any) | undefined;
|
|
2743
|
+
onCodeDestroyed?: ((random: string) => any) | undefined;
|
|
2744
|
+
onRetry?: (() => any) | undefined;
|
|
2745
|
+
onMfa?: ((code: number, message: string, data: Record<string, any>) => {}) | undefined;
|
|
2746
|
+
tips?: {
|
|
2747
|
+
title?: string | undefined;
|
|
2748
|
+
scanned?: string | undefined;
|
|
2749
|
+
succeed?: string | undefined;
|
|
2750
|
+
canceled?: string | undefined;
|
|
2751
|
+
expired?: string | undefined;
|
|
2752
|
+
retry?: string | undefined;
|
|
2753
|
+
failed?: string | undefined;
|
|
2754
|
+
} | undefined;
|
|
2755
|
+
onAuthFlow?: ((flow: Record<string, any>) => {}) | undefined;
|
|
2756
|
+
customData?: {
|
|
2757
|
+
[x: string]: any;
|
|
2758
|
+
} | undefined;
|
|
2759
|
+
context?: {
|
|
2760
|
+
[x: string]: any;
|
|
2761
|
+
} | undefined;
|
|
2762
|
+
withCustomData?: boolean | undefined;
|
|
2763
|
+
} | undefined;
|
|
2764
|
+
} | undefined;
|
|
2765
|
+
|
|
2395
2766
|
}
|
|
2396
2767
|
declare module '@authing/react-ui-components/components/_utils/config' {
|
|
2397
2768
|
import { IG2Config } from '@authing/react-ui-components/components/Type/index';
|
|
@@ -2405,13 +2776,44 @@ declare module '@authing/react-ui-components/components/_utils/config' {
|
|
|
2405
2776
|
}
|
|
2406
2777
|
declare module '@authing/react-ui-components/components/_utils/context' {
|
|
2407
2778
|
import React from 'react';
|
|
2779
|
+
import { GuardEvents, GuardLocalConfig, GuardModuleType } from '@authing/react-ui-components/components/index';
|
|
2408
2780
|
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2781
|
+
import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
|
|
2782
|
+
import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
|
|
2783
|
+
export interface IGuardContext {
|
|
2784
|
+
finallyConfig: GuardLocalConfig;
|
|
2785
|
+
defaultMergedConfig: GuardLocalConfig;
|
|
2786
|
+
publicConfig: ApplicationConfig;
|
|
2787
|
+
httpClient: GuardHttp;
|
|
2788
|
+
appId: string;
|
|
2789
|
+
initData: any;
|
|
2790
|
+
currentModule: ModuleState;
|
|
2791
|
+
events: Partial<GuardEvents>;
|
|
2792
|
+
changeModule?: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
|
|
2793
|
+
backModule?: () => void;
|
|
2794
|
+
isAuthFlow: boolean;
|
|
2795
|
+
contextLoaded: boolean;
|
|
2796
|
+
}
|
|
2797
|
+
export const createGuardXContext: () => {
|
|
2798
|
+
Provider: React.FC<{
|
|
2799
|
+
value: Partial<IGuardContext>;
|
|
2800
|
+
}>;
|
|
2801
|
+
Consumer: React.Consumer<IGuardContext>;
|
|
2413
2802
|
};
|
|
2414
|
-
export const
|
|
2803
|
+
export const useGuardPublicConfig: () => ApplicationConfig;
|
|
2804
|
+
export const useGuardHttpClient: () => GuardHttp;
|
|
2805
|
+
export const useGuardDefaultMergedConfig: () => GuardLocalConfig;
|
|
2806
|
+
export const useGuardAppId: () => string;
|
|
2807
|
+
export function useGuardInitData<T>(): T;
|
|
2808
|
+
export const useGuardCurrentModule: () => ModuleState;
|
|
2809
|
+
export const useGuardEvents: () => Partial<GuardEvents>;
|
|
2810
|
+
export const useGuardModule: () => {
|
|
2811
|
+
changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
|
|
2812
|
+
backModule: (() => void) | undefined;
|
|
2813
|
+
};
|
|
2814
|
+
export const useGuardFinallyConfig: () => GuardLocalConfig;
|
|
2815
|
+
export const useGuardContextLoaded: () => boolean;
|
|
2816
|
+
export const useGuardIsAuthFlow: () => boolean;
|
|
2415
2817
|
|
|
2416
2818
|
}
|
|
2417
2819
|
declare module '@authing/react-ui-components/components/_utils/corsVerification' {
|
|
@@ -2443,29 +2845,30 @@ declare module '@authing/react-ui-components/components/_utils/errorFace' {
|
|
|
2443
2845
|
export {};
|
|
2444
2846
|
|
|
2445
2847
|
}
|
|
2446
|
-
declare module '@authing/react-ui-components/components/_utils/
|
|
2447
|
-
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
2848
|
+
declare module '@authing/react-ui-components/components/_utils/guardHttp' {
|
|
2849
|
+
import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
2448
2850
|
import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
2449
2851
|
export class GuardHttp {
|
|
2450
2852
|
private requestClient;
|
|
2451
2853
|
private headers;
|
|
2452
2854
|
private responseInterceptorMap;
|
|
2453
|
-
constructor(baseUrl
|
|
2855
|
+
constructor(baseUrl?: string);
|
|
2454
2856
|
private getRequestClient;
|
|
2455
2857
|
setUserpoolId(userpoolId: string): this;
|
|
2456
2858
|
setAppId(appId: string): this;
|
|
2457
2859
|
setTenantId(tenantId: string): this;
|
|
2458
2860
|
setBaseUrl(baseUrl: string): this;
|
|
2459
2861
|
getHeaders: () => Record<string, string>;
|
|
2460
|
-
get: <T>(path: string, query?: Record<string, any>, config?: RequestInit | undefined) => Promise<
|
|
2461
|
-
post: <T>(path: string, data: any, config?: {
|
|
2862
|
+
get: <T = any>(path: string, query?: Record<string, any>, config?: RequestInit | undefined) => Promise<AuthingGuardResponse<T>>;
|
|
2863
|
+
post: <T = any>(path: string, data: any, config?: {
|
|
2462
2864
|
headers: any;
|
|
2463
|
-
} | undefined) => Promise<
|
|
2464
|
-
postForm: <T>(path: string, formData: any, config?: {
|
|
2865
|
+
} | undefined) => Promise<AuthingGuardResponse<T>>;
|
|
2866
|
+
postForm: <T = any>(path: string, formData: any, config?: {
|
|
2465
2867
|
headers: any;
|
|
2466
|
-
} | undefined) => Promise<
|
|
2467
|
-
|
|
2468
|
-
|
|
2868
|
+
} | undefined) => Promise<AuthingGuardResponse<T>>;
|
|
2869
|
+
authFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
|
|
2870
|
+
initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => this | undefined;
|
|
2871
|
+
responseIntercept: (res: AuthingResponse) => AuthingGuardResponse;
|
|
2469
2872
|
}
|
|
2470
2873
|
export const initGuardHttp: (baseUrl: string) => GuardHttp;
|
|
2471
2874
|
export const getGuardHttp: () => GuardHttp;
|
|
@@ -2474,6 +2877,8 @@ declare module '@authing/react-ui-components/components/_utils/guradHttp' {
|
|
|
2474
2877
|
}
|
|
2475
2878
|
declare module '@authing/react-ui-components/components/_utils/hooks/index' {
|
|
2476
2879
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
|
|
2880
|
+
import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
|
|
2881
|
+
import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/index';
|
|
2477
2882
|
export interface PhoneValidResult {
|
|
2478
2883
|
isValid: boolean;
|
|
2479
2884
|
phoneNumber: string;
|
|
@@ -2499,15 +2904,22 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
|
|
|
2499
2904
|
* @returns
|
|
2500
2905
|
*/
|
|
2501
2906
|
export const parsePhone: (isInternationSms: boolean, fieldValue: string, areaCode?: string) => {
|
|
2502
|
-
|
|
2503
|
-
countryCode: undefined;
|
|
2504
|
-
} | {
|
|
2505
|
-
countryCode: string;
|
|
2907
|
+
countryCode: string | undefined;
|
|
2506
2908
|
phoneNumber: string;
|
|
2507
2909
|
};
|
|
2910
|
+
/**
|
|
2911
|
+
*
|
|
2912
|
+
* @param config
|
|
2913
|
+
* @returns[socialConnectionObjs 社交身份源连接对象 enterpriseConnectionObjs 企业身份源连接对象 isNoMethod 是否没有身份源 ]
|
|
2914
|
+
*/
|
|
2915
|
+
export const useMethod: (params: {
|
|
2916
|
+
config: GuardLocalConfig;
|
|
2917
|
+
publicConfig: ApplicationConfig;
|
|
2918
|
+
}) => any;
|
|
2508
2919
|
|
|
2509
2920
|
}
|
|
2510
2921
|
declare module '@authing/react-ui-components/components/_utils/http' {
|
|
2922
|
+
import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
2511
2923
|
export const requestClient: {
|
|
2512
2924
|
(input: RequestInfo, init?: RequestInit | undefined): Promise<any>;
|
|
2513
2925
|
get<T>(path: string, query?: Record<string, any>, init?: RequestInit | undefined): Promise<AuthingResponse<T>>;
|
|
@@ -2534,6 +2946,10 @@ declare module '@authing/react-ui-components/components/_utils/http' {
|
|
|
2534
2946
|
messages?: string;
|
|
2535
2947
|
message?: string;
|
|
2536
2948
|
}
|
|
2949
|
+
export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
|
|
2950
|
+
onGuardHandling?: () => CodeAction;
|
|
2951
|
+
isFlowEnd?: boolean;
|
|
2952
|
+
}
|
|
2537
2953
|
|
|
2538
2954
|
}
|
|
2539
2955
|
declare module '@authing/react-ui-components/components/_utils/index' {
|
|
@@ -2577,7 +2993,7 @@ declare module '@authing/react-ui-components/components/_utils/index' {
|
|
|
2577
2993
|
key: string;
|
|
2578
2994
|
value: string | string[] | qs.ParsedQs | qs.ParsedQs[] | undefined;
|
|
2579
2995
|
}[];
|
|
2580
|
-
export const
|
|
2996
|
+
export const isWeChatBrowser: () => boolean;
|
|
2581
2997
|
export const isLarkBrowser: () => boolean;
|
|
2582
2998
|
export const assembledAppHost: (identifier: string, host: string) => string;
|
|
2583
2999
|
export const assembledRequestHost: (requestHostname: string, configHost: string) => string;
|
|
@@ -2625,6 +3041,32 @@ declare module '@authing/react-ui-components/components/_utils/locales/zh/index'
|
|
|
2625
3041
|
import map from '@authing/react-ui-components/components/_utils/locales/zh/map/index';
|
|
2626
3042
|
export { common, login, user, map };
|
|
2627
3043
|
|
|
3044
|
+
}
|
|
3045
|
+
declare module '@authing/react-ui-components/components/_utils/logger/index' {
|
|
3046
|
+
import { LoggerType } from '@authing/react-ui-components/components/_utils/logger/interface';
|
|
3047
|
+
export class Logger {
|
|
3048
|
+
static printType: LoggerType[];
|
|
3049
|
+
/**
|
|
3050
|
+
* 打印日志
|
|
3051
|
+
* @param message 日志信息
|
|
3052
|
+
* @param type 日志类型
|
|
3053
|
+
*/
|
|
3054
|
+
static log(message: string, type?: LoggerType): void;
|
|
3055
|
+
static info(message: string): void;
|
|
3056
|
+
static warn(message: string): void;
|
|
3057
|
+
static error(message: string): void;
|
|
3058
|
+
}
|
|
3059
|
+
export const getLogger: () => Logger;
|
|
3060
|
+
export const useLogger: () => Logger;
|
|
3061
|
+
|
|
3062
|
+
}
|
|
3063
|
+
declare module '@authing/react-ui-components/components/_utils/logger/interface' {
|
|
3064
|
+
export enum LoggerType {
|
|
3065
|
+
INFO = "INFO",
|
|
3066
|
+
WARN = "WARN",
|
|
3067
|
+
ERROR = "ERROR"
|
|
3068
|
+
}
|
|
3069
|
+
|
|
2628
3070
|
}
|
|
2629
3071
|
declare module '@authing/react-ui-components/components/_utils/popupCenter' {
|
|
2630
3072
|
/**
|
|
@@ -2639,20 +3081,29 @@ declare module '@authing/react-ui-components/components/_utils/popupCenter' {
|
|
|
2639
3081
|
|
|
2640
3082
|
}
|
|
2641
3083
|
declare module '@authing/react-ui-components/components/_utils/responseManagement/index' {
|
|
2642
|
-
import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
3084
|
+
import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
|
|
2643
3085
|
import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
2644
|
-
export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) =>
|
|
3086
|
+
export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => AuthingResponse<any>;
|
|
2645
3087
|
|
|
2646
3088
|
}
|
|
2647
3089
|
declare module '@authing/react-ui-components/components/_utils/responseManagement/interface' {
|
|
2648
3090
|
import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
|
|
2649
3091
|
export enum CodeAction {
|
|
2650
3092
|
CHANGE_MODULE = "changeModule",
|
|
2651
|
-
RENDER_MESSAGE = "renderMessage"
|
|
3093
|
+
RENDER_MESSAGE = "renderMessage",
|
|
3094
|
+
FLOW_END = "flowEnd"
|
|
2652
3095
|
}
|
|
2653
3096
|
export enum ApiCode {
|
|
2654
|
-
IDENTITY_BINDING_ASK =
|
|
2655
|
-
IDENTITY_BINDING =
|
|
3097
|
+
IDENTITY_BINDING_ASK = 1641,
|
|
3098
|
+
IDENTITY_BINDING = 1640,
|
|
3099
|
+
APP_MFA = 1636,
|
|
3100
|
+
MFA = 1635,
|
|
3101
|
+
ABORT_FLOW = 1699,
|
|
3102
|
+
COMPLETE_INFO = 1642,
|
|
3103
|
+
FLOW_END = 1600,
|
|
3104
|
+
FIRST_LOGIN_PASSWORD = 1639,
|
|
3105
|
+
FORCED_PASSWORD_RESET = 2058,
|
|
3106
|
+
ACCOUNT_MERGE = 1000
|
|
2656
3107
|
}
|
|
2657
3108
|
export const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
|
2658
3109
|
|
|
@@ -2733,10 +3184,12 @@ declare module '@authing/react-ui-components/components/context/module/context'
|
|
|
2733
3184
|
}
|
|
2734
3185
|
declare module '@authing/react-ui-components/components/index' {
|
|
2735
3186
|
export * from '@authing/react-ui-components/components/_utils/config';
|
|
3187
|
+
export * from '@authing/react-ui-components/components/_utils/responseManagement/interface';
|
|
2736
3188
|
export type { AuthenticationClientOptions } from 'authing-js-sdk';
|
|
2737
3189
|
export * from '@authing/react-ui-components/components/AuthingGuard/types/index';
|
|
2738
3190
|
export * from '@authing/react-ui-components/components/AuthingGuard/hooks/index';
|
|
2739
3191
|
export * from '@authing/react-ui-components/components/AuthingGuard/index';
|
|
3192
|
+
export * from '@authing/react-ui-components/components/SingleComponent/index';
|
|
2740
3193
|
export * from '@authing/react-ui-components/components/Guard/index';
|
|
2741
3194
|
export * from '@authing/react-ui-components/components/Type/index';
|
|
2742
3195
|
export * from '@authing/react-ui-components/components/version/index';
|
|
@@ -2748,7 +3201,7 @@ declare module '@authing/react-ui-components/components/version/index' {
|
|
|
2748
3201
|
|
|
2749
3202
|
}
|
|
2750
3203
|
declare module '@authing/react-ui-components/components/version/version' {
|
|
2751
|
-
const _default: "3.0.
|
|
3204
|
+
const _default: "3.0.39-rc.0";
|
|
2752
3205
|
export default _default;
|
|
2753
3206
|
|
|
2754
3207
|
}
|
|
@@ -2794,7 +3247,7 @@ declare module '@authing/react-ui-components/config/jest/fileTransform' {
|
|
|
2794
3247
|
|
|
2795
3248
|
}
|
|
2796
3249
|
declare module '@authing/react-ui-components/config/modules' {
|
|
2797
|
-
export const additionalModulePaths: string[] |
|
|
3250
|
+
export const additionalModulePaths: "" | string[] | null;
|
|
2798
3251
|
export const hasTsConfig: boolean;
|
|
2799
3252
|
export const webpackAliases: {
|
|
2800
3253
|
src?: undefined;
|