@ujet/websdk-headless 3.6.4 → 3.37.2

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
@@ -93,6 +93,12 @@ interface FormData {
93
93
  uri: string;
94
94
  };
95
95
  }
96
+ interface ChatMessageRequest {
97
+ message: {
98
+ content: string;
99
+ timestamp: string;
100
+ };
101
+ }
96
102
 
97
103
  interface LanguageOption {
98
104
  lang: string;
@@ -188,6 +194,8 @@ interface ChatResponse {
188
194
  external_agent?: VirtualAgent;
189
195
  all_agents: HumanAgent[];
190
196
  all_virtual_agents: VirtualAgent[];
197
+ redaction_enabled: boolean;
198
+ agent_incoming_ha_enabled: boolean;
191
199
  post_session_required?: boolean;
192
200
  post_session_opt_in_required?: boolean;
193
201
  post_session_transfer_status?: string;
@@ -217,6 +225,13 @@ interface MessageResponse {
217
225
  document?: {
218
226
  url: string;
219
227
  };
228
+ buttons?: {
229
+ title: string;
230
+ }[];
231
+ message?: {
232
+ messages: string[];
233
+ type: any;
234
+ };
220
235
  [key: string]: unknown;
221
236
  }
222
237
  interface CallResponse {
@@ -300,6 +315,10 @@ interface TriggerItem {
300
315
  keywords_included_or?: string[][];
301
316
  keywords_excluded_or?: string[][];
302
317
  }
318
+ interface ChatMessageResponse {
319
+ content: string;
320
+ timestamp: string;
321
+ }
303
322
 
304
323
  type RequestMethod = (url: string, options: RequestInit | Record<string, any>) => Promise<RequestReturn>;
305
324
  type EventHandler = (data: any) => void;
@@ -473,6 +492,7 @@ declare class Cobrowse {
473
492
  private _cobrowse;
474
493
  private _options;
475
494
  private _started;
495
+ private focusTrap;
476
496
  constructor(instance: any, options: CobrowseOption);
477
497
  private get root();
478
498
  private get lang();
@@ -542,6 +562,8 @@ declare class Client {
542
562
  fetchMessages(): Promise<MessageResponse[]>;
543
563
  sendFileMessage(file: File): Promise<number>;
544
564
  sendTextMessage(rawContent: string): Promise<void>;
565
+ sendPreviewMessage(content: string): Promise<void>;
566
+ private isRedactionAgentEnabled;
545
567
  createCobrowseCode(lang?: string, customData?: Record<string, string>): Promise<string>;
546
568
  startCobrowse(from?: string): Promise<void>;
547
569
  getMessageAttachment(message: MessageResponse): Promise<File>;
@@ -624,4 +646,4 @@ declare const OPTIONS: {
624
646
  version: string;
625
647
  };
626
648
 
627
- export { BaseProvider, type CallRequest, type CallResponse, Chat, type ChatDeflectionResponse, type ChatEndUserEventRequest, type ChatHistoryItem, type ChatHistoryResponse, type ChatRequest, type ChatResponse, type ChatSurveyResponse, type ChatTaskMessageResponse, Client, type ClientEvent, type ClientOption, type CobrowseMessages, type CobrowseOption, type CobrowseRequest, type CompanyResponse, type ConnectCallback, type ConnectOption, type ConnectRequest, type ConnectResult, ENVIRONMENT, type EmailRequest, type EscalateRequest, type EventHandler, EventManager, type FileTypeItem, type FormData, type GetServerMessage, type HumanAgent, type IssueChatTokenMethod, type LanguageOption, type LogData, Logger, type LoggerHandler, MediaStore, type MenuChannel, type MenuItem, type MenuResponse, type MessageRequest, type MessageResponse, OPTIONS, PostSessionStatus, type QuestionItem, type RateRequest, type RequestMethod, type RequestReturn, type SurveyAnswers, type TokenResponse, type TriggerItem, type TriggerMessage, type UserProfile, VERSION, type VirtualAgent, type WaitTimeResponse, addProviderType, consoleLoggerHandler };
649
+ export { BaseProvider, type CallRequest, type CallResponse, Chat, type ChatDeflectionResponse, type ChatEndUserEventRequest, type ChatHistoryItem, type ChatHistoryResponse, type ChatMessageRequest, type ChatMessageResponse, type ChatRequest, type ChatResponse, type ChatSurveyResponse, type ChatTaskMessageResponse, Client, type ClientEvent, type ClientOption, type CobrowseMessages, type CobrowseOption, type CobrowseRequest, type CompanyResponse, type ConnectCallback, type ConnectOption, type ConnectRequest, type ConnectResult, ENVIRONMENT, type EmailRequest, type EscalateRequest, type EventHandler, EventManager, type FileTypeItem, type FormData, type GetServerMessage, type HumanAgent, type IssueChatTokenMethod, type LanguageOption, type LogData, Logger, type LoggerHandler, MediaStore, type MenuChannel, type MenuItem, type MenuResponse, type MessageRequest, type MessageResponse, OPTIONS, PostSessionStatus, type QuestionItem, type RateRequest, type RequestMethod, type RequestReturn, type SurveyAnswers, type TokenResponse, type TriggerItem, type TriggerMessage, type UserProfile, VERSION, type VirtualAgent, type WaitTimeResponse, addProviderType, consoleLoggerHandler };