import { R as Result, E as ExecOptions, D as DcmtkProcessResult, S as SpawnOptions } from './types-Cgumy1N4.js';
export { L as LineSource, P as ProcessLine, a as ResultValue, b as assertUnreachable, e as err, m as mapResult, o as ok } from './types-Cgumy1N4.js';
import { A as AETitle, D as DicomTag, a as DicomTagPath, P as Port, S as SOPClassUID, T as TransferSyntaxUID, b as DicomDataset } from './DicomInstance-CQEIuF_x.js';
export { B as Brand, C as ChangeSet, c as DicomFilePath, d as DicomInstance, e as createAETitle, f as createDicomFilePath, g as createDicomTag, h as createDicomTagPath, i as createPort, j as createSOPClassUID, k as createTransferSyntaxUID, t as tag } from './DicomInstance-CQEIuF_x.js';
import { z } from 'zod';
export { AssociationAcknowledgedData, AssociationCompleteData, AssociationContext, AssociationReceivedData, AssociationSummary, AssociationTracker, CStoreRequestData, CannotStartListenerData, ConfigErrorData, DCMPRSCP_FATAL_EVENTS, DCMPRSCP_PATTERNS, DCMPSRCV_FATAL_EVENTS, DCMPSRCV_PATTERNS, DCMQRSCP_FATAL_EVENTS, DCMQRSCP_PATTERNS, DCMRECV_FATAL_EVENTS, DCMRECV_PATTERNS, DatabaseReadyData, DcmQRSCP, DcmQRSCPEventMap, DcmQRSCPOptions, DcmprsCP, DcmprsCPEventMap, DcmprsCPOptions, DcmprscpEvent, DcmprscpEventValue, Dcmpsrcv, DcmpsrcvEvent, DcmpsrcvEventMap, DcmpsrcvEventValue, DcmpsrcvOptions, DcmqrscpEvent, DcmqrscpEventValue, Dcmrecv, DcmrecvEvent, DcmrecvEventMap, DcmrecvEventValue, DcmrecvOptions, DcmtkProcess, DcmtkProcessConfig, DcmtkProcessEventMap, DicomReceiver, DicomReceiverEventMap, DicomReceiverOptions, EventPattern, FileDeletedData, FileReceivedData, FilenameMode, FilenameModeValue, LineParser, LineParserEventMap, MultiLineConfig, PoolStatus, PreferredTransferSyntax, PreferredTransferSyntaxValue, PrintAssociationAcknowledgedData, PrintAssociationReceivedData, PrintCannotStartListenerData, ProcessState, ProcessStateValue, QRAssociationAcknowledgedData, QRAssociationReceivedData, QRCFindRequestData, QRCGetRequestData, QRCMoveRequestData, QRCStoreRequestData, QRCannotStartListenerData, QRListeningData, ReceiverAssociationAcknowledgedData, ReceiverAssociationData, ReceiverAssociationReceivedData, ReceiverCStoreRequestData, ReceiverCannotStartListenerData, ReceiverConfigErrorData, ReceiverDatabaseReadyData, ReceiverEchoRequestData, ReceiverErrorData, ReceiverFileData, ReceiverListeningData, RefusingAssociationData, STORESCP_FATAL_EVENTS, STORESCP_PATTERNS, StorageMode, StorageModeValue, StoreSCP, StoreSCPEventMap, StoreSCPOptions, StoreSCPPreset, StoreSCPPresetName, StoredFileData, StorescpEvent, StorescpEventValue, StoringFileData, SubdirectoryCreatedData, SubdirectoryMode, SubdirectoryModeValue, TrackedFile, WLMSCPFS_FATAL_EVENTS, WLMSCPFS_PATTERNS, WlmAssociationAcknowledgedData, WlmAssociationReceivedData, WlmCFindRequestData, WlmCannotStartListenerData, WlmListeningData, Wlmscpfs, WlmscpfsEvent, WlmscpfsEventMap, WlmscpfsEventValue, WlmscpfsOptions } from './servers.js';
export { a as DcmodifyOptions, b as DcmodifyResult, D as DicomJsonElement, c as DicomJsonModel, T as TagModification, d as ToolBaseOptions, e as dcmodify, x as xmlToJson } from './dcmodify-B-_uUIKB.js';
export { DictionaryEntry, SOPClassName, SOP_CLASSES, TagSegment, VR, VRCategoryName, VRMetadata, VRValue, VR_CATEGORY, VR_CATEGORY_NAME, VR_META, getVRCategory, isBinaryVR, isNumericVR, isStringVR, lookupTag, lookupTagByKeyword, lookupTagByName, segmentsToModifyPath, segmentsToString, sopClassNameFromUID, tagPathToSegments } from './dicom.js';
export { Cda2dcmOptions, Cda2dcmResult, ColorConversion, ColorConversionValue, Dcm2cdaOptions, Dcm2cdaResult, Dcm2jsonOptions, Dcm2jsonResult, Dcm2jsonSource, Dcm2pdfOptions, Dcm2pdfResult, Dcm2pnmOptions, Dcm2pnmOutputFormat, Dcm2pnmOutputFormatValue, Dcm2pnmResult, Dcm2xmlCharset, Dcm2xmlCharsetValue, Dcm2xmlOptions, Dcm2xmlResult, DcmcjpegOptions, DcmcjpegResult, DcmcjplsOptions, DcmcjplsResult, DcmconvOptions, DcmconvResult, DcmcrleOptions, DcmcrleResult, DcmdecapOptions, DcmdecapResult, DcmdjpegOptions, DcmdjpegResult, DcmdjplsOptions, DcmdjplsResult, DcmdrleOptions, DcmdrleResult, DcmdspfnOptions, DcmdspfnResult, DcmdumpFormat, DcmdumpFormatValue, DcmdumpOptions, DcmdumpResult, DcmencapOptions, DcmencapResult, DcmftestOptions, DcmftestResult, DcmgpdirOptions, DcmgpdirResult, Dcmj2pnmOptions, Dcmj2pnmOutputFormat, Dcmj2pnmOutputFormatValue, Dcmj2pnmResult, DcmmkcrvOptions, DcmmkcrvResult, DcmmkdirOptions, DcmmkdirResult, DcmmklutOptions, DcmmklutResult, Dcmp2pgmOptions, Dcmp2pgmResult, DcmprscuOptions, DcmprscuResult, DcmpschkOptions, DcmpschkResult, DcmpsmkOptions, DcmpsmkResult, DcmpsprtOptions, DcmpsprtResult, DcmqridxOptions, DcmqridxResult, DcmquantOptions, DcmquantResult, DcmscaleOptions, DcmscaleResult, DcmsendOptions, DcmsendResult, Dcod2lumOptions, Dcod2lumResult, DconvlumOptions, DconvlumResult, DrtdumpOptions, DrtdumpResult, Dsr2xmlOptions, Dsr2xmlResult, DsrdumpOptions, DsrdumpResult, Dump2dcmOptions, Dump2dcmResult, EchoscuOptions, EchoscuResult, FindscuOptions, FindscuResult, GetQueryModel, GetQueryModelValue, GetscuOptions, GetscuResult, Img2dcmInputFormat, Img2dcmInputFormatValue, Img2dcmOptions, Img2dcmResult, JplsColorConversion, JplsColorConversionValue, Json2dcmOptions, Json2dcmResult, LutType, LutTypeValue, MoveQueryModel, MoveQueryModelValue, MovescuOptions, MovescuResult, Pdf2dcmOptions, Pdf2dcmResult, ProposedTransferSyntax, ProposedTransferSyntaxValue, QueryModel, QueryModelValue, Stl2dcmOptions, Stl2dcmResult, StorescuOptions, StorescuResult, TermscuOptions, TermscuResult, TransferSyntax, TransferSyntaxValue, Xml2dcmOptions, Xml2dcmResult, Xml2dsrOptions, Xml2dsrResult, cda2dcm, dcm2cda, dcm2json, dcm2pdf, dcm2pnm, dcm2xml, dcmcjpeg, dcmcjpls, dcmconv, dcmcrle, dcmdecap, dcmdjpeg, dcmdjpls, dcmdrle, dcmdspfn, dcmdump, dcmencap, dcmftest, dcmgpdir, dcmj2pnm, dcmmkcrv, dcmmkdir, dcmmklut, dcmp2pgm, dcmprscu, dcmpschk, dcmpsmk, dcmpsprt, dcmqridx, dcmquant, dcmscale, dcmsend, dcod2lum, dconvlum, drtdump, dsr2xml, dsrdump, dump2dcm, echoscu, findscu, getscu, img2dcm, json2dcm, movescu, pdf2dcm, stl2dcm, storescu, termscu, xml2dcm, xml2dsr } from './tools.js';
export { BatchOptions, BatchResult, RetryOptions, batch, retry } from './utils.js';
import 'node:events';

