@ujet/websdk-headless 3.42.2 → 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 +55 -56
- package/dist/index.js +72 -87
- package/dist/index.mjs +9784 -10508
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -104,7 +104,14 @@ interface CheckInVisibilityStateRequest {
|
|
|
104
104
|
tab_inactive?: boolean;
|
|
105
105
|
}
|
|
106
106
|
interface CheckInModalStateRequest {
|
|
107
|
-
modal_type: 'check_in'
|
|
107
|
+
modal_type: 'check_in';
|
|
108
|
+
}
|
|
109
|
+
interface CustomFormPayload {
|
|
110
|
+
smart_action_id: number;
|
|
111
|
+
form_response: {
|
|
112
|
+
question_id: number;
|
|
113
|
+
value: string | string[] | boolean;
|
|
114
|
+
}[];
|
|
108
115
|
}
|
|
109
116
|
|
|
110
117
|
declare enum PostSessionStatus {
|
|
@@ -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 {
|
|
@@ -537,7 +555,8 @@ declare class Chat {
|
|
|
537
555
|
get optInRequired(): boolean;
|
|
538
556
|
get postSessionRequired(): boolean;
|
|
539
557
|
get postSessionInProgress(): boolean;
|
|
540
|
-
get checkInStatus(): CheckInStatus;
|
|
558
|
+
get checkInStatus(): CheckInStatus | null;
|
|
559
|
+
set checkInStatus(newStatus: CheckInStatus | null);
|
|
541
560
|
update(state: ChatResponse): void;
|
|
542
561
|
on(eventName: string, handler: EventHandler): void;
|
|
543
562
|
off(eventName: string, handler: EventHandler): void;
|
|
@@ -579,28 +598,6 @@ declare class MediaStore {
|
|
|
579
598
|
clear(): Promise<void>;
|
|
580
599
|
}
|
|
581
600
|
|
|
582
|
-
declare class Cobrowse {
|
|
583
|
-
private _cobrowse;
|
|
584
|
-
private _options;
|
|
585
|
-
private _started;
|
|
586
|
-
private focusTrap;
|
|
587
|
-
constructor(instance: any, options: CobrowseOption);
|
|
588
|
-
private get root();
|
|
589
|
-
private get lang();
|
|
590
|
-
private get messages();
|
|
591
|
-
private get template();
|
|
592
|
-
static create(options: CobrowseOption, script: string): Promise<Cobrowse>;
|
|
593
|
-
setCustomData(data: any): void;
|
|
594
|
-
on(eventName: string, eventHandler: EventHandler): void;
|
|
595
|
-
start(): Promise<void>;
|
|
596
|
-
stop(): Promise<void>;
|
|
597
|
-
endSession(): Promise<void>;
|
|
598
|
-
createSessionCode(): Promise<string>;
|
|
599
|
-
private createConfirmConsent;
|
|
600
|
-
private setupConfirms;
|
|
601
|
-
private setupSessionControl;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
601
|
declare class Client {
|
|
605
602
|
VERSION: string;
|
|
606
603
|
options: ClientOption;
|
|
@@ -609,12 +606,13 @@ declare class Client {
|
|
|
609
606
|
private events;
|
|
610
607
|
request: RequestMethod;
|
|
611
608
|
chat: Chat;
|
|
612
|
-
|
|
609
|
+
private _cobrowse;
|
|
613
610
|
constructor(options: ClientOption);
|
|
614
611
|
get deviceId(): string;
|
|
615
612
|
get user(): UserProfile;
|
|
616
613
|
get lang(): string;
|
|
617
614
|
set lang(lang: string);
|
|
615
|
+
get cobrowse(): any;
|
|
618
616
|
destroy(): void;
|
|
619
617
|
on(eventName: string, handler: EventHandler): void;
|
|
620
618
|
off(eventName: string, handler: EventHandler): void;
|
|
@@ -623,6 +621,8 @@ declare class Client {
|
|
|
623
621
|
trackClientEvents(events: ClientEvent[]): Promise<void>;
|
|
624
622
|
getProhibitedFileTypes(): Promise<FileTypeItem[]>;
|
|
625
623
|
getMenus(key?: string, lang?: string): Promise<MenuResponse>;
|
|
624
|
+
getCustomFormData(formId: string): Promise<RequestReturn>;
|
|
625
|
+
submitCustomForm(payload: CustomFormPayload): Promise<RequestReturn>;
|
|
626
626
|
getAfterHourMessage(lang?: string): Promise<string>;
|
|
627
627
|
getTimeSlots(menuId: number | string, lang?: string): Promise<string[]>;
|
|
628
628
|
getWaitTimes(menuId: number | string, lang?: string): Promise<WaitTimeResponse | null>;
|
|
@@ -665,7 +665,6 @@ declare class Client {
|
|
|
665
665
|
private updateCheckIn;
|
|
666
666
|
private initializeCobrowse;
|
|
667
667
|
private registerOngoingChat;
|
|
668
|
-
private getCobrowseScript;
|
|
669
668
|
_triggerEvent(eventName: string, data?: any): void;
|
|
670
669
|
}
|
|
671
670
|
|
|
@@ -692,4 +691,4 @@ declare const OPTIONS: {
|
|
|
692
691
|
version: string;
|
|
693
692
|
};
|
|
694
693
|
|
|
695
|
-
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 };
|