comment.ts 670 B

12345678910111213141516171819202122232425262728293031
  1. import type {
  2. Nullable, Ref, HasObjectId,
  3. IPage, IRevision, IUser,
  4. } from '@growi/core';
  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[];