UNPKG

teambition-sdk-socket

Version:
80 lines (79 loc) 2.04 kB
import { Schema, ISchema } from './schema'; import { MessageId, UserId, ProjectId, OrganizationId, ActivityId, DetailObjectId, DetailObjectTypes } from '../teambition'; export declare type MessageType = 'object' | 'system'; export interface MessageData extends ISchema { _id: MessageId; _userId: UserId; type: MessageType; updated: string; created: string; isArchived: boolean; isMute: boolean; isAted: boolean; reminder?: { reminderDate: string; updated: string; }; isLater: boolean; isRead: boolean; unreadActivitiesCount: number; boundToObjectUpdated: string; creator: { _id: UserId; name: string; avatarUrl: string; email?: string; }; title: string; subtitle: string; _latestActivityId?: ActivityId; latestActivityAction?: string; _projectId?: ProjectId; project?: { _id: ProjectId; name: string; logo: string; }; _organizationId?: OrganizationId; organization?: { _id: OrganizationId; name: string; logo: string; }; _objectId: DetailObjectId | ProjectId; objectType: DetailObjectTypes | 'activity' | 'room'; mentions?: any; } export default class Message extends Schema<MessageData> implements MessageData { _id: MessageId; _userId: UserId; type: MessageType; updated: string; created: string; isArchived: boolean; isMute: boolean; isAted: boolean; isLater: boolean; isRead: boolean; unreadActivitiesCount: number; boundToObjectUpdated: string; creator: { _id: UserId; name: string; avatarUrl: string; }; title: string; subtitle: string; project?: { _id: ProjectId; name: string; logo: string; }; organization?: { _id: OrganizationId; name: string; logo: string; }; _objectId: DetailObjectId | ProjectId; objectType: DetailObjectTypes | 'activity' | 'room'; }