import type { Static } from '@sinclair/typebox'; import type { Polygon, Position } from './types/feature.js'; import type { MartiDestAttributes, LinkAttributes, CreatorAttributes, VideoAttributes, SensorAttributes, VideoConnectionEntryAttributes } from './types/types.js'; import JSONCoT, { Detail } from './types/types.js'; export type CoTOptions = { verbose?: boolean; creator?: CoT | { uid: string; type: string; callsign: string; time?: Date | string; }; milsym?: { augment?: boolean; }; }; /** * 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 default class CoT { raw: Static; metadata: Record; path: string; constructor(cot: Static, opts?: CoTOptions); /** * Returns or sets the UID of the CoT */ uid(uid?: string): string; /** * Returns or sets the Callsign of the CoT */ type(type?: string): string; /** * Returns or sets the detail.archive tag which instructs the TAK client to locally archive this feature * * @param archived - Optional archive state to set */ archived(archived?: boolean): boolean; /** * Returns or sets the Callsign of the CoT * * @param callsign - Optional Callsign to set */ callsign(callsign?: string): string; /** * Return Detail Object of CoT or create one if it doesn't yet exist and pass a reference */ detail(): Static; /** * Add a given Dest tag to a CoT */ addDest(dest: Static): CoT; addVideo(video: Static, connection?: Static): CoT; position(position?: Static): Static; sensor(sensor?: Static): Static | null; creator(creator?: { uid: string; type: string; callsign?: string; time: Date | string | undefined; }): Static | undefined; addLink(link: Static): CoT; is_stale(): boolean; /** * Determines if the CoT message represents a Tasking Message * * @return {boolean} */ is_tasking(): boolean; /** * Determines if the CoT message represents a Chat Message * Note: Chat Receipts are excluded even when they reuse the `__chat` * detail element (WinTAK style) - see `is_chat_receipt()` * * @return {boolean} */ is_chat(): boolean; /** * Determines if the CoT message represents a Chat Receipt * Note: ATAK sends receipts with a `__chatreceipt` detail element, while * WinTAK reuses the `__chat` element - the CoT type is authoritative * * @return {boolean} */ is_chat_receipt(): boolean; /** * Determines if the CoT message represents a Friendly Element * * @return {boolean} */ is_friend(): boolean; /** * Determines if the CoT message represents a Hostile Element * * @return {boolean} */ is_hostile(): boolean; /** * Determines if the CoT message represents a Unknown Element * * @return {boolean} */ is_unknown(): boolean; /** * Determines if the CoT message represents a Pending Element * * @return {boolean} */ is_pending(): boolean; /** * Determines if the CoT message represents an Assumed Element * * @return {boolean} */ is_assumed(): boolean; /** * Determines if the CoT message represents a Neutral Element * * @return {boolean} */ is_neutral(): boolean; /** * Determines if the CoT message represents a Suspect Element * * @return {boolean} */ is_suspect(): boolean; /** * Determines if the CoT message represents a Joker Element * * @return {boolean} */ is_joker(): boolean; /** * Determines if the CoT message represents a Faker Element * * @return {boolean} */ is_faker(): boolean; /** * Determines if the CoT message represents an Element * * @return {boolean} */ is_atom(): boolean; /** * Determines if the CoT message represents an Airborne Element * * @return {boolean} */ is_airborne(): boolean; /** * Determines if the CoT message represents a Ground Element * * @return {boolean} */ is_ground(): boolean; /** * Determines if the CoT message represents an Installation * * @return {boolean} */ is_installation(): boolean; /** * Determines if the CoT message represents a Vehicle * * @return {boolean} */ is_vehicle(): boolean; /** * Determines if the CoT message represents Equipment * * @return {boolean} */ is_equipment(): boolean; /** * Determines if the CoT message represents a Surface Element * * @return {boolean} */ is_surface(): boolean; /** * Determines if the CoT message represents a Subsurface Element * * @return {boolean} */ is_subsurface(): boolean; /** * Determines if the CoT message represents a UAV Element * * @return {boolean} */ is_uav(): boolean; /** * Return a CoT Message */ static ping(): CoT; }