@tak-ps/node-cot
Version:
Lightweight JavaScript library for parsing and manipulating TAK messages
62 lines (61 loc) • 1.57 kB
TypeScript
import CoT from '../cot.js';
export type MissionChatMember = {
uid: string;
type?: string;
};
export type MissionChatInput = {
from: MissionChatMember;
mission: {
name: string;
id: string;
guid?: string;
};
senderCallsign: string;
message: string;
parent?: string;
groupOwner?: boolean;
messageId?: string;
};
export declare class MissionChat extends CoT {
constructor(chat: MissionChatInput);
}
export type DirectChatMember = {
uid: string;
callsign: string;
};
export declare const DirectChatReceiptStatus: {
readonly delivered: "b-t-f-d";
readonly read: "b-t-f-r";
readonly pending: "b-t-f-p";
readonly failed: "b-t-f-s";
};
export type DirectChatReceiptInput = {
to: DirectChatMember;
from: DirectChatMember;
status: keyof typeof DirectChatReceiptStatus;
messageId: string;
parent?: string;
chatroom?: string;
groupOwner?: boolean;
};
/**
* Delivery/Read Receipt for a DirectChat message
* The `to` member is the sender of the original message that the receipt
* refers to and `messageId` is the original message's messageId
*/
export declare class DirectChatReceipt extends CoT {
constructor(receipt: DirectChatReceiptInput);
}
export type DirectChatInput = {
to: DirectChatMember;
from: DirectChatMember;
message: string;
parent?: string;
chatroom?: string;
groupOwner?: boolean;
messageId?: string;
id?: string;
};
export declare class DirectChat extends CoT {
constructor(chat: DirectChatInput);
}