comment.ts 633 B

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