@authing/guard-shim-react 6.0.0-alpha.11 → 6.0.0-alpha.13

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.
@@ -6,4 +6,4 @@ export declare enum CompleteInfoAuthFlowAction {
6
6
  }
7
7
  export declare const authFlow: (action: CompleteInfoAuthFlowAction, data?: CompleteInfoRequest) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
8
8
  export declare const registerSkipMethod: (fnName: RegisterCompleteInfoInitData['businessRequestName'] | string, content: any) => Promise<import("../_utils/http").AuthingGuardResponse<any>>;
9
- export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<import("../_utils/http").AuthingGuardResponse<any> | User | undefined>;
9
+ export declare const registerRequest: (action: CompleteInfoAuthFlowAction, registerFnName: RegisterCompleteInfoInitData['businessRequestName'], registerContent: any, registerProfile?: any) => Promise<User | import("../_utils/http").AuthingGuardResponse<any> | undefined>;
@@ -1,5 +1,5 @@
1
1
  import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
2
- import { IG2Config, IG2Events, IG2FCProps, IAuthingFunc } from '../Type';
2
+ import { IG2Config, IG2Events, IG2FCProps, IAuthingFunc, Lang } from '../Type';
3
3
  export interface CompleteInfoConfig extends IG2Config {
4
4
  }
5
5
  export declare const getDefaultCompleteInfoConfig: () => CompleteInfoConfig;
@@ -41,6 +41,9 @@ export interface CompleteInfoRule {
41
41
  type: FormValidateRule;
42
42
  content: string;
43
43
  errorMessage?: string;
44
+ i18n?: {
45
+ errorMessage: Record<Lang, []>;
46
+ };
44
47
  }
45
48
  export interface CompleteInfoSelectOption {
46
49
  value: string;
@@ -16,3 +16,9 @@ export declare const fieldValuesToRegisterProfile: (extendsFields: ApplicationCo
16
16
  value: string;
17
17
  }[];
18
18
  };
19
+ /**
20
+ * @description 获取对应key的国际化value
21
+ * @param record :example {key:"",i18n:{key:{zh_CN:{enabled:true,value:""}}}
22
+ * @param key
23
+ */
24
+ export declare const getI18nValue: (record: any, key: string) => any;
@@ -249,7 +249,7 @@ declare class MultipleAccount {
249
249
  setUserInfo: (user: Omit<User & {
250
250
  id: string;
251
251
  loginAccount?: string | undefined;
252
- }, "way" | "tab" | "phoneCountryCode">) => void;
252
+ }, "tab" | "phoneCountryCode" | "way">) => void;
253
253
  setLoginWayByHttpData: (account: string, data: {
254
254
  username?: string | undefined;
255
255
  phone?: string | undefined;
@@ -292,7 +292,7 @@ declare const useMultipleAccounts: ({ appId, finallyConfig, }: {
292
292
  setUserInfo: (user: Omit<User & {
293
293
  id: string;
294
294
  loginAccount?: string | undefined;
295
- }, "way" | "tab" | "phoneCountryCode">) => void;
295
+ }, "tab" | "phoneCountryCode" | "way">) => void;
296
296
  setLoginWayByHttpData: (account: string, data: {
297
297
  username?: string | undefined;
298
298
  phone?: string | undefined;
@@ -35,7 +35,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
35
35
  setUserInfo: (user: Omit<import("../../Guard/core/hooks/useMultipleAccounts").User & {
36
36
  id: string;
37
37
  loginAccount?: string | undefined;
38
- }, "way" | "tab" | "phoneCountryCode">) => void;
38
+ }, "tab" | "phoneCountryCode" | "way">) => void;
39
39
  setLoginWayByHttpData: (account: string, data: {
40
40
  username?: string | undefined;
41
41
  phone?: string | undefined;
@@ -57,7 +57,7 @@ declare function useLoginMultiple(setLoginWay: React.Dispatch<any>): {
57
57
  getOriginAccount: () => string;
58
58
  getOriginWay: () => string;
59
59
  } | undefined;
60
- referMultipleState: ((type: "login" | "multiple") => void) | undefined;
60
+ referMultipleState: ((type: "multiple" | "login") => void) | undefined;
61
61
  backfillData: BackFillMultipleState | undefined;
62
62
  defaultQrWay: string | undefined;
63
63
  };
@@ -53,7 +53,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
53
53
  loginMethods?: LoginMethods[] | undefined;
54
54
  passwordLoginMethods?: string[] | undefined;
55
55
  socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
56
- socialConnectionsBtnShape?: "default" | "button" | "icon" | undefined;
56
+ socialConnectionsBtnShape?: "button" | "default" | "icon" | undefined;
57
57
  enterpriseConnections?: string[] | undefined;
58
58
  qrCodeScanOptions?: {
59
59
  extIdpConnId?: string | undefined;
@@ -121,7 +121,7 @@ export declare const useGuardMultipleInstance: () => {
121
121
  setUserInfo: (user: Omit<import("../Guard/core/hooks/useMultipleAccounts").User & {
122
122
  id: string;
123
123
  loginAccount?: string | undefined;
124
- }, "way" | "tab" | "phoneCountryCode">) => void;
124
+ }, "tab" | "phoneCountryCode" | "way">) => void;
125
125
  setLoginWayByHttpData: (account: string, data: {
126
126
  username?: string | undefined;
127
127
  phone?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authing/guard-shim-react",
3
- "version": "6.0.0-alpha.11",
3
+ "version": "6.0.0-alpha.13",
4
4
  "description": "Guard shim for react 16 / 17, only be used to internal",
5
5
  "types": "dist/typings/src/index.d.ts",
6
6
  "module": "dist/guard.min.js",