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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts 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,8 @@ 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
1908
  import './styles.less';
1755
- export const GuardLoginView: (props: GuardLoginViewProps) => JSX.Element;
1909
+ export const GuardLoginView: () => JSX.Element;
1756
1910
 
1757
1911
  }
1758
1912
  declare module '@authing/react-ui-components/components/Login/interface' {
@@ -1763,12 +1917,12 @@ declare module '@authing/react-ui-components/components/Login/interface' {
1763
1917
  import { PasswordLoginParams, LDAPLoginParams, ADLoginParams, PhoneCodeLoginParams, AuthenticationClient, User } from '@authing/react-ui-components/components/index';
1764
1918
  import { LoginMethods } from '@authing/react-ui-components/components/AuthingGuard/types/index';
1765
1919
  export interface LoginConfig extends IG2Config {
1766
- autoRegister: boolean;
1767
- disableResetPwd: boolean;
1768
- disableRegister: boolean;
1769
- defaultLoginMethod: LoginMethods;
1770
- loginMethods: LoginMethods[];
1771
- passwordLoginMethods: PasswordLoginMethods[];
1920
+ autoRegister?: boolean;
1921
+ disableResetPwd?: boolean;
1922
+ disableRegister?: boolean;
1923
+ defaultLoginMethod?: LoginMethods;
1924
+ loginMethods?: LoginMethods[];
1925
+ passwordLoginMethods?: PasswordLoginMethods[];
1772
1926
  socialConnections?: SocialConnectionProvider[];
1773
1927
  socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
1774
1928
  enterpriseConnections?: string[];
@@ -1805,12 +1959,19 @@ declare module '@authing/react-ui-components/components/Login/socialLogin/index'
1805
1959
  export interface SocialLoginProps {
1806
1960
  appId: string;
1807
1961
  config: LoginConfig;
1808
- onLogin: any;
1962
+ onLoginFailed: any;
1963
+ onLoginSuccess: any;
1809
1964
  enterpriseConnectionObjs: ApplicationConfig['identityProviders'];
1810
1965
  socialConnectionObjs: SocialConnectionItem[];
1811
1966
  }
1812
1967
  export const SocialLogin: React.FC<SocialLoginProps>;
1813
1968
 
1969
+ }
1970
+ declare module '@authing/react-ui-components/components/Login/socialLogin/postMessage' {
1971
+ import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
1972
+ export const usePostMessage: () => (evt: MessageEvent) => import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any> | undefined;
1973
+ export const useErrorHandling: () => (res: AuthingResponse) => import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>;
1974
+
1814
1975
  }
1815
1976
  declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/VerifyCodeFormItem' {
1816
1977
  import { FormItemProps } from 'antd/lib/form';
@@ -1839,6 +2000,55 @@ declare module '@authing/react-ui-components/components/MFA/VerifyCodeInput/inde
1839
2000
  export const VerifyCodeInput: FC<VerifyCodeInputProps>;
1840
2001
  export {};
1841
2002
 
2003
+ }
2004
+ declare module '@authing/react-ui-components/components/MFA/businessRequest' {
2005
+ export enum MfaBusinessAction {
2006
+ VerifyEmail = "verify-email",
2007
+ VerifySms = "verify-sms",
2008
+ VerifyTotp = "verify-totp",
2009
+ VerifyFace = "verify-face",
2010
+ AssociateFace = "associate-face"
2011
+ }
2012
+ export const authFlow: (action: MfaBusinessAction, content: any) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2013
+ interface VerifySmsContent {
2014
+ phone: string;
2015
+ code: string;
2016
+ mfaToken?: string;
2017
+ phoneCountryCode?: string;
2018
+ }
2019
+ interface VerifyEmailContent {
2020
+ email: string;
2021
+ code: string;
2022
+ mfaToken?: string;
2023
+ }
2024
+ interface VerifyTotpContent {
2025
+ totp: string;
2026
+ mfaToken?: string;
2027
+ }
2028
+ interface VerifyFaceContent {
2029
+ photo: string;
2030
+ mfaToken?: string;
2031
+ }
2032
+ interface AssociateFaceContent {
2033
+ photoA: string;
2034
+ photoB: string;
2035
+ isExternalPhoto?: boolean;
2036
+ mfaToken?: string;
2037
+ }
2038
+ export const VerifyEmail: (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2039
+ export const VerifySms: (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2040
+ export const VerifyTotp: (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2041
+ export const VerifyFace: (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2042
+ export const AssociateFace: (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2043
+ export const useMfaBusinessRequest: () => {
2044
+ "verify-email": (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2045
+ "verify-sms": (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2046
+ "verify-totp": (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2047
+ "verify-face": (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2048
+ "associate-face": (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<any>>;
2049
+ };
2050
+ export {};
2051
+
1842
2052
  }
1843
2053
  declare module '@authing/react-ui-components/components/MFA/codemap' {
1844
2054
  import { GuardModuleAction } from '@authing/react-ui-components/components/Guard/module';
@@ -1946,14 +2156,13 @@ declare module '@authing/react-ui-components/components/MFA/core/totp' {
1946
2156
  }
1947
2157
  declare module '@authing/react-ui-components/components/MFA/index' {
1948
2158
  import React from 'react';
1949
- import { GuardMFAViewProps } from '@authing/react-ui-components/components/MFA/interface';
1950
2159
  import './styles.less';
1951
2160
  interface MFABackStateContextType {
1952
2161
  setMfaBackState: React.Dispatch<React.SetStateAction<string>>;
1953
2162
  mfaBackState: string;
1954
2163
  }
1955
2164
  export const MFABackStateContext: React.Context<MFABackStateContextType | undefined>;
1956
- export const GuardMFAView: React.FC<GuardMFAViewProps>;
2165
+ export const GuardMFAView: React.FC;
1957
2166
  export {};
1958
2167
 
1959
2168
  }
@@ -2002,10 +2211,9 @@ declare module '@authing/react-ui-components/components/MFA/interface' {
2002
2211
  }
2003
2212
  declare module '@authing/react-ui-components/components/MFA/mfaMethods/index' {
2004
2213
  import React from 'react';
2005
- import { GuardMFAInitData, MFAType } from '@authing/react-ui-components/components/MFA/interface';
2214
+ import { MFAType } from '@authing/react-ui-components/components/MFA/interface';
2006
2215
  import './style.less';
2007
2216
  export interface MFAMethodsProps {
2008
- applicationMfa: GuardMFAInitData['applicationMfa'];
2009
2217
  method: MFAType;
2010
2218
  onChangeMethod: (type: MFAType) => void;
2011
2219
  }
@@ -2027,6 +2235,14 @@ declare module '@authing/react-ui-components/components/NeedHelpView/index' {
2027
2235
  /// <reference types="react" />
2028
2236
  export const GuardNeedHelpView: (props: any) => JSX.Element;
2029
2237
 
2238
+ }
2239
+ declare module '@authing/react-ui-components/components/RecoveryCode/businessRequest' {
2240
+ export enum TotpRecoveryCodeBusinessAction {
2241
+ RecoveryTotp = "recovery-totp",
2242
+ ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
2243
+ }
2244
+ export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, content: any): Promise<import("@authing/react-ui-components/components/_utils/http").AuthingGuardResponse<T>>;
2245
+
2030
2246
  }
2031
2247
  declare module '@authing/react-ui-components/components/RecoveryCode/core/saveCode' {
2032
2248
  import React from 'react';
@@ -2041,20 +2257,21 @@ declare module '@authing/react-ui-components/components/RecoveryCode/core/useCod
2041
2257
  import { User } from '@authing/react-ui-components/components/index';
2042
2258
  export interface UseCodeProps {
2043
2259
  mfaToken: string;
2044
- onSubmit: (recoveryCode: string, user: User) => void;
2260
+ onSubmit: (recoveryCode: string, user?: User) => void;
2045
2261
  }
2046
2262
  export const UseCode: React.FC<UseCodeProps>;
2047
2263
 
2048
2264
  }
2049
2265
  declare module '@authing/react-ui-components/components/RecoveryCode/index' {
2050
2266
  import React from 'react';
2051
- import { GuardRecoveryCodeViewProps } from '@authing/react-ui-components/components/RecoveryCode/interface';
2052
2267
  import './style.less';
2053
- export const GuardRecoveryCodeView: React.FC<GuardRecoveryCodeViewProps>;
2268
+ export const RecoveryCode: React.FC;
2269
+ export const RecoveryCodeAuthFlow: React.FC;
2270
+ export const GuardRecoveryCodeView: React.FC;
2054
2271
 
2055
2272
  }
2056
2273
  declare module '@authing/react-ui-components/components/RecoveryCode/interface' {
2057
- import { IG2Config, IG2Events, IG2FCProps } from '@authing/react-ui-components/components/Type/index';
2274
+ import { IG2Config, IG2Events } from '@authing/react-ui-components/components/Type/index';
2058
2275
  import { AuthenticationClient, User } from '@authing/react-ui-components/components/index';
2059
2276
  export interface RecoveryCodeConfig extends IG2Config {
2060
2277
  }
@@ -2062,17 +2279,6 @@ declare module '@authing/react-ui-components/components/RecoveryCode/interface'
2062
2279
  export interface RecoveryCodeEvents extends IG2Events {
2063
2280
  onLogin?: (user: User, authClient: AuthenticationClient) => void;
2064
2281
  }
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
2282
 
2077
2283
  }
2078
2284
  declare module '@authing/react-ui-components/components/Register/codemap' {
@@ -2121,8 +2327,7 @@ declare module '@authing/react-ui-components/components/Register/core/WithPhone'
2121
2327
  }
2122
2328
  declare module '@authing/react-ui-components/components/Register/index' {
2123
2329
  import React from 'react';
2124
- import { GuardRegisterViewProps } from '@authing/react-ui-components/components/Register/interface';
2125
- export const GuardRegisterView: React.FC<GuardRegisterViewProps>;
2330
+ export const GuardRegisterView: React.FC;
2126
2331
 
2127
2332
  }
2128
2333
  declare module '@authing/react-ui-components/components/Register/interface' {
@@ -2131,13 +2336,13 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2131
2336
  import { AuthenticationClient, User, EmailRegisterParams, PhoneRegisterParams } from '@authing/react-ui-components/components/index';
2132
2337
  import { Agreement } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2133
2338
  export interface RegisterConfig extends IG2Config {
2134
- disableRegister: boolean;
2135
- registerMethods: RegisterMethods[];
2136
- defaultRegisterMethod: RegisterMethods;
2339
+ disableRegister?: boolean;
2340
+ registerMethods?: RegisterMethods[];
2341
+ defaultRegisterMethod?: RegisterMethods;
2137
2342
  publicKey?: string;
2138
2343
  agreementEnabled?: boolean;
2139
2344
  agreements?: Agreement[];
2140
- registeContext?: any;
2345
+ registerContext?: any;
2141
2346
  }
2142
2347
  export interface RegisterEvents extends IG2Events {
2143
2348
  onBeforeRegister?: (registerInfo: EmailRegisterParams | PhoneRegisterParams, authClient: AuthenticationClient) => boolean | Promise<boolean>;
@@ -2153,6 +2358,10 @@ declare module '@authing/react-ui-components/components/Register/interface' {
2153
2358
  }
2154
2359
  export const getDefaultRegisterConfig: () => RegisterConfig;
2155
2360
 
2361
+ }
2362
+ declare module '@authing/react-ui-components/components/Register/utils' {
2363
+ export const useIsChangeComplete: (currentMode: 'phone' | 'email') => boolean;
2364
+
2156
2365
  }
2157
2366
  declare module '@authing/react-ui-components/components/SendCode/SendCodeBtn' {
2158
2367
  import React, { FC } from 'react';
@@ -2224,9 +2433,9 @@ declare module '@authing/react-ui-components/components/ShieldSpin/index' {
2224
2433
 
2225
2434
  }
2226
2435
  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;
2436
+ /// <reference types="react" />
2437
+ import { GuardModuleType, IG2FCProps } from '@authing/react-ui-components/components/index';
2438
+ export function SingleComponent<T extends IG2FCProps>(props: T, guardModuleType: GuardModuleType, initData?: any): JSX.Element;
2230
2439
 
2231
2440
  }
2232
2441
  declare module '@authing/react-ui-components/components/SingleComponent/index' {
@@ -2248,8 +2457,7 @@ declare module '@authing/react-ui-components/components/SubmitButton/index' {
2248
2457
  }
2249
2458
  declare module '@authing/react-ui-components/components/SubmitSuccess/index' {
2250
2459
  import React from 'react';
2251
- import { GuardSubmitSuccessViewProps } from '@authing/react-ui-components/components/SubmitSuccess/interface';
2252
- export const GuardSubmitSuccessView: React.FC<GuardSubmitSuccessViewProps>;
2460
+ export const GuardSubmitSuccessView: React.FC;
2253
2461
 
2254
2462
  }
2255
2463
  declare module '@authing/react-ui-components/components/SubmitSuccess/interface' {
@@ -2275,19 +2483,21 @@ declare module '@authing/react-ui-components/components/SubmitSuccess/interface'
2275
2483
  declare module '@authing/react-ui-components/components/Type/index' {
2276
2484
  import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
2277
2485
  import { Lang } from 'authing-js-sdk/build/main/types';
2278
- import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2279
2486
  import { GuardMode } from '@authing/react-ui-components/components/AuthingGuard/types/GuardConfig';
2280
2487
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
2281
2488
  export interface IG2FCProps extends IG2Events {
2282
2489
  appId: string;
2490
+ tenantId?: string;
2283
2491
  config?: Partial<IG2Config>;
2492
+ visible?: boolean;
2493
+ initData?: any;
2284
2494
  }
2285
2495
  export interface IG2FCViewProps extends IG2FCProps {
2286
2496
  config: IG2Config;
2287
2497
  }
2288
2498
  export interface IG2Config {
2289
- title: string;
2290
- logo: string;
2499
+ title?: string;
2500
+ logo?: string;
2291
2501
  lang: Lang;
2292
2502
  langRange: Lang[];
2293
2503
  host: string;
@@ -2298,10 +2508,9 @@ declare module '@authing/react-ui-components/components/Type/index' {
2298
2508
  userpool?: string;
2299
2509
  contentCss?: string;
2300
2510
  target?: HTMLElement | string;
2301
- __appHost__?: string;
2302
- __pageConfig__?: GuardPageConfig;
2303
- __publicConfig__?: ApplicationConfig;
2304
2511
  __internalRequest__?: boolean;
2512
+ __singleComponent__?: boolean;
2513
+ __unAuthFlow__?: boolean;
2305
2514
  }
2306
2515
  export interface IG2Events {
2307
2516
  onLoad?: (authClient: AuthenticationClient) => void;
@@ -2316,14 +2525,6 @@ declare module '@authing/react-ui-components/components/Type/index' {
2316
2525
  EmailCode = "email-code",
2317
2526
  PhoneCode = "phone-code"
2318
2527
  }
2319
- export enum GuardPageSene {
2320
- Global = "guardGlobal"
2321
- }
2322
- export interface GuardPageConfig {
2323
- [GuardPageSene.Global]: {
2324
- showChangeLanguage: boolean;
2325
- };
2326
- }
2327
2528
 
2328
2529
  }
2329
2530
  declare module '@authing/react-ui-components/components/ValidatorRules/PasswordFormItem' {
@@ -2337,10 +2538,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/PasswordF
2337
2538
  }
2338
2539
  declare module '@authing/react-ui-components/components/ValidatorRules/ValidatorFormItem' {
2339
2540
  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>>;
2541
+ import { ValidatorFormItemProps } from '@authing/react-ui-components/components/ValidatorRules/index';
2542
+ export const EmailFormItem: React.FC<ValidatorFormItemProps>;
2543
+ export const PhoneFormItem: React.FC<ValidatorFormItemProps>;
2544
+ export const UserNameFormItem: React.FC<ValidatorFormItemProps>;
2344
2545
 
2345
2546
  }
2346
2547
  declare module '@authing/react-ui-components/components/ValidatorRules/index' {
@@ -2373,6 +2574,10 @@ declare module '@authing/react-ui-components/components/ValidatorRules/index' {
2373
2574
  const CustomFormItem: FormItemInterface;
2374
2575
  export default CustomFormItem;
2375
2576
 
2577
+ }
2578
+ declare module '@authing/react-ui-components/components/ValidatorRules/useCheckRepeat' {
2579
+ export const useCheckRepeat: (checkFn: (value: any, resolve: (value: unknown) => void, reject: (reason?: any) => void) => void) => (_: any, value: any) => Promise<unknown>;
2580
+
2376
2581
  }
2377
2582
  declare module '@authing/react-ui-components/components/VerifyCodeInput/index' {
2378
2583
  import React, { FC } from 'react';
@@ -2404,6 +2609,98 @@ declare module '@authing/react-ui-components/components/_utils/GuardErrorCode' {
2404
2609
  declare module '@authing/react-ui-components/components/_utils/clipboard' {
2405
2610
  export const copyToClipboard: (str: string) => void;
2406
2611
 
2612
+ }
2613
+ declare module '@authing/react-ui-components/components/_utils/config/index' {
2614
+ /// <reference types="react" />
2615
+ import { RegisterMethods } from 'authing-js-sdk';
2616
+ import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2617
+ import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/components/Guard/config';
2618
+ import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
2619
+ export const getPublicConfig: (appId: string) => ApplicationConfig;
2620
+ export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2621
+ export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
2622
+ export const useMergePublicConfig: (appId: string, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, serError?: any) => {
2623
+ host: string;
2624
+ isSSO?: boolean | undefined;
2625
+ defaultScenes?: import("@authing/react-ui-components/components/index").GuardModuleType | undefined;
2626
+ defaultInitData?: any;
2627
+ showLoading?: boolean | undefined;
2628
+ loadingComponent?: import("react").ReactNode;
2629
+ openEventsMapping?: boolean | undefined;
2630
+ disableRegister?: boolean | undefined;
2631
+ registerMethods?: RegisterMethods[] | undefined;
2632
+ defaultRegisterMethod?: RegisterMethods | undefined;
2633
+ publicKey?: string | undefined;
2634
+ agreementEnabled?: boolean | undefined;
2635
+ agreements?: import("@authing/react-ui-components/components/AuthingGuard/api/index").Agreement[] | undefined;
2636
+ registerContext?: any;
2637
+ title?: string | undefined;
2638
+ logo?: string | undefined;
2639
+ lang: import("@authing/react-ui-components/components/index").Lang;
2640
+ langRange: import("@authing/react-ui-components/components/index").Lang[];
2641
+ isHost?: boolean | undefined;
2642
+ mode: import("@authing/react-ui-components/components/index").GuardMode;
2643
+ clickCloseable: boolean;
2644
+ escCloseable: boolean;
2645
+ userpool?: string | undefined;
2646
+ contentCss?: string | undefined;
2647
+ target?: string | HTMLElement | undefined;
2648
+ __internalRequest__?: boolean | undefined;
2649
+ __singleComponent__?: boolean | undefined;
2650
+ __unAuthFlow__?: boolean | undefined;
2651
+ autoRegister?: boolean | undefined;
2652
+ disableResetPwd?: boolean | undefined;
2653
+ defaultLoginMethod?: import("@authing/react-ui-components/components/index").LoginMethods | undefined;
2654
+ loginMethods?: import("@authing/react-ui-components/components/index").LoginMethods[] | undefined;
2655
+ passwordLoginMethods?: import("@authing/react-ui-components/components/AuthingGuard/api/index").PasswordLoginMethods[] | undefined;
2656
+ socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
2657
+ socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
2658
+ enterpriseConnections?: string[] | undefined;
2659
+ qrCodeScanOptions?: {
2660
+ extIdpConnId?: string | undefined;
2661
+ autoExchangeUserInfo?: boolean | undefined;
2662
+ size?: {
2663
+ height: number;
2664
+ width: number;
2665
+ } | undefined;
2666
+ containerSize?: {
2667
+ height: number;
2668
+ width: number;
2669
+ } | undefined;
2670
+ interval?: number | undefined;
2671
+ onStart?: ((timer: any) => any) | undefined;
2672
+ onResult?: ((data: import("authing-js-sdk").QRCodeStatus) => any) | undefined;
2673
+ onScanned?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo) => any) | undefined;
2674
+ onSuccess?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo, ticket: string) => any) | undefined;
2675
+ onCancel?: (() => any) | undefined;
2676
+ onError?: ((message: string) => any) | undefined;
2677
+ onExpired?: (() => any) | undefined;
2678
+ onCodeShow?: ((random: string, url: string) => any) | undefined;
2679
+ onCodeLoaded?: ((random: string, url: string) => any) | undefined;
2680
+ onCodeLoadFailed?: ((message: string) => any) | undefined;
2681
+ onCodeDestroyed?: ((random: string) => any) | undefined;
2682
+ onRetry?: (() => any) | undefined;
2683
+ onMfa?: ((code: number, message: string, data: Record<string, any>) => {}) | undefined;
2684
+ tips?: {
2685
+ title?: string | undefined;
2686
+ scanned?: string | undefined;
2687
+ succeed?: string | undefined;
2688
+ canceled?: string | undefined;
2689
+ expired?: string | undefined;
2690
+ retry?: string | undefined;
2691
+ failed?: string | undefined;
2692
+ } | undefined;
2693
+ onAuthFlow?: ((flow: Record<string, any>) => {}) | undefined;
2694
+ customData?: {
2695
+ [x: string]: any;
2696
+ } | undefined;
2697
+ context?: {
2698
+ [x: string]: any;
2699
+ } | undefined;
2700
+ withCustomData?: boolean | undefined;
2701
+ } | undefined;
2702
+ } | undefined;
2703
+
2407
2704
  }
2408
2705
  declare module '@authing/react-ui-components/components/_utils/config' {
2409
2706
  import { IG2Config } from '@authing/react-ui-components/components/Type/index';
@@ -2417,13 +2714,44 @@ declare module '@authing/react-ui-components/components/_utils/config' {
2417
2714
  }
2418
2715
  declare module '@authing/react-ui-components/components/_utils/context' {
2419
2716
  import React from 'react';
2717
+ import { GuardEvents, GuardLocalConfig, GuardModuleType } from '@authing/react-ui-components/components/index';
2420
2718
  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>;
2719
+ import { ModuleState } from '@authing/react-ui-components/components/Guard/GuardModule/stateMachine';
2720
+ import { GuardHttp } from '@authing/react-ui-components/components/_utils/guardHttp';
2721
+ export interface IGuardContext {
2722
+ finallyConfig: GuardLocalConfig;
2723
+ defaultMergedConfig: GuardLocalConfig;
2724
+ publicConfig: ApplicationConfig;
2725
+ httpClient: GuardHttp;
2726
+ appId: string;
2727
+ initData: any;
2728
+ currentModule: ModuleState;
2729
+ events: Partial<GuardEvents>;
2730
+ changeModule?: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
2731
+ backModule?: () => void;
2732
+ isAuthFlow: boolean;
2733
+ contextLoaded: boolean;
2734
+ }
2735
+ export const createGuardXContext: () => {
2736
+ Provider: React.FC<{
2737
+ value: Partial<IGuardContext>;
2738
+ }>;
2739
+ Consumer: React.Consumer<IGuardContext>;
2740
+ };
2741
+ export const useGuardPublicConfig: () => ApplicationConfig;
2742
+ export const useGuardHttpClient: () => GuardHttp;
2743
+ export const useGuardDefaultMergedConfig: () => GuardLocalConfig;
2744
+ export const useGuardAppId: () => string;
2745
+ export function useGuardInitData<T>(): T;
2746
+ export const useGuardCurrentModule: () => ModuleState;
2747
+ export const useGuardEvents: () => Partial<GuardEvents>;
2748
+ export const useGuardModule: () => {
2749
+ changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
2750
+ backModule: (() => void) | undefined;
2425
2751
  };
2426
- export const usePublicConfig: () => ApplicationConfig | undefined;
2752
+ export const useGuardFinallyConfig: () => GuardLocalConfig;
2753
+ export const useGuardContextLoaded: () => boolean;
2754
+ export const useGuardIsAuthFlow: () => boolean;
2427
2755
 
2428
2756
  }
2429
2757
  declare module '@authing/react-ui-components/components/_utils/corsVerification' {
@@ -2455,29 +2783,30 @@ declare module '@authing/react-ui-components/components/_utils/errorFace' {
2455
2783
  export {};
2456
2784
 
2457
2785
  }
2458
- declare module '@authing/react-ui-components/components/_utils/guradHttp' {
2459
- import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
2786
+ declare module '@authing/react-ui-components/components/_utils/guardHttp' {
2787
+ import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
2460
2788
  import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
2461
2789
  export class GuardHttp {
2462
2790
  private requestClient;
2463
2791
  private headers;
2464
2792
  private responseInterceptorMap;
2465
- constructor(baseUrl: string);
2793
+ constructor(baseUrl?: string);
2466
2794
  private getRequestClient;
2467
2795
  setUserpoolId(userpoolId: string): this;
2468
2796
  setAppId(appId: string): this;
2469
2797
  setTenantId(tenantId: string): this;
2470
2798
  setBaseUrl(baseUrl: string): this;
2471
2799
  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?: {
2800
+ get: <T = any>(path: string, query?: Record<string, any>, config?: RequestInit | undefined) => Promise<AuthingGuardResponse<T>>;
2801
+ post: <T = any>(path: string, data: any, config?: {
2474
2802
  headers: any;
2475
- } | undefined) => Promise<AuthingResponse<any>>;
2476
- postForm: <T>(path: string, formData: any, config?: {
2803
+ } | undefined) => Promise<AuthingGuardResponse<T>>;
2804
+ postForm: <T = any>(path: string, formData: any, config?: {
2477
2805
  headers: any;
2478
- } | undefined) => Promise<AuthingResponse<any>>;
2479
- initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => void) => this | undefined;
2480
- private responseIntercept;
2806
+ } | undefined) => Promise<AuthingGuardResponse<T>>;
2807
+ authFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
2808
+ initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => this | undefined;
2809
+ responseIntercept: (res: AuthingResponse) => AuthingGuardResponse;
2481
2810
  }
2482
2811
  export const initGuardHttp: (baseUrl: string) => GuardHttp;
2483
2812
  export const getGuardHttp: () => GuardHttp;
@@ -2486,7 +2815,8 @@ declare module '@authing/react-ui-components/components/_utils/guradHttp' {
2486
2815
  }
2487
2816
  declare module '@authing/react-ui-components/components/_utils/hooks/index' {
2488
2817
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/module';
2489
- import { LoginConfig } from '@authing/react-ui-components/components/Login/interface';
2818
+ import { ApplicationConfig } from '@authing/react-ui-components/components/AuthingGuard/api/index';
2819
+ import { GuardLocalConfig } from '@authing/react-ui-components/components/Guard/index';
2490
2820
  export interface PhoneValidResult {
2491
2821
  isValid: boolean;
2492
2822
  phoneNumber: string;
@@ -2512,10 +2842,7 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
2512
2842
  * @returns
2513
2843
  */
2514
2844
  export const parsePhone: (isInternationSms: boolean, fieldValue: string, areaCode?: string) => {
2515
- phoneNumber: string;
2516
- countryCode: undefined;
2517
- } | {
2518
- countryCode: string;
2845
+ countryCode: string | undefined;
2519
2846
  phoneNumber: string;
2520
2847
  };
2521
2848
  /**
@@ -2523,10 +2850,14 @@ declare module '@authing/react-ui-components/components/_utils/hooks/index' {
2523
2850
  * @param config
2524
2851
  * @returns[socialConnectionObjs 社交身份源连接对象 enterpriseConnectionObjs 企业身份源连接对象 isNoMethod 是否没有身份源 ]
2525
2852
  */
2526
- export const useMethod: (config: LoginConfig) => any;
2853
+ export const useMethod: (params: {
2854
+ config: GuardLocalConfig;
2855
+ publicConfig: ApplicationConfig;
2856
+ }) => any;
2527
2857
 
2528
2858
  }
2529
2859
  declare module '@authing/react-ui-components/components/_utils/http' {
2860
+ import { CodeAction } from '@authing/react-ui-components/components/_utils/responseManagement/interface';
2530
2861
  export const requestClient: {
2531
2862
  (input: RequestInfo, init?: RequestInit | undefined): Promise<any>;
2532
2863
  get<T>(path: string, query?: Record<string, any>, init?: RequestInit | undefined): Promise<AuthingResponse<T>>;
@@ -2553,6 +2884,10 @@ declare module '@authing/react-ui-components/components/_utils/http' {
2553
2884
  messages?: string;
2554
2885
  message?: string;
2555
2886
  }
2887
+ export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
2888
+ onGuardHandling?: () => CodeAction;
2889
+ isFlowEnd?: boolean;
2890
+ }
2556
2891
 
2557
2892
  }
2558
2893
  declare module '@authing/react-ui-components/components/_utils/index' {
@@ -2596,7 +2931,7 @@ declare module '@authing/react-ui-components/components/_utils/index' {
2596
2931
  key: string;
2597
2932
  value: string | string[] | qs.ParsedQs | qs.ParsedQs[] | undefined;
2598
2933
  }[];
2599
- export const isWechatBrowser: () => boolean;
2934
+ export const isWeChatBrowser: () => boolean;
2600
2935
  export const isLarkBrowser: () => boolean;
2601
2936
  export const assembledAppHost: (identifier: string, host: string) => string;
2602
2937
  export const assembledRequestHost: (requestHostname: string, configHost: string) => string;
@@ -2644,6 +2979,32 @@ declare module '@authing/react-ui-components/components/_utils/locales/zh/index'
2644
2979
  import map from '@authing/react-ui-components/components/_utils/locales/zh/map/index';
2645
2980
  export { common, login, user, map };
2646
2981
 
2982
+ }
2983
+ declare module '@authing/react-ui-components/components/_utils/logger/index' {
2984
+ import { LoggerType } from '@authing/react-ui-components/components/_utils/logger/interface';
2985
+ export class Logger {
2986
+ static printType: LoggerType[];
2987
+ /**
2988
+ * 打印日志
2989
+ * @param message 日志信息
2990
+ * @param type 日志类型
2991
+ */
2992
+ static log(message: string, type?: LoggerType): void;
2993
+ static info(message: string): void;
2994
+ static warn(message: string): void;
2995
+ static error(message: string): void;
2996
+ }
2997
+ export const getLogger: () => Logger;
2998
+ export const useLogger: () => Logger;
2999
+
3000
+ }
3001
+ declare module '@authing/react-ui-components/components/_utils/logger/interface' {
3002
+ export enum LoggerType {
3003
+ INFO = "INFO",
3004
+ WARN = "WARN",
3005
+ ERROR = "ERROR"
3006
+ }
3007
+
2647
3008
  }
2648
3009
  declare module '@authing/react-ui-components/components/_utils/popupCenter' {
2649
3010
  /**
@@ -2658,20 +3019,28 @@ declare module '@authing/react-ui-components/components/_utils/popupCenter' {
2658
3019
 
2659
3020
  }
2660
3021
  declare module '@authing/react-ui-components/components/_utils/responseManagement/index' {
2661
- import { AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
3022
+ import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/components/_utils/http';
2662
3023
  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>;
3024
+ export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => AuthingResponse<any>;
2664
3025
 
2665
3026
  }
2666
3027
  declare module '@authing/react-ui-components/components/_utils/responseManagement/interface' {
2667
3028
  import { GuardModuleType } from '@authing/react-ui-components/components/Guard/index';
2668
3029
  export enum CodeAction {
2669
3030
  CHANGE_MODULE = "changeModule",
2670
- RENDER_MESSAGE = "renderMessage"
3031
+ RENDER_MESSAGE = "renderMessage",
3032
+ FLOW_END = "flowEnd"
2671
3033
  }
2672
3034
  export enum ApiCode {
2673
- IDENTITY_BINDING_ASK = "1641",
2674
- IDENTITY_BINDING = "1640"
3035
+ IDENTITY_BINDING_ASK = 1641,
3036
+ IDENTITY_BINDING = 1640,
3037
+ APP_MFA = 1636,
3038
+ MFA = 1635,
3039
+ ABORT_FLOW = 1699,
3040
+ COMPLETE_INFO = 1642,
3041
+ FLOW_END = 1600,
3042
+ FIRST_LOGIN_PASSWORD = 1639,
3043
+ FORCED_PASSWORD_RESET = 2058
2675
3044
  }
2676
3045
  export const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
2677
3046
 
@@ -2767,7 +3136,7 @@ declare module '@authing/react-ui-components/components/version/index' {
2767
3136
 
2768
3137
  }
2769
3138
  declare module '@authing/react-ui-components/components/version/version' {
2770
- const _default: "3.0.31-rc.2";
3139
+ const _default: "3.1.0-rc.2";
2771
3140
  export default _default;
2772
3141
 
2773
3142
  }
@@ -2813,7 +3182,7 @@ declare module '@authing/react-ui-components/config/jest/fileTransform' {
2813
3182
 
2814
3183
  }
2815
3184
  declare module '@authing/react-ui-components/config/modules' {
2816
- export const additionalModulePaths: string[] | "" | null;
3185
+ export const additionalModulePaths: "" | string[] | null;
2817
3186
  export const hasTsConfig: boolean;
2818
3187
  export const webpackAliases: {
2819
3188
  src?: undefined;