@authing/react-ui-components 4.0.0-rc.0 → 4.0.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.
Files changed (165) hide show
  1. package/lib/index.min.css +2 -2
  2. package/lib/index.min.js +1 -1
  3. package/lib/index.min.js.LICENSE.txt +9 -0
  4. package/package.json +8 -6
  5. package/types/AuthClientProvider/AuthClientProvider.d.ts +4 -0
  6. package/types/AuthClientProvider/context.d.ts +6 -0
  7. package/types/AuthClientProvider/index.d.ts +1 -0
  8. package/types/Back/index.d.ts +10 -0
  9. package/types/BindTotp/businessRequest.d.ts +5 -0
  10. package/types/BindTotp/core/bindSuccess.d.ts +6 -0
  11. package/types/BindTotp/core/securityCode.d.ts +8 -0
  12. package/types/BindTotp/index.d.ts +3 -0
  13. package/types/BindTotp/interface.d.ts +20 -0
  14. package/types/ChangeLanguage/index.d.ts +10 -0
  15. package/types/ChangePassword/businessRequest.d.ts +9 -0
  16. package/types/ChangePassword/core/PasswordNotSafeReset.d.ts +6 -0
  17. package/types/ChangePassword/core/completePassword.d.ts +2 -0
  18. package/types/ChangePassword/core/firstLoginReset.d.ts +6 -0
  19. package/types/ChangePassword/core/rotateReset.d.ts +7 -0
  20. package/types/ChangePassword/index.d.ts +10 -0
  21. package/types/CompleteInfo/businessRequest.d.ts +9 -0
  22. package/types/CompleteInfo/core/completeInfo.d.ts +11 -0
  23. package/types/CompleteInfo/index.d.ts +11 -0
  24. package/types/CompleteInfo/interface.d.ts +99 -0
  25. package/types/CompleteInfo/utils.d.ts +16 -0
  26. package/types/CopyAbleText/index.d.ts +5 -0
  27. package/types/DownloadAuthenticator/index.d.ts +3 -0
  28. package/types/DownloadAuthenticator/interface.d.ts +12 -0
  29. package/types/Error/index.d.ts +6 -0
  30. package/types/Error/interface.d.ts +8 -0
  31. package/types/ForgetPassword/core/resetPassword.d.ts +13 -0
  32. package/types/ForgetPassword/index.d.ts +2 -0
  33. package/types/ForgetPassword/interface.d.ts +18 -0
  34. package/types/Guard/Guard.d.ts +10 -0
  35. package/types/Guard/GuardModule/stateMachine.d.ts +38 -0
  36. package/types/Guard/authClient.d.ts +14 -0
  37. package/types/Guard/config.d.ts +27 -0
  38. package/types/Guard/core/hooks/useMultipleAccounts.d.ts +320 -0
  39. package/types/Guard/core/index.d.ts +8 -0
  40. package/types/Guard/core/renderContext.d.ts +7 -0
  41. package/types/Guard/core/renderModule.d.ts +10 -0
  42. package/types/Guard/core/useAppendConfig.d.ts +4 -0
  43. package/types/Guard/core/usePlugin.d.ts +3 -0
  44. package/types/Guard/event.d.ts +88 -0
  45. package/types/Guard/index.d.ts +4 -0
  46. package/types/Guard/module.d.ts +28 -0
  47. package/types/Guard/sso.d.ts +19 -0
  48. package/types/GuardButton/GuardButton.d.ts +6 -0
  49. package/types/GuardButton/index.d.ts +1 -0
  50. package/types/IconFont/iconfont.d.ts +1 -0
  51. package/types/IconFont/index.d.ts +8 -0
  52. package/types/IconFont/useGuardIconfont.d.ts +1 -0
  53. package/types/IdentityBinding/IdentityBinding.d.ts +3 -0
  54. package/types/IdentityBinding/businessRequest.d.ts +33 -0
  55. package/types/IdentityBinding/index.d.ts +2 -0
  56. package/types/IdentityBinding/interface.d.ts +27 -0
  57. package/types/IdentityBindingAsk/IdentityBindingAsk.d.ts +3 -0
  58. package/types/IdentityBindingAsk/index.d.ts +2 -0
  59. package/types/IdentityBindingAsk/interface.d.ts +21 -0
  60. package/types/ImagePro/index.d.ts +14 -0
  61. package/types/InputNumber/index.d.ts +5 -0
  62. package/types/InputPassword/index.d.ts +4 -0
  63. package/types/Login/codemap.d.ts +2 -0
  64. package/types/Login/core/withAD.d.ts +21 -0
  65. package/types/Login/core/withAppQrcode.d.ts +10 -0
  66. package/types/Login/core/withLDAP.d.ts +22 -0
  67. package/types/Login/core/withPassword/FormItemAccount.d.ts +7 -0
  68. package/types/Login/core/withPassword/GraphicVerifyCode.d.ts +7 -0
  69. package/types/Login/core/withPassword/InputAccount.d.ts +7 -0
  70. package/types/Login/core/withPassword/index.d.ts +28 -0
  71. package/types/Login/core/withVerifyCode/FormItemIdentify.d.ts +11 -0
  72. package/types/Login/core/withVerifyCode/InputInternationPhone.d.ts +7 -0
  73. package/types/Login/core/withVerifyCode/VirtualDropdown.d.ts +12 -0
  74. package/types/Login/core/withVerifyCode/index.d.ts +4 -0
  75. package/types/Login/core/withVerifyCode/inputIdentify.d.ts +7 -0
  76. package/types/Login/core/withWechatMiniQrcode.d.ts +11 -0
  77. package/types/Login/core/withWechatmpQrcode.d.ts +14 -0
  78. package/types/Login/hooks/useLoginMultiple.d.ts +62 -0
  79. package/types/Login/index.d.ts +3 -0
  80. package/types/Login/interface.d.ts +37 -0
  81. package/types/Login/multipleAccounts/index.d.ts +22 -0
  82. package/types/Login/multipleAccounts/panel.d.ts +45 -0
  83. package/types/Login/socialLogin/IdpButton/index.d.ts +2 -0
  84. package/types/Login/socialLogin/index.d.ts +18 -0
  85. package/types/Login/socialLogin/postMessage.d.ts +7 -0
  86. package/types/MFA/VerifyCodeInput/VerifyCodeFormItem.d.ts +8 -0
  87. package/types/MFA/VerifyCodeInput/index.d.ts +14 -0
  88. package/types/MFA/businessRequest.d.ts +46 -0
  89. package/types/MFA/codemap.d.ts +2 -0
  90. package/types/MFA/core/email.d.ts +23 -0
  91. package/types/MFA/core/face.d.ts +2 -0
  92. package/types/MFA/core/face_deps.d.ts +11 -0
  93. package/types/MFA/core/sms.d.ts +28 -0
  94. package/types/MFA/core/totp.d.ts +20 -0
  95. package/types/MFA/index.d.ts +9 -0
  96. package/types/MFA/interface.d.ts +40 -0
  97. package/types/MFA/mfaMethods/index.d.ts +8 -0
  98. package/types/NeedHelpView/core/describeQuestions.d.ts +8 -0
  99. package/types/NeedHelpView/index.d.ts +2 -0
  100. package/types/RecoveryCode/businessRequest.d.ts +5 -0
  101. package/types/RecoveryCode/core/saveCode.d.ts +5 -0
  102. package/types/RecoveryCode/core/useCode.d.ts +7 -0
  103. package/types/RecoveryCode/index.d.ts +5 -0
  104. package/types/RecoveryCode/interface.d.ts +8 -0
  105. package/types/Register/codemap.d.ts +2 -0
  106. package/types/Register/components/Agreements/index.d.ts +11 -0
  107. package/types/Register/core/WithCode.d.ts +12 -0
  108. package/types/Register/core/WithEmail.d.ts +11 -0
  109. package/types/Register/core/WithEmailCode.d.ts +11 -0
  110. package/types/Register/core/WithPhone.d.ts +10 -0
  111. package/types/Register/index.d.ts +2 -0
  112. package/types/Register/interface.d.ts +25 -0
  113. package/types/Register/utils.d.ts +1 -0
  114. package/types/SelfUnlock/core/selfUnlock.d.ts +8 -0
  115. package/types/SelfUnlock/index.d.ts +2 -0
  116. package/types/SelfUnlock/interface.d.ts +15 -0
  117. package/types/SendCode/SendCodeBtn.d.ts +10 -0
  118. package/types/SendCode/SendCodeByEmail.d.ts +13 -0
  119. package/types/SendCode/SendCodeByPhone.d.ts +15 -0
  120. package/types/SendCode/index.d.ts +9 -0
  121. package/types/ShieldSpin/index.d.ts +7 -0
  122. package/types/SingleComponent/SingleComponent.d.ts +3 -0
  123. package/types/SingleComponent/index.d.ts +3 -0
  124. package/types/SubmitButton/index.d.ts +10 -0
  125. package/types/SubmitSuccess/index.d.ts +2 -0
  126. package/types/SubmitSuccess/interface.d.ts +17 -0
  127. package/types/Type/application.d.ts +251 -0
  128. package/types/Type/index.d.ts +84 -0
  129. package/types/UploadImage/index.d.ts +5 -0
  130. package/types/ValidatorRules/PasswordFormItem.d.ts +6 -0
  131. package/types/ValidatorRules/ValidatorFormItem.d.ts +5 -0
  132. package/types/ValidatorRules/index.d.ts +31 -0
  133. package/types/ValidatorRules/useCheckRepeat.d.ts +1 -0
  134. package/types/VerifyCodeInput/index.d.ts +10 -0
  135. package/types/_utils/GuardErrorCode.d.ts +11 -0
  136. package/types/_utils/appendConfig.d.ts +4 -0
  137. package/types/_utils/clipboard.d.ts +1 -0
  138. package/types/_utils/config/index.d.ts +96 -0
  139. package/types/_utils/context.d.ts +139 -0
  140. package/types/_utils/corsVerification.d.ts +1 -0
  141. package/types/_utils/countryList.d.ts +7 -0
  142. package/types/_utils/errorFace.d.ts +12 -0
  143. package/types/_utils/facePlugin/index.d.ts +4 -0
  144. package/types/_utils/facePlugin/interface.d.ts +5 -0
  145. package/types/_utils/flowHandleStorage.d.ts +4 -0
  146. package/types/_utils/guardDocument.d.ts +3 -0
  147. package/types/_utils/guardHttp.d.ts +27 -0
  148. package/types/_utils/hooks/index.d.ts +43 -0
  149. package/types/_utils/http.d.ts +33 -0
  150. package/types/_utils/index.d.ts +92 -0
  151. package/types/_utils/initAppId.d.ts +7 -0
  152. package/types/_utils/locales/en-us/index.d.ts +4 -0
  153. package/types/_utils/locales/index.d.ts +7 -0
  154. package/types/_utils/locales/zh-cn/index.d.ts +4 -0
  155. package/types/_utils/locales/zh-tw/index.d.ts +4 -0
  156. package/types/_utils/logger/index.d.ts +15 -0
  157. package/types/_utils/logger/interface.d.ts +5 -0
  158. package/types/_utils/popupCenter.d.ts +9 -0
  159. package/types/_utils/responseManagement/index.d.ts +3 -0
  160. package/types/_utils/responseManagement/interface.d.ts +21 -0
  161. package/types/_utils/useErrorText.d.ts +5 -0
  162. package/types/index.d.ts +6 -0
  163. package/types/version/index.d.ts +2 -0
  164. package/types/version/version.d.ts +2 -0
  165. package/lib/index.d.ts +0 -2667