/**
 * Runtime validation schemas and parse functions.
 *
 * All external inputs are validated at module boundaries using Zod (Rule 7.2).
 * Each schema has a corresponding parse function returning `Result<BrandedType>`.
 * Internal code trusts branded types without re-validation.
 *
 * @module validation
 */

/** Schema for DICOM AE Titles: 1-16 chars, letters/digits/spaces/hyphens. */
declare const AETitleSchema: z.ZodString;
/** Schema for network port numbers: integer 1-65535. */
declare const PortSchema: z.ZodNumber;
/** Schema for DICOM tags: (XXXX,XXXX) where X is a hex digit. */
declare const DicomTagSchema: z.ZodString;
/** Schema for DICOM tag paths: dot-separated tags with optional array indices. */
declare const DicomTagPathSchema: z.ZodString;
/** Schema for DICOM UIDs: dotted numeric OID, 1-64 chars. */
declare const UIDSchema: z.ZodString;
/**
 * Validates unknown input as an AE Title.
 *
 * @param input - The unknown input to validate
 * @returns Result containing a branded AETitle or an error
 */
declare function parseAETitle(input: unknown): Result<AETitle>;
/**
 * Validates unknown input as a network port.
 *
 * @param input - The unknown input to validate
 * @returns Result containing a branded Port or an error
 */
