@ujet/websdk-headless 3.43.4 → 3.44.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 +52 -54
- package/dist/index.js +72 -87
- package/dist/index.mjs +9757 -10495
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -106,6 +106,13 @@ interface CheckInVisibilityStateRequest {
|
|
|
106
106
|
interface CheckInModalStateRequest {
|
|
107
107
|
modal_type: 'check_in';
|
|
108
108
|
}
|
|
109
|
+
interface CustomFormPayload {
|
|
110
|
+
smart_action_id: number;
|
|
111
|
+
form_response: {
|
|
112
|
+
question_id: number;
|
|
113
|
+
value: string | string[] | boolean;
|
|
114
|
+
}[];
|
|
115
|
+
}
|
|
109
116
|
|
|
110
117
|
declare enum PostSessionStatus {
|
|
111
118
|
WAITING = "waiting",
|
|
@@ -238,16 +245,6 @@ interface CallResponse {
|
|
|
238
245
|
survey_enabled: boolean;
|
|
239
246
|
type: string;
|
|
240
247
|
}
|
|
241
|
-
interface ChatDeflectionResponse {
|
|
242
|
-
email: boolean;
|
|
243
|
-
enabled: boolean;
|
|
244
|
-
external_deflection_links: {
|
|
245
|
-
enabled: boolean;
|
|
246
|
-
ids: number[];
|
|
247
|
-
};
|
|
248
|
-
keep_waiting: boolean;
|
|
249
|
-
threshold: number;
|
|
250
|
-
}
|
|
251
248
|
interface EmailResponse {
|
|
252
249
|
attachment_count: number;
|
|
253
250
|
id: number;
|
|
@@ -286,6 +283,17 @@ interface MessageResponse {
|
|
|
286
283
|
};
|
|
287
284
|
type: string;
|
|
288
285
|
unredacted?: string;
|
|
286
|
+
signature?: string;
|
|
287
|
+
form?: {
|
|
288
|
+
id: number;
|
|
289
|
+
form_type: string;
|
|
290
|
+
name: string;
|
|
291
|
+
title: string;
|
|
292
|
+
subtitle: string;
|
|
293
|
+
external_form_id: string;
|
|
294
|
+
smart_action_id: number;
|
|
295
|
+
image: string;
|
|
296
|
+
};
|
|
289
297
|
visible?: boolean;
|
|
290
298
|
[key: string]: unknown;
|
|
291
299
|
}
|
|
@@ -356,6 +364,26 @@ interface QuestionItem {
|
|
|
356
364
|
value: string;
|
|
357
365
|
}[];
|
|
358
366
|
}
|
|
367
|
+
interface ChatDeflectionResponse {
|
|
368
|
+
email: boolean;
|
|
369
|
+
enabled: boolean;
|
|
370
|
+
external_deflection_links: {
|
|
371
|
+
enabled: boolean;
|
|
372
|
+
ids: number[];
|
|
373
|
+
};
|
|
374
|
+
keep_waiting: boolean;
|
|
375
|
+
threshold: number;
|
|
376
|
+
}
|
|
377
|
+
interface ChatDeflectionResponse {
|
|
378
|
+
enabled: boolean;
|
|
379
|
+
threshold: number;
|
|
380
|
+
email: boolean;
|
|
381
|
+
keep_waiting: boolean;
|
|
382
|
+
external_deflection_links: {
|
|
383
|
+
enabled: boolean;
|
|
384
|
+
ids: number[];
|
|
385
|
+
};
|
|
386
|
+
}
|
|
359
387
|
interface CheckInResponse {
|
|
360
388
|
chat_id: number;
|
|
361
389
|
check_in_status: CheckInStatus;
|
|
@@ -386,23 +414,7 @@ interface ClientOption {
|
|
|
386
414
|
lang?: string;
|
|
387
415
|
bridge?: string;
|
|
388
416
|
version?: string;
|
|
389
|
-
cobrowse?:
|
|
390
|
-
enabled: boolean;
|
|
391
|
-
template?: string;
|
|
392
|
-
confirmSessionTemplate?: string;
|
|
393
|
-
confirmRemoteControlTemplate?: string;
|
|
394
|
-
confirmFullDeviceTemplate?: string;
|
|
395
|
-
sessionControlsTemplate?: string;
|
|
396
|
-
root?: Element;
|
|
397
|
-
messages?: CobrowseMessages;
|
|
398
|
-
api?: string;
|
|
399
|
-
license?: string;
|
|
400
|
-
trustedOrigins?: string[];
|
|
401
|
-
capabilities?: string[];
|
|
402
|
-
registration?: boolean;
|
|
403
|
-
redactedViews?: string[];
|
|
404
|
-
unredactedViews?: string[];
|
|
405
|
-
};
|
|
417
|
+
cobrowse?: CobrowseOption;
|
|
406
418
|
[key: string]: unknown;
|
|
407
419
|
}
|
|
408
420
|
interface ConnectOption {
|
|
@@ -443,8 +455,8 @@ interface CobrowseMessages {
|
|
|
443
455
|
}
|
|
444
456
|
interface CobrowseOption {
|
|
445
457
|
enabled?: boolean;
|
|
446
|
-
lang
|
|
447
|
-
messages
|
|
458
|
+
lang?: string;
|
|
459
|
+
messages?: CobrowseMessages;
|
|
448
460
|
root?: Element;
|
|
449
461
|
api?: string;
|
|
450
462
|
license?: string;
|
|
@@ -458,6 +470,12 @@ interface CobrowseOption {
|
|
|
458
470
|
registration?: boolean;
|
|
459
471
|
redactedViews?: string[];
|
|
460
472
|
unredactedViews?: string[];
|
|
473
|
+
instance?: any;
|
|
474
|
+
confirmSession?: () => Promise<boolean>;
|
|
475
|
+
confirmRemoteControl?: () => Promise<boolean>;
|
|
476
|
+
confirmFullDevice?: () => Promise<boolean>;
|
|
477
|
+
showSessionControls?: () => void;
|
|
478
|
+
hideSessionControls?: () => void;
|
|
461
479
|
}
|
|
462
480
|
|
|
463
481
|
declare class EventManager {
|
|
@@ -580,28 +598,6 @@ declare class MediaStore {
|
|
|
580
598
|
clear(): Promise<void>;
|
|
581
599
|
}
|
|
582
600
|
|
|
583
|
-
declare class Cobrowse {
|
|
584
|
-
private _cobrowse;
|
|
585
|
-
private _options;
|
|
586
|
-
private _started;
|
|
587
|
-
private focusTrap;
|
|
588
|
-
constructor(instance: any, options: CobrowseOption);
|
|
589
|
-
private get root();
|
|
590
|
-
private get lang();
|
|
591
|
-
private get messages();
|
|
592
|
-
private get template();
|
|
593
|
-
static create(options: CobrowseOption, script: string): Promise<Cobrowse>;
|
|
594
|
-
setCustomData(data: any): void;
|
|
595
|
-
on(eventName: string, eventHandler: EventHandler): void;
|
|
596
|
-
start(): Promise<void>;
|
|
597
|
-
stop(): Promise<void>;
|
|
598
|
-
endSession(): Promise<void>;
|
|
599
|
-
createSessionCode(): Promise<string>;
|
|
600
|
-
private createConfirmConsent;
|
|
601
|
-
private setupConfirms;
|
|
602
|
-
private setupSessionControl;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
601
|
declare class Client {
|
|
606
602
|
VERSION: string;
|
|
607
603
|
options: ClientOption;
|
|
@@ -610,12 +606,13 @@ declare class Client {
|
|
|
610
606
|
private events;
|
|
611
607
|
request: RequestMethod;
|
|
612
608
|
chat: Chat;
|
|
613
|
-
|
|
609
|
+
private _cobrowse;
|
|
614
610
|
constructor(options: ClientOption);
|
|
615
611
|
get deviceId(): string;
|
|
616
612
|
get user(): UserProfile;
|
|
617
613
|
get lang(): string;
|
|
618
614
|
set lang(lang: string);
|
|
615
|
+
get cobrowse(): any;
|
|
619
616
|
destroy(): void;
|
|
620
617
|
on(eventName: string, handler: EventHandler): void;
|
|
621
618
|
off(eventName: string, handler: EventHandler): void;
|
|
@@ -624,6 +621,8 @@ declare class Client {
|
|
|
624
621
|
trackClientEvents(events: ClientEvent[]): Promise<void>;
|
|
625
622
|
getProhibitedFileTypes(): Promise<FileTypeItem[]>;
|
|
626
623
|
getMenus(key?: string, lang?: string): Promise<MenuResponse>;
|
|
624
|
+
getCustomFormData(formId: string): Promise<RequestReturn>;
|
|
625
|
+
submitCustomForm(payload: CustomFormPayload): Promise<RequestReturn>;
|
|
627
626
|
getAfterHourMessage(lang?: string): Promise<string>;
|
|
628
627
|
getTimeSlots(menuId: number | string, lang?: string): Promise<string[]>;
|
|
629
628
|
getWaitTimes(menuId: number | string, lang?: string): Promise<WaitTimeResponse | null>;
|
|
@@ -666,7 +665,6 @@ declare class Client {
|
|
|
666
665
|
private updateCheckIn;
|
|
667
666
|
private initializeCobrowse;
|
|
668
667
|
private registerOngoingChat;
|
|
669
|
-
private getCobrowseScript;
|
|
670
668
|
_triggerEvent(eventName: string, data?: any): void;
|
|
671
669
|
}
|
|
672
670
|
|
|
@@ -693,4 +691,4 @@ declare const OPTIONS: {
|
|
|
693
691
|
version: string;
|
|
694
692
|
};
|
|
695
693
|
|
|
696
|
-
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, type CheckInModalStateRequest, type CheckInResponse, CheckInStatus, type CheckInVisibilityStateRequest, 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 EmailResponse, type EscalateRequest, type EventHandler, EventManager, type FileTypeItem, type FormData, type GenerateTranscriptResponse, 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, type PdfStatusResponse, 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 };
|
|
694
|
+
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, type CheckInModalStateRequest, type CheckInResponse, CheckInStatus, type CheckInVisibilityStateRequest, Client, type ClientEvent, type ClientOption, type CobrowseMessages, type CobrowseOption, type CobrowseRequest, type CompanyResponse, type ConnectCallback, type ConnectOption, type ConnectRequest, type ConnectResult, type CustomFormPayload, ENVIRONMENT, type EmailRequest, type EmailResponse, type EscalateRequest, type EventHandler, EventManager, type FileTypeItem, type FormData, type GenerateTranscriptResponse, 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, type PdfStatusResponse, 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 };
|