import { SearchBackendInterface } from './search-backend-interface'; import type { SearchParams } from '../search-params'; import type { Result } from '@internetarchive/result-type'; import { SearchServiceError } from '../search-service-error'; import type { SearchBackendOptionsInterface } from './search-backend-options'; /** * An abstract base class for search backends. */ export declare abstract class BaseSearchBackend implements SearchBackendInterface { /** * The base URL / host this backend should use for its requests. * Defaults to 'archive.org'. */ protected baseUrl: string; protected includeCredentials: boolean; protected requestScope?: string; protected cachingFlags?: string; protected verbose?: boolean; protected debuggingEnabled?: boolean; constructor(options?: SearchBackendOptionsInterface); /** @inheritdoc */ abstract performSearch(params: SearchParams): Promise>; /** * Fires a request to the URL (with this backend's options applied) and * asynchronously returns a Result object containing either the raw response * JSON or a SearchServiceError. */ protected fetchUrl(url: string, options?: { requestOptions?: RequestInit; }): Promise>; private getErrorResult; /** * Logs a full response to the console, with truncated hits. */ private printResponse; /** * Logs PPS debugging info to the console if it is present on the response object */ private printDebuggingInfo; }