declare function parsePort(input: unknown): Result<Port>;
/**
 * Validates unknown input as a DICOM tag.
 *
 * @param input - The unknown input to validate
 * @returns Result containing a branded DicomTag or an error
 */
declare function parseDicomTag(input: unknown): Result<DicomTag>;
/**
 * Validates unknown input as a DICOM tag path.
 *
 * @param input - The unknown input to validate
 * @returns Result containing a branded DicomTagPath or an error
 */
declare function parseDicomTagPath(input: unknown): Result<DicomTagPath>;
/**
 * Validates unknown input as a SOP Class UID.
 *
 * @param input - The unknown input to validate
 * @returns Result containing a branded SOPClassUID or an error
 */
declare function parseSOPClassUID(input: unknown): Result<SOPClassUID>;
/**
 * Validates unknown input as a Transfer Syntax UID.
 *
 * @param input - The unknown input to validate
 * @returns Result containing a branded TransferSyntaxUID or an error
 */
declare function parseTransferSyntaxUID(input: unknown): Result<TransferSyntaxUID>;

/**
 * Application-wide constants.
 *
 * All values use `as const` assertions per Rule 3.5 (no traditional enums).
 * All bounds are documented per Rule 8.1 (bounded loops/buffers).
 *
 * @module constants
 */
/** Default timeout for short-lived process execution (30 seconds). */
declare const DEFAULT_TIMEOUT_MS = 30000;
/** Default timeout for long-lived process startup (10 seconds). */
declare const DEFAULT_START_TIMEOUT_MS = 10000;
/** Default timeout for graceful shutdown drain (5 seconds). */
declare const DEFAULT_DRAIN_TIMEOUT_MS = 5000;
/** Default timeout for multi-line block accumulation in line parser (1 second). */
declare const DEFAULT_BLOCK_TIMEOUT_MS = 1000;
/** DICOM protocol default PDU sizes. */
declare const PDU_SIZE: {
    /** Default maximum PDU receive size (16 KB). */
    readonly DEFAULT: 16384;
    /** Minimum allowed PDU size (4 KB). */
    readonly MIN: 4096;
    /** Maximum allowed PDU size (128 KB). */
    readonly MAX: 131072;
};
/** Default DICOM port used by DCMTK tools. */
declare const DEFAULT_DICOM_PORT = 104;
/** Known DCMTK binary locations on Windows. */
declare const WINDOWS_SEARCH_PATHS: readonly ["C:\\Program Files\\DCMTK\\bin", "C:\\Program Files (x86)\\DCMTK\\bin", "C:\\ProgramData\\chocolatey\\bin"];
/** Known DCMTK binary locations on Unix/macOS. */
declare const UNIX_SEARCH_PATHS: readonly ["/usr/local/bin", "/usr/bin", "/opt/local/bin", "/opt/homebrew/bin"];
/** Binaries that must be present for the library to function. */
declare const REQUIRED_BINARIES: readonly ["dcm2json", "dcm2xml", "dcmodify", "dcmdump", "dcmrecv", "dcmsend", "echoscu"];
/** Maximum lines accumulated in multi-line block parser. */
declare const MAX_BLOCK_LINES = 1000;
/** Maximum number of event patterns a line parser can hold. */
declare const MAX_EVENT_PATTERNS = 200;
/** Maximum loop iterations for iterative traversal (e.g., nested sequences). */
declare const MAX_TRAVERSAL_DEPTH = 50;
/** Maximum number of operations (modifications + erasures) in a single ChangeSet. */
declare const MAX_CHANGESET_OPERATIONS = 10000;

