import { WaybackItem } from '../types'; type LocalChangeCandidate = { /** * release number of a wayback item */ releaseNumber: number; /** * size of the tile image data associated with this wayback release */ size: number; /** * url of a tile image from this wayback release */ url: string; }; type GetWaybackItemsWithLocalChangesOptions = { /** * Signal from an AbortController that can be used to cancel the operation if needed. * If the signal is aborted, the function will throw an error indicating that the task has been aborted by the user. */ signal?: AbortSignal; /** * If set to true, the change detector will only use the size of the tile image data to filter out duplicate releases, * without fetching and comparing the actual image data. This may result some actual releases with local changes being incorrectly identified as duplicates and thus not included in the final output, * but it can significantly improve the performance of the change detector by reducing the number of image data fetches and comparisons needed. */ onlyUseSizeToFilterDuplicates?: boolean; }; /** * Retrieves a list of world imagery wayback releases with local changes for a specified geographic point at a given zoom level. * It fetches wayback configuration data, find the release of wayback items with local changes, and determines unique release associated * with image tiles linked to local changes. * * @param point The geographic coordinates (longitude and latitude) of the location of interest, (e.g., `{longitude: -100.05, latitude: 35.10}`) * @param zoom The zoom level used to determine the level of detail for the geographic point * @param options Optional parameters for the function, including an AbortSignal to cancel the operation and a flag to control duplicate filtering behavior * @returns {Promise} A Promise that resolves with an array of unique releases of wayback items * associated with local changes for the given geographic point and zoom level. */ export declare const getWaybackItemsWithLocalChanges: (point: { latitude: number; longitude: number; }, zoom: number, options?: GetWaybackItemsWithLocalChangesOptions) => Promise; /** * Sends tilemap requests to identify World Imagery Wayback releases that contain local changes. * * Returns release numbers of wayback items with local changes for a specific tile (defined by column, row, and level), * along with the size of the tile image data. * * Note: results may include duplicate release numbers with identical tile image data. * * @param column Column coordinate for the tile * @param row Row coordinate for the tile * @param level Level of detail for the tile * @returns A Promise that resolves with an array containing release numbers associated with local changes * found in World Imagery Wayback items. */ export declare const getReleasesWithLocalChanges: ({ column, row, level, }: { column: number; row: number; level: number; }) => Promise; /** * Asynchronous function removeDuplicates is responsible for processing an array of Candidate objects * to extract unique release numbers associated with image data URLs. It eliminates duplicate image data * and returns an array of unique release numbers. * * @param candidates An array of Candidate objects containing URL and releaseNumber information * @param zoomLevel The zoom level used to determine whether to skip duplicate removal process * @returns A Promise that resolves with an array of unique release numbers extracted from the provided Candidates * If the input array is empty or encounters an error during processing, it returns an empty array. */ export declare const removeDuplicates: (candidates: Array, zoomLevel: number) => Promise>; /** * An optimized alternative to {@link removeDuplicates} that reduces the number of image fetches * by first grouping consecutive candidates that share the same tile size. * * Strategy: * 1. Group candidates into runs of consecutive equal-size entries. Singleton groups are kept as-is * since a unique size guarantees a unique image without any network request. * 2. For each multi-candidate group, delegate to {@link removeDuplicatesFromGroup}, which uses a * fast path (compare only the newest and oldest) and falls back to a full comparison only when * the two boundary images differ. * 3. Results from all groups are flattened back into a single ordered array. * * On error, all candidates are returned unchanged so the caller always receives a usable result. * * @param candidates Ordered array (newest → oldest release) of candidates to deduplicate * @param zoomLevel Zoom level of the tile; duplicate removal is skipped for levels ≤ 11 * @param onlyUseSizeToFilterDuplicates If true, candidates are considered duplicates if their sizes match, without fetching image data. This may lead to false positives but improves performance by avoiding network requests. * @returns A Promise resolving to an array of unique release numbers with duplicates removed */ export declare const removeDuplicatesFasterApproach: (candidates: Array, zoomLevel: number, onlyUseSizeToFilterDuplicates?: boolean) => Promise>; export {};