import { API } from '../core/api' ; extends API export default class Tokens extends API { param token param store see Cafes returns async add ( token ? , store ? ) { const response = await this . sendPost ( `tokens` , undefined , { token : token || '' , store : store || false } ) ; return response . text ( ) as Promise < string > ; } param token returns async validate ( token ) { const response = await this . sendGet ( `tokens/${ token }` ) ; return response . status === 200 ; } returns async list ( ) { const response = await this . sendGet ( 'tokens' ) ; return response . json ( ) as Promise < string [ ] > ; } param token returns async remove ( token ) { const response = await this . sendDelete ( `tokens/${ token }` ) ; return response . status === 204 ; } }