/**
 * Locates DCMTK binaries on the host system.
 *
 * Search order:
 * 1. `DCMTK_PATH` environment variable
 * 2. Platform-specific known install locations
 * 3. System PATH (via `which`/`where` lookup)
 *
 * @module findDcmtkPath
 */

/**
 * Options for {@link findDcmtkPath}.
 */
interface FindDcmtkPathOptions {
    /** Bypass the cached result and perform a fresh search. */
    readonly noCache?: boolean | undefined;
}
/**
 * Locates the directory containing DCMTK command-line binaries.
 *
 * Searches in the following order:
 * 1. `DCMTK_PATH` environment variable (if set)
 * 2. Platform-specific known install locations
 * 3. System PATH lookup via `which`/`where`
 *
 * The result is cached after the first successful call. Pass `{ noCache: true }`
 * to force a fresh search.
 *
 * @param options - Optional configuration
 * @returns A Result containing the DCMTK binary directory path, or an error if not found
 * @throws Never throws for expected failures (Rule 6.1)
 *
 * @example
 * ```ts
 * const result = findDcmtkPath();
 * if (result.ok) {
 *     console.log(`DCMTK found at: ${result.value}`);
 * } else {
 *     console.error(result.error.message);
 * }
 * ```
 */
declare function findDcmtkPath(options?: FindDcmtkPathOptions): Result<string>;
/**
 * Clears the cached DCMTK path. Primarily for testing.
 */
declare function clearDcmtkPathCache(): void;

/**
 * Short-lived DCMTK process execution.
 *
 * Two execution modes:
 * - `execCommand()` — convenience wrapper; uses `spawn()` internally for safety
 * - `spawnCommand()` — uses `child_process.spawn()`, safer for user-supplied values (Rule 7.4)
 *
 * Both enforce mandatory timeouts (Rule 4.2) and return `Result<DcmtkProcessResult>`.
 *
 * @module exec
 */

/**
 * Executes a DCMTK binary as a short-lived process.
 *
 * **Security:** This function uses `child_process.spawn()` internally, passing
 * arguments as an array to avoid shell interpretation. This eliminates shell
 * injection risks regardless of argument content (Rule 7.4).
 *
 * @param binary - Full path to the DCMTK binary
 * @param args - Command-line arguments (passed directly, no shell interpolation)
 * @param options - Execution options (timeout, cwd, signal)
 * @returns A Result containing the process output or an error
 * @throws Never throws for expected failures (Rule 6.1)
 *
 * @example
 * ```ts
 * const result = await execCommand('/usr/local/bin/dcm2json', ['+ll', 'input.dcm']);
 * if (result.ok) {
 *     console.log(result.value.stdout);
 * }
 * ```
 */
declare function execCommand(binary: string, args: readonly string[], options?: ExecOptions): Promise<Result<DcmtkProcessResult>>;
/**
 * Executes a DCMTK binary using `child_process.spawn()`.
 *
 * Like {@link execCommand}, arguments are passed as an array to avoid shell
 * injection (Rule 7.4). This variant additionally supports custom environment
 * variables via the `env` option.
 *
 * @param binary - Full path to the DCMTK binary
 * @param args - Command-line arguments (passed directly, no shell interpolation)
 * @param options - Execution options (timeout, cwd, signal, env)
 * @returns A Result containing the process output or an error
 * @throws Never throws for expected failures (Rule 6.1)
 *
 * @example
 * ```ts
 * const result = await spawnCommand('/usr/local/bin/dcmodify', ['-m', '(0010,0010)=Smith^John', 'input.dcm']);
 * ```
 */
declare function spawnCommand(binary: string, args: readonly string[], options?: SpawnOptions): Promise<Result<DcmtkProcessResult>>;

