Parameters that combine to specify a predicate that can be used to select a set of downloads. Used for example in search() and erase()

interface DownloadQuery {
    bytesReceived?: number;
    cookieStoreId?: string;
    danger?: DangerType;
    endedAfter?: DownloadTime;
    endedBefore?: DownloadTime;
    endTime?: string;
    error?: InterruptReason;
    exists?: boolean;
    filename?: string;
    filenameRegex?: string;
    fileSize?: number;
    id?: number;
    limit?: number;
    mime?: string;
    orderBy?: string[];
    paused?: boolean;
    query?: string[];
    startedAfter?: DownloadTime;
    startedBefore?: DownloadTime;
    startTime?: string;
    state?: State;
    totalBytes?: number;
    totalBytesGreater?: number;
    totalBytesLess?: number;
    url?: string;
    urlRegex?: string;
}
Index
bytesReceived?: number

Number of bytes received so far from the host, without considering file compression.

cookieStoreId?: string

The cookie store ID of the contextual identity.

danger?: DangerType

Indication of whether this download is thought to be safe or known to be suspicious.

endedAfter?: DownloadTime

Limits results to downloads that ended after the given ms since the epoch.

endedBefore?: DownloadTime

Limits results to downloads that ended before the given ms since the epoch.

endTime?: string

Why a download was interrupted.

exists?: boolean
filename?: string

Absolute local path.

filenameRegex?: string

Limits results to DownloadItems whose filename matches the given regular expression.

fileSize?: number

Number of bytes in the whole file post-decompression, or -1 if unknown.

id?: number
limit?: number

Setting this integer limits the number of results. Otherwise, all matching DownloadItems will be returned.

mime?: string

The file's MIME type.

orderBy?: string[]

Setting elements of this array to DownloadItem properties in order to sort the search results. For example, setting orderBy='startTime' sorts the DownloadItems by their start time in ascending order. To specify descending order, prefix orderBy with a hyphen: '-startTime'.

paused?: boolean

True if the download has stopped reading data from the host, but kept the connection open.

query?: string[]

This array of search terms limits results to DownloadItems whose filename or url contain all of the search terms that do not begin with a dash '-' and none of the search terms that do begin with a dash.

startedAfter?: DownloadTime

Limits results to downloads that started after the given ms since the epoch.

startedBefore?: DownloadTime

Limits results to downloads that started before the given ms since the epoch.

startTime?: string
state?: State

Indicates whether the download is progressing, interrupted, or complete.

totalBytes?: number

Number of bytes in the whole file, without considering file compression, or -1 if unknown.

totalBytesGreater?: number

Limits results to downloads whose totalBytes is greater than the given integer.

totalBytesLess?: number

Limits results to downloads whose totalBytes is less than the given integer.

url?: string

Absolute URL.

urlRegex?: string

Limits results to DownloadItems whose url matches the given regular expression.