import { Node } from "slate"; import ShortcutManager from "../main/platform/ShortcutManager"; export type Mouse = { x: number; y: number; userId: ID; }; export type Slide = { id: ID; content: { [slideObjectId: string]: SlideObject }; index: number; }; export type SlideObject = | SlideText | SlideAirtable | SlideRectangle | SlideComment | SlideBoard | SlideIdea | SlideConnection; export type SlideConnection = { startId: ID; startOrientation: string; endId: ID; endOrientation: string; } & SlideObjectBase; export type SlideComment = { thread: CommentThreadItem[]; } & SlideObjectBase; export type CommentThreadItem = { id: ID; userId: ID; text: string; createdAt: number; }; export type SlideText = { type: SlideObjectType.TEXT; text: string; fontSize: number; width: number | null; height: number | null; } & SlideObjectBase; export type SlideAirtable = {} & SlideObjectBase; // For now put this into a separate array export type SlideIdea = { type: SlideObjectType.IDEA; boardId: ID | null; status: SlideBoardItemStatus; title: string; description: Node[]; // JSON blob for a text editor index: number; height: number width: number } & SlideObjectBase; export enum SlideBoardItemStatus { NO_STATUS = "NO_STATUS", NOT_STARTED = "NOT_STARTED", IN_PROGRESS = "IN_PROGRESS", COMPLETED = "COMPLETED", } export type SlideRectangle = { width: number; height: number; } & SlideObjectBase; export type SlideBoard = { width: number; height: number; boardItems: ID[]; } & SlideObjectBase; export interface SlideObjectBase { id: ID; type: SlideObjectType; x: number; y: number; } export enum SlideObjectType { "TEXT" = "TEXT", "COMMENT" = "COMMENT", "RECTANGLE" = "RECTANGLE", "AIRTABLE" = "AIRTABLE", "BOARD" = "BOARD", "IDEA" = "IDEA", "CONNECTION" = "CONNECTION", } export type MouseClick = { userId: ID; x: number; y: number; timestamp: number; }; export type ID = string; export type SlideshowDataModel = { roomId: ID; mouseInfo: { [userId: string]: Mouse; }; subscribers: { [userId: string]: ID; }; mouseClicks: { [userId: string]: MouseClick; }; }; export enum TAB { HOME = "HOME", CONTACTS = "CONTACTS", INSIGHTS = "INSIGHTS", SETTINGS = "SETTINGS", } export type User = { id: string; }; export type Domain = string; export type Company = { id: string; name: string; domain: Domain; }; export type Filter = { id: string; user: User | null; name: string; count: number; }; export enum CREATE_CONTACT_ERROR { EMAIL = "EMAIL", } export enum SEND_DRAFT_ERROR { EMAIL = "EMAIL", } export enum CREATE_TEMPLATE_ERROR { NAME = "NAME", } export enum HOTKEYS { ENTER = "enter", TAB = "tab", SHIFT_TAB = "shift+tab", CMD_B = "mod+b", CMD_I = "mod+i", CMD_U = "mod+u", CMD_ALT_1 = "mod+alt+1", CMD_ALT_2 = "mod+alt+2", CMD_ALT_3 = "mod+alt+3", CMD_H = "mod+h", } export interface UserWithProfilePicture { id: string; profilePictureUrl: string | null; } export enum IntegrationTypes { INTERCOM = "INTERCOM", GMAIL = "GMAIL", } export enum NoteTypes { INTERCOM_NOTE = "INTERCOM_NOTE", MANUAL = "MANUAL", } export enum HighlightableTypes { INTERCOM_MESSAGE = "INTERCOM_MESSAGE", } export type ContactsFilter = { search: string; }; export enum PRIORITY { "P0" = "P0", "P1" = "P1", "P2" = "P2", "P3" = "P3", } export type PlatformProps = { manager: ShortcutManager; notification: string | null; notificationTimestamp: number; setNotification: (notificationAndTimestamp: { notification: string; timestamp: number; }) => any; showSidebar: boolean; setShowSidebar: (showSidebar: boolean) => any; showCommandLine: boolean; setShowCommandLine: (showCommandLine: boolean) => any; }; export const HAS_MOUSE = false;