/**
 * Type definitions for the high-level PACS client API.
 *
 * @module pacs/types
 */

/** Query levels supported by C-FIND. */
declare const QueryLevel: {
    readonly STUDY: "STUDY";
    readonly SERIES: "SERIES";
    readonly IMAGE: "IMAGE";
    readonly WORKLIST: "WORKLIST";
};
/** Union of valid query level values. */
type QueryLevelValue = (typeof QueryLevel)[keyof typeof QueryLevel];
/** Retrieval modes for C-GET and C-MOVE. */
declare const RetrieveMode: {
    readonly C_GET: "C_GET";
    readonly C_MOVE: "C_MOVE";
};
/** Union of valid retrieve mode values. */
type RetrieveModeValue = (typeof RetrieveMode)[keyof typeof RetrieveMode];
/** Base options shared by all PacsClient methods. */
interface PacsMethodOptions {
    /** Timeout in milliseconds for this operation. Overrides client default. */
    readonly timeoutMs?: number | undefined;
    /** AbortSignal for external cancellation. */
    readonly signal?: AbortSignal | undefined;
}
/** Connection configuration for a PACS node. */
interface PacsClientConfig {
    /** Remote host or IP address. **Security:** Not validated for SSRF — callers accepting user input should validate against private/internal IP ranges. */
    readonly host: string;
    /** Remote port number (1-65535). */
    readonly port: number;
    /** Calling AE Title (local). Defaults to 'DCMTK'. */
    readonly callingAETitle?: string | undefined;
    /** Called AE Title (remote). Defaults to 'ANY-SCP'. */
    readonly calledAETitle?: string | undefined;
    /** Default timeout in milliseconds for all operations. */
    readonly timeoutMs?: number | undefined;
}
/** Options for {@link PacsClient.echo}. */
type PacsEchoOptions = PacsMethodOptions;
/** Options for {@link PacsClient.findStudies} and related query methods. */
interface PacsQueryOptions extends PacsMethodOptions {
    /** Maximum number of concurrent file parse operations. Defaults to 5. Clamped to range [1, 64]. */
    readonly parseConcurrency?: number | undefined;
}
/** Options for {@link PacsClient.retrieveStudy} and related retrieval methods. */
interface PacsRetrieveOptions extends PacsMethodOptions {
    /** Directory to write retrieved files into. */
    readonly outputDirectory: string;
    /** Retrieval mode. Defaults to C_GET. */
    readonly mode?: RetrieveModeValue | undefined;
    /** Move destination AE Title (required when mode is C_MOVE). */
    readonly moveDestination?: string | undefined;
}
/** Options for {@link PacsClient.store}. */
interface PacsStoreOptions extends PacsMethodOptions {
    /** Scan directories for DICOM files. */
    readonly scanDirectories?: boolean | undefined;
    /** Recurse into subdirectories (requires scanDirectories). */
    readonly recurse?: boolean | undefined;
}
/** Filter criteria for study-level C-FIND queries. */
interface StudyFilter {
    /** Patient ID (0010,0020). */
    readonly patientId?: string | undefined;
    /** Patient Name (0010,0010). Supports wildcards. */
    readonly patientName?: string | undefined;
    /** Study Date (0008,0020). Supports ranges like '20240101-20241231'. */
    readonly studyDate?: string | undefined;
    /** Accession Number (0008,0050). */
    readonly accessionNumber?: string | undefined;
    /** Modality (0008,0060). */
    readonly modality?: string | undefined;
    /** Study Instance UID (0020,000d). */
    readonly studyInstanceUID?: string | undefined;
    /** Study Description (0008,1030). */
    readonly studyDescription?: string | undefined;
}
/** Filter criteria for series-level C-FIND queries. */
interface SeriesFilter {
    /** Study Instance UID (required for series-level queries). */
    readonly studyInstanceUID: string;
    /** Modality (0008,0060). */
    readonly modality?: string | undefined;
    /** Series Number (0020,0011). */
    readonly seriesNumber?: string | undefined;
    /** Series Instance UID (0020,000e). */
    readonly seriesInstanceUID?: string | undefined;
    /** Series Description (0008,103e). */
    readonly seriesDescription?: string | undefined;
}
/** Filter criteria for image-level C-FIND queries. */
interface ImageFilter {
    /** Study Instance UID (required for image-level queries). */
    readonly studyInstanceUID: string;
    /** Series Instance UID (required for image-level queries). */
    readonly seriesInstanceUID: string;
    /** Instance Number (0020,0013). */
    readonly instanceNumber?: string | undefined;
    /** SOP Instance UID (0008,0018). */
    readonly sopInstanceUID?: string | undefined;
    /** SOP Class UID (0008,0016). */
    readonly sopClassUID?: string | undefined;
}
/** Filter criteria for worklist C-FIND queries. Raw key pass-through. */
interface WorklistFilter {
    /** Raw DICOM key strings (e.g., '0040,0100.0008,0060=CT'). */
    readonly keys: readonly string[];
}
/** Result of a PACS echo (C-ECHO) operation. */
interface PacsEchoResult {
    /** Whether the echo succeeded. */
    readonly success: boolean;
    /** Round-trip time in milliseconds. */
    readonly rttMs: number;
}
/** Result of a PACS store (C-STORE) operation. */
interface PacsStoreResult {
    /** Whether the store completed successfully. */
    readonly success: boolean;
    /** Number of files sent. */
    readonly fileCount: number;
}
/** Result of a PACS retrieve (C-GET/C-MOVE) operation. */
interface PacsRetrieveResult {
    /** Whether the retrieval completed successfully. */
    readonly success: boolean;
    /** Directory containing the retrieved files. */
    readonly outputDirectory: string;
}
/** Result of a PACS query (C-FIND) operation. */
type PacsQueryResult = readonly DicomDataset[];

