import HttpsClient from './HttpsClient.js'; import { ApiResponse, JobCreationResponse, JobDeleteResponse, JobDownloadRequest, JobResultsRequest, JobResultsResponse, JobSearchRequest, JobSearchResponse, JobStatusResponse } from './types.js'; /** * Jobs API endpoints */ declare class Jobs extends HttpsClient { /** * Search for jobs * @param query Search query parameters * @returns Promise with search results */ search(query?: JobSearchRequest): Promise; /** * Creates a job * @param input Input data (array of emails or remote URL) * @param inputlocation Input location type ('remote_url' or 'supplied') * @param filename Filename for the job * @param runsample Whether to run a sample * @param autoparse Whether to automatically parse * @param autostart Whether to automatically start * @param historicalData Whether to leverage historical data * @param allowManualReview Whether to allow manual review * @param callbackUrl URL to call when job completes * @param callbackHeaders Headers to include in callback request * @returns Promise with job creation response */ create(input: any[] | string, inputlocation?: string, filename?: string, runsample?: boolean, autoparse?: boolean, autostart?: boolean, historicalData?: boolean, allowManualReview?: boolean, callbackUrl?: string, callbackHeaders?: Record): Promise; /** * Starts parsing job after creation * @param jobid Job ID * @param autostart Whether to automatically start * @returns Promise with parse response */ parse(jobid: number, autostart?: boolean): Promise; /** * Starts job waiting to be started * @param jobid Job ID * @param runsample Whether to run a sample * @param allowManualReview Whether to allow manual review * @returns Promise with start response */ start(jobid: number, runsample?: boolean, allowManualReview?: boolean): Promise; /** * Gets job status * @param jobid Job ID * @returns Promise with job status */ status(jobid: number): Promise; /** * Retrieves job results * @param jobid Job ID * @param query Additional query parameters * @returns Promise with job results */ results(jobid: number, query?: Omit): Promise; /** * Downloads results as CSV * @param jobid Job ID * @param query Additional query parameters * @returns Promise with CSV data */ download(jobid: number, query?: Omit): Promise; /** * Deletes a job * @param jobid Job ID * @returns Promise with delete response */ delete(jobid: number): Promise; /** * Job input type constants */ static readonly remote: string; static readonly supplied: string; /** * Helper object for job types and statuses * @since 4.1.4 */ static readonly helpers: { inputType: { remote: string; supplied: string; }; status: { under_review: string; queued: string; failed: string; complete: string; running: string; parsing: string; waiting: string; waiting_analyzed: string; uploading: string; }; }; } export default Jobs;