import type { Static } from '@sinclair/typebox'; import type { ToGeoJSONOptions } from './parser/to_geojson.js'; export type { ToGeoJSONOptions } from './parser/to_geojson.js'; import type { Feature } from './types/feature.js'; import type { GeoJSONFeature } from './types/geojson.js'; import { InputFeature } from './types/feature.js'; import CoT from './cot.js'; import type { CoTOptions } from './cot.js'; export interface SerializerOptions { resetFlow: boolean; } export interface CoTParseError { error: string; event: unknown; } /** * Convert to and from an XML CoT message * @class * * @param cot A string/buffer containing the XML representation or the xml-js object tree * * @prop raw Raw XML-JS representation of CoT */ export declare class CoTParser { static validate(cot: CoT, opts?: { flow: boolean; }): CoT; /** * Detect difference between CoT messages * Note: This diffs based on GeoJSON Representation of message * So if unknown properties are present they will be excluded from the diff */ static isDiff(aCoT: CoT, bCoT: CoT, opts?: { diffMetadata: boolean; diffStaleStartTime: boolean; diffDest: boolean; diffFlow: boolean; }): Promise; static from_xml(raw: Buffer | string, opts?: CoTOptions): CoT; static from_xml_document(raw: Buffer | string, opts?: CoTOptions): { cots: CoT[]; invalid: CoTParseError[]; }; static to_xml(cot: CoT, opts?: SerializerOptions): string; /** * Return an ATAK Compliant Protobuf */ static to_proto(cot: CoT, version?: number, opts?: SerializerOptions): Promise; /** * Return a GeoJSON Feature from an XML CoT message */ static to_geojson(cot: CoT, opts?: ToGeoJSONOptions): Promise>; /** * Parse an ATAK compliant Protobuf to a JS Object */ static from_proto(raw: Uint8Array, version?: number, opts?: CoTOptions): Promise; static normalize_geojson(feature: Static): Promise>; /** * Return an CoT Message given a GeoJSON Feature * * @param {Object} feature GeoJSON Point Feature * * @return {CoT} */ static from_geojson(feature: Static, opts?: CoTOptions): Promise; }