import { Chat, ChatCreationData, ChatData, ChatResourceFilters } from "./chat"; import { CurrentClientResource } from "../../resources/client.resource"; import { APICursorHttpResponse } from "../../helpers/apiCursor.helper"; export declare type ClientCredentials = { id: number; email?: string; auth_token: string; session: string; }; export declare type ClientData = ClientCredentials & { id: number; first_name: string; last_name: string; profile_picture: string; gender: string; birthday: string; status: string; }; /** * A single chat. Uses StreamListeners to keep tabs on the Chat's status. * @constructor */ export declare class Client extends CurrentClientResource { uuid: string; id: number; sessionKey: string; protected sortKey: string; auth_token: string; chat: Chat; resourceIdentifyingMetadata: { id: number; auth_token: string; }; protected _subResources: { 'chats': { url: string; resource: string; }; }; /** * @param data */ constructor(data?: ClientCredentials); getChats(filters?: ChatResourceFilters): Promise; getChatData(filters?: ChatResourceFilters): Promise>; getChatsOrCreateChat(filters?: ChatResourceFilters, metadata?: any): Promise; getChat(uuid: string): Promise; createChat(data?: ChatCreationData): Promise; /** * Listen for updates on one specific Client instance * @return {Client} */ listenForClientUpdates(): this; /** * Listen for updates on one generic updates to all clients * @return {Client} */ listenForGenericClientsUpdates(): this; login(email: string, password: string): Promise; logout(): Promise; }