/** * Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com). * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import { AsgardeoBrowserClient, UserProfile, SignInOptions, SignOutOptions, User, EmbeddedFlowExecuteResponse, SignUpOptions, EmbeddedFlowExecuteRequestPayload, EmbeddedSignInFlowHandleRequestPayload, Organization, IdToken, EmbeddedFlowExecuteRequestConfig, AllOrganizationsApiResponse, TokenResponse, HttpRequestConfig, HttpResponse, TokenExchangeRequestConfig, OIDCDiscoveryApiResponse } from '@asgardeo/browser'; import { AsgardeoReactConfig } from './models/config'; /** * Client for mplementing Asgardeo in React applications. * This class provides the core functionality for managing user authentication and sessions. * * @typeParam T - Configuration type that extends AsgardeoReactConfig. */ declare class AsgardeoReactClient extends AsgardeoBrowserClient { private asgardeo; private loadingState; private clientInstanceId; private initializeConfig; /** * Creates a new AsgardeoReactClient instance. * @param instanceId - Optional instance ID for multi-auth context support. Defaults to 0 for backward compatibility. */ constructor(instanceId?: number); /** * Get the instance ID for this client. * @returns The instance ID used for multi-auth context support. */ getInstanceId(): number; /** * Set the loading state of the client * @param loading - Boolean indicating if the client is in a loading state */ private setLoading; /** * Wrap async operations with loading state management * @param operation - The async operation to execute * @returns Promise with the result of the operation */ private withLoading; initialize(config: AsgardeoReactConfig): Promise; reInitialize(config: Partial): Promise; updateUserProfile(): Promise; getUser(options?: any): Promise; getDecodedIdToken(sessionId?: string): Promise; getIdToken(): Promise; getUserProfile(options?: any): Promise; getMyOrganizations(options?: any): Promise; getAllOrganizations(options?: any): Promise; getCurrentOrganization(): Promise; switchOrganization(organization: Organization): Promise; isLoading(): boolean; isInitialized(): Promise; isSignedIn(): Promise; startAutoRefreshToken(): Promise; getConfiguration(): T; exchangeToken(config: TokenExchangeRequestConfig): Promise; signIn(options?: SignInOptions, sessionId?: string, onSignInSuccess?: (afterSignInUrl: string) => void): Promise; signIn(payload: EmbeddedSignInFlowHandleRequestPayload, request: EmbeddedFlowExecuteRequestConfig, sessionId?: string, onSignInSuccess?: (afterSignInUrl: string) => void): Promise; signInSilently(options?: SignInOptions): Promise; signOut(options?: SignOutOptions, afterSignOut?: (afterSignOutUrl: string) => void): Promise; signOut(options?: SignOutOptions, sessionId?: string, afterSignOut?: (afterSignOutUrl: string) => void): Promise; signUp(options?: SignUpOptions): Promise; signUp(payload: EmbeddedFlowExecuteRequestPayload): Promise; recover(payload: EmbeddedFlowExecuteRequestPayload): Promise; getDiscoveryResponse(): Promise; request(requestConfig?: HttpRequestConfig): Promise>; requestAll(requestConfigs?: HttpRequestConfig[]): Promise[]>; getAccessToken(sessionId?: string): Promise; clearSession(sessionId?: string): void; setSession(sessionData: Record, sessionId?: string): Promise; getStorageManager(): Promise; decodeJwtToken>(token: string): Promise; } export default AsgardeoReactClient; //# sourceMappingURL=AsgardeoReactClient.d.ts.map