package/lib/index.d.ts DELETED
@@ -1,2667 +0,0 @@
1
- declare module '@authing/react-ui-components/AuthClientProvider/AuthClientProvider' {
2
- import React from 'react';
3
- import { AuthClientContextProps } from '@authing/react-ui-components/AuthClientProvider/context';
4
- export const AuthClientProvider: React.FC<AuthClientContextProps>;
5
- export const useGlobalAuthClient: () => import("authing-js-sdk").AuthenticationClient | undefined;
6
-
7
- }
8
- declare module '@authing/react-ui-components/AuthClientProvider/context' {
9
- import { AuthenticationClient } from 'authing-js-sdk';
10
- import React from 'react';
11
- export interface AuthClientContextProps {
12
- client: AuthenticationClient;
13
- }
14
- export const AuthClientContext: React.Context<AuthClientContextProps | undefined>;
15
-
16
- }
17
- declare module '@authing/react-ui-components/AuthClientProvider/index' {
18
- export { AuthClientProvider, useGlobalAuthClient } from '@authing/react-ui-components/AuthClientProvider/AuthClientProvider';
19
-
20
- }
21
- declare module '@authing/react-ui-components/Back/index' {
22
- import React from 'react';
23
- import './styles.less';
24
- export interface BackProps {
25
- isRender?: boolean;
26
- }
27
- export const BackLogin: React.FC<BackProps>;
28
- export interface BackCustomProps extends BackProps {
29
- onBack?: () => void;
30
- }
31
- export const BackCustom: React.FC<BackCustomProps>;
32
-
33
- }
34
- declare module '@authing/react-ui-components/BindTotp/businessRequest' {
35
- export enum BindTotpBusinessAction {
36
- VerifyTotpFirstTime = "verify-totp-first-time",
37
- ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
38
- }
39
- export const authFlow: (action: BindTotpBusinessAction, content: any) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
40
-
41
- }
42
- declare module '@authing/react-ui-components/BindTotp/core/bindSuccess' {
43
- import React from 'react';
44
- export interface BindSuccessProps {
45
- onBind: any;
46
- secret: string;
47
- }
48
- export const BindSuccess: React.FC<BindSuccessProps>;
49
-
50
- }
51
- declare module '@authing/react-ui-components/BindTotp/core/securityCode' {
52
- import React from 'react';
53
- export interface SecurityCodeProps {
54
- mfaToken: string;
55
- qrcode: string;
56
- onNext: any;
57
- changeModule: any;
58
- }
59
- export const SecurityCode: React.FC<SecurityCodeProps>;
60
-
61
- }
62
- declare module '@authing/react-ui-components/BindTotp/index' {
63
- import React from 'react';
64
- import './styles.less';
65
- export const GuardBindTotpView: React.FC;
66
-
67
- }
68
- declare module '@authing/react-ui-components/BindTotp/interface' {
69
- import { IG2Config, IG2Events, IG2FCProps } from '@authing/react-ui-components/Type/index';
70
- import { GuardMFAInitData } from '@authing/react-ui-components/MFA/interface';
71
- import { AuthenticationClient, User } from 'authing-js-sdk';
72
- export interface BindTotpConfig extends IG2Config {
73
- autoRegister: boolean;
74
- }
75
- export const getDefaultMFAConfig: () => BindTotpConfig;
76
- export interface BindTotpEvents extends IG2Events {
77
- onLogin?: (user: User, authClient: AuthenticationClient) => void;
78
- }
79
- export interface GuardBindTotpInitData extends GuardMFAInitData {
80
- }
81
- export interface GuardBindTotpProps extends IG2FCProps, BindTotpEvents {
82
- config: Partial<BindTotpConfig>;
83
- initData: GuardBindTotpInitData;
84
- }
85
- export interface GuardBindTotpViewProps extends GuardBindTotpProps {
86
- config: BindTotpConfig;
87
- initData: GuardBindTotpInitData;
88
- }
89
-
90
- }
91
- declare module '@authing/react-ui-components/ChangeLanguage/index' {
92
- /// <reference types="react" />
93
- export const ChangeLanguage: (props: any) => JSX.Element | null;
94
-
95
- }
96
- declare module '@authing/react-ui-components/ChangePassword/businessRequest' {
97
- export enum ChangePasswordBusinessAction {
98
- ResetPassword = "reset-password-first-time",
99
- FirstLoginReset = "reset-password-forced",
100
- ResetPasswordStrengthDetection = "reset-password-strength-detection"
101
- }
102
- export const authFlow: (action: ChangePasswordBusinessAction, content: {
103
- password: string;
104
- oldPassword?: string;
105
- }) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
106
-
107
- }
108
- declare module '@authing/react-ui-components/ChangePassword/core/PasswordNotSafeReset' {
109
- import React from 'react';
110
- interface PasswordNotSafeResetProps {
111
- onReset: any;
112
- }
113
- export const PasswordNotSafeReset: React.FC<PasswordNotSafeResetProps>;
114
- export {};
115
-
116
- }
117
- declare module '@authing/react-ui-components/ChangePassword/core/completePassword' {
118
- import React from 'react';
119
- export const CompletePassword: React.FC;
120
-
121
- }
122
- declare module '@authing/react-ui-components/ChangePassword/core/firstLoginReset' {
123
- import React from 'react';
124
- interface FirstLoginResetProps {
125
- onReset: any;
126
- }
127
- export const FirstLoginReset: React.FC<FirstLoginResetProps>;
128
- export {};
129
-
130
- }
131
- declare module '@authing/react-ui-components/ChangePassword/core/rotateReset' {
132
- /// <reference types="react" />
133
- interface RotateResetProps {
134
- onReset: any;
135
- onFinishCallBack?: any;
136
- }
137
- export const RotateReset: (props: RotateResetProps) => JSX.Element;
138
- export {};
139
-
140
- }
141
- declare module '@authing/react-ui-components/ChangePassword/index' {
142
- import React from 'react';
143
- export const GuardChangePassword: React.FC<{
144
- title: string;
145
- explain: string;
146
- }>;
147
- export const GuardFirstLoginPasswordResetView: React.FC;
148
- export const GuardPasswordNotSafeResetView: React.FC;
149
- export const GuardForcedPasswordResetView: React.FC;
150
- export const GuardNoticePasswordResetView: React.FC;
151
- export const GuardRegisterCompletePasswordView: React.FC;
152
-
153
- }
154
- declare module '@authing/react-ui-components/CompleteInfo/businessRequest' {
155
- import { User } from 'authing-js-sdk';
156
- import { CompleteInfoRequest, RegisterCompleteInfoInitData } from '@authing/react-ui-components/CompleteInfo/interface';
157
- export enum CompleteInfoAuthFlowAction {
158
- Complete = "complete-completion",
159
- Skip = "skip-completion"
160
- }
161
- export const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest | undefined) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
162
- export const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'], content: any) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>> | Promise<User> | undefined;
163
- export const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any> | undefined>;
164
-
165
- }
166
- declare module '@authing/react-ui-components/CompleteInfo/core/completeInfo' {
167
- import React from 'react';
168
- import { CompleteInfoMetaData, CompleteInfoRequest } from '@authing/react-ui-components/CompleteInfo/interface';
169
- export interface CompleteInfoProps {
170
- metaData: CompleteInfoMetaData[];
171
- businessRequest: (data: CompleteInfoRequest) => Promise<void>;
172
- }
173
- export interface FieldMetadata {
174
- key: string;
175
- options: any;
176
- }
177
- export const CompleteInfo: React.FC<CompleteInfoProps>;
178
-
179
- }
180
- declare module '@authing/react-ui-components/CompleteInfo/index' {
181
- import React from 'react';
182
- import { CompleteInfoMetaData, CompleteInfoRequest } from '@authing/react-ui-components/CompleteInfo/interface';
183
- import './styles.less';
184
- import { CompleteInfoAuthFlowAction } from '@authing/react-ui-components/CompleteInfo/businessRequest';
185
- export const GuardCompleteInfo: React.FC<{
186
- metaData: CompleteInfoMetaData[];
187
- skipComplateFileds: boolean;
188
- businessRequest: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<void>;
189
- }>;
190
- export const GuardLoginCompleteInfoView: React.FC;
191
- export const GuardRegisterCompleteInfoView: React.FC;
192
-
193
- }
194
- declare module '@authing/react-ui-components/CompleteInfo/interface' {
195
- import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
196
- import { IG2Config, IG2Events, IG2FCProps } from '@authing/react-ui-components/Type/index';
197
- export interface CompleteInfoConfig extends IG2Config {
198
- }
199
- export const getDefaultCompleteInfoConfig: () => CompleteInfoConfig;
200
- export interface CompleteInfoEvents extends IG2Events {
201
- onRegisterInfoCompleted?: (user: User, udfs: {
202
- definition: any;
203
- value: any;
204
- }[], authClient: AuthenticationClient) => void;
205
- onRegisterInfoCompletedError?: (error: CommonMessage, udfs: {
206
- definition: any;
207
- value: any;
208
- }[], authClient: AuthenticationClient) => void;
209
- }
210
- export interface GuardCompleteInfoProps extends IG2FCProps, CompleteInfoEvents {
211
- config: Partial<CompleteInfoConfig>;
212
- }
213
- export interface GuardCompleteInfoViewProps extends GuardCompleteInfoProps {
214
- config: CompleteInfoConfig;
215
- initData: any;
216
- onLogin?: any;
217
- }
218
- export type ExtendsFieldType = 'user' | 'internal';
219
- export interface ExtendsField {
220
- type: ExtendsFieldType;
221
- name: string;
222
- label: string;
223
- inputType: string;
224
- required: boolean;
225
- validateRules: any[];
226
- }
227
- export enum FormValidateRule {
228
- NONE = "none",
229
- EMAIL = "email",
230
- PHONE = "phone",
231
- IS_NUMBER = "isNumber",
232
- REG_EXP = "regExp"
233
- }
234
- export interface CompleteInfoRule {
235
- type: FormValidateRule;
236
- content: string;
237
- errorMessage?: string;
238
- }
239
- export interface CompleteInfoSelectOption {
240
- value: string;
241
- label: string;
242
- }
243
- export interface CompleteInfoMetaData {
244
- type: CompleteInfoBaseControls | CompleteInfoExtendsControls;
245
- label: string;
246
- name: string;
247
- required: boolean;
248
- validateRules: CompleteInfoRule[];
249
- options?: CompleteInfoSelectOption[];
250
- }
251
- export enum CompleteInfoBaseControls {
252
- USERNAME = "username",
253
- PHONE = "phone",
254
- EMAIL = "email"
255
- }
256
- export enum CompleteInfoExtendsControls {
257
- IMAGE = "image",
258
- NUMBER = "number",
259
- DATE = "date",
260
- DATE_TIME = "dateTime",
261
- SELECT = "select",
262
- DROPDOWN = "dropdown",
263
- BOOLEAN = "boolean",
264
- STRING = "string",
265
- TEXT = "text",
266
- GENDER = "gender",
267
- COUNTRY = "country"
268
- }
269
- export interface CompleteInfoInitData {
270
- skip: boolean;
271
- metaData: CompleteInfoMetaData[];
272
- }
273
- export interface RegisterCompleteInfoInitData {
274
- content: any;
275
- businessRequestName: 'registerByEmail' | 'registerByPhoneCode' | 'registerByEmailCode';
276
- onRegisterFailed: Function;
277
- onRegisterSuccess: Function;
278
- }
279
- export interface RegisterCompletePasswordInitData extends RegisterCompleteInfoInitData {
280
- isChangeComplete: boolean;
281
- }
282
- export interface CompleteInfoRequest {
283
- fieldValues: {
284
- name: string;
285
- value: string;
286
- code?: string;
287
- }[];
288
- }
289
- export enum OmitCompleteInfo {
290
- 'registerByEmail' = "email",
291
- 'registerByPhoneCode' = "phone",
292
- 'registerByEmailCode' = "email"
293
- }
294
-
295
- }
296
- declare module '@authing/react-ui-components/CompleteInfo/utils' {
297
- import { User } from 'authing-js-sdk';
298
- import { CompleteInfoMetaData, ExtendsField } from '@authing/react-ui-components/CompleteInfo/interface';
299
- import { ApplicationConfig } from '@authing/react-ui-components/Type/application';
300
- export const completeFieldsFilter: (user: User, field: ExtendsField) => boolean;
301
- export const extendsFieldsToMetaData: (extendsFields: import("@authing/react-ui-components/Type/application").ExtendsField[] | undefined, selectOptions: {
302
- key: string;
303
- options: {
304
- value: string;
305
- label: string;
306
- }[];
307
- }[]) => CompleteInfoMetaData[];
308
- export const fieldValuesToRegisterProfile: (extendsFields: ApplicationConfig['extendsFields'], fieldValues?: {
309
- name: string;
310
- value: string;
311
- code?: string | undefined;
312
- }[] | undefined) => Record<string, any>;
313
-
314
- }
315
- declare module '@authing/react-ui-components/CopyAbleText/index' {
316
- import React, { FC } from 'react';
317
- import './style.less';
318
- export interface CopyTextProps extends React.HTMLAttributes<HTMLDivElement> {
319
- }
320
- export const CopyAbleText: FC<CopyTextProps>;
321
-
322
- }
323
- declare module '@authing/react-ui-components/DownloadAuthenticator/index' {
324
- import React from 'react';
325
- import './styles.less';
326
- export const GuardDownloadATView: React.FC;
327
-
328
- }
329
- declare module '@authing/react-ui-components/DownloadAuthenticator/interface' {
330
- import { IG2Config, IG2Events, IG2FCProps } from '@authing/react-ui-components/Type/index';
331
- export interface DownloadATConfig extends IG2Config {
332
- }
333
- export const getDefaultDownloadAuthenticatorConfig: () => DownloadATConfig;
334
- export interface DownloadATEvents extends IG2Events {
335
- }
336
- export interface GuardDownloadATProps extends IG2FCProps, DownloadATEvents {
337
- config: Partial<DownloadATConfig>;
338
- }
339
- export interface GuardDownloadATViewProps extends GuardDownloadATProps {
340
- config: DownloadATConfig;
341
- }
342
-
343
- }
344
- declare module '@authing/react-ui-components/Error/index' {
345
- import React from 'react';
346
- import './styles.less';
347
- export interface ErrorProps {
348
- error?: Error;
349
- }
350
- export const GuardErrorView: React.FC<ErrorProps>;
351
-
352
- }
353
- declare module '@authing/react-ui-components/Error/interface' {
354
- export interface ErrorInitData {
355
- error?: Error;
356
- }
357
- export interface GuardErrorProps {
358
- initData?: ErrorInitData;
359
- }
360
- export interface GuardErrorViewProps extends GuardErrorProps {
361
- }
362
-
363
- }
364
- declare module '@authing/react-ui-components/ForgetPassword/core/resetPassword' {
365
- /// <reference types="react" />
366
- export enum InputMethodMap {
367
- email = "email-code",
368
- phone = "phone-code"
369
- }
370
- interface ResetPasswordProps {
371
- onReset: any;
372
- publicConfig: any;
373
- onSend: (type: 'email' | 'phone') => void;
374
- onSendError: (type: 'email' | 'phone', error: any) => void;
375
- }
376
- export const ResetPassword: (props: ResetPasswordProps) => JSX.Element;
377
- export {};
378
-
379
- }
380
- declare module '@authing/react-ui-components/ForgetPassword/index' {
381
- import React from 'react';
382
- export const GuardForgetPassword: React.FC;
383
-
384
- }
385
- declare module '@authing/react-ui-components/ForgetPassword/interface' {
386
- import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
387
- import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '@authing/react-ui-components/Type/index';
388
- export interface ForgetPasswordEvents extends IG2Events {
389
- onPwdEmailSend?: (authClient: AuthenticationClient) => void;
390
- onPwdEmailSendError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
391
- onPwdPhoneSend?: (authClient: AuthenticationClient) => void;
392
- onPwdPhoneSendError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
393
- onPwdReset?: (authClient: AuthenticationClient) => void;
394
- onPwdResetError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
395
- }
396
- export interface ForgetPasswordConfig extends IG2Config {
397
- }
398
- export interface ForgetPasswordProps extends IG2FCProps, ForgetPasswordEvents {
399
- config: Partial<IG2Config>;
400
- }
401
- export interface ForgetPasswordViewProps extends ForgetPasswordProps, IG2FCViewProps {
402
- config: IG2Config;
403
- }
404
-
405
- }
406
- declare module '@authing/react-ui-components/Guard/Guard' {
407
- import { GuardEvents } from '@authing/react-ui-components/Guard/event';
408
- import { GuardAppendConfig, IG2FCProps } from '@authing/react-ui-components/Type/index';
409
- import { GuardLocalConfig } from '@authing/react-ui-components/Guard/config';
410
- import 'moment/locale/zh-cn';
411
- import React from 'react';
412
- export interface GuardProps extends GuardEvents, IG2FCProps {
413
- config?: Partial<GuardLocalConfig>;
414
- appendConfig?: GuardAppendConfig;
415
- }
416
- export const Guard: React.MemoExoticComponent<(props: GuardProps) => JSX.Element>;
417
-
418
- }
419
- declare module '@authing/react-ui-components/Guard/GuardModule/stateMachine' {
420
- import { GuardLocalConfig } from '@authing/react-ui-components/Guard/config';
421
- import { GuardModuleType } from '@authing/react-ui-components/Guard/module';
422
- export interface ModuleState {
423
- moduleName: GuardModuleType;
424
- initData?: any;
425
- }
426
- export enum ActionType {
427
- ChangeModule = "ChangeModule",
428
- Back = "Back",
429
- Init = "Init"
430
- }
431
- export interface StateMachineLog {
432
- action: ActionType;
433
- date: number;
434
- dataSource: ModuleState;
435
- }
436
- export type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
437
- export class GuardStateMachine {
438
- private order;
439
- private config;
440
- private moduleStateHistory;
441
- private changeModuleEvent;
442
- private stateMachineLog;
443
- constructor(changeModuleEvent: ChangeModuleEvent, initData: ModuleState);
444
- uninstallPopstate: () => void;
445
- globalWindow: () => Window | undefined;
446
- next: (nextModule: GuardModuleType, initData: any) => void;
447
- back: (initData?: any) => void;
448
- end: () => void;
449
- historyPush: (data: ModuleState, actionType?: ActionType) => void;
450
- historyBack: (data: ModuleState) => void;
451
- setConfig: (config: GuardLocalConfig) => void;
452
- isUseHistoryHijack: () => boolean;
453
- onPopstate: () => void;
454
- }
455
- export const initGuardStateMachine: (changeMouleEvent: ChangeModuleEvent, initData: ModuleState) => GuardStateMachine;
456
- export const getGuardStateMachine: () => GuardStateMachine;
457
- export const useGuardStateMachine: () => GuardStateMachine;
458
-
459
- }
460
- declare module '@authing/react-ui-components/Guard/authClient' {
461
- import { AuthenticationClient } from 'authing-js-sdk';
462
- import { GuardLocalConfig } from '@authing/react-ui-components/Guard/config';
463
- let authClient: AuthenticationClient;
464
- export const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string | undefined) => AuthenticationClient;
465
- export const useInitGuardAuthClient: (props: {
466
- config?: GuardLocalConfig | undefined;
467
- appId?: string | undefined;
468
- authClient?: AuthenticationClient | undefined;
469
- setError?: any;
470
- tenantId?: string | undefined;
471
- }) => AuthenticationClient | undefined;
472
- export const getGuardAuthClient: () => AuthenticationClient;
473
- export const useGuardAuthClient: () => AuthenticationClient;
474
- export {};
475
-
476
- }
477
- declare module '@authing/react-ui-components/Guard/config' {
478
- import { ReactNode } from 'react';
479
- import { GuardModuleType } from '@authing/react-ui-components/Guard/index';
480
- import { LoginConfig } from '@authing/react-ui-components/Login/interface';
481
- import { RegisterConfig } from '@authing/react-ui-components/Register/interface';
482
- export interface GuardComponentConfig extends Partial<GuardLocalConfig> {
483
- }
484
- export enum QrCodeScanType {
485
- appQrcode = "appQrcode",
486
- wechatMiniQrcode = "wechatMiniQrcode",
487
- wechatmpQrcode = "wechatmpQrcode"
488
- }
489
- export interface QrCodeScanOptions {
490
- qrcode: string;
491
- }
492
- export interface GuardLocalConfig extends RegisterConfig, LoginConfig {
493
- isSSO?: boolean;
494
- defaultScenes?: GuardModuleType;
495
- defaultInitData?: any;
496
- showLoading?: boolean;
497
- loadingComponent?: ReactNode;
498
- /**
499
- * @description 是否调用 eventsMapping 中的事件
500
- */
501
- openEventsMapping?: boolean;
502
- _qrCodeScanOptions?: Record<QrCodeScanType, QrCodeScanOptions>;
503
- }
504
- export const getDefaultGuardLocalConfig: () => GuardLocalConfig;
505
-
506
- }
507
- declare module '@authing/react-ui-components/Guard/core/index' {
508
- /// <reference types="react" />
509
- import { GuardProps } from '@authing/react-ui-components/Guard/index';
510
- import { ModuleState } from '@authing/react-ui-components/Guard/GuardModule/stateMachine';
511
- export interface GuardCoreProps {
512
- guardProps: GuardProps;
513
- initState: ModuleState;
514
- }
515
- export const GuardCore: (props: GuardCoreProps) => JSX.Element;
516
-
517
- }
518
- declare module '@authing/react-ui-components/Guard/core/renderContext' {
519
- import { GuardProps } from '@authing/react-ui-components/Guard/index';
520
- import React from 'react';
521
- import { ModuleState } from '@authing/react-ui-components/Guard/GuardModule/stateMachine';
522
- export const RenderContext: React.FC<{
523
- guardProps: GuardProps;
524
- initState: ModuleState;
525
- }>;
526
-
527
- }
528
- declare module '@authing/react-ui-components/Guard/core/renderModule' {
529
- import React from 'react';
530
- import { GuardProps } from '@authing/react-ui-components/Guard/index';
531
- import '../styles.less';
532
- export enum LangMAP {
533
- zhCn = "zh-CN",
534
- enUs = "en-US"
535
- }
536
- export const RenderModule: React.FC<{
537
- guardProps: GuardProps;
538
- }>;
539
-
540
- }
541
- declare module '@authing/react-ui-components/Guard/core/useAppendConfig' {
542
- import { GuardAppendConfig } from '@authing/react-ui-components/index';
543
- export const getGuardWindow: () => (Window & typeof globalThis) | undefined;
544
- export const useGuardWindow: () => (Window & typeof globalThis) | undefined;
545
- export const useInitGuardAppendConfig: (setForceUpdate: any, appId?: string | undefined, appendConfig?: GuardAppendConfig | undefined) => void;
546
-
547
- }
548
- declare module '@authing/react-ui-components/Guard/core/usePlugin' {
549
- import { FacePlugin } from '@authing/react-ui-components/_utils/facePlugin/interface';
550
- export const useGuardPlugin: any;
551
- export const useGuardFacePlugin: (facePlugin?: FacePlugin | undefined) => boolean;
552
-
553
- }
554
- declare module '@authing/react-ui-components/Guard/event' {
555
- import { GuardModuleType } from '@authing/react-ui-components/Guard/index';
556
- import { CompleteInfoEvents } from '@authing/react-ui-components/CompleteInfo/interface';
557
- import { ForgetPasswordEvents } from '@authing/react-ui-components/ForgetPassword/interface';
558
- import { IdentityBindingEvents } from '@authing/react-ui-components/IdentityBinding/interface';
559
- import { IdentityBindingAskEvents } from '@authing/react-ui-components/IdentityBindingAsk/index';
560
- import { LoginEvents } from '@authing/react-ui-components/Login/interface';
561
- import { RegisterEvents } from '@authing/react-ui-components/Register/interface';
562
- export interface GuardEvents extends LoginEvents, RegisterEvents, CompleteInfoEvents, ForgetPasswordEvents, IdentityBindingEvents, IdentityBindingAskEvents {
563
- onBeforeChangeModule?: (key: GuardModuleType, initData?: any) => boolean | Promise<boolean>;
564
- }
565
- export const guardEventsFilter: (props: any, openEventsMapping?: boolean | undefined) => GuardEvents;
566
- export const guardEventsHijacking: (events: GuardEvents, openEventsMapping?: boolean | undefined) => GuardEvents;
567
- export const GuardEventsCamelToKebabMapping: {
568
- readonly onLoad: "load";
569
- readonly onLoadError: "load-error";
570
- readonly onLogin: "login";
571
- readonly onBeforeLogin: "before-login";
572
- readonly onLoginError: "login-error";
573
- readonly onRegister: "register";
574
- readonly onBeforeRegister: "before-register";
575
- readonly onRegisterError: "register-error";
576
- readonly onPwdEmailSend: "pwd-email-send";
577
- readonly onPwdEmailSendError: "pwd-email-send-error";
578
- readonly onPwdPhoneSend: "pwd-phone-send";
579
- readonly onPwdPhoneSendError: "pwd-phone-send-error";
580
- readonly onPwdReset: "pwd-reset";
581
- readonly onPwdResetError: "pwd-reset-error";
582
- readonly onClose: "close";
583
- readonly onLoginTabChange: "login-tab-change";
584
- readonly onRegisterTabChange: "register-tab-change";
585
- readonly onRegisterInfoCompleted: "register-info-completed";
586
- readonly onRegisterInfoCompletedError: "register-info-completed-error";
587
- readonly onLangChange: "lang-change";
588
- };
589
- export interface GuardEventsKebabToCamelType {
590
- load: GuardEvents['onLoad'];
591
- 'load-error': GuardEvents['onLoadError'];
592
- 'before-login': GuardEvents['onBeforeLogin'];
593
- login: GuardEvents['onLogin'];
594
- 'login-error': GuardEvents['onLoginError'];
595
- 'before-register': GuardEvents['onBeforeRegister'];
596
- register: GuardEvents['onRegister'];
597
- 'register-error': GuardEvents['onRegisterError'];
598
- 'pwd-email-send': GuardEvents['onPwdEmailSend'];
599
- 'pwd-email-send-error': GuardEvents['onPwdEmailSendError'];
600
- 'pwd-phone-send': GuardEvents['onPwdPhoneSend'];
601
- 'pwd-phone-send-error': GuardEvents['onPwdPhoneSendError'];
602
- 'pwd-reset': GuardEvents['onPwdReset'];
603
- 'pwd-reset-error': GuardEvents['onPwdResetError'];
604
- close: GuardEvents['onClose'];
605
- 'login-tab-change': GuardEvents['onLoginTabChange'];
606
- 'register-tab-change': GuardEvents['onRegisterTabChange'];
607
- 'register-info-completed': GuardEvents['onRegisterInfoCompleted'];
608
- 'register-info-completed-error': GuardEvents['onRegisterInfoCompletedError'];
609
- 'lang-change': GuardEvents['onLangChange'];
610
- }
611
-
612
- }
613
- declare module '@authing/react-ui-components/Guard/index' {
614
- export * from '@authing/react-ui-components/Guard/Guard';
615
- export * from '@authing/react-ui-components/Guard/module';
616
- export * from '@authing/react-ui-components/Guard/event';
617
- export * from '@authing/react-ui-components/Guard/config';
618
-
619
- }
620
- declare module '@authing/react-ui-components/Guard/module' {
621
- export enum GuardModuleType {
622
- ERROR = "error",
623
- LOGIN = "login",
624
- REGISTER = "register",
625
- MFA = "mfa",
626
- FORGET_PWD = "forgetPassword",
627
- FORCED_PASSWORD_RESET = "forcedPasswordReset",
628
- NOTICE_PASSWORD_RESET = "noticePasswordReset",
629
- FIRST_LOGIN_PASSWORD = "firstLoginPassword",
630
- UNSAFE_PASSWORD_RESET = "unsafePasswordReset",
631
- DOWNLOAD_AT = "downloadAT",
632
- BIND_TOTP = "bindTotp",
633
- ANY_QUESTIONS = "anyQuestions",
634
- LOGIN_COMPLETE_INFO = "loginCompleteInfo",
635
- REGISTER_PASSWORD = "registerPassword",
636
- REGISTER_COMPLETE_INFO = "registerCompleteInfo",
637
- RECOVERY_CODE = "recoveryCode",
638
- SUBMIT_SUCCESS = "submitSuccess",
639
- IDENTITY_BINDING_ASK = "identityBindingAsk",
640
- IDENTITY_BINDING = "identityBinding",
641
- SELF_UNLOCK = "selfUnlock"
642
- }
643
- export interface GuardModuleAction {
644
- action: string;
645
- module?: GuardModuleType;
646
- message?: string;
647
- initData?: any;
648
- }
649
-
650
- }
651
- declare module '@authing/react-ui-components/Guard/sso' {
652
- import { User } from 'authing-js-sdk';
653
- export interface SessionData {
654
- session: null | {
655
- _id: string;
656
- cookie: {
657
- originalMaxAge: number;
658
- expires: Date;
659
- secure: boolean;
660
- httpOnly: boolean;
661
- path: string;
662
- sameSite: string;
663
- };
664
- appId?: string;
665
- type: string;
666
- userId: string;
667
- };
668
- userInfo?: User;
669
- }
670
- export const trackSession: () => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<SessionData>>;
671
-
672
- }
673
- declare module '@authing/react-ui-components/GuardButton/GuardButton' {
674
- import React from 'react';
675
- import { ButtonProps } from 'antd/lib/button';
676
- import './styles.less';
677
- export interface GuardButtonProps extends ButtonProps {
678
- }
679
- export const GuardButton: React.FC<GuardButtonProps>;
680
-
681
- }
682
- declare module '@authing/react-ui-components/GuardButton/index' {
683
- export * from '@authing/react-ui-components/GuardButton/GuardButton';
684
-
685
- }
686
- declare module '@authing/react-ui-components/IconFont/iconfont' {
687
- export const GenerateSvg: (guardDocument: Document, svgString: string) => void;
688
-
689
- }
690
- declare module '@authing/react-ui-components/IconFont/index' {
691
- import React, { FC } from 'react';
692
- import './iconfont';
693
- import './style.less';
694
- export const IconFont: FC<{
695
- type: string;
696
- style?: React.CSSProperties;
697
- className?: string;
698
- }>;
699
-
700
- }
701
- declare module '@authing/react-ui-components/IconFont/useGuardIconfont' {
702
- export const useGuardIconfont: (cdnBase?: string | undefined, setError?: any) => boolean;
703
-
704
- }
705
- declare module '@authing/react-ui-components/IdentityBinding/IdentityBinding' {
706
- import React from 'react';
707
- import './styles.less';
708
- export const GuardIdentityBindingView: React.FC;
709
-
710
- }
711
- declare module '@authing/react-ui-components/IdentityBinding/businessRequest' {
712
- export enum IdentityBindingBusinessAction {
713
- PhoneCode = "phone-code",
714
- EmailCode = "emial-code",
715
- Password = "password"
716
- }
717
- export interface PhoneCodeParams {
718
- phone: string;
719
- code: string;
720
- phoneCountryCode?: string;
721
- }
722
- export interface EmailCodeParams {
723
- email: string;
724
- code: string;
725
- }
726
- export interface PasswordParams {
727
- account: string;
728
- password: string;
729
- captchaCode: string;
730
- }
731
- export enum IdentityBindingAction {
732
- CreateUser = "create-federation-account",
733
- BindByPassword = "bind-identity-by-password",
734
- BindByPhoneCode = "bind-identity-by-phone-code",
735
- BindByEmailCode = "bind-identity-by-email-code"
736
- }
737
- export const PhoneCode: (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
738
- export const EmailCode: (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
739
- export const Password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
740
- export const useIdentityBindingBusinessRequest: () => {
741
- "phone-code": (params: PhoneCodeParams) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
742
- "emial-code": (params: EmailCodeParams) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
743
- password: (params: PasswordParams) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
744
- };
745
-
746
- }
747
- declare module '@authing/react-ui-components/IdentityBinding/index' {
748
- export * from '@authing/react-ui-components/IdentityBinding/IdentityBinding';
749
- export * from '@authing/react-ui-components/IdentityBinding/interface';
750
-
751
- }
752
- declare module '@authing/react-ui-components/IdentityBinding/interface' {
753
- import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '@authing/react-ui-components/index';
754
- import { AuthenticationClient, User } from 'authing-js-sdk';
755
- import { GuardModuleType } from '@authing/react-ui-components/Guard/index';
756
- import { Agreement } from '@authing/react-ui-components/Type/application';
757
- export interface IdentityBindingConfig extends IG2Config {
758
- autoRegister?: boolean;
759
- publicKey?: string;
760
- agreementEnabled?: boolean;
761
- agreements?: Agreement[];
762
- }
763
- export interface IdentityBindingEvents extends IG2Events {
764
- onBinding?: (user: User, authClient: AuthenticationClient) => void;
765
- onBindingError?: (errorMessages: any) => void;
766
- onLogin?: (user: User, authClient: AuthenticationClient) => void;
767
- onLoginError?: (errorMessages: any) => void;
768
- }
769
- export interface GuardIdentityBindingProps extends IG2FCProps, IdentityBindingEvents {
770
- config?: Partial<IdentityBindingConfig>;
771
- }
772
- export interface GuardIdentityBindingInitData {
773
- methods: Array<'email' | 'username' | 'phone' | 'phone-code' | 'email-code'>;
774
- source?: GuardModuleType;
775
- }
776
- export interface GuardIdentityBindingViewProps extends GuardIdentityBindingProps, IG2FCViewProps {
777
- config: IdentityBindingConfig;
778
- initData: GuardIdentityBindingInitData;
779
- }
780
-
781
- }
782
- declare module '@authing/react-ui-components/IdentityBindingAsk/IdentityBindingAsk' {
783
- import React from 'react';
784
- import './styles.less';
785
- export const GuardIdentityBindingAskView: React.FC;
786
-
787
- }
788
- declare module '@authing/react-ui-components/IdentityBindingAsk/index' {
789
- export * from '@authing/react-ui-components/IdentityBindingAsk/IdentityBindingAsk';
790
- export * from '@authing/react-ui-components/IdentityBindingAsk/interface';
791
-
792
- }
793
- declare module '@authing/react-ui-components/IdentityBindingAsk/interface' {
794
- import { AuthenticationClient, User } from 'authing-js-sdk';
795
- import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '@authing/react-ui-components/index';
796
- export interface IdentityBindingAskConfig extends IG2Config {
797
- }
798
- export interface IdentityBindingAskEvents extends IG2Events {
799
- onLogin?: (user: User, authClient: AuthenticationClient) => void;
800
- onLoginError?: (errorMessages: any) => void;
801
- onCreate?: (user: User, authClient: AuthenticationClient) => void;
802
- onCreateError?: (errorMessages: any) => void;
803
- }
804
- export interface GuardIdentityBindingAskProps extends IG2FCProps, IdentityBindingAskEvents {
805
- config?: Partial<IdentityBindingAskConfig>;
806
- initData?: any;
807
- }
808
- export interface GuardIdentityBindingAskInitData {
809
- methods: 'email' | 'username' | 'phone' | 'phone-code' | 'email-code';
810
- }
811
- export interface GuardIdentityBindingAskViewProps extends GuardIdentityBindingAskProps, IG2FCViewProps {
812
- config: IdentityBindingAskConfig;
813
- initData: GuardIdentityBindingAskInitData;
814
- }
815
-
816
- }
817
- declare module '@authing/react-ui-components/ImagePro/index' {
818
- import React from 'react';
819
- import './styles.less';
820
- export interface ImageProProps extends React.ImgHTMLAttributes<HTMLImageElement> {
821
- src: string;
822
- className?: string;
823
- alt?: string;
824
- imgClassName?: string;
825
- size?: number | string;
826
- width?: number | string;
827
- height?: number | string;
828
- borderRadius?: number | string;
829
- noSpin?: boolean;
830
- }
831
- export const ImagePro: (props: ImageProProps) => JSX.Element;
832
-
833
- }
834
- declare module '@authing/react-ui-components/InputNumber/index' {
835
- import { InputProps } from 'antd/lib/input';
836
- import React from 'react';
837
- export interface InputNumberProps extends InputProps {
838
- }
839
- export const InputNumber: React.ForwardRefExoticComponent<InputNumberProps & React.RefAttributes<any>>;
840
-
841
- }
842
- declare module '@authing/react-ui-components/InputPassword/index' {
843
- import { Input } from 'antd';
844
- import { PasswordProps } from 'antd/lib/input';
845
- import React from 'react';
846
- export const InputPassword: React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<React.RefObject<Input>>>;
847
-
848
- }
849
- declare module '@authing/react-ui-components/Login/codemap' {
850
- import { GuardModuleAction } from '@authing/react-ui-components/Guard/module';
851
- export const codeMap: Record<number, GuardModuleAction>;
852
-
853
- }
854
- declare module '@authing/react-ui-components/Login/core/withAD' {
855
- /// <reference types="react" />
856
- import { Agreement } from '@authing/react-ui-components/Type/application';
857
- interface LoginWithADProps {
858
- publicKey: string;
859
- autoRegister?: boolean;
860
- onLoginSuccess: any;
861
- onLoginFailed: any;
862
- onBeforeLogin: any;
863
- agreements: Agreement[];
864
- }
865
- export const LoginWithAD: (props: LoginWithADProps) => JSX.Element;
866
- export {};
867
-
868
- }
869
- declare module '@authing/react-ui-components/Login/core/withAppQrcode' {
870
- /// <reference types="react" />
871
- interface LoginWithAppQrcodeProps {
872
- onLoginSuccess: any;
873
- canLoop: boolean;
874
- qrCodeScanOptions: any;
875
- }
876
- export const LoginWithAppQrcode: (props: LoginWithAppQrcodeProps) => JSX.Element;
877
- export {};
878
-
879
- }
880
- declare module '@authing/react-ui-components/Login/core/withLDAP' {
881
- /// <reference types="react" />
882
- import { Agreement } from '@authing/react-ui-components/Type/application';
883
- interface LoginWithLDAPProps {
884
- publicKey: string;
885
- autoRegister?: boolean;
886
- host?: string;
887
- onLoginSuccess: any;
888
- onLoginFailed: any;
889
- onBeforeLogin: any;
890
- agreements: Agreement[];
891
- }
892
- export const LoginWithLDAP: (props: LoginWithLDAPProps) => JSX.Element;
893
- export {};
894
-
895
- }
896
- declare module '@authing/react-ui-components/Login/core/withPassword/FormItemAccount' {
897
- import { FormItemProps } from 'antd/lib/form';
898
- import React from 'react';
899
- import { PasswordLoginMethods } from '@authing/react-ui-components/Type/application';
900
- export interface FormItemAccountProps extends FormItemProps {
901
- passwordLoginMethods: PasswordLoginMethods[];
902
- }
903
- export const FormItemAccount: React.FC<FormItemAccountProps>;
904
-
905
- }
906
- declare module '@authing/react-ui-components/Login/core/withPassword/GraphicVerifyCode' {
907
- import { InputProps } from 'antd/lib/input';
908
- import React from 'react';
909
- export interface GraphicVerifyCodeProps extends InputProps {
910
- verifyCodeUrl: string;
911
- changeCode: () => void;
912
- }
913
- export const GraphicVerifyCode: React.FC<GraphicVerifyCodeProps>;
914
-
915
- }
916
- declare module '@authing/react-ui-components/Login/core/withPassword/InputAccount' {
917
- import { InputProps } from 'antd/lib/input';
918
- import React from 'react';
919
- import { PasswordLoginMethods } from '@authing/react-ui-components/Type/application';
920
- export interface InputAccountProps extends InputProps {
921
- passwordLoginMethods: PasswordLoginMethods[];
922
- }
923
- export const InputAccount: React.FC<InputAccountProps>;
924
-
925
- }
926
- declare module '@authing/react-ui-components/Login/core/withPassword/index' {
927
- /// <reference types="react" />
928
- import { AuthingResponse } from '@authing/react-ui-components/_utils/http';
929
- import { Agreement, LoginMethods, PasswordLoginMethods } from '@authing/react-ui-components/Type/application';
930
- interface LoginWithPasswordProps {
931
- publicKey: string;
932
- autoRegister?: boolean;
933
- host?: string;
934
- onBeforeLogin?: any;
935
- onLoginSuccess?: any;
936
- onLoginFailed?: any;
937
- onLoginRequest?: (loginInfo: any) => Promise<AuthingResponse>;
938
- passwordLoginMethods: PasswordLoginMethods[];
939
- agreements: Agreement[];
940
- loginWay?: LoginMethods;
941
- submitButText?: string;
942
- saveIdentify?: (type: LoginMethods, identity: string) => void;
943
- }
944
- export const LoginWithPassword: (props: LoginWithPasswordProps) => JSX.Element;
945
- export {};
946
-
947
- }
948
- declare module '@authing/react-ui-components/Login/core/withVerifyCode/FormItemIdentify' {
949
- import { FormItemProps } from 'antd/lib/form';
950
- import React from 'react';
951
- import { VerifyLoginMethods } from '@authing/react-ui-components/Type/application';
952
- export interface FormItemIdentifyProps extends FormItemProps {
953
- checkRepeat?: boolean;
954
- checkExist?: boolean;
955
- methods: VerifyLoginMethods[];
956
- currentMethod: 'phone-code' | 'email-code';
957
- areaCode?: string;
958
- }
959
- export const FormItemIdentify: React.FC<FormItemIdentifyProps>;
960
-
961
- }
962
- declare module '@authing/react-ui-components/Login/core/withVerifyCode/InputInternationPhone' {
963
- import { InputProps } from 'antd/lib/input';
964
- import React from 'react';
965
- export interface InputInternationPhoneProps extends InputProps {
966
- areaCode: string;
967
- onAreaCodeChange: (areaCode: string) => void;
968
- }
969
- export const InputInternationPhone: React.FC<InputInternationPhoneProps>;
970
-
971
- }
972
- declare module '@authing/react-ui-components/Login/core/withVerifyCode/VirtualDropdown' {
973
- import React, { FC } from 'react';
974
- import './styles.less';
975
- export interface VirtualDropdownProps {
976
- value?: string;
977
- onChange?: (value: string) => void;
978
- style?: React.CSSProperties;
979
- }
980
- export const VirtualDropdown: FC<VirtualDropdownProps>;
981
-
982
- }
983
- declare module '@authing/react-ui-components/Login/core/withVerifyCode/index' {
984
- /// <reference types="react" />
985
- import './styles.less';
986
- export const LoginWithVerifyCode: (props: any) => JSX.Element;
987
-
988
- }
989
- declare module '@authing/react-ui-components/Login/core/withVerifyCode/inputIdentify' {
990
- import { InputProps } from 'antd/lib/input';
991
- import React from 'react';
992
- import { VerifyLoginMethods } from '@authing/react-ui-components/Type/application';
993
- export interface InputIdentifyProps extends InputProps {
994
- methods: VerifyLoginMethods[];
995
- }
996
- export const InputIdentify: React.FC<InputIdentifyProps>;
997
-
998
- }
999
- declare module '@authing/react-ui-components/Login/core/withWechatMiniQrcode' {
1000
- /// <reference types="react" />
1001
- interface LoginWithWechatMiniQrcodeProps {
1002
- onLoginSuccess: any;
1003
- canLoop: boolean;
1004
- qrCodeScanOptions: any;
1005
- }
1006
- export const LoginWithWechatMiniQrcode: (props: LoginWithWechatMiniQrcodeProps) => JSX.Element;
1007
- export {};
1008
-
1009
- }
1010
- declare module '@authing/react-ui-components/Login/core/withWechatmpQrcode' {
1011
- /// <reference types="react" />
1012
- interface LoginWithWechatmpQrcodeProps {
1013
- onLoginSuccess: any;
1014
- canLoop: boolean;
1015
- qrCodeScanOptions: any;
1016
- }
1017
- export const LoginWithWechatmpQrcode: (props: LoginWithWechatmpQrcodeProps) => JSX.Element;
1018
- export {};
1019
-
1020
- }
1021
- declare module '@authing/react-ui-components/Login/index' {
1022
- /// <reference types="react" />
1023
- import './styles.less';
1024
- export const GuardLoginView: () => JSX.Element;
1025
-
1026
- }
1027
- declare module '@authing/react-ui-components/Login/interface' {
1028
- import { IG2Config, IG2Events, IG2FCProps, IG2FCViewProps } from '@authing/react-ui-components/Type/index';
1029
- import { AuthenticationClient, SocialConnectionProvider, User } from 'authing-js-sdk';
1030
- import { QrCodeAuthenticationClient } from 'authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient';
1031
- import { Agreement, LoginMethods, PasswordLoginMethods } from '@authing/react-ui-components/Type/application';
1032
- export interface LoginConfig extends IG2Config {
1033
- autoRegister?: boolean;
1034
- disableResetPwd?: boolean;
1035
- disableRegister?: boolean;
1036
- defaultLoginMethod?: LoginMethods;
1037
- loginMethods?: LoginMethods[];
1038
- passwordLoginMethods?: PasswordLoginMethods[];
1039
- socialConnections?: SocialConnectionProvider[];
1040
- socialConnectionsBtnShape?: 'default' | 'button' | 'icon';
1041
- enterpriseConnections?: string[];
1042
- qrCodeScanOptions?: Parameters<QrCodeAuthenticationClient['startScanning']>[1];
1043
- publicKey?: string;
1044
- agreementEnabled?: boolean;
1045
- agreements?: Agreement[];
1046
- }
1047
- export interface LoginEvents extends IG2Events {
1048
- onLogin?: (user: User, authClient: AuthenticationClient) => void;
1049
- onLoginError?: (errorMessages: any) => void;
1050
- onLoginTabChange?: (activeTab: LoginMethods) => void;
1051
- onBeforeLogin?: (loginInfo: any, authClient: AuthenticationClient) => boolean | Promise<boolean>;
1052
- }
1053
- export interface GuardLoginProps extends IG2FCProps, LoginEvents {
1054
- config?: Partial<LoginConfig>;
1055
- }
1056
- export interface GuardLoginViewProps extends GuardLoginProps, IG2FCViewProps {
1057
- config: LoginConfig;
1058
- }
1059
- export interface GuardLoginInitData {
1060
- specifyDefaultLoginMethod?: LoginMethods;
1061
- _firstItemInitialValue?: string;
1062
- _lockMethod?: string;
1063
- }
1064
- export const getDefaultLoginConfig: () => LoginConfig;
1065
-
1066
- }
1067
- declare module '@authing/react-ui-components/Login/socialLogin/IdpButton/index' {
1068
- /// <reference types="react" />
1069
- export const IdpButton: (props: any) => JSX.Element | null;
1070
-
1071
- }
1072
- declare module '@authing/react-ui-components/Login/socialLogin/index' {
1073
- import React from 'react';
1074
- import './style.less';
1075
- import { GuardLocalConfig } from '@authing/react-ui-components/Guard/index';
1076
- import { ApplicationConfig, SocialConnectionItem } from '@authing/react-ui-components/Type/application';
1077
- export interface SocialLoginProps {
1078
- appId: string;
1079
- config: GuardLocalConfig;
1080
- onLoginFailed: any;
1081
- onLoginSuccess: any;
1082
- enterpriseConnectionObjs: ApplicationConfig['identityProviders'];
1083
- socialConnectionObjs: SocialConnectionItem[];
1084
- }
1085
- export const SocialLogin: React.FC<SocialLoginProps>;
1086
-
1087
- }
1088
- declare module '@authing/react-ui-components/Login/socialLogin/postMessage' {
1089
- import { AuthingResponse } from '@authing/react-ui-components/_utils/http';
1090
- export const usePostMessage: () => (evt: MessageEvent) => import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any> | {
1091
- code: any;
1092
- data: any;
1093
- onGuardHandling: undefined;
1094
- } | undefined;
1095
- export const useErrorHandling: () => (res: AuthingResponse) => import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>;
1096
-
1097
- }
1098
- declare module '@authing/react-ui-components/MFA/VerifyCodeInput/VerifyCodeFormItem' {
1099
- import { FormItemProps } from 'antd/lib/form';
1100
- import React from 'react';
1101
- import './style.less';
1102
- export interface VerifyCodeFormItemProps extends FormItemProps {
1103
- codeLength: number;
1104
- ruleKeyword?: string;
1105
- }
1106
- export const VerifyCodeFormItem: React.FC<VerifyCodeFormItemProps>;
1107
-
1108
- }
1109
- declare module '@authing/react-ui-components/MFA/VerifyCodeInput/index' {
1110
- import React, { FC } from 'react';
1111
- import './style.less';
1112
- interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
1113
- length?: number;
1114
- size?: string;
1115
- gutter?: string;
1116
- onEenter?: Function;
1117
- showDivider?: boolean;
1118
- onChange?: any;
1119
- value?: Array<number | string>;
1120
- onFinish?: any;
1121
- }
1122
- export const VerifyCodeInput: FC<VerifyCodeInputProps>;
1123
- export {};
1124
-
1125
- }
1126
- declare module '@authing/react-ui-components/MFA/businessRequest' {
1127
- export enum MfaBusinessAction {
1128
- VerifyEmail = "verify-email",
1129
- VerifySms = "verify-sms",
1130
- VerifyTotp = "verify-totp",
1131
- VerifyFace = "verify-face",
1132
- AssociateFace = "associate-face"
1133
- }
1134
- export const authFlow: (action: MfaBusinessAction, content: any) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1135
- interface VerifySmsContent {
1136
- phone: string;
1137
- code: string;
1138
- mfaToken?: string;
1139
- phoneCountryCode?: string;
1140
- }
1141
- interface VerifyEmailContent {
1142
- email: string;
1143
- code: string;
1144
- mfaToken?: string;
1145
- }
1146
- interface VerifyTotpContent {
1147
- totp: string;
1148
- mfaToken?: string;
1149
- }
1150
- interface VerifyFaceContent {
1151
- photo: string;
1152
- mfaToken?: string;
1153
- }
1154
- interface AssociateFaceContent {
1155
- photoA: string;
1156
- photoB: string;
1157
- isExternalPhoto?: boolean;
1158
- mfaToken?: string;
1159
- }
1160
- export const VerifyEmail: (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1161
- export const VerifySms: (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1162
- export const VerifyTotp: (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1163
- export const VerifyFace: (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1164
- export const AssociateFace: (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1165
- export const useMfaBusinessRequest: () => {
1166
- "verify-email": (content: VerifyEmailContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1167
- "verify-sms": (content: VerifySmsContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1168
- "verify-totp": (content: VerifyTotpContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1169
- "verify-face": (content: VerifyFaceContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1170
- "associate-face": (content: AssociateFaceContent) => Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<any>>;
1171
- };
1172
- export {};
1173
-
1174
- }
1175
- declare module '@authing/react-ui-components/MFA/codemap' {
1176
- import { GuardModuleAction } from '@authing/react-ui-components/Guard/module';
1177
- export const codeMap: Record<number, GuardModuleAction>;
1178
-
1179
- }
1180
- declare module '@authing/react-ui-components/MFA/core/email' {
1181
- import React from 'react';
1182
- import { MFAConfig } from '@authing/react-ui-components/MFA/interface';
1183
- interface BindMFAEmailProps {
1184
- mfaToken: string;
1185
- onBind: (email: string) => void;
1186
- config: any;
1187
- }
1188
- export const BindMFAEmail: React.FC<BindMFAEmailProps>;
1189
- interface VerifyMFAEmailProps {
1190
- email: string;
1191
- mfaToken: string;
1192
- onVerify: (code: number, data: any) => void;
1193
- sendCodeRef: React.RefObject<HTMLButtonElement>;
1194
- codeLength: number;
1195
- }
1196
- export const VerifyMFAEmail: React.FC<VerifyMFAEmailProps>;
1197
- export const MFAEmail: React.FC<{
1198
- mfaToken: string;
1199
- email?: string;
1200
- mfaLogin: any;
1201
- config: MFAConfig;
1202
- }>;
1203
- export {};
1204
-
1205
- }
1206
- declare module '@authing/react-ui-components/MFA/core/face' {
1207
- /// <reference types="react" />
1208
- export const MFAFace: (props: any) => JSX.Element;
1209
-
1210
- }
1211
- declare module '@authing/react-ui-components/MFA/core/face_deps' {
1212
- export const devicesConstraints: {
1213
- video: {
1214
- width: number;
1215
- height: number;
1216
- };
1217
- };
1218
- export const FACE_SCORE = 0.65;
1219
- export function getFaceDetectorOptions(): any;
1220
- export function getCurrentFaceDetectionNet(): any;
1221
- export function isFaceDetectionModelLoaded(): boolean;
1222
- export function dataURItoBlob(base64Data: any): Blob;
1223
-
1224
- }
1225
- declare module '@authing/react-ui-components/MFA/core/sms' {
1226
- import React from 'react';
1227
- import { GuardMFAInitData, MFAConfig } from '@authing/react-ui-components/MFA/interface';
1228
- export interface BindMFASmsProps {
1229
- mfaToken: string;
1230
- onBind: (phone: string) => void;
1231
- config: any;
1232
- areaCode: string;
1233
- setAreaCode: (areaCode: string) => void;
1234
- isInternationSms: boolean;
1235
- }
1236
- export const BindMFASms: React.FC<BindMFASmsProps>;
1237
- export interface VerifyMFASmsProps {
1238
- mfaToken: string;
1239
- phone: string;
1240
- onVerify: (code: number, data: any) => void;
1241
- sendCodeRef: React.RefObject<HTMLButtonElement>;
1242
- codeLength: number;
1243
- areaCode: string;
1244
- phoneCountryCode?: string;
1245
- isInternationSms: boolean;
1246
- userPhone?: string;
1247
- }
1248
- export const VerifyMFASms: React.FC<VerifyMFASmsProps>;
1249
- export const MFASms: React.FC<{
1250
- mfaLogin: any;
1251
- config: MFAConfig;
1252
- initData: GuardMFAInitData;
1253
- }>;
1254
-
1255
- }
1256
- declare module '@authing/react-ui-components/MFA/core/totp' {
1257
- import React from 'react';
1258
- import { GuardMFAInitData, MFAConfig } from '@authing/react-ui-components/MFA/interface';
1259
- export interface BindMFATotpProps {
1260
- initData: GuardMFAInitData;
1261
- changeModule: any;
1262
- }
1263
- export const BindMFATotp: React.FC<BindMFATotpProps>;
1264
- export interface VerifyMFATotpProps {
1265
- mfaToken: string;
1266
- mfaLogin: any;
1267
- changeModule: any;
1268
- }
1269
- export const VerifyMFATotp: React.FC<VerifyMFATotpProps>;
1270
- export interface MFATotpProps {
1271
- changeModule: any;
1272
- config: MFAConfig;
1273
- initData: GuardMFAInitData;
1274
- mfaLogin: any;
1275
- }
1276
- export const MFATotp: React.FC<MFATotpProps>;
1277
-
1278
- }
1279
- declare module '@authing/react-ui-components/MFA/index' {
1280
- import React from 'react';
1281
- import './styles.less';
1282
- interface MFABackStateContextType {
1283
- setMfaBackState: React.Dispatch<React.SetStateAction<string>>;
1284
- mfaBackState: string;
1285
- }
1286
- export const MFABackStateContext: React.Context<MFABackStateContextType | undefined>;
1287
- export const GuardMFAView: React.FC;
1288
- export {};
1289
-
1290
- }
1291
- declare module '@authing/react-ui-components/MFA/interface' {
1292
- import { IG2Config, IG2Events, IG2FCProps } from '@authing/react-ui-components/Type/index';
1293
- import { AuthenticationClient, User } from 'authing-js-sdk';
1294
- export interface MFAConfig extends IG2Config {
1295
- autoRegister: boolean;
1296
- }
1297
- export const getDefaultMFAConfig: () => MFAConfig;
1298
- export interface MFAEvents extends IG2Events {
1299
- onLogin?: (user: User, authClient: AuthenticationClient) => void;
1300
- }
1301
- export enum MFAType {
1302
- SMS = "SMS",
1303
- EMAIL = "EMAIL",
1304
- TOTP = "OTP",
1305
- FACE = "FACE"
1306
- }
1307
- export interface GuardMFAInitData {
1308
- mfaToken: string;
1309
- applicationMfa: {
1310
- mfaPolicy: MFAType;
1311
- sort: number;
1312
- status: 0 | 1;
1313
- }[];
1314
- phoneCountryCode?: string;
1315
- faceMfaEnabled: boolean;
1316
- totpMfaEnabled: boolean;
1317
- email?: string;
1318
- phone?: string;
1319
- avatar?: string;
1320
- nickme?: string;
1321
- username?: string;
1322
- current?: MFAType;
1323
- }
1324
- export interface GuardMFAProps extends IG2FCProps, MFAEvents {
1325
- config: Partial<MFAConfig>;
1326
- initData: GuardMFAInitData;
1327
- }
1328
- export interface GuardMFAViewProps extends GuardMFAProps {
1329
- config: MFAConfig;
1330
- initData: GuardMFAInitData;
1331
- }
1332
-
1333
- }
1334
- declare module '@authing/react-ui-components/MFA/mfaMethods/index' {
1335
- import React from 'react';
1336
- import { MFAType } from '@authing/react-ui-components/MFA/interface';
1337
- import './style.less';
1338
- export interface MFAMethodsProps {
1339
- method: MFAType;
1340
- onChangeMethod: (type: MFAType) => void;
1341
- }
1342
- export const MFAMethods: React.FC<MFAMethodsProps>;
1343
-
1344
- }
1345
- declare module '@authing/react-ui-components/NeedHelpView/core/describeQuestions' {
1346
- /// <reference types="react" />
1347
- interface describeQuestionsProps {
1348
- appId: string;
1349
- host: string;
1350
- onSuccess: any;
1351
- }
1352
- export const DescribeQuestions: (props: describeQuestionsProps) => JSX.Element;
1353
- export {};
1354
-
1355
- }
1356
- declare module '@authing/react-ui-components/NeedHelpView/index' {
1357
- /// <reference types="react" />
1358
- export const GuardNeedHelpView: (props: any) => JSX.Element;
1359
-
1360
- }
1361
- declare module '@authing/react-ui-components/RecoveryCode/businessRequest' {
1362
- export enum TotpRecoveryCodeBusinessAction {
1363
- RecoveryTotp = "recovery-totp",
1364
- ConfirmTotpRecoveryCode = "confirm-totp-recovery-code"
1365
- }
1366
- export function authFlow<T>(action: TotpRecoveryCodeBusinessAction, content: any): Promise<import("@authing/react-ui-components/_utils/http").AuthingGuardResponse<T>>;
1367
-
1368
- }
1369
- declare module '@authing/react-ui-components/RecoveryCode/core/saveCode' {
1370
- import React from 'react';
1371
- export const SaveCode: React.FC<{
1372
- secret: string;
1373
- onBind: any;
1374
- }>;
1375
-
1376
- }
1377
- declare module '@authing/react-ui-components/RecoveryCode/core/useCode' {
1378
- import React from 'react';
1379
- import { User } from 'authing-js-sdk';
1380
- export interface UseCodeProps {
1381
- mfaToken: string;
1382
- onSubmit: (recoveryCode: string, user?: User) => void;
1383
- }
1384
- export const UseCode: React.FC<UseCodeProps>;
1385
-
1386
- }
1387
- declare module '@authing/react-ui-components/RecoveryCode/index' {
1388
- import React from 'react';
1389
- import './style.less';
1390
- export const RecoveryCode: React.FC;
1391
- export const RecoveryCodeAuthFlow: React.FC;
1392
- export const GuardRecoveryCodeView: React.FC;
1393
-
1394
- }
1395
- declare module '@authing/react-ui-components/RecoveryCode/interface' {
1396
- import { IG2Config, IG2Events } from '@authing/react-ui-components/Type/index';
1397
- import { AuthenticationClient, User } from 'authing-js-sdk';
1398
- export interface RecoveryCodeConfig extends IG2Config {
1399
- }
1400
- export const getDefaultRecoveryCodeConfig: () => RecoveryCodeConfig;
1401
- export interface RecoveryCodeEvents extends IG2Events {
1402
- onLogin?: (user: User, authClient: AuthenticationClient) => void;
1403
- }
1404
-
1405
- }
1406
- declare module '@authing/react-ui-components/Register/codemap' {
1407
- import { GuardModuleAction } from '@authing/react-ui-components/Guard/module';
1408
- export const codeMap: Record<number, GuardModuleAction>;
1409
-
1410
- }
1411
- declare module '@authing/react-ui-components/Register/components/Agreements/index' {
1412
- import React, { FC } from 'react';
1413
- import './style.less';
1414
- import { Agreement } from '@authing/react-ui-components/Type/application';
1415
- export interface AgreementsProps {
1416
- value?: boolean;
1417
- onChange?: (value: boolean) => void;
1418
- style?: React.CSSProperties;
1419
- agreements: Agreement[];
1420
- showError?: boolean;
1421
- }
1422
- export const Agreements: FC<AgreementsProps>;
1423
-
1424
- }
1425
- declare module '@authing/react-ui-components/Register/core/WithCode' {
1426
- import React from 'react';
1427
- import { Agreement, ApplicationConfig } from '@authing/react-ui-components/Type/application';
1428
- export interface RegisterWithCodeProps {
1429
- onRegisterSuccess: Function;
1430
- onRegisterFailed: Function;
1431
- onBeforeRegister?: Function;
1432
- agreements: Agreement[];
1433
- publicConfig?: ApplicationConfig;
1434
- registeContext?: any;
1435
- methods: any[];
1436
- }
1437
- export const RegisterWithCode: React.FC<RegisterWithCodeProps>;
1438
-
1439
- }
1440
- declare module '@authing/react-ui-components/Register/core/WithEmail' {
1441
- import React from 'react';
1442
- import { Agreement, ApplicationConfig } from '@authing/react-ui-components/Type/application';
1443
- export interface RegisterWithEmailProps {
1444
- onRegisterSuccess: Function;
1445
- onRegisterFailed: Function;
1446
- onBeforeRegister?: Function;
1447
- publicConfig?: ApplicationConfig;
1448
- agreements: Agreement[];
1449
- registeContext?: any;
1450
- }
1451
- export const RegisterWithEmail: React.FC<RegisterWithEmailProps>;
1452
-
1453
- }
1454
- declare module '@authing/react-ui-components/Register/core/WithEmailCode' {
1455
- import React from 'react';
1456
- import { Agreement, ApplicationConfig } from '@authing/react-ui-components/Type/application';
1457
- export interface RegisterWithEmailCodeProps {
1458
- onRegisterSuccess: Function;
1459
- onRegisterFailed: Function;
1460
- onBeforeRegister?: Function;
1461
- agreements: Agreement[];
1462
- publicConfig?: ApplicationConfig;
1463
- registeContext?: any;
1464
- }
1465
- export const RegisterWithEmailCode: React.FC<RegisterWithEmailCodeProps>;
1466
-
1467
- }
1468
- declare module '@authing/react-ui-components/Register/core/WithPhone' {
1469
- import React from 'react';
1470
- import { Agreement, ApplicationConfig } from '@authing/react-ui-components/Type/application';
1471
- export interface RegisterWithPhoneProps {
1472
- onRegisterSuccess: Function;
1473
- onRegisterFailed: Function;
1474
- agreements: Agreement[];
1475
- publicConfig?: ApplicationConfig;
1476
- registeContext?: any;
1477
- }
1478
- export const RegisterWithPhone: React.FC<RegisterWithPhoneProps>;
1479
-
1480
- }
1481
- declare module '@authing/react-ui-components/Register/index' {
1482
- import React from 'react';
1483
- export const GuardRegisterView: React.FC;
1484
-
1485
- }
1486
- declare module '@authing/react-ui-components/Register/interface' {
1487
- import { AuthenticationClient, User } from 'authing-js-sdk';
1488
- import { IG2FCProps, IG2Config, IG2Events } from '@authing/react-ui-components/Type/index';
1489
- import { Agreement, RegisterMethods } from '@authing/react-ui-components/Type/application';
1490
- export interface RegisterConfig extends IG2Config {
1491
- disableRegister?: boolean;
1492
- registerMethods?: RegisterMethods[];
1493
- defaultRegisterMethod?: RegisterMethods;
1494
- publicKey?: string;
1495
- agreementEnabled?: boolean;
1496
- agreements?: Agreement[];
1497
- registerContext?: any;
1498
- }
1499
- export interface RegisterEvents extends IG2Events {
1500
- onBeforeRegister?: (registerInfo: any, authClient: AuthenticationClient) => boolean | Promise<boolean>;
1501
- onRegister?: (user: User, authClient: AuthenticationClient) => void;
1502
- onRegisterError?: (error: any) => void;
1503
- onRegisterTabChange?: (activeTab: RegisterMethods) => void;
1504
- }
1505
- export interface GuardRegisterProps extends IG2FCProps, RegisterEvents {
1506
- config?: Partial<RegisterConfig>;
1507
- }
1508
- export interface GuardRegisterViewProps extends GuardRegisterProps {
1509
- config: RegisterConfig;
1510
- }
1511
- export const getDefaultRegisterConfig: () => RegisterConfig;
1512
-
1513
- }
1514
- declare module '@authing/react-ui-components/Register/utils' {
1515
- export const useIsChangeComplete: (currentMode: 'phone' | 'email') => boolean;
1516
-
1517
- }
1518
- declare module '@authing/react-ui-components/SelfUnlock/core/selfUnlock' {
1519
- import React from 'react';
1520
- export enum InputMethodMap {
1521
- email = "email-code",
1522
- phone = "phone-code"
1523
- }
1524
- export const SelfUnlock: ({ identifyRef, }: {
1525
- identifyRef?: React.MutableRefObject<string> | undefined;
1526
- }) => JSX.Element;
1527
-
1528
- }
1529
- declare module '@authing/react-ui-components/SelfUnlock/index' {
1530
- import React from 'react';
1531
- export const GuardUnlockView: React.FC;
1532
-
1533
- }
1534
- declare module '@authing/react-ui-components/SelfUnlock/interface' {
1535
- import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
1536
- import { IG2Config, IG2Events, IG2FCProps } from '@authing/react-ui-components/Type/index';
1537
- export interface ForgetPasswordEvents extends IG2Events {
1538
- onPwdEmailSend?: (authClient: AuthenticationClient) => void;
1539
- onPwdEmailSendError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
1540
- onPwdPhoneSend?: (authClient: AuthenticationClient) => void;
1541
- onPwdPhoneSendError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
1542
- onPwdReset?: (authClient: AuthenticationClient) => void;
1543
- onPwdResetError?: (error: CommonMessage, authClient: AuthenticationClient) => void;
1544
- }
1545
- export interface ForgetPasswordConfig extends IG2Config {
1546
- }
1547
- export interface ForgetPasswordProps extends IG2FCProps, ForgetPasswordEvents {
1548
- config: Partial<IG2Config>;
1549
- }
1550
-
1551
- }
1552
- declare module '@authing/react-ui-components/SendCode/SendCodeBtn' {
1553
- import React, { FC } from 'react';
1554
- import './style.less';
1555
- import { ButtonProps } from 'antd/lib/button';
1556
- export interface SendCodeProps extends ButtonProps {
1557
- beforeSend: () => Promise<boolean>;
1558
- btnRef?: React.RefObject<HTMLButtonElement>;
1559
- setSent?: (value: boolean) => void;
1560
- sendDesc?: string;
1561
- }
1562
- export const SendCodeBtn: FC<SendCodeProps>;
1563
-
1564
- }
1565
- declare module '@authing/react-ui-components/SendCode/SendCodeByEmail' {
1566
- import { FC } from 'react';
1567
- import './style.less';
1568
- import { InputProps } from 'antd/lib/input';
1569
- import { EmailScene } from '@authing/react-ui-components/Type/index';
1570
- export interface SendCodeByEmailProps extends InputProps {
1571
- data?: string;
1572
- form?: any;
1573
- onSendCodeBefore?: any;
1574
- fieldName?: string;
1575
- autoSubmit?: boolean;
1576
- scene: EmailScene;
1577
- }
1578
- export const SendCodeByEmail: FC<SendCodeByEmailProps>;
1579
-
1580
- }
1581
- declare module '@authing/react-ui-components/SendCode/SendCodeByPhone' {
1582
- import { FC } from 'react';
1583
- import { SceneType } from 'authing-js-sdk';
1584
- import './style.less';
1585
- import { InputProps } from 'antd/lib/input';
1586
- export interface SendCodeByPhoneProps extends InputProps {
1587
- data?: string;
1588
- form?: any;
1589
- onSendCodeBefore?: any;
1590
- fieldName?: string;
1591
- autoSubmit?: boolean;
1592
- scene: SceneType;
1593
- areaCode?: string;
1594
- isInternationSms?: boolean;
1595
- }
1596
- export const SendCodeByPhone: FC<SendCodeByPhoneProps>;
1597
-
1598
- }
1599
- declare module '@authing/react-ui-components/SendCode/index' {
1600
- import { FC } from 'react';
1601
- import './style.less';
1602
- import { InputProps } from 'antd/lib/input';
1603
- export interface SendPhoneCodeProps extends InputProps {
1604
- form?: any;
1605
- beforeSend?: any;
1606
- autoSubmit?: boolean;
1607
- }
1608
- export const SendCode: FC<SendPhoneCodeProps>;
1609
-
1610
- }
1611
- declare module '@authing/react-ui-components/ShieldSpin/index' {
1612
- /// <reference types="react" />
1613
- interface IG2SpinProps {
1614
- size?: number;
1615
- }
1616
- export const ShieldSpin: (props: IG2SpinProps) => JSX.Element;
1617
- export const Spin: () => JSX.Element;
1618
- export {};
1619
-
1620
- }
1621
- declare module '@authing/react-ui-components/SingleComponent/SingleComponent' {
1622
- /// <reference types="react" />
1623
- import { GuardModuleType, IG2FCProps } from '@authing/react-ui-components/index';
1624
- export function SingleComponent<T extends IG2FCProps>(props: T, guardModuleType: GuardModuleType, initData?: any): JSX.Element;
1625
-
1626
- }
1627
- declare module '@authing/react-ui-components/SingleComponent/index' {
1628
- import React from 'react';
1629
- import { GuardRegisterProps } from '@authing/react-ui-components/Register/interface';
1630
- export const Register: React.FC<GuardRegisterProps>;
1631
-
1632
- }
1633
- declare module '@authing/react-ui-components/SubmitButton/index' {
1634
- import React from 'react';
1635
- import { ButtonProps } from 'antd/lib/button';
1636
- interface SubmitButtonProps extends ButtonProps {
1637
- text?: string;
1638
- className?: string;
1639
- onClick?: any;
1640
- disabled?: boolean;
1641
- }
1642
- const _default: React.ForwardRefExoticComponent<SubmitButtonProps & React.RefAttributes<unknown>>;
1643
- export default _default;
1644
-
1645
- }
1646
- declare module '@authing/react-ui-components/SubmitSuccess/index' {
1647
- import React from 'react';
1648
- export const GuardSubmitSuccessView: React.FC;
1649
-
1650
- }
1651
- declare module '@authing/react-ui-components/SubmitSuccess/interface' {
1652
- import { GuardModuleType } from '@authing/react-ui-components/Guard/index';
1653
- import { IG2Config, IG2Events, IG2FCViewProps } from '@authing/react-ui-components/Type/index';
1654
- export interface SubmitSuccessEvents extends IG2Events {
1655
- }
1656
- export interface SubmitSuccessConfig extends IG2Config {
1657
- }
1658
- export interface SubmitSuccessInitData {
1659
- title?: string;
1660
- message?: string;
1661
- text?: string;
1662
- countDesc?: string;
1663
- changeModule?: GuardModuleType;
1664
- }
1665
- export interface GuardSubmitSuccessViewProps extends IG2FCViewProps, SubmitSuccessEvents {
1666
- config: SubmitSuccessConfig;
1667
- initData?: SubmitSuccessInitData;
1668
- }
1669
-
1670
- }
1671
- declare module '@authing/react-ui-components/Type/application' {
1672
- import { Lang } from '@authing/react-ui-components/index';
1673
- import { PasswordStrength } from '@authing/react-ui-components/_utils/index';
1674
- export enum LoginMethods {
1675
- LDAP = "ldap",
1676
- AppQr = "app-qrcode",
1677
- Password = "password",
1678
- PhoneCode = "phone-code",
1679
- WxMinQr = "wechat-miniprogram-qrcode",
1680
- AD = "ad",
1681
- WechatMpQrcode = "wechatmp-qrcode"
1682
- }
1683
- export enum OIDCConnectionMode {
1684
- FRONT_CHANNEL = "FRONT_CHANNEL",
1685
- BACK_CHANNEL = "BACK_CHANNEL"
1686
- }
1687
- export enum SocialConnectionProvider {
1688
- ALIPAY = "alipay",
1689
- GOOGLE = "google",
1690
- WECHATPC = "wechat:pc",
1691
- WECHATMP = "wechat:webpage-authorization",
1692
- WECHAT_MINIPROGRAM = "wechat:miniprogram:default",
1693
- WECHAT_MINIPROGRAM_QRCODE = "wechat:miniprogram:qrconnect",
1694
- WECHAT_MINIPROGRAM_APPLAUNCH = "wechat:miniprogram:app-launch",
1695
- WECHATMOBILE = "wechat:mobile",
1696
- GITHUB = "github",
1697
- QQ = "qq",
1698
- WECHATWORK_ADDRESS_BOOK = "wechatwork:addressbook",
1699
- WECHATWORK_CORP_QRCONNECT = "wechatwork:corp:qrconnect",
1700
- WECHATWORK_SERVICEPROVIDER_QRCONNECT = "wechatwork:service-provider:qrconnect",
1701
- DINGTALK = "dingtalk",
1702
- WEIBO = "weibo",
1703
- APPLE = "apple",
1704
- APPLE_WEB = "apple:web",
1705
- LARK_PUBLIC = "lark-public",
1706
- LARK_INTERNAL = "lark-internal",
1707
- BAIDU = "baidu",
1708
- LINKEDIN = "linkedin",
1709
- SLACK = "slack",
1710
- YIDUN = "yidun",
1711
- QINGCLOUD = "qingcloud",
1712
- FACEBOOK = "facebook"
1713
- }
1714
- export enum Protocol {
1715
- AD = "ad",
1716
- CAS = "cas",
1717
- LDAP = "ldap",
1718
- OIDC = "oidc",
1719
- SAML = "saml",
1720
- OAUTH = "oauth",
1721
- AZURE_AD = "azure-ad"
1722
- }
1723
- export interface IOAuthConnectionConfig {
1724
- authEndPoint: string;
1725
- tokenEndPoint: string;
1726
- scope: string;
1727
- clientId: string;
1728
- clientSecret: string;
1729
- authUrlTemplate: string;
1730
- codeToTokenScript: string;
1731
- tokenToUserInfoScript: string;
1732
- tokenToUserInfoScriptFuncId: string;
1733
- codeToTokenScriptFuncId: string;
1734
- authUrl?: string;
1735
- }
1736
- export interface IAzureAdConnectionConfig {
1737
- microsoftAzureAdDomain: string;
1738
- clientId: string;
1739
- syncUserProfileOnLogin: string;
1740
- emailVerifiedDefault: boolean;
1741
- authorizationUrl: string;
1742
- callbackUrl: string;
1743
- }
1744
- export interface ISamlConnectionConfig {
1745
- signInEndPoint: string;
1746
- samlRequest?: string;
1747
- samlIdpCert: string;
1748
- samlSpCert: string;
1749
- samlSpKey: string;
1750
- signOutEndPoint: string;
1751
- signSamlRequest: boolean;
1752
- signatureAlgorithm: string;
1753
- digestAlgorithm: string;
1754
- protocolBinding: string;
1755
- }
1756
- export interface ICasConnectionConfig {
1757
- casConnectionLoginUrl: string;
1758
- }
1759
- export interface SocialConnectionItem {
1760
- name: string;
1761
- name_en: string;
1762
- displayName: string;
1763
- logo: string;
1764
- description: string;
1765
- identifier: string;
1766
- provider: SocialConnectionProvider;
1767
- authorizationUrl: string;
1768
- tooltip: Record<Lang, string>;
1769
- }
1770
- export enum RegisterMethods {
1771
- Email = "email",
1772
- Phone = "phone",
1773
- EmailCode = "emailCode"
1774
- }
1775
- export type QrcodeTabsSettings = Record<LoginMethods, Array<{
1776
- id: string;
1777
- title: string;
1778
- isDefault?: boolean;
1779
- }>>;
1780
- export interface OidcClientMetadata {
1781
- grant_types: string[];
1782
- client_id: string;
1783
- redirect_uris: string[];
1784
- scope: string;
1785
- response_types: ResponseType[];
1786
- }
1787
- export interface OIDCConnectionConfig {
1788
- issuerUrl: string;
1789
- authorizationEdpoint: string;
1790
- responseType: string;
1791
- mode: OIDCConnectionMode;
1792
- clientId: string;
1793
- clientSecret: string;
1794
- scopes: string;
1795
- redirectUri: string;
1796
- }
1797
- export interface InternalExtendsField {
1798
- type: 'internal';
1799
- name: string;
1800
- label: string;
1801
- inputType: string;
1802
- required: boolean;
1803
- validateRules: any[];
1804
- }
1805
- export interface UserExtendsField {
1806
- type: 'user';
1807
- id: string;
1808
- name: string;
1809
- label: string;
1810
- inputType: string;
1811
- required: boolean;
1812
- validateRules: any[];
1813
- }
1814
- export type ExtendsField = InternalExtendsField | UserExtendsField;
1815
- export interface ApplicationPasswordTabConfig {
1816
- enabledLoginMethods?: PasswordLoginMethods[];
1817
- }
1818
- export interface ApplicationVerifyCodeTabConfig {
1819
- enabledLoginMethods: VerifyLoginMethods[];
1820
- }
1821
- export interface Agreement {
1822
- id: number;
1823
- title: string;
1824
- required: boolean;
1825
- lang: Lang;
1826
- availableAt?: number;
1827
- }
1828
- export type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
1829
- export type VerifyLoginMethods = 'email-code' | 'phone-code';
1830
- export type ComplateFiledsPlace = 'register' | 'login';
1831
- export interface ApplicationConfig {
1832
- id: string;
1833
- allowedOrigins: string[];
1834
- corsWhitelist: string[];
1835
- cdnBase: string;
1836
- userPoolId: string;
1837
- rootUserPoolId: string;
1838
- publicKey: string;
1839
- internationalSmsConfig?: {
1840
- enabled: boolean;
1841
- defaultISOType: string;
1842
- };
1843
- css: string;
1844
- customLoading?: string;
1845
- name: string;
1846
- logo: string;
1847
- description?: string;
1848
- redirectUris: string[];
1849
- registerDisabled: boolean;
1850
- mergeAdAndAccountPasswordLogin: boolean;
1851
- registerTabs: {
1852
- list: string[];
1853
- default: string;
1854
- title: {
1855
- [x: string]: string;
1856
- };
1857
- };
1858
- registerTabsConfig: {
1859
- list: string[];
1860
- default: string;
1861
- title: {
1862
- [x: string]: string;
1863
- };
1864
- registerTypeConfig: {
1865
- emailRegisterType?: RegisterMethods[];
1866
- phoneRegisterType?: RegisterMethods[];
1867
- };
1868
- };
1869
- qrcodeTabsSettings: QrcodeTabsSettings;
1870
- loginTabs: {
1871
- list: string[];
1872
- default: string;
1873
- defaultV2?: string;
1874
- title: {
1875
- [x: string]: string;
1876
- };
1877
- };
1878
- socialConnections: SocialConnectionItem[];
1879
- complateFiledsPlace: ComplateFiledsPlace[];
1880
- extendsFieldsEnabled: boolean;
1881
- extendsFields: ExtendsField[];
1882
- identifier: string;
1883
- requestHostname: string;
1884
- identityProviders: {
1885
- identifier: string;
1886
- protocol: Protocol;
1887
- displayName: string;
1888
- logo: string;
1889
- config: ISamlConnectionConfig | OIDCConnectionConfig | ICasConnectionConfig | IAzureAdConnectionConfig | IOAuthConnectionConfig;
1890
- }[];
1891
- ssoPageComponentDisplay: {
1892
- autoRegisterThenLoginHintInfo: boolean;
1893
- forgetPasswordBtn: boolean;
1894
- idpBtns: boolean;
1895
- loginBtn: boolean;
1896
- loginByPhoneCodeTab: boolean;
1897
- loginByUserPasswordTab: boolean;
1898
- loginMethodNav: boolean;
1899
- phoneCodeInput: boolean;
1900
- registerBtn: boolean;
1901
- registerByEmailTab: boolean;
1902
- registerByPhoneTab: boolean;
1903
- registerMethodNav: boolean;
1904
- socialLoginBtns: boolean;
1905
- userPasswordInput: boolean;
1906
- wxMpScanTab: boolean;
1907
- };
1908
- protocol: Protocol;
1909
- oidcConfig: OidcClientMetadata;
1910
- passwordTabConfig: ApplicationPasswordTabConfig;
1911
- verifyCodeTabConfig?: ApplicationVerifyCodeTabConfig;
1912
- agreementEnabled: boolean;
1913
- agreements: Agreement[];
1914
- customPasswordStrength: any;
1915
- passwordStrength: PasswordStrength;
1916
- verifyCodeLength: number;
1917
- websocket: string;
1918
- welcomeMessage: any;
1919
- skipComplateFileds: boolean;
1920
- selfUnlockStrategy: 'captcha' | 'password-captcha';
1921
- }
1922
-
1923
- }
1924
- declare module '@authing/react-ui-components/Type/index' {
1925
- import { AuthenticationClient, CommonMessage } from 'authing-js-sdk';
1926
- import { GuardModuleType } from '@authing/react-ui-components/Guard/module';
1927
- import { FacePlugin } from '@authing/react-ui-components/_utils/facePlugin/interface';
1928
- import { ApplicationConfig } from '@authing/react-ui-components/Type/application';
1929
- export type Lang = 'zh-CN' | 'en-US';
1930
- export enum GuardMode {
1931
- Modal = "modal",
1932
- Normal = "normal"
1933
- }
1934
- export interface IG2FCProps extends IG2Events {
1935
- appId?: string;
1936
- tenantId?: string;
1937
- config?: Partial<IG2Config>;
1938
- visible?: boolean;
1939
- initData?: any;
1940
- appendConfig?: GuardAppendConfig;
1941
- facePlugin?: FacePlugin;
1942
- authClient?: AuthenticationClient;
1943
- }
1944
- export interface GuardAppendConfig {
1945
- internalRequest?: boolean;
1946
- singleComponent?: boolean;
1947
- unAuthFlow?: boolean;
1948
- publicConfig?: ApplicationConfig;
1949
- pageConfig?: GuardPageConfig;
1950
- }
1951
- export interface IG2FCViewProps extends IG2FCProps {
1952
- config: IG2Config;
1953
- }
1954
- export interface IG2Config {
1955
- title?: string;
1956
- logo?: string;
1957
- lang: string;
1958
- langRange: string[];
1959
- host: string;
1960
- isHost?: boolean;
1961
- mode: GuardMode;
1962
- clickCloseable: boolean;
1963
- escCloseable: boolean;
1964
- userpool?: string;
1965
- contentCss?: string;
1966
- target?: HTMLElement | string;
1967
- __internalRequest__?: boolean;
1968
- __singleComponent__?: boolean;
1969
- __unAuthFlow__?: boolean;
1970
- }
1971
- export interface IG2Events {
1972
- onLoad?: (authClient: AuthenticationClient) => void;
1973
- onLoadError?: (error: CommonMessage) => void;
1974
- onClose?: () => void;
1975
- onLangChange?: (lang: Lang) => void;
1976
- __changeModule?: (moduleName: GuardModuleType, initData?: any) => void;
1977
- }
1978
- export const getDefaultG2Config: () => IG2Config;
1979
- export const LanguageMap: any;
1980
- export enum InputMethod {
1981
- EmailCode = "email-code",
1982
- PhoneCode = "phone-code"
1983
- }
1984
- export enum GuardPageSene {
1985
- Global = "global"
1986
- }
1987
- export interface GuardPageConfig {
1988
- [GuardPageSene.Global]: {
1989
- showChangeLanguage: boolean;
1990
- };
1991
- }
1992
- export enum EmailScene {
1993
- WELCOME_EMAIL = "WELCOME_EMAIL",
1994
- FIRST_CREATED_USER = "FIRST_CREATED_USER",
1995
- REGISTER_VERIFY_CODE = "REGISTER_VERIFY_CODE",
1996
- LOGIN_VERIFY_CODE = "LOGIN_VERIFY_CODE",
1997
- MFA_VERIFY_CODE = "MFA_VERIFY_CODE",
1998
- INFORMATION_COMPLETION_VERIFY_CODE = "INFORMATION_COMPLETION_VERIFY_CODE",
1999
- FIRST_EMAIL_LOGIN_VERIFY = "FIRST_EMAIL_LOGIN_VERIFY",
2000
- CONSOLE_CONDUCTED_VERIFY = "CONSOLE_CONDUCTED_VERIFY",
2001
- RESET_PASSWORD_VERIFY_CODE = "RESET_PASSWORD_VERIFY_CODE",
2002
- EMAIL_BIND_VERIFY_CODE = "EMAIL_BIND_VERIFY_CODE",
2003
- EMAIL_UNBIND_VERIFY_CODE = "EMAIL_UNBIND_VERIFY_CODE",
2004
- SELF_UNLOCKING_VERIFY_CODE = "SELF_UNLOCKING_VERIFY_CODE"
2005
- }
2006
-
2007
- }
2008
- declare module '@authing/react-ui-components/UploadImage/index' {
2009
- import { FC } from 'react';
2010
- export const UploadImage: FC<{
2011
- value?: string;
2012
- onChange?: (value: string) => void;
2013
- }>;
2014
-
2015
- }
2016
- declare module '@authing/react-ui-components/ValidatorRules/PasswordFormItem' {
2017
- import React from 'react';
2018
- import { PasswordFormItemProps } from '@authing/react-ui-components/ValidatorRules/index';
2019
- export interface ExPasswordFormItemProps extends PasswordFormItemProps {
2020
- fieldRequiredRuleMessage?: string;
2021
- }
2022
- export const PasswordFormItem: React.FC<ExPasswordFormItemProps>;
2023
-
2024
- }
2025
- declare module '@authing/react-ui-components/ValidatorRules/ValidatorFormItem' {
2026
- import React from 'react';
2027
- import { ValidatorFormItemProps } from '@authing/react-ui-components/ValidatorRules/index';
2028
- export const EmailFormItem: React.FC<ValidatorFormItemProps>;
2029
- export const PhoneFormItem: React.FC<ValidatorFormItemProps>;
2030
- export const UserNameFormItem: React.FC<ValidatorFormItemProps>;
2031
-
2032
- }
2033
- declare module '@authing/react-ui-components/ValidatorRules/index' {
2034
- import { FormInstance, FormItemProps } from 'antd/lib/form';
2035
- import FormItem from 'antd/lib/form/FormItem';
2036
- import { PasswordFormItem } from '@authing/react-ui-components/ValidatorRules/PasswordFormItem';
2037
- import { EmailFormItem, PhoneFormItem, UserNameFormItem } from '@authing/react-ui-components/ValidatorRules/ValidatorFormItem';
2038
- export interface ValidatorFormItemProps extends FormItemProps {
2039
- form?: FormInstance;
2040
- checkRepeat?: boolean;
2041
- checkExist?: boolean;
2042
- areaCode?: string;
2043
- /**
2044
- * 控制内部FormItem组件关于pattern的校验规则
2045
- */
2046
- isCheckPattern?: boolean;
2047
- }
2048
- export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
2049
- method: 'email' | 'phone' | 'username';
2050
- }
2051
- export interface PasswordFormItemProps extends FormItemProps {
2052
- }
2053
- export interface ICheckProps {
2054
- check: (values: any) => void;
2055
- }
2056
- type InternalFormItemType = typeof FormItem;
2057
- interface FormItemInterface extends InternalFormItemType {
2058
- Password: typeof PasswordFormItem;
2059
- Email: typeof EmailFormItem;
2060
- Phone: typeof PhoneFormItem;
2061
- UserName: typeof UserNameFormItem;
2062
- }
2063
- const CustomFormItem: FormItemInterface;
2064
- export default CustomFormItem;
2065
-
2066
- }
2067
- declare module '@authing/react-ui-components/ValidatorRules/useCheckRepeat' {
2068
- export const useCheckRepeat: (checkFn: (value: any, resolve: (value: unknown) => void, reject: (reason?: any) => void) => void) => (_: any, value: any) => Promise<unknown>;
2069
-
2070
- }
2071
- declare module '@authing/react-ui-components/VerifyCodeInput/index' {
2072
- import React, { FC } from 'react';
2073
- import './style.less';
2074
- interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
2075
- verifyCode: string[];
2076
- setVerifyCode: (code: string[]) => void;
2077
- length?: number;
2078
- onEnter?: Function;
2079
- }
2080
- export const VerifyCodeInput: FC<VerifyCodeInputProps>;
2081
- export {};
2082
-
2083
- }
2084
- declare module '@authing/react-ui-components/_utils/GuardErrorCode' {
2085
- export enum ErrorCode {
2086
- OTP_MFA_CODE = 1635,
2087
- APP_MFA_CODE = 1636,
2088
- INPUT_CAPTCHACODE = 2000,
2089
- USER_EXISTENCE = 2026,
2090
- LOGIN_INVALID = 2021,
2091
- PASSWORD_ERROR = 2333,
2092
- USER_NOT_EXIST = 2004,
2093
- MULTIPLE_ERROR_LOCK = 2057,
2094
- ACCOUNT_LOCK = 2005
2095
- }
2096
-
2097
- }
2098
- declare module '@authing/react-ui-components/_utils/appendConfig' {
2099
- import { GuardAppendConfig } from '@authing/react-ui-components/index';
2100
- export const getAppendConfig: () => GuardAppendConfig;
2101
- export const useAppendConfig: () => GuardAppendConfig;
2102
- export const initAppendConfig: (appendConfig?: GuardAppendConfig) => void;
2103
-
2104
- }
2105
- declare module '@authing/react-ui-components/_utils/clipboard' {
2106
- export const copyToClipboard: (str: string) => void;
2107
-
2108
- }
2109
- declare module '@authing/react-ui-components/_utils/config/index' {
2110
- /// <reference types="react" />
2111
- import { GuardComponentConfig, GuardLocalConfig } from '@authing/react-ui-components/Guard/config';
2112
- import { GuardHttp } from '@authing/react-ui-components/_utils/guardHttp';
2113
- import { GuardPageConfig } from '@authing/react-ui-components/Type/index';
2114
- import { ApplicationConfig, RegisterMethods } from '@authing/react-ui-components/Type/application';
2115
- export const getPublicConfig: (appId: string) => ApplicationConfig;
2116
- export const setPublicConfig: (appId: string, config: ApplicationConfig) => ApplicationConfig;
2117
- export const useMergeDefaultConfig: (defaultConfig: GuardLocalConfig, config?: GuardComponentConfig | undefined) => GuardLocalConfig | undefined;
2118
- export const useMergePublicConfig: (forceUpdate: number, appId?: string | undefined, config?: GuardLocalConfig | undefined, httpClient?: GuardHttp | undefined, setError?: any) => {
2119
- host: string;
2120
- isSSO?: boolean | undefined;
2121
- defaultScenes?: import("@authing/react-ui-components/index").GuardModuleType | undefined;
2122
- defaultInitData?: any;
2123
- showLoading?: boolean | undefined;
2124
- loadingComponent?: import("react").ReactNode;
2125
- openEventsMapping?: boolean | undefined;
2126
- _qrCodeScanOptions?: Record<import("@authing/react-ui-components/Guard/config").QrCodeScanType, import("../../Guard/config").QrCodeScanOptions> | undefined;
2127
- disableRegister?: boolean | undefined;
2128
- registerMethods?: RegisterMethods[] | undefined;
2129
- defaultRegisterMethod?: RegisterMethods | undefined;
2130
- publicKey?: string | undefined;
2131
- agreementEnabled?: boolean | undefined;
2132
- agreements?: import("@authing/react-ui-components/Type/application").Agreement[] | undefined;
2133
- registerContext?: any;
2134
- title?: string | undefined;
2135
- logo?: string | undefined;
2136
- lang: string;
2137
- langRange: string[];
2138
- isHost?: boolean | undefined;
2139
- mode: import("@authing/react-ui-components/Type/index").GuardMode;
2140
- clickCloseable: boolean;
2141
- escCloseable: boolean;
2142
- userpool?: string | undefined;
2143
- contentCss?: string | undefined;
2144
- target?: string | HTMLElement | undefined;
2145
- __internalRequest__?: boolean | undefined;
2146
- __singleComponent__?: boolean | undefined;
2147
- __unAuthFlow__?: boolean | undefined;
2148
- autoRegister?: boolean | undefined;
2149
- disableResetPwd?: boolean | undefined;
2150
- defaultLoginMethod?: import("@authing/react-ui-components/Type/application").LoginMethods | undefined;
2151
- loginMethods?: import("@authing/react-ui-components/Type/application").LoginMethods[] | undefined;
2152
- passwordLoginMethods?: import("@authing/react-ui-components/Type/application").PasswordLoginMethods[] | undefined;
2153
- socialConnections?: import("authing-js-sdk").SocialConnectionProvider[] | undefined;
2154
- socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
2155
- enterpriseConnections?: string[] | undefined;
2156
- qrCodeScanOptions?: {
2157
- extIdpConnId?: string | undefined;
2158
- autoExchangeUserInfo?: boolean | undefined;
2159
- size?: {
2160
- height: number;
2161
- width: number;
2162
- } | undefined;
2163
- containerSize?: {
2164
- height: number;
2165
- width: number;
2166
- } | undefined;
2167
- interval?: number | undefined;
2168
- onStart?: ((timer: any) => any) | undefined;
2169
- onResult?: ((data: import("authing-js-sdk").QRCodeStatus) => any) | undefined;
2170
- onScanned?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo) => any) | undefined;
2171
- onSuccess?: ((userInfo: import("authing-js-sdk").QRCodeUserInfo, ticket: string) => any) | undefined;
2172
- onCancel?: (() => any) | undefined;
2173
- onError?: ((message: string) => any) | undefined;
2174
- onExpired?: (() => any) | undefined;
2175
- onCodeShow?: ((random: string, url: string) => any) | undefined;
2176
- onCodeLoaded?: ((random: string, url: string) => any) | undefined;
2177
- onCodeLoadFailed?: ((message: string) => any) | undefined;
2178
- onCodeDestroyed?: ((random: string) => any) | undefined;
2179
- onRetry?: (() => any) | undefined;
2180
- onMfa?: ((code: number, message: string, data: Record<string, any>) => {}) | undefined;
2181
- tips?: {
2182
- title?: string | undefined;
2183
- scanned?: string | undefined;
2184
- succeed?: string | undefined;
2185
- canceled?: string | undefined;
2186
- expired?: string | undefined;
2187
- retry?: string | undefined;
2188
- failed?: string | undefined;
2189
- middleTitle?: string | undefined;
2190
- referText?: string | undefined;
2191
- } | undefined;
2192
- onAuthFlow?: ((flow: Record<string, any>) => {}) | undefined;
2193
- customData?: {
2194
- [x: string]: any;
2195
- } | undefined;
2196
- context?: {
2197
- [x: string]: any;
2198
- } | undefined;
2199
- withCustomData?: boolean | undefined;
2200
- } | undefined;
2201
- } | undefined;
2202
- export const getPageConfig: (appId: string) => GuardPageConfig;
2203
- export const setPageConfig: (appId: string, config: GuardPageConfig) => GuardPageConfig;
2204
- export const requestGuardPageConfig: (appId: string, httpClient: GuardHttp) => Promise<GuardPageConfig>;
2205
- export const useGuardPageConfig: (forceUpdate: number, appId?: string | undefined, httpClient?: GuardHttp | undefined, serError?: any) => GuardPageConfig | undefined;
2206
-
2207
- }
2208
- declare module '@authing/react-ui-components/_utils/context' {
2209
- import React from 'react';
2210
- import { GuardEvents, GuardLocalConfig, GuardModuleType, GuardPageConfig } from '@authing/react-ui-components/index';
2211
- import { ModuleState } from '@authing/react-ui-components/Guard/GuardModule/stateMachine';
2212
- import { ApplicationConfig } from '@authing/react-ui-components/Type/application';
2213
- import { GuardHttp } from '@authing/react-ui-components/_utils/guardHttp';
2214
- export interface IGuardContext {
2215
- finallyConfig: GuardLocalConfig;
2216
- defaultMergedConfig: GuardLocalConfig;
2217
- publicConfig: ApplicationConfig;
2218
- httpClient: GuardHttp;
2219
- appId: string;
2220
- tenantId?: string;
2221
- initData: any;
2222
- currentModule: ModuleState;
2223
- events: Partial<GuardEvents>;
2224
- changeModule?: (moduleName: GuardModuleType, initData?: any) => Promise<void>;
2225
- backModule?: () => void;
2226
- isAuthFlow: boolean;
2227
- contextLoaded: boolean;
2228
- guardPageConfig: Partial<GuardPageConfig>;
2229
- }
2230
- export const createGuardXContext: () => {
2231
- Provider: React.FC<{
2232
- value: Partial<IGuardContext>;
2233
- }>;
2234
- Consumer: React.Consumer<IGuardContext>;
2235
- };
2236
- export const useGuardXContext: () => {
2237
- Provider: React.FC<{
2238
- value: Partial<IGuardContext>;
2239
- }>;
2240
- Consumer: React.Consumer<IGuardContext>;
2241
- };
2242
- export interface IGuardContextProvider {
2243
- spin: boolean;
2244
- spinChange: (spin: boolean) => void;
2245
- }
2246
- export const useGuardButtonContext: () => {
2247
- GuardButtonProvider: React.FC<{}>;
2248
- };
2249
- export const useGuardButtonState: () => IGuardContextProvider;
2250
- export const useGuardPublicConfig: () => ApplicationConfig;
2251
- export const useGuardHttpClient: () => GuardHttp;
2252
- export const useGuardDefaultMergedConfig: () => GuardLocalConfig;
2253
- export const useGuardAppId: () => string;
2254
- export const useGuardTenantId: () => string | undefined;
2255
- export function useGuardInitData<T>(): T;
2256
- export const useGuardCurrentModule: () => ModuleState;
2257
- export const useGuardEvents: () => Partial<GuardEvents>;
2258
- export const useGuardModule: () => {
2259
- changeModule: ((moduleName: GuardModuleType, initData?: any) => Promise<void>) | undefined;
2260
- backModule: (() => void) | undefined;
2261
- };
2262
- export const useGuardFinallyConfig: () => GuardLocalConfig;
2263
- export const useGuardContextLoaded: () => boolean;
2264
- export const useGuardIsAuthFlow: () => boolean;
2265
- export const useGuardPageConfig: () => Partial<GuardPageConfig>;
2266
-
2267
- }
2268
- declare module '@authing/react-ui-components/_utils/corsVerification' {
2269
- export const corsVerification: (allowedOrigins?: string[], corsWhitelist?: string[]) => void;
2270
-
2271
- }
2272
- declare module '@authing/react-ui-components/_utils/countryList' {
2273
- export interface IsoType {
2274
- iso: string;
2275
- regions: string;
2276
- regions_en: string;
2277
- phoneCountryCode: string;
2278
- }
2279
- export const isoInfo: IsoType[];
2280
-
2281
- }
2282
- declare module '@authing/react-ui-components/_utils/errorFace' {
2283
- enum FaceErrorName {
2284
- NotAllowedError = "NotAllowedError",
2285
- AbortError = "AbortError",
2286
- NotReadableError = "NotReadableError",
2287
- OverconstrainedError = "OverconstrainedError",
2288
- SecurityError = "SecurityError"
2289
- }
2290
- export interface FaceErrorMessage extends DOMException {
2291
- name: FaceErrorName;
2292
- }
2293
- export const faceErrorMessage: (error: FaceErrorMessage) => string;
2294
- export {};
2295
-
2296
- }
2297
- declare module '@authing/react-ui-components/_utils/facePlugin/index' {
2298
- import { FacePlugin } from '@authing/react-ui-components/_utils/facePlugin/interface';
2299
- export const getFacePlugin: () => FacePlugin | undefined;
2300
- export const useFacePlugin: () => FacePlugin | undefined;
2301
- export const initFacePlugin: (facePlugin: FacePlugin) => FacePlugin;
2302
-
2303
- }
2304
- declare module '@authing/react-ui-components/_utils/facePlugin/interface' {
2305
- export interface FacePlugin {
2306
- detectSingleFace: any;
2307
- TinyFaceDetectorOptions: any;
2308
- nets: any;
2309
- }
2310
-
2311
- }
2312
- declare module '@authing/react-ui-components/_utils/flowHandleStorage' {
2313
- export const getFlowHandle: () => string | undefined;
2314
- export const useFlowHandle: () => string | undefined;
2315
- export const updateFlowHandle: (flowHandle: string) => void;
2316
- export const useUpdateFlowHandle: (flowHandle: string) => void;
2317
-
2318
- }
2319
- declare module '@authing/react-ui-components/_utils/guardDocument' {
2320
- export const getGuardDocument: () => Document;
2321
- export const useAppendConfig: () => Document;
2322
- export const initGuardDocument: (document: Document) => void;
2323
-
2324
- }
2325
- declare module '@authing/react-ui-components/_utils/guardHttp' {
2326
- import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/_utils/http';
2327
- import { CodeAction } from '@authing/react-ui-components/_utils/responseManagement/interface';
2328
- export class GuardHttp {
2329
- private requestClient;
2330
- private headers;
2331
- private responseInterceptorMap;
2332
- constructor(baseUrl?: string);
2333
- private getRequestClient;
2334
- setUserpoolId(userpoolId: string): this;
2335
- setAppId(appId: string): this;
2336
- setTenantId(tenantId: string): this;
2337
- setBaseUrl(baseUrl: string): this;
2338
- getHeaders: () => Record<string, string>;
2339
- get: <T = any>(path: string, query?: Record<string, any>, config?: any) => Promise<AuthingGuardResponse<T>>;
2340
- post: <T = any>(path: string, data: any, config?: {
2341
- headers: any;
2342
- } | undefined) => Promise<AuthingGuardResponse<T>>;
2343
- postForm: <T = any>(path: string, formData: any, config?: {
2344
- headers: any;
2345
- } | undefined) => Promise<AuthingGuardResponse<T>>;
2346
- authFlow: <T = any>(action: string, data?: any) => Promise<AuthingGuardResponse<T>>;
2347
- initErrorCodeInterceptor: (callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => this | undefined;
2348
- responseIntercept: (res: AuthingResponse) => AuthingGuardResponse;
2349
- }
2350
- export const initGuardHttp: (baseUrl: string) => GuardHttp;
2351
- export const getGuardHttp: () => GuardHttp;
2352
- export const useGuardHttp: () => GuardHttp;
2353
-
2354
- }
2355
- declare module '@authing/react-ui-components/_utils/hooks/index' {
2356
- import { GuardLocalConfig } from '@authing/react-ui-components/Guard/index';
2357
- import { ApplicationConfig } from '@authing/react-ui-components/Type/application';
2358
- export interface PhoneValidResult {
2359
- isValid: boolean;
2360
- phoneNumber: string;
2361
- countryIso2: string;
2362
- countryIso3: string;
2363
- countryCode: string;
2364
- }
2365
- export const HIDE_SOCIALS: string[];
2366
- export const HIDE_SOCIALS_SHOWIN_ENTERPRISE: string[];
2367
- export const useAppId: (appId?: string | undefined) => string;
2368
- export const useDebounce: (fn: any, delay: number) => (...args: any[]) => void;
2369
- export const useMediaSize: () => {
2370
- isPhoneMedia: boolean;
2371
- };
2372
- export const useShaking: () => {
2373
- MountShaking: () => void;
2374
- UnMountShaking: () => void;
2375
- };
2376
- /**
2377
- * 解析手机号
2378
- * @param fieldValue 字段值
2379
- * @param areaCode 区号
2380
- * @returns
2381
- */
2382
- export const parsePhone: (isInternationSms: boolean, fieldValue: string, areaCode?: string) => {
2383
- countryCode: string | undefined;
2384
- phoneNumber: string;
2385
- };
2386
- export enum SocialConnectionEvent {
2387
- Message = "message",
2388
- Auth = "auth"
2389
- }
2390
- /**
2391
- *
2392
- * @param config
2393
- * @returns[socialConnectionObjs 社交身份源连接对象 enterpriseConnectionObjs 企业身份源连接对象 isNoMethod 是否没有身份源 ]
2394
- */
2395
- export const useMethod: (params: {
2396
- config: GuardLocalConfig;
2397
- publicConfig: ApplicationConfig;
2398
- }) => any;
2399
-
2400
- }
2401
- declare module '@authing/react-ui-components/_utils/http' {
2402
- import { CodeAction } from '@authing/react-ui-components/_utils/responseManagement/interface';
2403
- import { AxiosRequestConfig } from 'axios';
2404
- export const requestClient: {
2405
- (input: RequestInfo, init?: RequestInit | undefined): Promise<any>;
2406
- get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig<any> | undefined): Promise<AuthingResponse<T>>;
2407
- post<T_1>(path: string, data: any, config?: {
2408
- headers: any;
2409
- } | undefined): Promise<AuthingResponse<T_1>>;
2410
- postForm<T_2>(path: string, formData: any, config?: {
2411
- headers: any;
2412
- } | undefined): Promise<AuthingResponse<T_2>>;
2413
- baseUrl: string;
2414
- setBaseUrl(base: string): void;
2415
- langHeader: string;
2416
- tenantHeader: string;
2417
- tenantId: string;
2418
- setLangHeader(key: string | undefined): void;
2419
- setTenantHeader(key: string | undefined): void;
2420
- setTenantId(tenantId: string): void;
2421
- };
2422
- export interface AuthingResponse<T = any> {
2423
- code?: number;
2424
- statusCode?: number;
2425
- apiCode?: number;
2426
- data?: T;
2427
- messages?: string;
2428
- message?: string;
2429
- flowHandle?: string;
2430
- }
2431
- export interface AuthingGuardResponse<T = any> extends AuthingResponse<T> {
2432
- onGuardHandling?: () => CodeAction;
2433
- isFlowEnd?: boolean;
2434
- }
2435
-
2436
- }
2437
- declare module '@authing/react-ui-components/_utils/index' {
2438
- import { Rule } from 'antd/lib/form';
2439
- import qs from 'qs';
2440
- import { User } from 'authing-js-sdk';
2441
- import { GuardProps } from '@authing/react-ui-components/Guard/index';
2442
- import { ApplicationConfig, ComplateFiledsPlace, LoginMethods, RegisterMethods } from '@authing/react-ui-components/Type/application';
2443
- export * from '@authing/react-ui-components/_utils/popupCenter';
2444
- export * from '@authing/react-ui-components/_utils/clipboard';
2445
- export const VALIDATE_PATTERN: {
2446
- readonly email: RegExp;
2447
- readonly phone: RegExp;
2448
- readonly ip: RegExp;
2449
- readonly host: RegExp;
2450
- readonly username: RegExp;
2451
- };
2452
- export const validate: (type: keyof typeof VALIDATE_PATTERN, val: string) => boolean;
2453
- export const getRequiredRules: (msg: string) => Rule[];
2454
- export const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string | undefined) => Rule[];
2455
- export function getDeviceName(): string | null | undefined;
2456
- export type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
2457
- export const insertStyles: (styles: string | any, recordKey?: "appConfig" | "userConfig" | undefined) => void;
2458
- export const removeStyles: (recordKey: STYLE_RECORD_KEY) => void;
2459
- export const getClassnames: (classnames: (string | boolean | undefined)[]) => string;
2460
- /**
2461
- * https://www.itranslater.com/qa/details/2115518846294557696
2462
- * Simple object check.
2463
- * @param item
2464
- * @returns {boolean}
2465
- */
2466
- export function isObject(item: any): any;
2467
- /**
2468
- * https://www.itranslater.com/qa/details/2115518846294557696
2469
- * Deep merge two objects.
2470
- * @param target
2471
- * @param ...sources
2472
- */
2473
- export function deepMerge<T extends any = any>(target: T, ...sources: any[]): T;
2474
- /**
2475
- * 在托管页下上传query中指定的用户自定义字段进行补全
2476
- * @param params 指定上传的用户自定义字段
2477
- */
2478
- export const getUserRegisterParams: (params?: string[] | undefined) => {
2479
- key: string;
2480
- value: string | string[] | qs.ParsedQs | qs.ParsedQs[] | undefined;
2481
- }[];
2482
- export const isWeChatBrowser: () => boolean | null;
2483
- export const isLarkBrowser: () => boolean | null;
2484
- export const isQtWebEngine: () => boolean | null;
2485
- export const isXiaomiBrowser: () => boolean | null;
2486
- export const isDingtalkBrowser: () => boolean | null;
2487
- export const isQQBrowser: () => boolean | null;
2488
- export const isQQBuiltInBrowser: () => boolean | null;
2489
- export const isWeWorkBuiltInBrowser: () => boolean | null;
2490
- export const isEdgeBrowser: () => boolean;
2491
- export const isWeiboBrowser: () => boolean | null;
2492
- export const isAlipayBrowser: () => boolean | null;
2493
- export const isBaiduBrowser: () => boolean | null;
2494
- export const isWeComeBrowser: () => boolean;
2495
- export const isMobile: () => RegExpMatchArray | null;
2496
- export const isSpecialBrowser: () => boolean;
2497
- export const assembledAppHost: (identifier: string, host: string) => string;
2498
- export const assembledRequestHost: (requestHostname: string, configHost: string) => string;
2499
- export enum PasswordStrength {
2500
- NoCheck = 0,
2501
- Low = 1,
2502
- Middle = 2,
2503
- High = 3,
2504
- AUTO = 4
2505
- }
2506
- export const PASSWORD_STRENGTH_TEXT_MAP: Record<PasswordStrength, {
2507
- placeholder: () => string;
2508
- validateMessage: () => string;
2509
- }>;
2510
- export const getSymbolTypeLength: (pwd: string) => number;
2511
- export const getPasswordValidate: (strength?: PasswordStrength, customPasswordStrength?: any, fieldRequiredRuleMessage?: string | undefined) => Rule[];
2512
- export const sleep: (delay: number) => Promise<unknown>;
2513
- export const shoudGoToComplete: (user: User, contextType: ComplateFiledsPlace, config: ApplicationConfig | undefined, autoRegister?: boolean | undefined) => boolean;
2514
- export const tabSort: (defaultValue: any, tabList: RegisterMethods[]) => RegisterMethods[];
2515
- export const mailDesensitization: (mail: string) => string;
2516
- export const phoneDesensitization: (phone: string) => string;
2517
- export const getHundreds: (num: number) => number;
2518
- export const GuardPropsFilter: (pre: GuardProps, current: GuardProps) => boolean;
2519
- export const getDocumentNode: (node: Node & ParentNode) => Document;
2520
- export const getLoginTypePipe: (publicConfig: ApplicationConfig, registerMethod: RegisterMethods) => {
2521
- specifyDefaultLoginMethod: LoginMethods;
2522
- lockMethod: string;
2523
- } | {
2524
- specifyDefaultLoginMethod: LoginMethods;
2525
- lockMethod?: undefined;
2526
- } | undefined;
2527
- export const getPasswordIdentify: (identity: string) => string;
2528
-
2529
- }
2530
- declare module '@authing/react-ui-components/_utils/initAppId' {
2531
- import { AuthenticationClient } from 'authing-js-sdk';
2532
- export interface UseInitAppidProps {
2533
- propsAppid?: string;
2534
- propsAuthClient?: AuthenticationClient;
2535
- setError?: any;
2536
- }
2537
- export const useInitAppId: (propsAppid?: string | undefined, propsAuthClient?: AuthenticationClient | undefined, setError?: any) => string | undefined;
2538
-
2539
- }
2540
- declare module '@authing/react-ui-components/_utils/locales/en-us/index' {
2541
- import common from '@authing/react-ui-components/_utils/locales/en-us/common/index';
2542
- import login from '@authing/react-ui-components/_utils/locales/en-us/login/index';
2543
- import user from '@authing/react-ui-components/_utils/locales/en-us/user/index';
2544
- export { common, login, user };
2545
-
2546
- }
2547
- declare module '@authing/react-ui-components/_utils/locales/index' {
2548
- import i18n from 'i18next';
2549
- import { Lang } from '@authing/react-ui-components/Type/index';
2550
- export const changeLang: (lang: Lang) => void;
2551
- const initI18n: (localesConfig?: {}, lang?: string | undefined) => void;
2552
- export { i18n, initI18n };
2553
-
2554
- }
2555
- declare module '@authing/react-ui-components/_utils/locales/zh-cn/index' {
2556
- import common from '@authing/react-ui-components/_utils/locales/zh-cn/common/index';
2557
- import login from '@authing/react-ui-components/_utils/locales/zh-cn/login/index';
2558
- import user from '@authing/react-ui-components/_utils/locales/zh-cn/user/index';
2559
- export { common, login, user };
2560
-
2561
- }
2562
- declare module '@authing/react-ui-components/_utils/locales/zh-tw/index' {
2563
- import common from '@authing/react-ui-components/_utils/locales/zh-tw/common/index';
2564
- import login from '@authing/react-ui-components/_utils/locales/zh-tw/login/index';
2565
- import user from '@authing/react-ui-components/_utils/locales/zh-tw/user/index';
2566
- export { common, login, user };
2567
-
2568
- }
2569
- declare module '@authing/react-ui-components/_utils/logger/index' {
2570
- import { LoggerType } from '@authing/react-ui-components/_utils/logger/interface';
2571
- export class Logger {
2572
- static printType: LoggerType[];
2573
- /**
2574
- * 打印日志
2575
- * @param message 日志信息
2576
- * @param type 日志类型
2577
- */
2578
- static log(message: string, type?: LoggerType): void;
2579
- static info(message: string): void;
2580
- static warn(message: string): void;
2581
- static error(message: string): void;
2582
- }
2583
- export const getLogger: () => Logger;
2584
- export const useLogger: () => Logger;
2585
-
2586
- }
2587
- declare module '@authing/react-ui-components/_utils/logger/interface' {
2588
- export enum LoggerType {
2589
- INFO = "INFO",
2590
- WARN = "WARN",
2591
- ERROR = "ERROR"
2592
- }
2593
-
2594
- }
2595
- declare module '@authing/react-ui-components/_utils/popupCenter' {
2596
- /**
2597
- * 在屏幕中心弹出新窗口加载 url
2598
- * @param url
2599
- * @param param1
2600
- */
2601
- export const popupCenter: (url: string, { w, h }?: {
2602
- w: number;
2603
- h: number;
2604
- }) => void;
2605
-
2606
- }
2607
- declare module '@authing/react-ui-components/_utils/responseManagement/index' {
2608
- import { AuthingGuardResponse, AuthingResponse } from '@authing/react-ui-components/_utils/http';
2609
- import { CodeAction } from '@authing/react-ui-components/_utils/responseManagement/interface';
2610
- export const errorCodeInterceptor: (res: AuthingResponse<any>, callBack: (code: CodeAction, res: AuthingResponse) => AuthingGuardResponse) => AuthingResponse<any>;
2611
-
2612
- }
2613
- declare module '@authing/react-ui-components/_utils/responseManagement/interface' {
2614
- import { GuardModuleType } from '@authing/react-ui-components/Guard/index';
2615
- export enum CodeAction {
2616
- CHANGE_MODULE = "changeModule",
2617
- RENDER_MESSAGE = "renderMessage",
2618
- FLOW_END = "flowEnd"
2619
- }
2620
- export enum ApiCode {
2621
- IDENTITY_BINDING_ASK = 1641,
2622
- IDENTITY_BINDING = 1640,
2623
- APP_MFA = 1636,
2624
- MFA = 1635,
2625
- ABORT_FLOW = 1699,
2626
- COMPLETE_INFO = 1642,
2627
- UNLOCK = 1643,
2628
- FLOW_END = 1600,
2629
- FIRST_LOGIN_PASSWORD = 1639,
2630
- FORCED_PASSWORD_RESET = 2058,
2631
- UNSAFE_PASSWORD_TIP = 2061,
2632
- UNSAFE_PASSWORD_RESET = 2071
2633
- }
2634
- export const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
2635
-
2636
- }
2637
- declare module '@authing/react-ui-components/_utils/useErrorText' {
2638
- import React from 'react';
2639
- export const usePasswordErrorText: () => {
2640
- setPasswordErrorTextShow: React.Dispatch<React.SetStateAction<boolean>>;
2641
- getPassWordUnsafeText: () => JSX.Element;
2642
- };
2643
-
2644
- }
2645
- declare module '@authing/react-ui-components/index' {
2646
- export * from '@authing/react-ui-components/_utils/config/index';
2647
- export * from '@authing/react-ui-components/_utils/responseManagement/interface';
2648
- export * from '@authing/react-ui-components/AuthClientProvider/index';
2649
- export * from '@authing/react-ui-components/Guard/index';
2650
- export * from '@authing/react-ui-components/Type/index';
2651
- export * from '@authing/react-ui-components/version/index';
2652
-
2653
- }
2654
- declare module '@authing/react-ui-components/version/index' {
2655
- import version from '@authing/react-ui-components/version/version';
2656
- export default version;
2657
-
2658
- }
2659
- declare module '@authing/react-ui-components/version/version' {
2660
- const _default: "4.0.0-rc.0";
2661
- export default _default;
2662
-
2663
- }
2664
- declare module '@authing/react-ui-components' {
2665
- import main = require('@authing/react-ui-components/components/index');
2666
- export = main;
2667
- }