import type { TemplateResult } from 'lit'; import type { SubsetJobError } from '../apis/harmony.api.js'; export interface HarmonyErrorDetails { status: number; code: string; message: string; context?: string; isCancellation?: boolean; } export interface HarmonyError { code: string; message?: string; context?: string; } /** * Checks if an error indicates a user cancellation by checking the error message * and nested error structures * @param error - The error to check * @returns true if the error indicates a user cancellation */ export declare function isCancellationError(error: unknown): boolean; /** * Extracts error information from Harmony GraphQL operations * @param error - The error object from Harmony operations * @param jobErrors - Optional array of job errors from Harmony job status * @returns Error details object with status, code, message, and context */ export declare function extractHarmonyError(error: unknown, jobErrors?: Array): HarmonyErrorDetails; /** * Formats error messages for display in UI components * @param error - Error object with code, message, and optional context * @returns HTML template for the error message */ export declare function formatHarmonyErrorMessage(error: HarmonyError): TemplateResult; /** * Simplifies a GeoJSON object using binary search over the Douglas-Peucker * tolerance to find the finest tolerance that brings the vertex count to * at or below maxPoints. This maximises shape fidelity rather than * just getting under the limit by the smallest possible margin. * * @param geoJson - Any valid GeoJSON object * @param maxPoints - Maximum number of vertices allowed * @returns Simplified GeoJSON, or the original if it was already under the limit */ export declare function simplifyToPointLimit(geoJson: object, maxPoints: number): object;