Interface: IAnnotationsService
Class for working with IAnnotations and IMarkupSets
Methods
getAnnotationHistory()
getAnnotationHistory(workspaceId
, documentId
, annotationId
, markupSetId
, clientId
): Promise
<IAnnotationHistoryData
[]>
Retrieves the IAnnotationHistoryData for the selected annotation.
Parameters
• workspaceId: number
Current Workspace ID
• documentId: number
Current Document ID
• annotationId: number
Selected Annotation ID
• markupSetId: number
Active Markup Set ID
• clientId: string
Client ID
Returns
Promise
<IAnnotationHistoryData
[]>
getAnnotationVisibility()
getAnnotationVisibility(): AnnotationVisibilityType
Retrieves the local annotation visibility
Returns
AnnotationVisibilityType
getAnnotationVisibilityFromSession()
getAnnotationVisibilityFromSession(): AnnotationVisibilityType
Retrieves the annotation visibility from session storage
If it is invalid it defaults it to AnnotationVisibilityType.Visible and updates sessionStorage
Returns
AnnotationVisibilityType
getDefaultMarkupSetData()
getDefaultMarkupSetData(): Promise
<IMarkupSet
>
Retrieves the default IMarkupSet the user has access to based on the Order field
Returns
Promise
<IMarkupSet
>
Promise that resolves to the default markup set
getMarkupSetAnnotations()
getMarkupSetAnnotations(documentId
, markupSet
): Promise
<IAnnotationLookup
>
Retrieves the IAnnotations for a specific IMarkupSet
Parameters
• documentId: number
The artifact ID of the document
• markupSet: IMarkupSet
The markup set to use
Returns
Promise
<IAnnotationLookup
>
getMarkupSetData()
getMarkupSetData(refreshCache
?): Promise
<IMarkupSet
[]>
Retrieves the available IMarkupSets the user has access to in the workspace
Parameters
• refreshCache?: boolean
Whether or not to skip the cache and force retrieval from the API (Defaults to false)
Returns
Promise
<IMarkupSet
[]>
Promise that resolves to an array of markup sets
getUserDefaultRedactionText()
getUserDefaultRedactionText(): Promise
<string
>
Retrieves the default redaction text for the user
Returns
Promise
<string
>
Promise that resolves to the default redaction text
getUserDefaultRedactionTextSize()
getUserDefaultRedactionTextSize(): RedactionTextSize
Retrieves the default RedactionTextSize for the user
Returns
RedactionTextSize
The user's default redaction text size
persistNewMarkupSetSelection()
persistNewMarkupSetSelection(markupSetArtifactId
): void
Saves the specified markup set Artifact ID to the User Preferences cache and table as the user's default.
Parameters
• markupSetArtifactId: number
Artifact ID of the markup set to persist.
Returns
void
setAnnotationVisibility()
setAnnotationVisibility(visibility
): void
Sets the annotation visibility in sessionStorage and locally
Parameters
• visibility: AnnotationVisibilityType
Returns
void
setUserDefaultRedactionText()
setUserDefaultRedactionText(text
): void
Updates the user's default redaction text
Parameters
• text: string
New default redaction text
Returns
void
This will make a "fire-and-forget" call to persist the user's default redaction text to the database
setUserDefaultRedactionTextSize()
setUserDefaultRedactionTextSize(size
): void
Updates the user's default RedactionTextSize
Parameters
• size: RedactionTextSize
New default redaction text size
Returns
void