/**
 * High-level PACS client encapsulating DICOM network operations.
 *
 * Wraps findscu, getscu, movescu, storescu, and echoscu with a
 * connection-config-once, call-many pattern. Query results are
 * returned as DicomDataset arrays for immediate use.
 *
 * @module pacs/PacsClient
 */

/** Default concurrency for parallel file parsing in PacsClient queries. Exported for consumer reference. */
declare const DEFAULT_PARSE_CONCURRENCY = 5;
/**
 * High-level PACS client for DICOM network operations.
 *
 * Encapsulates connection configuration and provides friendly methods
 * for Echo (C-ECHO), Query (C-FIND), Retrieve (C-GET/C-MOVE), and
 * Store (C-STORE) operations.
 *
 * @example
 * ```ts
 * const clientResult = PacsClient.create({
 *     host: '192.168.1.100',
 *     port: 104,
 *     calledAETitle: 'PACS',
 * });
 * if (!clientResult.ok) throw clientResult.error;
 * const client = clientResult.value;
 *
 * // Echo
 * const echo = await client.echo();
 *
 * // Query studies
 * const studies = await client.findStudies({ patientId: 'PAT001' });
 *
 * // Retrieve a study
 * const retrieve = await client.retrieveStudy('1.2.3.4', {
 *     outputDirectory: '/tmp/dicom',
 * });
 * ```
 */
