export type JSONContent = { type?: string; attrs?: Record; content?: JSONContent[]; marks?: { type: string; attrs?: Record; [key: string]: unknown; }[]; text?: string; [key: string]: unknown; }; export interface AttachmentFile { type: 'image' | 'xls' | 'doc' | 'pdf' | 'csv' | 'video' | 'data'; filePath?: string; } export interface AttachmentLink { type: 'link'; url?: string; } export interface LinkTaskURL { type: 'taskUrl'; url: string; } export interface LinkTaskIframeEmbed { type: 'embed'; code: string; } export interface DetailText { type: 'text'; value: string; } export interface DetailUserText { type: 'userText'; user: { _id: string; nickName: string; }; text: string; } export interface DetailBullet { type: 'bullet'; value: (string | DetailUserText)[]; } export interface DetailJSONContent { type: 'json'; value: JSONContent; } export type Attachment = AttachmentLink | AttachmentFile | LinkTaskIframeEmbed | LinkTaskURL; export type LinkTaskEditAction = Record<'Sebelum' | 'Sesudah', LinkTaskURL | LinkTaskIframeEmbed>; export type DetailType = Attachment | LinkTaskEditAction | DetailText | DetailUserText | DetailBullet | DetailJSONContent; export type KeyValue = Record; export type TimelineItem = { _id: string; action: string; createdAt: string; user?: { _id: string; nickName: string; }; detail?: KeyValue | DetailType; };