import { DownloadFormat } from "./download-format"; import { DownloadTarget } from "./download-target"; import { DownloadStatuses } from "./download-status"; import type { ArcGISIdentityManager } from "@esri/arcgis-rest-request"; export interface IDownloadMetadataRequestParams { target?: DownloadTarget; host: string; datasetId: string; format: DownloadFormat; spatialRefId?: string; geometry?: string; where?: string; authentication?: ArcGISIdentityManager; } export interface IDownloadMetadataResults { downloadId: string; status: DownloadStatuses; errors?: Error[]; lastEditDate?: string; contentLastModified?: string; lastModified?: string; downloadUrl?: string; contentLength?: number; cacheTime?: number; } /** * ```js * import { requestDownloadMetadata } from "@esri/hub-downloads"; * const params = { * host: 'https://opendata.arcgis.com, * datasetId: 'abcdef0123456789abcdef0123456789_0', * format: 'CSV', * target: 'hub' * }; * requestDownloadMetadata(params) * .then(response => { * // { * // downloadId: 'abcdef0123456789abcdef0123456789_0::csv', * // contentLastModified: '2020-06-17T01:16:01.933Z', * // lastEditDate: '2020-06-18T01:17:31.492Z', * // lastModified: '2020-06-17T13:04:28.000Z', * // status: 'stale', * // downloadUrl: 'https://dev-hub-indexer.s3.amazonaws.com/files/dd4580c810204019a7b8eb3e0b329dd6/0/full/4326/dd4580c810204019a7b8eb3e0b329dd6_0_full_4326.csv', * // contentLength: 1391454, * // cacheTime: 13121 * // } * }); * ``` * Fetch metadata for a Hub download. * @param {IDownloadMetadataRequestParams} params * @returns {Promise} */ export declare function requestDownloadMetadata(params: IDownloadMetadataRequestParams): Promise;