import { BlockedConnectionToPrivateIpError, BlockedDisallowedPortError, BlockedEmbeddedCredentialsError, BlockedExternalFileExceedingError, BlockedExternalFileLargerThanError, BlockedExternalUnsupportedBytesError, BlockedInlineFileExceedingError, BlockedInlineUnsupportedFileBytesError, BlockedUnsupportedSchemeError, BlockedUrlResolvingToPrivateIpError, ExternalFileResponseBodyEmptyError, FailedToDownloadError, FileSecurityError, InvalidExternalFileUrlError, InvalidInlineFileMalformedBase64Error, InvalidUtf8TextDocumentError, NoIpResolvedError, PdfUrlIngestionError, RedirectMissingLocationError, TextDocumentAttachmentError, TextDocumentControlCharacterError, TimedOutDownloadingError, TooManyRedirectsError, UnableToResolveHostError, UnexpectedRedirectStateError, UnsupportedTextAttachmentSourceError, isTransientDownloadError } from "./file-security-errors.js";
import { ALLOWED_EXTERNAL_IMAGE_MIME_TYPES, ALLOWED_HTTP_PORTS, EXTERNAL_FETCH_TIMEOUT_MS, MAX_EXTERNAL_REDIRECTS, MAX_FILE_BYTES, TEXT_DOCUMENT_MAX_BYTES } from "./file-security-constants.js";
import { normalizeInlineFileBytes, normalizeInlineImageBytes, resolveDownloadedFileMimeType } from "./file-content-security.js";
import { isBlockedIpAddress, makeSanitizedSourceUrl, validateExternalFileUrl, validateUrlResolvesToPublicIp } from "./file-url-security.js";
import { downloadExternalFile } from "./external-file-downloader.js";

export { ALLOWED_EXTERNAL_IMAGE_MIME_TYPES, ALLOWED_HTTP_PORTS, BlockedConnectionToPrivateIpError, BlockedDisallowedPortError, BlockedEmbeddedCredentialsError, BlockedExternalFileExceedingError, BlockedExternalFileLargerThanError, BlockedExternalUnsupportedBytesError, BlockedInlineFileExceedingError, BlockedInlineUnsupportedFileBytesError, BlockedUnsupportedSchemeError, BlockedUrlResolvingToPrivateIpError, EXTERNAL_FETCH_TIMEOUT_MS, ExternalFileResponseBodyEmptyError, FailedToDownloadError, FileSecurityError, InvalidExternalFileUrlError, InvalidInlineFileMalformedBase64Error, InvalidUtf8TextDocumentError, MAX_EXTERNAL_REDIRECTS, MAX_FILE_BYTES, NoIpResolvedError, PdfUrlIngestionError, RedirectMissingLocationError, TEXT_DOCUMENT_MAX_BYTES, TextDocumentAttachmentError, TextDocumentControlCharacterError, TimedOutDownloadingError, TooManyRedirectsError, UnableToResolveHostError, UnexpectedRedirectStateError, UnsupportedTextAttachmentSourceError, downloadExternalFile, isBlockedIpAddress, isTransientDownloadError, makeSanitizedSourceUrl, normalizeInlineFileBytes, normalizeInlineImageBytes, resolveDownloadedFileMimeType, validateExternalFileUrl, validateUrlResolvesToPublicIp };