import { Annotation , GetAnnotationsResponse } from '../../../../common/types/annotations' ; import { http , http$ } from '../http_service' ; import { basePath } from './index' ; export const annotations = { getAnnotations$ ( obj ) { const body = JSON . stringify ( obj ) ; return http$ < GetAnnotationsResponse > ( { path : `${ basePath ( ) }/annotations` , method : 'POST' , body , } ) ; } , getAnnotations ( obj ) { const body = JSON . stringify ( obj ) ; return http < GetAnnotationsResponse > ( { path : `${ basePath ( ) }/annotations` , method : 'POST' , body , } ) ; } , indexAnnotation ( obj ) { const body = JSON . stringify ( obj ) ; return http < any > ( { path : `${ basePath ( ) }/annotations/index` , method : 'PUT' , body , } ) ; } , deleteAnnotation ( id ) { return http < any > ( { path : `${ basePath ( ) }/annotations/delete/${ id }` , method : 'DELETE' , } ) ; } , } ;