declare class PacsClient {
    private readonly config;
    private constructor();
    /**
     * Creates a new PacsClient instance with validated configuration.
     *
     * @param config - PACS connection configuration
     * @returns A Result containing the PacsClient or a validation error
     */
    static create(config: PacsClientConfig): Result<PacsClient>;
    /** Remote host. */
    get host(): string;
    /** Remote port. */
    get port(): number;
    /** Calling AE Title. */
    get callingAETitle(): string | undefined;
    /** Called AE Title. */
    get calledAETitle(): string | undefined;
    /**
     * Tests DICOM connectivity using C-ECHO.
     *
     * @param options - Echo options
     * @returns A Result containing the echo result with RTT
     */
    echo(options?: PacsEchoOptions): Promise<Result<PacsEchoResult>>;
    /**
     * Queries for studies matching the given filter.
     *
     * @param filter - Study-level filter criteria
     * @param options - Query options
     * @returns A Result containing matching DicomDatasets
     */
    findStudies(filter: StudyFilter, options?: PacsQueryOptions): Promise<Result<readonly DicomDataset[]>>;
    /**
     * Queries for series matching the given filter.
     *
     * @param filter - Series-level filter criteria (studyInstanceUID required)
     * @param options - Query options
     * @returns A Result containing matching DicomDatasets
     */
    findSeries(filter: SeriesFilter, options?: PacsQueryOptions): Promise<Result<readonly DicomDataset[]>>;
    /**
     * Queries for images matching the given filter.
     *
     * @param filter - Image-level filter criteria
     * @param options - Query options
     * @returns A Result containing matching DicomDatasets
     */
    findImages(filter: ImageFilter, options?: PacsQueryOptions): Promise<Result<readonly DicomDataset[]>>;
    /**
     * Queries a worklist SCP with raw filter keys.
     *
     * @param filter - Worklist filter with raw key strings
     * @param options - Query options
     * @returns A Result containing matching DicomDatasets
     */
    findWorklist(filter: WorklistFilter, options?: PacsQueryOptions): Promise<Result<readonly DicomDataset[]>>;
    /**
     * Executes a raw C-FIND query with arbitrary keys.
     *
     * @param keys - Array of -k argument strings
     * @param options - Query options
     * @returns A Result containing matching DicomDatasets
     */
    find(keys: readonly string[], options?: PacsQueryOptions): Promise<Result<readonly DicomDataset[]>>;
    /**
     * Retrieves a study by Study Instance UID.
     *
     * @param studyInstanceUID - Study Instance UID to retrieve
     * @param options - Retrieval options (outputDirectory required)
     * @returns A Result containing the retrieval result
     */
    retrieveStudy(studyInstanceUID: string, options: PacsRetrieveOptions): Promise<Result<PacsRetrieveResult>>;
    /**
     * Retrieves a series by Study + Series Instance UIDs.
     *
     * @param studyInstanceUID - Study Instance UID
     * @param seriesInstanceUID - Series Instance UID to retrieve
     * @param options - Retrieval options (outputDirectory required)
     * @returns A Result containing the retrieval result
     */
    retrieveSeries(studyInstanceUID: string, seriesInstanceUID: string, options: PacsRetrieveOptions): Promise<Result<PacsRetrieveResult>>;
    /**
     * Sends DICOM files to the remote SCP using C-STORE.
     *
     * @param files - File paths to send
     * @param options - Store options
     * @returns A Result containing the store result
     */
    store(files: readonly string[], options?: PacsStoreOptions): Promise<Result<PacsStoreResult>>;
    /**
     * Resolves the effective timeout: method override > client config > default.
     */
    private resolveTimeout;
    /**
     * Executes a C-FIND query: creates temp dir, runs findscu --extract,
     * parses extracted files, cleans up temp dir.
     */
    private executeQuery;
    /**
     * Runs findscu --extract and parses the results from the temp directory.
     */
    private runFindAndParse;
    /**
     * Dispatches retrieval to C-GET or C-MOVE based on the mode option.
     */
    private executeRetrieve;
    /**
     * Executes a C-GET retrieval via getscu.
     */
    private executeCGet;
    /**
     * Executes a C-MOVE retrieval via movescu.
     */
    private executeCMove;
}

export { AETitle, AETitleSchema, DEFAULT_BLOCK_TIMEOUT_MS, DEFAULT_DICOM_PORT, DEFAULT_DRAIN_TIMEOUT_MS, DEFAULT_PARSE_CONCURRENCY, DEFAULT_START_TIMEOUT_MS, DEFAULT_TIMEOUT_MS, DcmtkProcessResult, DicomDataset, DicomTag, DicomTagPath, DicomTagPathSchema, DicomTagSchema, ExecOptions, type FindDcmtkPathOptions, type ImageFilter, MAX_BLOCK_LINES, MAX_CHANGESET_OPERATIONS, MAX_EVENT_PATTERNS, MAX_TRAVERSAL_DEPTH, PDU_SIZE, PacsClient, type PacsClientConfig, type PacsEchoOptions, type PacsEchoResult, type PacsMethodOptions, type PacsQueryOptions, type PacsQueryResult, type PacsRetrieveOptions, type PacsRetrieveResult, type PacsStoreOptions, type PacsStoreResult, Port, PortSchema, QueryLevel, type QueryLevelValue, REQUIRED_BINARIES, Result, RetrieveMode, type RetrieveModeValue, SOPClassUID, type SeriesFilter, SpawnOptions, type StudyFilter, TransferSyntaxUID, UIDSchema, UNIX_SEARCH_PATHS, WINDOWS_SEARCH_PATHS, type WorklistFilter, clearDcmtkPathCache, execCommand, findDcmtkPath, parseAETitle, parseDicomTag, parseDicomTagPath, parsePort, parseSOPClassUID, parseTransferSyntaxUID, spawnCommand };
