CommentAnnotation Class

PropertyTypeOptionalDescription
annotationIdstringNoUnique identifier for the comment pin annotation. Auto generated.
commentsComment[]NoThe list of all comments part of this annotation.
commentCategoriesCustomCategory[]NoThe list of categories that this comment pin annotation belongs to.
fromUserNoThe user who created this comment pin annotation.
colorstringYesColor used for the comment pin annotation.
resolvedbooleanYesWhether the comment annotation is marked resolved. Deprecated.
inProgressbooleanYesWhether the comment annotation is marked as in progress. Deprecated.
lastUpdatedanyYesTimestamp when the comment annotation was last updated. Auto generated.
createdAtanyYesTimestamp when the comment annotation was created. Auto generated.
positionCursorPosition | nullYesCursor position relative to the comment annotation.
locationIdnumber | nullYesUnique location id generated from provided location.
locationLocation | nullYesSet location to identify user on sub document.
typestringYesType of the comment annotation.
selectAllContentbooleanYesIf true, sets text comment annotation on all the text content.
approvedbooleanYesWhether the comment annotation is approved.
statusCustomStatusNoStatus of the comment annotation. Default: CommentAnnotationStatusMap.OPEN
annotationIndexnumberYesIndex of current annotation in the list.
pageInfoPageInfoYesPage information related to the comment annotation.
assignedToUserYesUser to whom the comment annotation is assigned.
priorityCustomPriorityYesPriority level of the comment annotation.
ghostCommentGhostComment | nullYesPlaceholder for a non-existing comment.
contextanyYesCustom context data provided by the user.
resolvedByUserIdstringYesID of the user who resolved the comment.
subscribedUsersCommentAnnotationSubscribedUsersYesUsers who explicitly subscribe to the comment.
unsubscribedUsersCommentAnnotationUnsubscribedUsersYesUsers who explicitly unsubscribe to the comment.
multiThreadAnnotationIdstringYesThis is the ID of the multithread annotation group it belongs to, if this was created when multithread mode was on.
isDraftbooleanYesIndicates if the comment annotation is in draft state.
customListCustomAnnotationDropdownItem[]YesCustom list of items for the comment annotation.

CommentAnnotationSubscribedUsers Class

PropertyTypeOptionalDescription
userIdHashstringNoThe user ID of the subscribed user.
userUserNoThe user object of the subscribed user.
type’manual''auto’NoManual: if the user used the UI option to subscribe; Auto: When the system automatically adds the user to the subscribed list. eg: when the user creates a comment annotation.

CommentAnnotationUnsubscribedUsers Class

PropertyTypeOptionalDescription
userIdHashstringNoThe user ID of the unsubscribed user.
userUserNoThe user object of the unsubscribed user.
type’manual''auto’NoManual: if the user used the UI option to unsubscribe; Auto: When the system automatically removes the user from the unsubscribed list. eg: when the comment where user was tagged is deleted.

CustomFilter Class

PropertyTypeOptionalDescription
idstringNoUnique identifier for the custom filter.
colorstringNoColor associated with the custom filter.
namestringNoName or label of the custom filter.

CustomPriority Class

PropertyTypeOptionalDescription
idstringNoUnique identifier for the custom priority.
colorstringNoColor associated with the custom priority.
namestringNoName or label of the custom priority.
lightColorstringYesLight color variant for the custom priority.

CustomStatus Class

PropertyTypeOptionalDescription
idstringNoUnique identifier for the custom status.
colorstringNoColor associated with the custom status.
namestringNoName or label of the custom status.
typeStatusTypeNoType of the status (default, ongoing, or terminal).
lightColorstringYesLight color for the custom status.
svgstringYesRaw SVG string for the custom status.
iconUrlstringYesURL to an icon image for the custom status.

CustomCategory Class

PropertyTypeOptionalDescription
idstringNoUnique identifier for the custom category.
colorstringNoColor associated with the custom category.
namestringNoName or label of the custom category.

CustomAnnotationDropdownData

Represents the configuration for a custom annotation dropdown.

PropertyTypeDescription
typemulti | singleThe type of the custom annotation dropdown.
placeholderstringThe placeholder text for the dropdown. Defaults to ‘Select’.
dataCustomAnnotationDropdownItem[]An array of dropdown items.

