import type { APIClient } from '@wireapp/api-client' ; import { Connection , ConnectionStatus } from '@wireapp/api-client/src/connection/' ; export class ConnectionService { constructor ( private readonly apiClient ) { } public getConnections ( ) { return this . apiClient . connection . api . getAllConnections ( ) ; } public acceptConnection ( userId ) { return this . apiClient . connection . api . putConnection ( userId , { status : ConnectionStatus . ACCEPTED , } ) ; } public ignoreConnection ( userId ) { return this . apiClient . connection . api . putConnection ( userId , { status : ConnectionStatus . IGNORED , } ) ; } public createConnection ( userId ) { return this . apiClient . connection . api . postConnection ( { message : ' ' , name : ' ' , user : userId , } ) ; } }