UNPKG

@wireapp/api-client

Version:

Wire API Client to send and receive data.

49 lines (48 loc) 2.23 kB
import { HttpClient } from '../http'; import { ClientPreKey, PreKeyBundle } from '../auth'; import { PublicClient } from '../client/'; import { Activate, ActivationResponse, CheckHandles, CompletePasswordReset, HandleInfo, NewPasswordReset, SearchResult, SendActivationCode, User, UserPreKeyBundleMap, VerifyDelete } from '../user'; import { UserClients } from '../conversation/UserClients'; declare class UserAPI { private client; constructor(client: HttpClient); static readonly URL: { ACTIVATE: string; CALLS: string; CLIENTS: string; CONTACTS: string; DELETE: string; HANDLES: string; PASSWORDRESET: string; PRE_KEYS: string; PROPERTIES: string; SEARCH: string; SEND: string; USERS: string; }; deleteProperties(): Promise<{}>; deleteProperty(propertyKey: string): Promise<{}>; getActivation(activationCode: string, activationKey: string): Promise<ActivationResponse>; getCallsConfiguration(): Promise<RTCConfiguration>; getClient(userId: string, clientId: string): Promise<PublicClient>; getClientPreKey(userId: string, clientId: string): Promise<ClientPreKey>; getClients(userId: string): Promise<PublicClient[]>; getHandle(handle: string): Promise<HandleInfo>; getProperties(): Promise<string[]>; getProperty(propertyKey: string): Promise<Object>; getSearchContacts(query: string, limit?: number): Promise<SearchResult>; getUser(userId: string): Promise<User>; getUserPreKeys(userId: string): Promise<PreKeyBundle>; getUsers(parameters: { handles?: string[]; ids?: string[]; }): Promise<User[]>; postActivation(activationData: Activate): Promise<ActivationResponse>; postActivationCode(activationCodeData: SendActivationCode): Promise<{}>; postDelete(verificationData: VerifyDelete): Promise<{}>; postHandles(handles: CheckHandles): Promise<string[]>; postMultiPreKeyBundles(userClientMap: UserClients): Promise<UserPreKeyBundleMap>; postPasswordReset(resetData: NewPasswordReset | CompletePasswordReset): Promise<{}>; putProperty(propertyKey: string, propertyData: Object): Promise<{}>; } export { UserAPI };