CustomAnnotationDropdownItem

Represents an item in a custom annotation dropdown.

PropertyTypeDescription
idstringThe unique identifier for the dropdown item.
labelstringThe display text for the dropdown item.

Default Status Object

The default status object is defined in the CommentAnnotationStatusMap constant. It includes three predefined statuses: OPEN, IN_PROGRESS, and RESOLVED. Each status is an object with the following structure:

{
  OPEN: {
    id: 'OPEN',
    name: 'Open',
    color: '#625DF5',
    lightColor: '#E7E8FA',
    type: 'default',
    svg: `
    <svg
      width="16"
      height="16"
      viewBox="0 0 16 16"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M8.00016 13.3333C10.9457 13.3333 13.3335 10.9455 13.3335 8.00001C13.3335 5.05449 10.9457 2.66668 8.00016 2.66668C5.05464 2.66668 2.66683 5.05449 2.66683 8.00001C2.66683 10.9455 5.05464 13.3333 8.00016 13.3333ZM8.00016 14.6667C11.6821 14.6667 14.6668 11.6819 14.6668 8.00001C14.6668 4.31811 11.6821 1.33334 8.00016 1.33334C4.31826 1.33334 1.3335 4.31811 1.3335 8.00001C1.3335 11.6819 4.31826 14.6667 8.00016 14.6667Z"
        fill="currentColor"
      />
    </svg>
    `
  },
  IN_PROGRESS: {
    id: 'IN_PROGRESS',
    name: 'In Progress',
    color: '#ECB000',
    lightColor: '#FEFCEA',
    type: 'ongoing',
    svg: `
    <svg
      width="16"
      height="16"
      viewBox="0 0 16 16"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M8.00016 13.3333C10.9457 13.3333 13.3335 10.9455 13.3335 8.00001C13.3335 5.05449 10.9457 2.66668 8.00016 2.66668C5.05464 2.66668 2.66683 5.05449 2.66683 8.00001C2.66683 10.9455 5.05464 13.3333 8.00016 13.3333ZM8.00016 14.6667C11.6821 14.6667 14.6668 11.6819 14.6668 8.00001C14.6668 4.31811 11.6821 1.33334 8.00016 1.33334C4.31826 1.33334 1.3335 4.31811 1.3335 8.00001C1.3335 11.6819 4.31826 14.6667 8.00016 14.6667Z"
        fill="currentColor"
      />
      <path
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M8.00016 4C8.36835 4 8.66683 4.29848 8.66683 4.66667V7.72386L10.1382 9.19526C10.3986 9.45561 10.3986 9.87772 10.1382 10.1381C9.87788 10.3984 9.45577 10.3984 9.19542 10.1381L7.52876 8.4714C7.40373 8.34638 7.3335 8.17681 7.3335 8V4.66667C7.3335 4.29848 7.63197 4 8.00016 4Z"
        fill="currentColor"
      />
    </svg>
    `
  },
  RESOLVED: {
    id: 'RESOLVED',
    name: 'Resolved',
    color: '#00C48C',
    lightColor: '#E7FAF2',
    type: 'terminal',
    svg: `
    <svg
      width="17"
      height="16"
      viewBox="0 0 17 16"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M8.50016 13.3333C11.4457 13.3333 13.8335 10.9455 13.8335 8.00001C13.8335 5.05449 11.4457 2.66668 8.50016 2.66668C5.55464 2.66668 3.16683 5.05449 3.16683 8.00001C3.16683 10.9455 5.55464 13.3333 8.50016 13.3333ZM8.50016 14.6667C12.1821 14.6667 15.1668 11.6819 15.1668 8.00001C15.1668 4.31811 12.1821 1.33334 8.50016 1.33334C4.81826 1.33334 1.8335 4.31811 1.8335 8.00001C1.8335 11.6819 4.81826 14.6667 8.50016 14.6667Z"
        fill="currentColor"
      />
      <path
        d="M5.8335 8L7.8335 10L11.8335 6"
        class="checkmark"
        stroke="currentColor"
        stroke-width="1.2"
        stroke-miterlimit="10"
        stroke-linecap="round"
        stroke-linejoin="round"
      />
    </svg>
    `
  },
}