@authing/react-ui-components 3.0.31-rc.3 → 3.1.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -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<GuardBindTotpViewProps>;
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
- /// <reference types="react" />
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: (props: FirstLoginResetProps) => JSX.Element;
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
- /// <reference types="react" />
1139
- export const GuardChangePassword: (props: any) => JSX.Element;
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 { ExtendsField } from '@authing/react-ui-components/components/AuthingGuard/api/index';
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
- user: User;
1149
- verifyCodeLength: number | undefined;
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 { GuardCompleteInfoViewProps } from '@authing/react-ui-components/components/CompleteInfo/interface';
1187
+ import { CompleteInfoMetaData, CompleteInfoRequest } from '@authing/react-ui-components/components/CompleteInfo/interface';
1164
1188
  import './styles.less';
1165
- export const GuardCompleteInfoView: React.FC<GuardCompleteInfoViewProps>;
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,82 @@ 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
+ }
1201
1289
 
1202
1290
  }
1203
1291
  declare module '@authing/react-ui-components/components/CompleteInfo/utils' {
1204
1292
  import { User } from 'authing-js-sdk';
1205
- import { ExtendsField } from '@authing/react-ui-components/components/CompleteInfo/interface';
1293
+ import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
1294
+ import { CompleteInfoMetaData, ExtendsField } from '@authing/react-ui-components/components/CompleteInfo/interface';
1206
1295
  export const completeFieldsFilter: (user: User, field: ExtendsField) => boolean;
1296
+ export const extendsFieldsToMetaData: (extendsFields: import("@authing/react-ui-components/components/AuthingGuard/api/index").ExtendsField[] | undefined, selectOptions: {
1297
+ key: string;
1298
+ options: {
1299
+ value: string;
1300
+ label: string;
1301
+ }[];
1302
+ }[]) => CompleteInfoMetaData[];
1303
+ export const fieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: {
1304
+ name: string;
1305
+ value: string;
1306
+ code?: string | undefined;
1307
+ }[] | undefined) => Record<string, any>;
1207
1308
 
1208
1309
  }
