@ujet/websdk-headless 3.0.3 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -129,6 +129,7 @@ export interface CompanyResponse {
129
129
  export interface MenuChannel {
130
130
  enabled: boolean;
131
131
  type: string;
132
+ menu_id: number;
132
133
  [key: string]: unknown;
133
134
  }
134
135
  export interface MenuItem {
@@ -153,6 +154,10 @@ export interface MenuResponse {
153
154
  user: boolean;
154
155
  };
155
156
  }
157
+ export interface WaitTimeResponse {
158
+ chat: number;
159
+ voice_call: number;
160
+ }
156
161
  export interface HumanAgent {
157
162
  id: number;
158
163
  name: string;
@@ -191,6 +196,11 @@ export interface ChatResponse {
191
196
  all_agents: HumanAgent[];
192
197
  all_virtual_agents: VirtualAgent[];
193
198
  }
199
+ export interface ChatDeflectionResponse {
200
+ enabled: boolean;
201
+ threshold: number;
202
+ keep_waiting: boolean;
203
+ }
194
204
  export interface MessageResponse {
195
205
  $index: number;
196
206
  $sid: string;
@@ -322,7 +332,9 @@ export declare class Client {
322
332
  getCompany(): Promise<CompanyResponse>;
323
333
  getTrigger(lang?: string): Promise<TriggerItem>;
324
334
  getMenus(key?: string, lang?: string): Promise<MenuResponse>;
335
+ getAfterHourMessage(lang?: string): Promise<string>;
325
336
  getTimeSlots(menuId: number | string, lang?: string): Promise<string[]>;
337
+ getWaitTimes(menuId: number | string, lang?: string): Promise<WaitTimeResponse>;
326
338
  createCall(menuId: number | string, data: CallRequest): Promise<CallResponse>;
327
339
  loadCall(callId: number | string): Promise<CallResponse>;
328
340
  cancelCall(callId: number | string): Promise<CallResponse>;
@@ -333,11 +345,13 @@ export declare class Client {
333
345
  loadOngoingChat(): Promise<Chat>;
334
346
  finishChat(): Promise<void>;
335
347
  destroyChat(): Promise<void>;
336
- sendChatTranscript(emails: string[]): Promise<RequestReturn>;
348
+ getChatDeflection(): Promise<ChatDeflectionResponse | null>;
349
+ sendChatTranscripts(emails: string[]): Promise<RequestReturn>;
337
350
  getChatSurvey(): Promise<ChatSurveyResponse>;
338
351
  sendChatSurvey(answers: SurveyAnswers): Promise<RequestReturn>;
339
352
  sendChatRate(data: RateRequest): Promise<RequestReturn>;
340
353
  escalateChat(data?: EscalateRequest): Promise<RequestReturn>;
354
+ fetchMessages(): Promise<MessageResponse[]>;
341
355
  sendFileMessage(file: File, progress?: ProgressMethod): Promise<number>;
342
356
  sendTextMessage(content: string): Promise<number>;
343
357
  createCobrowseCode(lang?: string, customData?: Record<string, string>): Promise<string>;