NEW ANNOUNCEMENT (18-OCT-2026): 5: Privacy Policy Updated
// this file is responsible for managing chats and chat messages. objects are delegated to objectModel.ts.
import { createTimestamp } from "../utility";
// creation methods
export function createChatMessage(channel: string, sender: string, body: string): ChatMessage {
return {
dataVersion: "v2",
channel,
sender,
body,
dateSent: createTimestamp(),
}
// types
export interface ChatMessage {
dataVersion: "v2";
channel: string;
sender: string;
body: string;
dateSent: string;
stringifiedObject?: string;
export interface ChatObject {
id: string;
title: string;
contentVersions: { [key: string]: MessageObjectContent };
export interface MessageObjectContent {
creationDate: string;
noteText?: string;
priority?: number;
category?: string;
status?: string;
date?: string;
time?: string;