2
0

comment.ts 740 B

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