import firebase from 'firebase/compat/app'; import 'firebase/compat/firestore'; import 'firebase/compat/auth'; import Org from './lib/Org'; import IUser from './Interfaces/User/IUser'; import User from './lib/User'; import IBaseExternalService from './Interfaces/ExternalService/BaseExternalService'; /** * TBSDK - SDK Manager * * Client SDK to access TheBEAST eCommerce */ export declare const isTestEnv: boolean; export declare const API_URL: string; export interface IRedirectUrls { readonly verifyEmail?: string; } export default class TBSDK { private _f; private _f_user?; private _user?; constructor(firebase_config: any); static fetch: (_path: string) => Promise<{}>; /** * Fetch current user. Firebase User if exists null if not. */ getCurrentUser: (loginUser?: firebase.User | null) => Promise; logout(): Promise; /** * Login : Log user with password and username (email) * @param email * @param password * @options First step to do after the SDK constructor. */ login: ({ email, password, redirectUrls }: { readonly email: string; readonly password: string; readonly redirectUrls?: IRedirectUrls | undefined; }) => Promise; validateUserEmailByOOBCode(oobCode: string): Promise; sendConfirmationEmail(): Promise; /** * Second step after constructor ; First step after authentificated an user. Retrieve and return the user's organization. * @param version String version : Default (latest) */ org: (version?: string, loginUser?: firebase.User | null, orgIdToBypassUser?: string) => Promise; external_services: (loginUser?: firebase.User | null) => Promise; private _getOrgByUserEmail; private _validateApiKeyAndOrgId; }