import { API } from '../core/api' ; import { NotificationList } from '../models' ; extends API export default class Notifications extends API { returns async list ( ) { const response = await this . sendGet ( 'notifications' ) ; return response . json ( ) as Promise < NotificationList > ; } param id returns async read ( id ) { const response = await this . sendPost ( `notifications/${ id }/read` ) ; return response . status === 200 ; } returns async readAll ( ) { return this . read ( 'all' ) ; } }