import { BaseApi } from "../base-api"; import type { ApiToken, ExchangeTokenRequest, LoggedInUser, LoginRequest, LoginResponse, RegisterRequest, RegisterResponse, RegistrationStatus, RegistrationStatusB2bRequest, RegistrationStatusRequest, RegistrationStatusResponse, StytchToken, UserRole } from "./types"; /** * A class for accessing the Authentication API * @extends BaseApi */ declare class AuthenticationApi extends BaseApi { /** * Logs in the user. * * @see https://docs.narrative.io/open-api#tag/Authentication/paths/~1authentication~1login/post * * @param {LoginRequest} loginRequest - The login request object. * @returns {Promise} - A promise that resolves to the login response. */ login(loginRequest: LoginRequest): Promise; /** * Logs in a B2B user. * * @see https://docs.narrative.io/open-api#tag/Authentication/paths/~1authentication~1b2b~1login/post * * @param {LoginRequest} loginRequest - The login request object. * @returns {Promise} - A promise that resolves to the login response. */ loginB2b(loginRequest: LoginRequest): Promise; /** * Registers a new user. * * @see https://docs.narrative.io/open-api#tag/Authentication/paths/~1authentication~1register/post * * @param {RegisterRequest} registerRequest - The register request object. * @returns {Promise} - A promise that resolves to the register response. */ register(registerRequest: RegisterRequest): Promise; /** * Registers a new B2B user. * * @see https://docs.narrative.io/open-api#tag/Authentication/paths/~1authentication~1b2b~1register/post * * @param {RegisterRequest} registerRequest - The register request object. * @returns {Promise} - A promise that resolves to the register response. */ registerB2b(registerRequest: RegisterRequest): Promise; /** * Checks the resgistration status of a user. * * @see https://docs.narrative.io/open-api#tag/Authentication/paths/~1authentication~1registration-status/post * * @param {RegistrationStatusRequest} statusRequest - request payload of user login for whom to check status. * @returns {Promise} - A promise that resolves to the response. */ checkRegistrationStatus(statusRequest: RegistrationStatusRequest): Promise; /** * Checks the registration status of a B2B user. * * @see https://docs.narrative.io/open-api#tag/Authentication/paths/~1authentication~1b2b~1registration-status/post * * @param {RegistrationStatusB2bRequest} statusRequest - The B2B registration status request. * @returns {Promise} - A promise that resolves to the response. */ checkRegistrationStatusB2b(statusRequest: RegistrationStatusB2bRequest): Promise; /** * Exchange the current user access token for a new token scoped to a different company. * The user can only exchange their token to be scoped to another company to which they belong, unless they are a global admin. * * @param {ExchangeTokenRequest} exchangeTokenRequest - The exchange token request containing the target company ID. * @returns {Promise} - A promise that resolves to the login response with the new token. */ exchangeToken(exchangeTokenRequest: ExchangeTokenRequest): Promise; } export { type ApiToken, AuthenticationApi, type ExchangeTokenRequest, type LoggedInUser, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type RegistrationStatus, type RegistrationStatusB2bRequest, type RegistrationStatusRequest, type RegistrationStatusResponse, type StytchToken, type UserRole, };