import { Comment , ID } from '../types' ; import { ITransport } from '../transport' ; import { ActivityItem } from './activity' ; export class CommentsHandler < T > { private transport : ITransport ; constructor ( transport ) { this . transport = transport ; } async create ( comment ) { const response = await this . transport . post ( '/activity/comment' , comment ) ; return response . data ; } async update ( comment_activity_id , comment ) { const response = await this . transport . patch ( `/activity/comment/${ encodeURI ( comment_activity_id as string ) }` , { comment , } ) ; return response . data ; } async delete ( comment_activity_id ) { await this . transport . delete ( `/activity/comment/${ encodeURI ( comment_activity_id as string ) }` ) ; } }