comment.ts 635 B

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