@nibssplc/cams-sdk-react 0.0.1-beta.62 → 0.0.1-beta.64

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.
@@ -2,6 +2,7 @@ interface MFAGateProps {
2
2
  children: React.ReactNode;
3
3
  fallback?: React.ReactNode;
4
4
  loginComponent?: React.ComponentType;
5
+ MFAEndpoint?: string;
5
6
  }
6
- declare const MFAGate: ({ children, fallback, loginComponent: LoginComponent }: MFAGateProps) => string | number | bigint | true | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
7
+ declare const MFAGate: ({ children, fallback, loginComponent: LoginComponent, MFAEndpoint, }: MFAGateProps) => string | number | bigint | true | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
7
8
  export default MFAGate;
@@ -1,5 +1,6 @@
1
1
  interface MFAOptionsProps {
2
2
  onComplete?: (success: boolean) => void;
3
+ MFAEndpoint?: string;
3
4
  }
4
- declare const MFAOptions: ({ onComplete }?: MFAOptionsProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const MFAOptions: ({ onComplete, MFAEndpoint }?: MFAOptionsProps) => import("react/jsx-runtime").JSX.Element;
5
6
  export default MFAOptions;
@@ -10,7 +10,7 @@ interface BaseProviderProps {
10
10
  interface RegularProviderProps extends BaseProviderProps, Omit<UseCAMSAuthOptions, "appCode"> {
11
11
  mode: "REGULAR";
12
12
  }
13
- interface MSALProviderProps extends BaseProviderProps, UseCAMSMSALAuthOptions {
13
+ interface MSALProviderProps extends BaseProviderProps, Omit<UseCAMSMSALAuthOptions, 'MFAEndpoint'> {
14
14
  mode: "MSAL";
15
15
  msalConfig: Configuration;
16
16
  msalInstance?: PublicClientApplication;
@@ -9,7 +9,7 @@ export interface UseCAMSMSALAuthOptions {
9
9
  messageOrigin?: string;
10
10
  appCode: string;
11
11
  allowedOrigins?: string[];
12
- MFAEndpoint: string;
12
+ MFAEndpoint?: string;
13
13
  }
14
14
  export interface UseCAMSMSALAuthReturn {
15
15
  login: () => Promise<void>;
@@ -23,7 +23,7 @@ export interface UseCAMSMSALAuthReturn {
23
23
  appCode: string;
24
24
  mfaAuthenticator: CAMSMFAAuthenticator | null;
25
25
  requiresMFA: boolean;
26
- completeMFA: (code: string, type: 'EmailOTP' | 'AuthenticatorCode') => Promise<MFAResponse>;
26
+ completeMFA: (code: string, type: "EmailOTP" | "AuthenticatorCode") => Promise<MFAResponse>;
27
27
  sendEmailOTP: () => Promise<boolean>;
28
28
  }
29
- export declare function useCAMSMSALAuth(options?: UseCAMSMSALAuthOptions): UseCAMSMSALAuthReturn;
29
+ export declare function useCAMSMSALAuth(options: UseCAMSMSALAuthOptions): UseCAMSMSALAuthReturn;
@@ -1,10 +1,10 @@
1
- export declare const useOTPHandler: ({ provider, accessToken, idToken, appCode, authenticationType, validateTokenUrl, onAuthComplete, }: {
1
+ export declare const useOTPHandler: ({ provider, accessToken, idToken, appCode, authenticationType, MFAEndpoint, onAuthComplete, }: {
2
2
  provider: string;
3
3
  accessToken: string;
4
4
  idToken: string;
5
5
  appCode: string;
6
6
  authenticationType: "AuthenticatorCode" | "EmailOTP" | null;
7
- validateTokenUrl: string;
7
+ MFAEndpoint?: string;
8
8
  onAuthComplete: (state: boolean, data: UserValidatedResponse | null) => void;
9
9
  }) => {
10
10
  handleSubmitOTP: (authenticationValue: string) => Promise<boolean>;