-
Notifications
You must be signed in to change notification settings - Fork 118
/
ILivechatRead.ts
36 lines (35 loc) · 1.7 KB
/
ILivechatRead.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { IDepartment } from '../livechat';
import { ILivechatRoom } from '../livechat/ILivechatRoom';
import { IVisitor } from '../livechat/IVisitor';
import { IMessage } from '../messages';
export interface ILivechatRead {
/**
* Gets online status of the livechat.
* @param departmentId (optional) the id of the livechat department
* @deprecated use `isOnlineAsync` instead
*/
isOnline(departmentId?: string): boolean;
/**
* Gets online status of the livechat.
* @param departmentId (optional) the id of the livechat department
*/
isOnlineAsync(departmentId?: string): Promise<boolean>;
getDepartmentsEnabledWithAgents(): Promise<Array<IDepartment>>;
getLivechatRooms(visitor: IVisitor, departmentId?: string): Promise<Array<ILivechatRoom>>;
/**
* @deprecated This method does not adhere to the conversion practices applied
* elsewhere in the Apps-Engine and will be removed in the next major version.
* Prefer the alternative methods to fetch visitors.
*/
getLivechatVisitors(query: object): Promise<Array<IVisitor>>;
getLivechatVisitorById(id: string): Promise<IVisitor | undefined>;
getLivechatVisitorByEmail(email: string): Promise<IVisitor | undefined>;
getLivechatVisitorByToken(token: string): Promise<IVisitor | undefined>;
getLivechatVisitorByPhoneNumber(phoneNumber: string): Promise<IVisitor | undefined>;
getLivechatDepartmentByIdOrName(value: string): Promise<IDepartment | undefined>;
/**
* @experimental we do not encourage the wider usage of this method,
* as we're evaluating its performance and fit for the API.
*/
_fetchLivechatRoomMessages(roomId: string): Promise<Array<IMessage>>;
}