import { AuthenticationClient, type initialProps } from "../Authentication/AuthenticationClient"; import type { Method, Body, AuthClientPropType, AuthenticateResult, Logger } from "./types"; import { requireAuthenticationClient } from "../utils/decorators"; declare class BaseModel { protected authenticationClient: AuthenticationClient | null; protected autoAuthenticate: boolean; protected basePath: string; protected readonly logger: Logger | null; private readonly httpAdapter; constructor(props?: AuthClientPropType); setAuthenticationClient(authenticationClient: AuthenticationClient): void; createAuthenticationClient(props: initialProps): AuthenticationClient; /** * Ensures a valid access token exists (refreshing if `autoAuthenticate` is enabled) * then delegates to `makeRequest`. */ protected triggerRequest(method: Method, body: Body, relativeUrl: string): Promise; /** * Executes the HTTP call. */ private makeRequest; getBaseUrl(): string; getClientEndpoint(): string; /** * Verifies (and optionally forces a refresh of) the current access token. * * @param force - When `true`, always fetches a fresh token from the OAuth endpoint. * When `false` (default), resolves immediately if the cached token is still valid. */ authenticate({ force }?: { force?: boolean; }): Promise; } export { BaseModel, requireAuthenticationClient };