@aakash58/chatbot 1.0.81 → 1.0.83
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/fesm2022/aakash58-chatbot.mjs +401 -146
- package/fesm2022/aakash58-chatbot.mjs.map +1 -1
- package/index.d.ts +114 -3
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnDestroy, RendererFactory2, InjectionToken, ElementRef, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { OnDestroy, RendererFactory2, InjectionToken, ElementRef, Renderer2, SimpleChanges, TrackByFunction, EventEmitter, AfterViewInit } from '@angular/core';
|
|
3
3
|
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { HttpClient } from '@angular/common/http';
|
|
@@ -28,6 +28,7 @@ interface DoohbotThemeConfig {
|
|
|
28
28
|
textColor?: string;
|
|
29
29
|
secondaryTextColor?: string;
|
|
30
30
|
hintTextColor?: string;
|
|
31
|
+
buttonColor?: string;
|
|
31
32
|
userMessageColor?: string;
|
|
32
33
|
botMessageColor?: string;
|
|
33
34
|
userTextColor?: string;
|
|
@@ -254,6 +255,19 @@ declare class FullscreenDirective {
|
|
|
254
255
|
static ɵdir: i0.ɵɵDirectiveDeclaration<FullscreenDirective, "[appFullscreen]", never, { "fullscreenTarget": { "alias": "fullscreenTarget"; "required": false; }; }, {}, never, never, true, never>;
|
|
255
256
|
}
|
|
256
257
|
|
|
258
|
+
interface ChatSession {
|
|
259
|
+
id: string;
|
|
260
|
+
timestamp: Date;
|
|
261
|
+
title: string;
|
|
262
|
+
messages: Message[];
|
|
263
|
+
contextKey: string;
|
|
264
|
+
userId: string;
|
|
265
|
+
}
|
|
266
|
+
interface ChatSessionGroup {
|
|
267
|
+
label: string;
|
|
268
|
+
sessions: ChatSession[];
|
|
269
|
+
}
|
|
270
|
+
|
|
257
271
|
declare class Doohbot extends DoohbotInput implements OnDestroy {
|
|
258
272
|
private elementRef;
|
|
259
273
|
private renderer;
|
|
@@ -269,6 +283,7 @@ declare class Doohbot extends DoohbotInput implements OnDestroy {
|
|
|
269
283
|
apiConfig?: DoohbotApiConfig;
|
|
270
284
|
userContext?: UserContext;
|
|
271
285
|
themeConfig: DoohbotThemeConfig | undefined;
|
|
286
|
+
selectedTenantId: i0.WritableSignal<string | null>;
|
|
272
287
|
isFullScreen: boolean;
|
|
273
288
|
isChatOpen: i0.WritableSignal<boolean>;
|
|
274
289
|
isAuthenticated: i0.WritableSignal<boolean>;
|
|
@@ -282,6 +297,10 @@ declare class Doohbot extends DoohbotInput implements OnDestroy {
|
|
|
282
297
|
maxMessageLength: number;
|
|
283
298
|
messageError: i0.WritableSignal<string | null>;
|
|
284
299
|
dismissTimeout: number | null;
|
|
300
|
+
userName: string;
|
|
301
|
+
isHistorySidebarOpen: i0.WritableSignal<boolean>;
|
|
302
|
+
chatSessions: i0.WritableSignal<ChatSession[]>;
|
|
303
|
+
private chatHistoryService;
|
|
285
304
|
predefinedMessages: string[];
|
|
286
305
|
trackByMessageId(index: number, item: any): string;
|
|
287
306
|
chatWindowRef: ElementRef;
|
|
@@ -302,6 +321,10 @@ declare class Doohbot extends DoohbotInput implements OnDestroy {
|
|
|
302
321
|
private updateApiConfig;
|
|
303
322
|
toggleChat(): void;
|
|
304
323
|
clearChat(): void;
|
|
324
|
+
toggleHistorySidebar(): void;
|
|
325
|
+
loadChatSession(session: ChatSession): void;
|
|
326
|
+
deleteSession(sessionId: string): void;
|
|
327
|
+
loadUserSessions(): void;
|
|
305
328
|
sendMessage(text: string): Promise<void>;
|
|
306
329
|
clearMessageError(): void;
|
|
307
330
|
showSuggestionChips: i0.Signal<boolean>;
|
|
@@ -405,5 +428,93 @@ declare const appConst: {
|
|
|
405
428
|
|
|
406
429
|
declare const DOOHBOT_API_URL: InjectionToken<string>;
|
|
407
430
|
|
|
408
|
-
|
|
409
|
-
|
|
431
|
+
interface ChatContext {
|
|
432
|
+
platformTenant: string;
|
|
433
|
+
subTenant: string;
|
|
434
|
+
agent: string;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
interface TenantConfig extends ChatContext {
|
|
438
|
+
id: string;
|
|
439
|
+
displayName: string;
|
|
440
|
+
config?: Partial<DoohbotInput>;
|
|
441
|
+
userContext?: UserContext;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
declare class ChatWindowComponent {
|
|
445
|
+
isChatOpen: boolean;
|
|
446
|
+
enableDrag: boolean;
|
|
447
|
+
enableResize: boolean;
|
|
448
|
+
isFullScreen: boolean;
|
|
449
|
+
isAuthenticated: boolean;
|
|
450
|
+
appTitle: string;
|
|
451
|
+
appLogoUrl: string;
|
|
452
|
+
appTextLogoUrl: string;
|
|
453
|
+
appHeaderLogoUrl: string;
|
|
454
|
+
moreIcon: string;
|
|
455
|
+
minimizeIcon: string;
|
|
456
|
+
messages: Message[];
|
|
457
|
+
isBotTyping: boolean;
|
|
458
|
+
appSubtitle: string;
|
|
459
|
+
welcomeDesc: string;
|
|
460
|
+
predefinedMessages: string[];
|
|
461
|
+
botAvatarUrl: string;
|
|
462
|
+
userAvatarUrl: string;
|
|
463
|
+
userName: string;
|
|
464
|
+
trackByMessageId: TrackByFunction<Message>;
|
|
465
|
+
hintText: string;
|
|
466
|
+
sendIcon: string;
|
|
467
|
+
messageError: string | null;
|
|
468
|
+
showSuggestionChips: boolean;
|
|
469
|
+
isHistorySidebarOpen: boolean;
|
|
470
|
+
chatSessions: ChatSession[];
|
|
471
|
+
toggleChat: EventEmitter<void>;
|
|
472
|
+
toggleFullScreen: EventEmitter<void>;
|
|
473
|
+
toggleHistorySidebar: EventEmitter<void>;
|
|
474
|
+
openSettings: EventEmitter<void>;
|
|
475
|
+
suggestionClick: EventEmitter<string>;
|
|
476
|
+
send: EventEmitter<string>;
|
|
477
|
+
clearMessageError: EventEmitter<void>;
|
|
478
|
+
clearChat: EventEmitter<void>;
|
|
479
|
+
sessionSelected: EventEmitter<ChatSession>;
|
|
480
|
+
sessionDeleted: EventEmitter<string>;
|
|
481
|
+
themeService: ThemeService;
|
|
482
|
+
onToggleChat(): void;
|
|
483
|
+
onToggleHistorySidebar(): void;
|
|
484
|
+
onToggleFullScreen(): void;
|
|
485
|
+
onOpenSettings(): void;
|
|
486
|
+
onSuggestionClick(text: string): void;
|
|
487
|
+
onSend(text: string): void;
|
|
488
|
+
onClearMessageError(): void;
|
|
489
|
+
onClearChat(): void;
|
|
490
|
+
onSessionSelected(session: ChatSession): void;
|
|
491
|
+
onSessionDeleted(sessionId: string): void;
|
|
492
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatWindowComponent, never>;
|
|
493
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatWindowComponent, "app-chat-window", never, { "isChatOpen": { "alias": "isChatOpen"; "required": false; }; "enableDrag": { "alias": "enableDrag"; "required": false; }; "enableResize": { "alias": "enableResize"; "required": false; }; "isFullScreen": { "alias": "isFullScreen"; "required": false; }; "isAuthenticated": { "alias": "isAuthenticated"; "required": false; }; "appTitle": { "alias": "appTitle"; "required": false; }; "appLogoUrl": { "alias": "appLogoUrl"; "required": false; }; "appTextLogoUrl": { "alias": "appTextLogoUrl"; "required": false; }; "appHeaderLogoUrl": { "alias": "appHeaderLogoUrl"; "required": false; }; "moreIcon": { "alias": "moreIcon"; "required": false; }; "minimizeIcon": { "alias": "minimizeIcon"; "required": false; }; "messages": { "alias": "messages"; "required": false; }; "isBotTyping": { "alias": "isBotTyping"; "required": false; }; "appSubtitle": { "alias": "appSubtitle"; "required": false; }; "welcomeDesc": { "alias": "welcomeDesc"; "required": false; }; "predefinedMessages": { "alias": "predefinedMessages"; "required": false; }; "botAvatarUrl": { "alias": "botAvatarUrl"; "required": false; }; "userAvatarUrl": { "alias": "userAvatarUrl"; "required": false; }; "userName": { "alias": "userName"; "required": false; }; "trackByMessageId": { "alias": "trackByMessageId"; "required": false; }; "hintText": { "alias": "hintText"; "required": false; }; "sendIcon": { "alias": "sendIcon"; "required": false; }; "messageError": { "alias": "messageError"; "required": false; }; "showSuggestionChips": { "alias": "showSuggestionChips"; "required": false; }; "isHistorySidebarOpen": { "alias": "isHistorySidebarOpen"; "required": false; }; "chatSessions": { "alias": "chatSessions"; "required": false; }; }, { "toggleChat": "toggleChat"; "toggleFullScreen": "toggleFullScreen"; "toggleHistorySidebar": "toggleHistorySidebar"; "openSettings": "openSettings"; "suggestionClick": "suggestionClick"; "send": "send"; "clearMessageError": "clearMessageError"; "clearChat": "clearChat"; "sessionSelected": "sessionSelected"; "sessionDeleted": "sessionDeleted"; }, never, never, true, never>;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
declare class MessageListComponent implements AfterViewInit, OnDestroy {
|
|
497
|
+
messages: Message[];
|
|
498
|
+
isBotTyping: boolean;
|
|
499
|
+
appLogoUrl: string;
|
|
500
|
+
appSubtitle: string;
|
|
501
|
+
welcomeDesc: string;
|
|
502
|
+
predefinedMessages: string[];
|
|
503
|
+
botAvatarUrl: string;
|
|
504
|
+
userAvatarUrl: string;
|
|
505
|
+
userName: string;
|
|
506
|
+
isAuthenticated: boolean;
|
|
507
|
+
trackByMessageId: TrackByFunction<Message>;
|
|
508
|
+
suggestionClick: EventEmitter<string>;
|
|
509
|
+
private chatMessagesContainer;
|
|
510
|
+
private mutationObserver;
|
|
511
|
+
ngAfterViewInit(): void;
|
|
512
|
+
private scrollToBottom;
|
|
513
|
+
ngOnDestroy(): void;
|
|
514
|
+
onPredefinedClick(text: string): void;
|
|
515
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageListComponent, never>;
|
|
516
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageListComponent, "app-message-list", never, { "messages": { "alias": "messages"; "required": false; }; "isBotTyping": { "alias": "isBotTyping"; "required": false; }; "appLogoUrl": { "alias": "appLogoUrl"; "required": false; }; "appSubtitle": { "alias": "appSubtitle"; "required": false; }; "welcomeDesc": { "alias": "welcomeDesc"; "required": false; }; "predefinedMessages": { "alias": "predefinedMessages"; "required": false; }; "botAvatarUrl": { "alias": "botAvatarUrl"; "required": false; }; "userAvatarUrl": { "alias": "userAvatarUrl"; "required": false; }; "userName": { "alias": "userName"; "required": false; }; "isAuthenticated": { "alias": "isAuthenticated"; "required": false; }; "trackByMessageId": { "alias": "trackByMessageId"; "required": false; }; }, { "suggestionClick": "suggestionClick"; }, never, never, true, never>;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export { AccountService, AuthService, ChatWindowComponent, ChatbotApiService, DOOHBOT_API_CONFIG, DOOHBOT_API_URL, Doohbot, DoohbotInput, MessageListComponent, appConst };
|
|
520
|
+
export type { ChatContext, ChatSession, ChatSessionGroup, DoohbotApiConfig, DoohbotThemeConfig, TenantConfig, UserContext };
|