comment.ts 770 B

1234567891011121314151617181920212223242526272829303132
  1. import { Nullable, Ref } from './common';
  2. import { HasObjectId } from './has-object-id';
  3. import { IPage } from './page';
  4. import { IRevision } from './revision';
  5. import { IUser } from './user';
  6. export type IComment = {
  7. comment: string;
  8. commentPosition: number,
  9. isMarkdown: boolean,
  10. replyTo: Nullable<string>,
  11. createdAt: Date,
  12. updatedAt: Date,
  13. page: Ref<IPage>,
  14. revision: Ref<IRevision>,
  15. creator: IUser,
  16. };
  17. export interface ICommentPostArgs {
  18. commentForm: {
  19. comment: string,
  20. revisionId: string,
  21. replyTo: string|undefined
  22. },
  23. slackNotificationForm: {
  24. isSlackEnabled: boolean|undefined,
  25. slackChannels: string|undefined,
  26. },
  27. }
  28. export type ICommentHasId = IComment & HasObjectId;
  29. export type ICommentHasIdList = ICommentHasId[];