teambition-sdk-socket
Version: 
Front-End SDK for Teambition
47 lines (46 loc) • 1.24 kB
TypeScript
import { Schema, ISchema } from './schema';
import { ExecutorOrCreator, PostSource, PostId, UserId, TagId, ProjectId, FileId } from '../teambition';
export interface PostData extends ISchema {
    _id: PostId;
    _projectId: ProjectId;
    _creatorId: UserId;
    attachments: FileId[];
    attachmentsCount?: number;
    commentsCount?: number;
    content: string;
    created: string;
    creator: ExecutorOrCreator;
    html: string;
    involveMembers: UserId[];
    isArchived: boolean;
    isFavorite: boolean;
    lastCommentedAt: string | null;
    pin: boolean;
    postMode: 'txt' | 'html';
    source: PostSource;
    tagIds: TagId[];
    title: string;
    updated: string;
    visible: string;
}
export default class Post extends Schema<PostData> implements PostData {
    _id: PostId;
    _projectId: ProjectId;
    _creatorId: UserId;
    title: string;
    content: string;
    creator: ExecutorOrCreator;
    attachments: FileId[];
    involveMembers: UserId[];
    postMode: 'txt' | 'html';
    isArchived: boolean;
    visible: string;
    html: string;
    pin: boolean;
    created: string;
    updated: string;
    tagIds: TagId[];
    isFavorite: boolean;
    source: PostSource;
    lastCommentedAt: string | null;
}