import Popup from './authentication/popup'; import Redirect from './authentication/redirect'; import Iframe from './authentication/iframe'; import Transaction from './authentication/transaction'; import { type TransactionData, type VerifyInput } from './types/transaction'; import RedirectUriParamsPersister from './helpers/persisters/redirectUriParams'; import { type SDKOptions, type ResolvedOptions } from './types/sdk'; import { type PopupSDK, type IframeSDK, type RedirectSDK } from './types/authentication'; /** * Accounts SDK main class for "Sign in with LiveChat". */ export default class AccountsSDK implements PopupSDK, IframeSDK, RedirectSDK { options: ResolvedOptions; transaction: Transaction; redirectUriParamsPersister: RedirectUriParamsPersister; constructor(options: SDKOptions); /** * Use iframe for authorization. Not recommended due to ITP 2.0. */ iframe(options?: Partial): Iframe; /** * Use popup for authorization. Must be called inside a click handler. */ popup(options?: Partial): Popup; /** * Use redirect for authorization. */ redirect(options?: Partial): Redirect; /** * Generate an authorization URL. * @param options - Options to override SDK defaults. * @param flow - Set to `'button'` for popup and iframe flows. */ authorizeURL(options?: Partial, flow?: string): string; /** * Verify if redirect transaction params are valid. * @param authorizeData - Authorize data to validate. * @returns Transaction state if valid, null otherwise. */ verify(authorizeData: VerifyInput): TransactionData | null; }