1209
1310
  declare module '@authing/react-ui-components/components/CopyAbleText/index' {
@@ -1216,9 +1317,8 @@ declare module '@authing/react-ui-components/components/CopyAbleText/index' {
1216
1317
  }
1217
1318
  declare module '@authing/react-ui-components/components/DownloadAuthenticator/index' {
1218
1319
  import React from 'react';
1219
- import { GuardDownloadATViewProps } from '@authing/react-ui-components/components/DownloadAuthenticator/interface';
1220
1320
  import './styles.less';
1221
- export const GuardDownloadATView: React.FC<GuardDownloadATViewProps>;
1321
+ export const GuardDownloadATView: React.FC;
1222
1322
 
1223
1323
  }
1224
1324
  declare module '@authing/react-ui-components/components/DownloadAuthenticator/interface' {
@@ -1238,14 +1338,13 @@ declare module '@authing/react-ui-components/components/DownloadAuthenticator/in
1238
1338
  }
1239
1339
  declare module '@authing/react-ui-components/components/Error/index' {
1240
1340
  import React from 'react';
1241
- import { GuardErrorViewProps } from '@authing/react-ui-components/components/Error/interface';
1242
1341
  import './styles.less';
1243
- export const GuardErrorView: React.FC<GuardErrorViewProps>;
1342
+ export const GuardErrorView: React.FC;
1244
1343
 
1245
1344
  }
1246
1345
  declare module '@authing/react-ui-components/components/Error/interface' {
1247
1346
  export interface ErrorInitData {
1248
- messages?: string;
1347
+ error?: Error;
1249
1348
  }
1250
1349
  export interface GuardErrorProps {
1251
1350
  initData?: ErrorInitData;
@@ -1272,8 +1371,7 @@ declare module '@authing/react-ui-components/components/ForgetPassword/core/rese
1272
1371
  }
1273
1372
  declare module '@authing/react-ui-components/components/ForgetPassword/index' {
1274
1373
  import React from 'react';
1275
- import { ForgetPasswordViewProps } from '@authing/react-ui-components/components/ForgetPassword/interface';
1276
- export const GuardForgetPassword: React.FC<ForgetPasswordViewProps>;
1374
+ export const GuardForgetPassword: React.FC;
1277
1375
 
1278
1376
  }
1279
1377
  declare module '@authing/react-ui-components/components/ForgetPassword/interface' {
@@ -1302,24 +1400,56 @@ declare module '@authing/react-ui-components/components/Guard/Guard' {
1302
1400
  import { GuardEvents } from '@authing/react-ui-components/components/Guard/event';
1303
1401
  import { IG2FCProps } from '@authing/react-ui-components/components/Type/index';
1304
1402
  import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
1305
- import './styles.less';
1306
1403
  import 'moment/locale/zh-cn';
1307
- export enum LangMAP {
1308
- zhCn = "zh-CN",
1309
- enUs = "en-US"
1310
- }
1311
1404
  export interface GuardProps extends GuardEvents, IG2FCProps {
1312
- tenantId?: string;
1313
1405
  config?: Partial<GuardLocalConfig>;
1314
- visible?: boolean;
1315
1406
  }
1316
1407
  export const Guard: (props: GuardProps) => JSX.Element;
1317
1408
 
1409
+ }
1410
+ declare module '@authing/react-ui-components/components/Guard/GuardModule/stateMachine' {
1411
+ import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
1412
+ import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
1413
+ export interface ModuleState {
1414
+ moduleName: GuardModuleType;
1415
+ initData?: any;
1416
+ }
1417
+ export enum ActionType {
1418
+ ChangeModule = "ChangeModule",
1419
+ Back = "Back",
1420
+ Init = "Init"
1421
+ }
1422
+ export interface StateMachineLog {
1423
+ action: ActionType;
1424
+ date: number;
1425
+ dataSource: ModuleState;
1426
+ }
1427
+ export type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
1428
+ export class GuardStateMachine {
1429
+ private order;
1430
+ private config;
1431
+ private moduleStateHistory;
1432
+ private changeModuleEvent;
1433
+ private stateMachineLog;
1434
+ constructor(changeModuleEvent: ChangeModuleEvent, initData: ModuleState);
1435
+ globalWindow: () => Window | undefined;
1436
+ next: (nextModule: GuardModuleType, initData: any) => void;
1437
+ back: (initData?: any) => void;
1438
+ end: () => void;
1439
+ historyPush: (data: ModuleState, actionType?: ActionType) => void;
1440
+ historyBack: (data: ModuleState) => void;
1441
+ setConfig: (config: GuardLocalConfig) => void;
1442
+ }
1443
+ export const useHistoryHijack: (back?: (() => void) | undefined) => ((state?: any) => void)[];
1444
+ export const initGuardStateMachine: (changeMouleEvent: ChangeModuleEvent, initData: ModuleState) => GuardStateMachine;
1445
+ export const getGuardStateMachine: () => GuardStateMachine;
1446
+ export const useGuardStateMachine: () => GuardStateMachine;
1447
+
1318
1448
  }
1319
1449
  declare module '@authing/react-ui-components/components/Guard/authClient' {
1320
1450
  import { AuthenticationClient } from 'authing-js-sdk';
1321
1451
  import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
1322
- export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string | undefined) => AuthenticationClient;
1452
+ export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, websocketHost: string, tenantId?: string | undefined) => AuthenticationClient;
1323
1453
  export const getGuardAuthClient: () => AuthenticationClient;
1324
1454
  export const useGuardAuthClient: () => AuthenticationClient;
1325
1455
 
@@ -1329,7 +1459,7 @@ declare module '@authing/react-ui-components/components/Guard/config' {
1329
1459
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
1330
1460
  import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
1331
1461
  import { RegisterConfig } from '@authing/react-ui-components/components/Register/interface';
1332
- export interface GuardComponentConifg extends Partial<GuardLocalConfig> {
1462
+ export interface GuardComponentConfig extends Partial<GuardLocalConfig> {
1333
1463
  }
1334
1464
  export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
1335
1465
  isSSO?: boolean;
@@ -1344,14 +1474,46 @@ declare module '@authing/react-ui-components/components/Guard/config' {
1344
1474
  }
1345
1475
  export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
1346
1476
 
1477
+ }
1478
+ declare module '@authing/react-ui-components/components/Guard/core/index' {
1479
+ /// <reference types="react" />
1480
+ import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
1481
+ import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
1482
+ export const useRenderGuardCore: (props: GuardProps, initState: ModuleState) => JSX.Element;
1483
+
1484
+ }
1485
+ declare module '@authing/react-ui-components/components/Guard/core/renderContext' {
1486
+ import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
1487
+ import React from 'react';
1488
+ import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
1489
+ export const RenderContext: React.FC<{
1490
+ guardProps: GuardProps;
1491
+ initState: ModuleState;
1492
+ }>;
1493
+
1494
+ }
1495
+ declare module '@authing/react-ui-components/components/Guard/core/renderModule' {
1496
+ import React from 'react';
1497
+ import { GuardProps } from '@authing/react-ui-components/components/Guard/index';
1498
+ import '../styles.less';
1499
+ export enum LangMAP {
1500
+ zhCn = "zh-CN",
1501
+ enUs = "en-US"
1502
+ }
1503
+ export const RenderModule: React.FC<{
1504
+ guardProps: GuardProps;
1505
+ }>;
1506
+
1347
1507
  }
1348
1508
  declare module '@authing/react-ui-components/components/Guard/event' {
1349
1509
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
1350
1510
  import { CompleteInfoEvents } from '@authing/react-ui-components/components/CompleteInfo/interface';
1351
1511
  import { ForgetPasswordEvents } from '@authing/react-ui-components/components/ForgetPassword/interface';
1512
+ import { IdentityBindingEvents } from '@authing/react-ui-components/components/IdentityBinding/interface';
1513
+ import { IdentityBindingAskEvents } from '@authing/react-ui-components/components/IdentityBindingAsk/index';
1352
1514
  import { LoginEvents } from '@authing/react-ui-components/components/Login/interface';
1353
1515
  import { RegisterEvents } from '@authing/react-ui-components/components/Register/interface';
1354
- export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents {
1516
+ export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
1355
1517
  onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
1356
1518
  }
1357
1519
  export const guardEventsFilter: (props: any, openEventsMapping?: boolean | undefined) => GuardEvents;
@@ -1372,11 +1534,13 @@ declare module '@authing/react-ui-components/components/Guard/module' {
1372
1534
  REGISTER = "register",
1373
1535
  MFA = "mfa",
1374
1536
  FORGET_PWD = "forgetPassword",
1375
- CHANGE_PWD = "changePassword",
1537
+ FORCED_PASSWORD_RESET = "forcedPasswordReset",
1538
+ FIRST_LOGIN_PASSWORD = "firstLoginPassword",
1376
1539
  DOWNLOAD_AT = "downloadAT",
1377
1540
  BIND_TOTP = "bindTotp",
1378
1541
  ANY_QUESTIONS = "anyQuestions",
1379
- COMPLETE_INFO = "completeInfo",
1542
+ LOGIN_COMPLETE_INFO = "loginCompleteInfo",
1543
+ REGISTER_COMPLETE_INFO = "registerCompleteInfo",
1380
1544
  RECOVERY_CODE = "recoveryCode",
1381
1545
  SUBMIT_SUCCESS = "submitSuccess",
1382
1546
  IDENTITY_BINDING_ASK = "identityBindingAsk",
@@ -1409,46 +1573,7 @@ declare module '@authing/react-ui-components/components/Guard/sso' {
1409
1573
  };
1410
1574
  userInfo?: User;
1411
1575
  }
1412
- export const trackSession: () => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingResponse<any>>;
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;
1576
+ export const trackSession: () => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<SessionData>>;
1452
1577
 
1453
1578
  }
1454
1579
  declare module '@authing/react-ui-components/components/IconFont/iconfont' {
@@ -1472,9 +1597,37 @@ declare module '@authing/react-ui-components/components/IconFont/svg' {
1472
1597
  }
1473
1598
  declare module '@authing/react-ui-components/components/IdentityBinding/IdentityBinding' {
1474
1599
  import React from 'react';
1475
- import { GuardIdentityBindingViewProps } from '@authing/react-ui-components/components/IdentityBinding/interface';
1476
1600
  import './styles.less';
1477
- export const GuardIdentityBindingView: React.FC<GuardIdentityBindingViewProps>;
1601
+ export const GuardIdentityBindingView: React.FC;
1602
+
1603
+ }
1604
+ declare module '@authing/react-ui-components/components/IdentityBinding/businessRequest' {
1605
+ export enum IdentityBindingBusinessAction {
1606
+ PhoneCode = "phone-code",
1607
+ EmailCode = "emial-code",
1608
+ Password = "password"
1609
+ }
1610
+ export interface PhoneCodeParams {
1611
+ phone: string;
1612
+ code: string;
1613
+ phoneCountryCode?: string;
1614
+ }
1615
+ export interface EmailCodeParams {
1616
+ email: string;
1617
+ code: string;
1618
+ }
1619
+ export interface PasswordParams {
1620
+ account: string;
1621
+ password: string;
1622
+ }
1623
+ export const PhoneCode: (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1624
+ export const EmailCode: (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1625
+ export const Password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1626
+ export const useIdentityBindingBusinessRequest: () => {
1627
+ "phone-code": (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1628
+ "emial-code": (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1629
+ password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
1630
+ };
1478
1631
 
1479
1632
  }
1480
1633
  declare module '@authing/react-ui-components/components/IdentityBinding/index' {
@@ -1514,9 +1667,8 @@ declare module '@authing/react-ui-components/components/IdentityBinding/interfac
1514
1667
  }
1515
1668
  declare module '@authing/react-ui-components/components/IdentityBindingAsk/IdentityBindingAsk' {
1516
1669
  import React from 'react';
1517
- import { GuardIdentityBindingAskViewProps } from '@authing/react-ui-components/components/IdentityBindingAsk/interface';
1518
1670
  import './styles.less';
1519
- export const GuardIdentityBindingAskView: React.FC<GuardIdentityBindingAskViewProps>;
1671
+ export const GuardIdentityBindingAskView: React.FC;
1520
1672
 
1521
1673
  }
1522
1674
  declare module '@authing/react-ui-components/components/IdentityBindingAsk/index' {
@@ -1591,7 +1743,8 @@ declare module '@authing/react-ui-components/components/Login/core/withAD' {
1591
1743
  interface LoginWithADProps {
1592
1744
  publicKey: string;
1593
1745
  autoRegister?: boolean;
1594
- onLogin: any;
1746
+ onLoginSuccess: any;
1747
+ onLoginFailed: any;
1595
1748
  onBeforeLogin: any;
1596
1749
  agreements: Agreement[];
1597
1750
  }
@@ -1602,7 +1755,7 @@ declare module '@authing/react-ui-components/components/Login/core/withAD' {
1602
1755
  declare module '@authing/react-ui-components/components/Login/core/withAppQrcode' {
1603
1756
  /// <reference types="react" />
1604
1757
  interface LoginWithAppQrcodeProps {
1605
- onLogin: any;
1758
+ onLoginSuccess: any;
1606
1759
  canLoop: boolean;
1607
1760
  qrCodeScanOptions: any;
1608
1761
  }
@@ -1617,7 +1770,8 @@ declare module '@authing/react-ui-components/components/Login/core/withLDAP' {
1617
1770
  publicKey: string;
1618
1771
  autoRegister?: boolean;
1619
1772
  host?: string;
1620
- onLogin: any;
1773
+ onLoginSuccess: any;
1774
+ onLoginFailed: any;
1621
1775
  onBeforeLogin: any;
1622
1776
  agreements: Agreement[];
1623
1777
  }
@@ -1664,8 +1818,9 @@ declare module '@authing/react-ui-components/components/Login/core/withPassword/
1664
1818
  publicKey: string;
1665
1819
  autoRegister?: boolean;
1666
1820
  host?: string;
1667
- onLogin: any;
1668
1821
  onBeforeLogin?: any;
1822
+ onLoginSuccess?: any;
1823
+ onLoginFailed?: any;
1669
1824
  onLoginRequest?: (loginInfo: any) => Promise<AuthingResponse>;
1670
1825
  passwordLoginMethods: PasswordLoginMethods[];
1671
1826
  agreements: Agreement[];
@@ -1729,7 +1884,7 @@ declare module '@authing/react-ui-components/components/Login/core/withVerifyCod
1729
1884
  declare module '@authing/react-ui-components/components/Login/core/withWechatMiniQrcode' {
1730
1885
  /// <reference types="react" />
1731
1886
  interface LoginWithWechatMiniQrcodeProps {
1732
- onLogin: any;
1887
+ onLoginSuccess: any;
1733
1888
  canLoop: boolean;
1734
1889
  qrCodeScanOptions: any;
1735
1890
  }
@@ -1740,7 +1895,7 @@ declare module '@authing/react-ui-components/components/Login/core/withWechatMin
1740
1895
  declare module '@authing/react-ui-components/components/Login/core/withWechatmpQrcode' {
1741
1896
  /// <reference types="react" />
1742
1897
  interface LoginWithWechatmpQrcodeProps {
1743
- onLogin: any;
1898
+ onLoginSuccess: any;
1744
1899
  canLoop: boolean;
1745
1900
  qrCodeScanOptions: any;
1746
1901
  }
@@ -1750,9 +1905,7 @@ declare module '@authing/react-ui-components/components/Login/core/withWechatmpQ
1750
1905
  }
1751
1906
  declare module '@authing/react-ui-components/components/Login/index' {
1752
1907
  /// <reference types="react" />
1753
- import { GuardLoginViewProps } from '@authing/react-ui-components/components/Login/interface';
1754
- import './styles.less';
1755
- export const GuardLoginView: (props: GuardLoginViewProps) => JSX.Element;
1908
+ export const GuardLoginView: () => JSX.Element;
1756
1909
 
1757
1910
  }
1758
1911
  declare module '@authing/react-ui-components/components/Login/interface' {
@@ -1763,12 +1916,12 @@ declare module '@authing/react-ui-components/components/Login/interface' {
1763
1916
  import { PasswordLoginParams, LDAPLoginParams, ADLoginParams, PhoneCodeLoginParams, AuthenticationClient, User } from '@authing/react-ui-components/components/index';
1764
1917
  import { LoginMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
1765
1918
  export interface LoginConfig extends IG2Config {
1766
- autoRegister: boolean;
1767
- disableResetPwd: boolean;
1768
- disableRegister: boolean;
1769
- defaultLoginMethod: LoginMethods;
1770
- loginMethods: LoginMethods[];
1771
- passwordLoginMethods: PasswordLoginMethods[];
1919
+ autoRegister?: boolean;
1920
+ disableResetPwd?: boolean;
1921
+ disableRegister?: boolean;
1922
+ defaultLoginMethod?: LoginMethods;
1923
+ loginMethods?: LoginMethods[];
1924
+ passwordLoginMethods?: PasswordLoginMethods[];
1772
1925
  socialConnections?: SocialConnectionProvider[];
1773
1926
  socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
1774
1927
  enterpriseConnections?: string[];
@@ -1805,12 +1958,19 @@ declare module '@authing/react-ui-components/components/Login/socialLogin/index'
1805
1958
  export interface SocialLoginProps {
1806
1959
  appId: string;
1807
1960
  config: LoginConfig;
1808
- onLogin: any;
1961
+ onLoginFailed: any;
1962
+ onLoginSuccess: any;
1809
1963
  enterpriseConnectionObjs: ApplicationConfig['identityProviders'];
1810
1964
  socialConnectionObjs: SocialConnectionItem[];
1811
1965
  }
1812
1966
  export const SocialLogin: React.FC<SocialLoginProps>;
1813
1967
 
1968
+ }
1969
+ declare module '@authing/react-ui-components/components/Login/socialLogin/postMessage' {
1970
+ import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
1971
+ export const usePostMessage: () => (evt: MessageEvent) => import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any> | undefined;
1972
+ export const useErrorHandling: () => (res: AuthingResponse) => import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>;
1973
+
1814
1974
  }
1815
1975
  declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/VerifyCodeFormItem' {
1816
1976
  import { FormItemProps } from 'antd/lib/form';
@@ -1839,6 +1999,55 @@ declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/inde
1839
1999
  export const VerifyCodeInput: FC<VerifyCodeInputProps>;
1840
2000
  export {};
1841
2001
 
2002
+ }
2003
+ declare module '@authing/react-ui-components/components/MFA/businessRequest' {
2004
+ export enum MfaBusinessAction {
2005
+ VerifyEmail = "verify-email",
2006
+ VerifySms = "verify-sms",
2007
+ VerifyTotp = "verify-totp",
2008
+ VerifyFace = "verify-face",
2009
+ AssociateFace = "associate-face"
2010
+ }
2011
+ export const authFlow: (action: MfaBusinessAction, content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2012
+ interface VerifySmsContent {
2013
+ phone: string;
2014
+ code: string;
2015
+ mfaToken?: string;
2016
+ phoneCountryCode?: string;
2017
+ }
2018
+ interface VerifyEmailContent {
2019
+ email: string;
2020
+ code: string;
2021
+ mfaToken?: string;
2022
+ }
2023
+ interface VerifyTotpContent {
2024
+ totp: string;
2025
+ mfaToken?: string;
2026
+ }
2027
+ interface VerifyFaceContent {
2028
+ photo: string;
2029
+ mfaToken?: string;
2030
+ }
2031
+ interface AssociateFaceContent {
2032
+ photoA: string;
2033
+ photoB: string;
2034
+ isExternalPhoto?: boolean;
2035
+ mfaToken?: string;
2036
+ }
2037
+ export const VerifyEmail: (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2038
+ export const VerifySms: (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2039
+ export const VerifyTotp: (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2040
+ export const VerifyFace: (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2041
+ export const AssociateFace: (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2042
+ export const useMfaBusinessRequest: () => {
2043
+ "verify-email": (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2044
+ "verify-sms": (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2045
+ "verify-totp": (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2046
+ "verify-face": (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2047
+ "associate-face": (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2048
+ };
2049
+ export {};
2050
+
1842
2051
  }
1843
2052
  declare module '@authing/react-ui-components/components/MFA/codemap' {
1844
2053
  import { GuardModuleAction } from '@authing/react-ui-components/components/Guard/module';
@@ -1946,14 +2155,13 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
1946
2155
  }
1947
2156
  declare module '@authing/react-ui-components/components/MFA/index' {
1948
2157
  import React from 'react';
1949
- import { GuardMFAViewProps } from '@authing/react-ui-components/components/MFA/interface';
1950
2158
  import './styles.less';
1951
2159
  interface MFABackStateContextType {
1952
2160
  setMfaBackState: React.Dispatch<React.SetStateAction<string>>;
1953
2161
  mfaBackState: string;
1954
2162
  }
1955
2163
  export const MFABackStateContext: React.Context<MFABackStateContextType | undefined>;
1956
- export const GuardMFAView: React.FC<GuardMFAViewProps>;
2164
+ export const GuardMFAView: React.FC;
1957
2165
  export {};
1958
2166
 
1959
2167
  }
@@ -2002,10 +2210,9 @@ declare module '@authing/react-ui-components/components/MFA/interface' {
2002
2210
  }
2003
2211
  declare module '@authing/react-ui-components/components/MFA/mfaMethods/index' {
2004
2212
  import React from 'react';
2005
- import { GuardMFAInitData, MFAType } from '@authing/react-ui-components/components/MFA/interface';
2213
+ import { MFAType } from '@authing/react-ui-components/components/MFA/interface';
2006
2214
  import './style.less';
2007
2215
  export interface MFAMethodsProps {
2008
- applicationMfa: GuardMFAInitData['applicationMfa'];
2009
2216
  method: MFAType;
2010
2217
  onChangeMethod: (type: MFAType) => void;
2011
2218
  }
@@ -2027,6 +2234,14 @@ declare module '@authing/react-ui-components/components/NeedHelpView/index' {
2027
2234
  /// <reference types="react" />
2028
2235
  export const GuardNeedHelpView: (props: any) => JSX.Element;
2029
2236
 
2237
+ }
2238
+ declare module '@authing/react-ui-components/components/RecoveryCode/businessRequest' {
2239
+ export enum TotpRecoveryCodeBusinessAction {
2240
+ RecoveryTotp = "recovery-totp",
2241
+ ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
2242
+ }
2243
+ export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, content: any): Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2244
+
2030
2245
  }
2031
2246
  declare module '@authing/react-ui-components/components/RecoveryCode/core/saveCode' {
2032
2247
  import React from 'react';
@@ -2041,20 +2256,21 @@ declare module '@authing/react-ui-components/components/RecoveryCode/core/useCod
2041
2256
  import { User } from '@authing/react-ui-components/components/index';
2042
2257
  export interface UseCodeProps {
2043
2258
  mfaToken: string;
2044
- onSubmit: (recoveryCode: string, user: User) => void;
2259
+ onSubmit: (recoveryCode: string, user?: User) => void;
2045
2260
  }
2046
2261
  export const UseCode: React.FC<UseCodeProps>;
2047
2262
 
2048
2263
  }
2049
2264
  declare module '@authing/react-ui-components/components/RecoveryCode/index' {
2050
2265
  import React from 'react';
2051
- import { GuardRecoveryCodeViewProps } from '@authing/react-ui-components/components/RecoveryCode/interface';
2052
2266
  import './style.less';
2053
- export const GuardRecoveryCodeView: React.FC<GuardRecoveryCodeViewProps>;
2267
+ export const RecoveryCode: React.FC;
2268
+ export const RecoveryCodeAuthFlow: React.FC;
2269
+ export const GuardRecoveryCodeView: React.FC;
2054
2270
 
2055
2271
  }
2056
2272
  declare module '@authing/react-ui-components/components/RecoveryCode/interface' {
2057
- import { IG2Config, IG2Events, IG2FCProps } from '@authing/react-ui-components/components/Type/index';
2273
+ import { IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
2058
2274
  import { AuthenticationClient, User } from '@authing/react-ui-components/components/index';
2059
2275
  export interface RecoveryCodeConfig extends IG2Config {
2060
2276
  }
@@ -2062,17 +2278,6 @@ declare module '@authing/react-ui-components/components/RecoveryCode/interface'
2062
2278
  export interface RecoveryCodeEvents extends IG2Events {
2063
2279
  onLogin?: (user: User, authClient: AuthenticationClient) => void;
2064
2280
  }
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
2281
 
2077
2282
  }
2078
2283
  declare module '@authing/react-ui-components/components/Register/codemap' {
@@ -2121,8 +2326,7 @@ declare module '@authing/react-ui-components/components/Register/core/WithPhone'
2121
2326
  }
2122
2327
  declare module '@authing/react-ui-components/components/Register/index' {
2123
2328
  import React from 'react';
2124
- import { GuardRegisterViewProps } from '@authing/react-ui-components/components/Register/interface';
2125
- export const GuardRegisterView: React.FC<GuardRegisterViewProps>;
2329
+ export const GuardRegisterView: React.FC;
2126
2330
 
2127
2331
  }
2128
2332
  declare module '@authing/react-ui-components/components/Register/interface' {
@@ -2131,13 +2335,13 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2131
2335
  import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams } from '@authing/react-ui-components/components/index';
2132
2336
  import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2133
2337
  export interface RegisterConfig extends IG2Config {
2134
- disableRegister: boolean;
2135
- registerMethods: RegisterMethods[];
2136
- defaultRegisterMethod: RegisterMethods;
2338
+ disableRegister?: boolean;
2339
+ registerMethods?: RegisterMethods[];
2340
+ defaultRegisterMethod?: RegisterMethods;
2137
2341
  publicKey?: string;
2138
2342
  agreementEnabled?: boolean;
2139
2343
  agreements?: Agreement[];
2140
- registeContext?: any;
2344
+ registerContext?: any;
2141
2345
  }
2142
2346
  export interface RegisterEvents extends IG2Events {
2143
2347
  onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
@@ -2153,6 +2357,10 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2153
2357
  }
2154
2358
  export const getDefaultRegisterConfig: () => RegisterConfig;
2155
2359
 
2360
+ }
2361
+ declare module '@authing/react-ui-components/components/Register/utils' {
2362
+ export const useIsChangeComplete: (currentMode: 'phone' | 'email') => boolean;
2363
+
2156
2364
  }
2157
2365
  declare module '@authing/react-ui-components/components/SendCode/SendCodeBtn' {
2158
2366
  import React, { FC } from 'react';
@@ -2224,9 +2432,9 @@ declare module '@authing/react-ui-components/components/ShieldSpin/index' {
2224
2432
 
2225
2433
  }
2226
2434
  declare module '@authing/react-ui-components/components/SingleComponent/SingleComponent' {
2227
- import React from 'react';
2228
- import { IG2FCProps } from '@authing/react-ui-components/components/index';
2229
- export function SingleComponent<T extends IG2FCProps>(props: T, Component: React.FC<any>): JSX.Element;
2435
+ /// <reference types="react" />
2436
+ import { GuardModuleType, IG2FCProps } from '@authing/react-ui-components/components/index';
2437
+ export function SingleComponent<T extends IG2FCProps>(props: T, guardModuleType: GuardModuleType, initData?: any): JSX.Element;
2230
2438
 
2231
2439
  }
2232
2440
  declare module '@authing/react-ui-components/components/SingleComponent/index' {
@@ -2248,8 +2456,7 @@ declare module '@authing/react-ui-components/components/SubmitButton/index' {
2248
2456
  }
2249
2457
  declare module '@authing/react-ui-components/components/SubmitSuccess/index' {
2250
2458
  import React from 'react';
2251
- import { GuardSubmitSuccessViewProps } from '@authing/react-ui-components/components/SubmitSuccess/interface';
2252
- export const GuardSubmitSuccessView: React.FC<GuardSubmitSuccessViewProps>;
2459
+ export const GuardSubmitSuccessView: React.FC;
2253
2460
 
2254
2461
  }
2255
2462
  declare module '@authing/react-ui-components/components/SubmitSuccess/interface' {
@@ -2275,19 +2482,21 @@ declare module '@authing/react-ui-components/components/SubmitSuccess/interface'
2275
2482
  declare module '@authing/react-ui-components/components/Type/index' {
2276
2483
  import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
2277
2484
  import { Lang } from 'authing-js-sdk/build/main/types';
2278
- import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2279
2485
  import { GuardMode } from '@authing/react-ui-components/components/AuthingGuard/types/GuardConfig';
2280
2486
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
2281
2487
  export interface IG2FCProps extends IG2Events {
2282
2488
  appId: string;
2489
+ tenantId?: string;
2283
2490
  config?: Partial<IG2Config>;
2491
+ visible?: boolean;
2492
+ initData?: any;
2284
2493
  }
2285
2494
  export interface IG2FCViewProps extends IG2FCProps {
2286
2495
  config: IG2Config;
2287
2496
  }
2288
2497
  export interface IG2Config {
2289
- title: string;
2290
- logo: string;
2498
+ title?: string;
2499
+ logo?: string;
2291
2500
  lang: Lang;
2292
2501
  langRange: Lang[];
2293
2502
  host: string;
@@ -2298,10 +2507,9 @@ declare module '@authing/react-ui-components/components/Type/index' {
2298
2507
  userpool?: string;
2299
2508
  contentCss?: string;
2300
2509
  target?: HTMLElement | string;
2301
- __appHost__?: string;
2302
- __pageConfig__?: GuardPageConfig;
2303
- __publicConfig__?: ApplicationConfig;
2304
2510
  __internalRequest__?: boolean;
2511
+ __singleComponent__?: boolean;
2512
+ __unAuthFlow__?: boolean;
2305
2513
  }
2306
2514
  export interface IG2Events {
2307
2515
  onLoad?: (authClient: AuthenticationClient) => void;
@@ -2316,14 +2524,6 @@ declare module '@authing/react-ui-components/components/Type/index' {
2316
2524
  EmailCode = "email-code",
2317
2525
  PhoneCode = "phone-code"
2318
2526
  }
2319
- export enum GuardPageSene {
2320
- Global = "global"
2321
- }
2322
- export interface GuardPageConfig {
2323
- [GuardPageSene.Global]: {
2324
- showChangeLanguage: boolean;
2325
- };
2326
- }
2327
2527
 
2328
2528
  }
2329
2529
  declare module '@authing/react-ui-components/components/ValidatorRules/PasswordFormItem' {
@@ -2337,10 +2537,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/PasswordF
2337
2537
  }
2338
2538
  declare module '@authing/react-ui-components/components/ValidatorRules/ValidatorFormItem' {
2339
2539
  import React from 'react';
2340
- import { ICheckProps, ValidatorFormItemProps } from '@authing/react-ui-components/components/ValidatorRules/index';
2341
- export const EmailFormItem: React.ForwardRefExoticComponent<ValidatorFormItemProps & React.RefAttributes<ICheckProps>>;
2342
- export const PhoneFormItem: React.ForwardRefExoticComponent<ValidatorFormItemProps & React.RefAttributes<ICheckProps>>;
2343
- export const UserNameFormItem: React.ForwardRefExoticComponent<ValidatorFormItemProps & React.RefAttributes<ICheckProps>>;
2540
+ import { ValidatorFormItemProps } from '@authing/react-ui-components/components/ValidatorRules/index';
2541
+ export const EmailFormItem: React.FC<ValidatorFormItemProps>;
2542
+ export const PhoneFormItem: React.FC<ValidatorFormItemProps>;
2543
+ export const UserNameFormItem: React.FC<ValidatorFormItemProps>;
2344
2544
 
2345
2545
  }
2346
2546
  declare module '@authing/react-ui-components/components/ValidatorRules/index' {
@@ -2373,6 +2573,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/index' {
2373
2573
  const CustomFormItem: FormItemInterface;
2374
2574
  export default CustomFormItem;
2375
2575
 
2576
+ }
2577
+ declare module '@authing/react-ui-components/components/ValidatorRules/useCheckRepeat' {
2578
+ export const useCheckRepeat: (checkFn: (value: any, resolve: (value: unknown) => void, reject: (reason?: any) => void) => void) => (_: any, value: any) => Promise<unknown>;
2579
+
2376
2580
  }
2377
2581
  declare module '@authing/react-ui-components/components/VerifyCodeInput/index' {
2378
2582
  import React, { FC } from 'react';
@@ -2404,6 +2608,98 @@ declare module '@authing/react-ui-components/components/_utils/GuardErrorCode' {
2404
2608
  declare module '@authing/react-ui-components/components/_utils/clipboard' {
2405
2609
  export const copyToClipboard: (str: string) => void;
2406
2610
 
2611
+ }
2612
+ declare module '@authing/react-ui-components/components/_utils/config/index' {
2613
+ /// <reference types="react" />
2614
+ import { RegisterMethods } from 'authing-js-sdk';
2615
+ import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2616
+ import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
2617
+ import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
2618
+ export const getPublicConfig: (appId: string) => ApplicationConfig;
2619
+ export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2620
+ export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
2621
+ export const useMergePublicConfig: (appId: string, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, serError?: any) => {
2622
+ host: string;
2623
+ isSSO?: boolean | undefined;
2624
+ defaultScenes?: import("@authing/react-ui-components/components/index").GuardModuleType | undefined;
2625
+ defaultInitData?: any;
2626
+ showLoading?: boolean | undefined;
2627
+ loadingComponent?: import("react").ReactNode;
2628
+ openEventsMapping?: boolean | undefined;
2629
+ disableRegister?: boolean | undefined;
2630
+ registerMethods?: RegisterMethods[] | undefined;
2631
+ defaultRegisterMethod?: RegisterMethods | undefined;
2632
+ publicKey?: string | undefined;
2633
+ agreementEnabled?: boolean | undefined;
2634
+ agreements?: import("@authing/react-ui-components/components/AuthingGuard/api/index").Agreement[] | undefined;
2635
+ registerContext?: any;
2636
+ title?: string | undefined;
2637
+ logo?: string | undefined;
2638
+ lang: import("@authing/react-ui-components/components/index").Lang;
2639
+ langRange: import("@authing/react-ui-components/components/index").Lang[];
2640
+ isHost?: boolean | undefined;
2641
+ mode: import("@authing/react-ui-components/components/index").GuardMode;
2642
+ clickCloseable: boolean;
2643
+ escCloseable: boolean;
2644
+ userpool?: string | undefined;
2645
+ contentCss?: string | undefined;
2646
+ target?: string | HTMLElement | undefined;
2647
+ __internalRequest__?: boolean | undefined;
2648
+ __singleComponent__?: boolean | undefined;
2649
+ __unAuthFlow__?: boolean | undefined;
2650
+ autoRegister?: boolean | undefined;
2651
+ disableResetPwd?: boolean | undefined;
2652
+ defaultLoginMethod?: import("@authing/react-ui-components/components/index").LoginMethods | undefined;
2653
+ loginMethods?: import("@authing/react-ui-components/components/index").LoginMethods[] | undefined;
2654
+ passwordLoginMethods?: import("@authing/react-ui-components/components/AuthingGuard/api/index").PasswordLoginMethods[] | undefined;
2655
+ socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
2656
+ socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
2657
+ enterpriseConnections?: string[] | undefined;
2658
+ qrCodeScanOptions?: {
2659
+ extIdpConnId?: string | undefined;
2660
+ autoExchangeUserInfo?: boolean | undefined;
2661
+ size?: {
2662
+ height: number;
2663
+ width: number;
2664
+ } | undefined;
2665
+ containerSize?: {
2666
+ height: number;
2667
+ width: number;
2668
+ } | undefined;
2669
+ interval?: number | undefined;
2670
+ onStart?: ((timer: any) => any) | undefined;
2671
+ onResult?: ((data: import("authing-js-sdk").QRCodeStatus) => any) | undefined;
2672
+ onScanned?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo) => any) | undefined;
2673
+ onSuccess?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo, ticket: string) => any) | undefined;
2674
+ onCancel?: (() => any) | undefined;
2675
+ onError?: ((message: string) => any) | undefined;
2676
+ onExpired?: (() => any) | undefined;
2677
+ onCodeShow?: ((random: string, url: string) => any) | undefined;
2678
+ onCodeLoaded?: ((random: string, url: string) => any) | undefined;
2679
+ onCodeLoadFailed?: ((message: string) => any) | undefined;
2680
+ onCodeDestroyed?: ((random: string) => any) | undefined;
2681
+ onRetry?: (() => any) | undefined;
2682
+ onMfa?: ((code: number, message: string, data: Record<string, any>) => {}) | undefined;
2683
+ tips?: {
2684
+ title?: string | undefined;
2685
+ scanned?: string | undefined;
2686
+ succeed?: string | undefined;
2687
+ canceled?: string | undefined;
2688
+ expired?: string | undefined;
2689
+ retry?: string | undefined;
2690
+ failed?: string | undefined;
2691
+ } | undefined;
2692
+ onAuthFlow?: ((flow: Record<string, any>) => {}) | undefined;
2693
+ customData?: {
2694
+ [x: string]: any;
2695
+ } | undefined;
2696
+ context?: {
2697
+ [x: string]: any;
2698
+ } | undefined;
2699
+ withCustomData?: boolean | undefined;
2700
+ } | undefined;
2701
+ } | undefined;
2702
+
2407
2703
  }
2408
2704
  declare module '@authing/react-ui-components/components/_utils/config' {
2409
2705
  import { IG2Config } from '@authing/react-ui-components/components/Type/index';
@@ -2417,13 +2713,44 @@ declare module '@authing/react-ui-components/components/_utils/config' {
2417
2713
  }
2418
2714
  declare module '@authing/react-ui-components/components/_utils/context' {
2419
2715
  import React from 'react';
2716
+ import { GuardEvents, GuardLocalConfig, GuardModuleType } from '@authing/react-ui-components/components/index';
2420
2717
  import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2421
- export const createGuardContext: () => {
2422
- Context: React.Context<ApplicationConfig | undefined>;
2423
- Provider: React.Provider<ApplicationConfig | undefined>;
2424
- Consumer: React.Consumer<ApplicationConfig | undefined>;
2718
+ import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
2719
+ import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
2720
+ export interface IGuardContext {
2721
+ finallyConfig: GuardLocalConfig;
2722
+ defaultMergedConfig: GuardLocalConfig;
2723
+ publicConfig: ApplicationConfig;
2724
+ httpClient: GuardHttp;
2725
+ appId: string;
2726
+ initData: any;
2727
+ currentModule: ModuleState;
2728
+ events: Partial<GuardEvents>;
2729
+ changeModule?: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
2730
+ backModule?: () => void;
2731
+ isAuthFlow: boolean;
2732
+ contextLoaded: boolean;
2733
+ }
2734
+ export const createGuardXContext: () => {
2735
+ Provider: React.FC<{
2736
+ value: Partial<IGuardContext>;
2737
+ }>;
2738
+ Consumer: React.Consumer<IGuardContext>;
2739
+ };
2740
+ export const useGuardPublicConfig: () => ApplicationConfig;
2741
+ export const useGuardHttpClient: () => GuardHttp;
2742
+ export const useGuardDefaultMergedConfig: () => GuardLocalConfig;
2743
+ export const useGuardAppId: () => string;
2744
+ export function useGuardInitData<T>(): T;
2745
+ export const useGuardCurrentModule: () => ModuleState;
2746
+ export const useGuardEvents: () => Partial<GuardEvents>;
2747
+ export const useGuardModule: () => {
2748
+ changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
2749
+ backModule: (() => void) | undefined;
2425
2750
  };
2426
- export const usePublicConfig: () => ApplicationConfig | undefined;
2751
+ export const useGuardFinallyConfig: () => GuardLocalConfig;
2752
+ export const useGuardContextLoaded: () => boolean;
2753
+ export const useGuardIsAuthFlow: () => boolean;
2427
2754
 
2428
2755
  }
2429
2756
  declare module '@authing/react-ui-components/components/_utils/corsVerification' {
@@ -2455,29 +2782,30 @@ declare module '@authing/react-ui-components/components/_utils/errorFace' {
2455
2782
  export {};
2456
2783
 
2457
2784
  }
2458
- declare module '@authing/react-ui-components/components/_utils/guradHttp' {
2459
- import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
2785
+ declare module '@authing/react-ui-components/components/_utils/guardHttp' {
2786
+ import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
2460
2787
  import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
2461
2788
  export class GuardHttp {
2462
2789
  private requestClient;
2463
2790
  private headers;
2464
2791
  private responseInterceptorMap;
2465
- constructor(baseUrl: string);
2792
+ constructor(baseUrl?: string);
2466
2793
  private getRequestClient;
2467
2794
  setUserpoolId(userpoolId: string): this;
2468
2795
  setAppId(appId: string): this;
2469
2796
  setTenantId(tenantId: string): this;
2470
2797
  setBaseUrl(baseUrl: string): this;
2471
2798
  getHeaders: () => Record<string, string>;
2472
- get: <T>(path: string, query?: Record<string, any>, config?: RequestInit | undefined) => Promise<AuthingResponse<any>>;
2473
- post: <T>(path: string, data: any, config?: {
2799
+ get: <T = any>(path: string, query?: Record<string, any>, config?: RequestInit | undefined) => Promise<AuthingGuardResponse<T>>;
2800
+ post: <T = any>(path: string, data: any, config?: {
2474
2801
  headers: any;
2475
- } | undefined) => Promise<AuthingResponse<any>>;
2476
- postForm: <T>(path: string, formData: any, config?: {
2802
+ } | undefined) => Promise<AuthingGuardResponse<T>>;
2803
+ postForm: <T = any>(path: string, formData: any, config?: {
2477
2804
  headers: any;
2478
- } | undefined) => Promise<AuthingResponse<any>>;
2479
- initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => void) => this | undefined;
2480
- private responseIntercept;
2805
+ } | undefined) => Promise<AuthingGuardResponse<T>>;
2806
+ authFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
2807
+ initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => this | undefined;
2808
+ responseIntercept: (res: AuthingResponse) => AuthingGuardResponse;
2481
2809
  }
2482
2810
  export const initGuardHttp: (baseUrl: string) => GuardHttp;
2483
2811
  export const getGuardHttp: () => GuardHttp;
@@ -2486,7 +2814,8 @@ declare module '@authing/react-ui-components/components/_utils/guradHttp' {
2486
2814
  }
2487
2815
  declare module '@authing/react-ui-components/components/_utils/hooks/index' {
2488
2816
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
2489
- import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
2817
+ import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2818
+ import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/index';
2490
2819
  export interface PhoneValidResult {
2491
2820
  isValid: boolean;
2492
2821
  phoneNumber: string;
@@ -2512,10 +2841,7 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
2512
2841
  * @returns
2513
2842
  */
2514
2843
  export const parsePhone: (isInternationSms: boolean, fieldValue: string, areaCode?: string) => {
2515
- phoneNumber: string;
2516
- countryCode: undefined;
2517
- } | {
2518
- countryCode: string;
2844
+ countryCode: string | undefined;
2519
2845
  phoneNumber: string;
2520
2846
  };
2521
2847
  /**
@@ -2523,10 +2849,14 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
2523
2849
  * @param config
2524
2850
  * @returns[socialConnectionObjs 社交身份源连接对象 enterpriseConnectionObjs 企业身份源连接对象 isNoMethod 是否没有身份源 ]
2525
2851
  */
2526
- export const useMethod: (config: LoginConfig) => any;
2852
+ export const useMethod: (params: {
2853
+ config: GuardLocalConfig;
2854
+ publicConfig: ApplicationConfig;
2855
+ }) => any;
2527
2856
 
2528
2857
  }
2529
2858
  declare module '@authing/react-ui-components/components/_utils/http' {
2859
+ import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
2530
2860
  export const requestClient: {
2531
2861
  (input: RequestInfo, init?: RequestInit | undefined): Promise<any>;
2532
2862
  get<T>(path: string, query?: Record<string, any>, init?: RequestInit | undefined): Promise<AuthingResponse<T>>;
@@ -2553,6 +2883,10 @@ declare module '@authing/react-ui-components/components/_utils/http' {
2553
2883
  messages?: string;
2554
2884
  message?: string;
2555
2885
  }
2886
+ export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
2887
+ onGuardHandling?: () => CodeAction;
2888
+ isFlowEnd?: boolean;
2889
+ }
2556
2890
 
2557
2891
  }
2558
2892
  declare module '@authing/react-ui-components/components/_utils/index' {
@@ -2596,7 +2930,7 @@ declare module '@authing/react-ui-components/components/_utils/index' {
2596
2930
  key: string;
2597
2931
  value: string | string[] | qs.ParsedQs | qs.ParsedQs[] | undefined;
2598
2932
  }[];
2599
- export const isWechatBrowser: () => boolean;
2933
+ export const isWeChatBrowser: () => boolean;
2600
2934
  export const isLarkBrowser: () => boolean;
2601
2935
  export const assembledAppHost: (identifier: string, host: string) => string;
2602
2936
  export const assembledRequestHost: (requestHostname: string, configHost: string) => string;
@@ -2644,6 +2978,32 @@ declare module '@authing/react-ui-components/components/_utils/locales/zh/index'
2644
2978
  import map from '@authing/react-ui-components/components/_utils/locales/zh/map/index';
2645
2979
  export { common, login, user, map };
2646
2980
 
2981
+ }
2982
+ declare module '@authing/react-ui-components/components/_utils/logger/index' {
2983
+ import { LoggerType } from '@authing/react-ui-components/components/_utils/logger/interface';
2984
+ export class Logger {
2985
+ static printType: LoggerType[];
2986
+ /**
2987
+ * 打印日志
2988
+ * @param message 日志信息
2989
+ * @param type 日志类型
2990
+ */
2991
+ static log(message: string, type?: LoggerType): void;
2992
+ static info(message: string): void;
2993
+ static warn(message: string): void;
2994
+ static error(message: string): void;
2995
+ }
2996
+ export const getLogger: () => Logger;
2997
+ export const useLogger: () => Logger;
2998
+
2999
+ }
3000
+ declare module '@authing/react-ui-components/components/_utils/logger/interface' {
3001
+ export enum LoggerType {
3002
+ INFO = "INFO",
3003
+ WARN = "WARN",
3004
+ ERROR = "ERROR"
3005
+ }
3006
+
2647
3007
  }
2648
3008
  declare module '@authing/react-ui-components/components/_utils/popupCenter' {
2649
3009
  /**
@@ -2658,20 +3018,28 @@ declare module '@authing/react-ui-components/components/_utils/popupCenter' {
2658
3018
 
2659
3019
  }
2660
3020
  declare module '@authing/react-ui-components/components/_utils/responseManagement/index' {
2661
- import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
3021
+ import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
2662
3022
  import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
2663
- export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => void) => AuthingResponse<any>;
3023
+ export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => AuthingResponse<any>;
2664
3024
 
2665
3025
  }
2666
3026
  declare module '@authing/react-ui-components/components/_utils/responseManagement/interface' {
2667
3027
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
2668
3028
  export enum CodeAction {
2669
3029
  CHANGE_MODULE = "changeModule",
2670
- RENDER_MESSAGE = "renderMessage"
3030
+ RENDER_MESSAGE = "renderMessage",
3031
+ FLOW_END = "flowEnd"
2671
3032
  }
2672
3033
  export enum ApiCode {
2673
- IDENTITY_BINDING_ASK = "1641",
2674
- IDENTITY_BINDING = "1640"
3034
+ IDENTITY_BINDING_ASK = 1641,
3035
+ IDENTITY_BINDING = 1640,
3036
+ APP_MFA = 1636,
3037
+ MFA = 1635,
3038
+ ABORT_FLOW = 1699,
3039
+ COMPLETE_INFO = 1642,
3040
+ FLOW_END = 1600,
3041
+ FIRST_LOGIN_PASSWORD = 1639,
3042
+ FORCED_PASSWORD_RESET = 2058
2675
3043
  }
2676
3044
  export const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
2677
3045
 
@@ -2767,7 +3135,7 @@ declare module '@authing/react-ui-components/components/version/index' {
2767
3135
 
2768
3136
  }
2769
3137
  declare module '@authing/react-ui-components/components/version/version' {
2770
- const _default: "3.0.31-rc.3";
3138
+ const _default: "3.1.0-rc.3";
2771
3139
  export default _default;
2772
3140
 
2773
3141
  }
@@ -2813,7 +3181,7 @@ declare module '@authing/react-ui-components/config/jest/fileTransform' {
2813
3181
 
2814
3182
  }
2815
3183
  declare module '@authing/react-ui-components/config/modules' {
2816
- export const additionalModulePaths: string[] | "" | null;
3184
+ export const additionalModulePaths: "" | string[] | null;
2817
3185
  export const hasTsConfig: boolean;
2818
3186
  export const webpackAliases: {
2819
3187
  src?: undefined;