import { SnapChatSignInCredentials, SnapChatUserRetrievedData } from '../types'; /** * Class to handle authentication via Google's OAuth flow. * It handles exchanging the authorization code for tokens and * retrieving user information from the SnapChat API. */ export declare class SnapChatAuthHandler { private readonly credentials; private readonly _accessToken; /** * Constructor to initialize the class with client credentials. * The credentials are base64 encoded and stored as `_accessToken`. * @param credentials - The client credentials (client ID, client secret, etc.) */ constructor(credentials: SnapChatSignInCredentials); /** * Exchanges the authorization code for an access token and refresh token. * Makes a POST request to the token exchange endpoint. * @param authorizationCode - The authorization code received from the user * @returns Promise resolving to the exchange data containing the access token, refresh token, and scope * @throws SnapChatAuthError if the token exchange fails */ private exchangeAuthorizationCode; /** * Retrieves user information from the SnapChat API using the provided access token. * @param accessToken - The access token obtained from the token exchange * @returns Promise resolving to the user's information including ID, name, and username * @throws SnapChatAuthError if user information retrieval fails */ private retrieveUserInfo; /** * Validates the user's credentials by exchanging the authorization code * and retrieving the user's information. * @param authorizationCode - The authorization code received from the user * @returns Promise resolving to the user's information if validation is successful * @throws SnapChatAuthError if validation fails or required scopes are not granted */ validateUserCredentials({ authorizationCode }: { authorizationCode: string; }): Promise; }