@adzen/doohbot 1.0.3 → 1.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/fesm2022/adzen-doohbot.mjs +3393 -3652
- package/fesm2022/adzen-doohbot.mjs.map +1 -1
- package/index.d.ts +240 -410
- package/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/lib/app/chat/components/chat-header/chat-header.component.scss +1 -1
- package/src/lib/app/chat/components/{message-list/message-list.component.scss → chat-message-container/chat-message-container.component.scss} +12 -13
- package/src/lib/app/chat/components/chat-window/chat-window.component.scss +116 -113
- package/src/lib/app/login/login-form.component.scss +171 -164
- package/src/lib/shared/chips/chips.component.scss +1 -0
- /package/src/lib/app/chat/components/{message-input/message-input.component.scss → chat-input/chat-input.component.scss} +0 -0
package/index.d.ts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnDestroy, RendererFactory2, ElementRef, Renderer2, Signal, OnInit, SimpleChanges, InjectionToken } from '@angular/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
5
6
|
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
6
7
|
import { SafeHtml } from '@angular/platform-browser';
|
|
7
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
8
|
-
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
9
|
-
|
|
10
|
-
interface LoginRequest {
|
|
11
|
-
username: string;
|
|
12
|
-
password: string;
|
|
13
|
-
rememberMe?: boolean;
|
|
14
|
-
}
|
|
15
8
|
|
|
16
9
|
/**
|
|
17
10
|
* Configuration for Doohbot API integration.
|
|
@@ -67,6 +60,23 @@ interface DoohbotApiConfig {
|
|
|
67
60
|
retryDelay?: number;
|
|
68
61
|
}
|
|
69
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Authentication validation mode for Doohbot SDK.
|
|
65
|
+
*
|
|
66
|
+
* Determines which input must be provided and validated.
|
|
67
|
+
*/
|
|
68
|
+
interface DoohbotAuthConfig {
|
|
69
|
+
/**
|
|
70
|
+
* Authentication strategy enforced by the SDK.
|
|
71
|
+
*
|
|
72
|
+
* - 'federated' → requires federatedAuthToken input (SSO)
|
|
73
|
+
* - 'session' → requires session input from host application
|
|
74
|
+
* - 'manual' → uses Doohbot internal login UI
|
|
75
|
+
*/
|
|
76
|
+
mode: 'federated' | 'session' | 'manual';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type ButtonStyle = 'fab' | 'sidebar' | 'sidebar-top' | 'sidebar-bottom';
|
|
70
80
|
/**
|
|
71
81
|
* Theme and visual customization options for Doohbot.
|
|
72
82
|
* All properties are optional and can be partially overridden.
|
|
@@ -90,7 +100,7 @@ interface DoohbotThemeConfig {
|
|
|
90
100
|
* - `sidebar-bottom`: Sidebar anchored to bottom
|
|
91
101
|
* @default 'fab'
|
|
92
102
|
*/
|
|
93
|
-
buttonStyle?:
|
|
103
|
+
buttonStyle?: ButtonStyle | 'fab';
|
|
94
104
|
/**
|
|
95
105
|
* Font family applied to all chatbot text.
|
|
96
106
|
* Accepts any valid CSS font-family value.
|
|
@@ -272,6 +282,14 @@ interface DoohbotConfig {
|
|
|
272
282
|
* or integrate with a custom/self-hosted API.
|
|
273
283
|
*/
|
|
274
284
|
api?: DoohbotApiConfig;
|
|
285
|
+
/**
|
|
286
|
+
* Optional authentication configuration.
|
|
287
|
+
* Use this to specify which authentication strategy the SDK should enforce,
|
|
288
|
+
* and to provide necessary parameters for that strategy.
|
|
289
|
+
*
|
|
290
|
+
* If not provided, SDK will default to 'federated' mode, expecting a federatedAuthToken.
|
|
291
|
+
*/
|
|
292
|
+
auth?: DoohbotAuthConfig;
|
|
275
293
|
/**
|
|
276
294
|
* Optional theme and visual customization options.
|
|
277
295
|
*
|
|
@@ -343,6 +361,11 @@ declare class DoohbotConfigService implements OnDestroy {
|
|
|
343
361
|
* Undefined if API integration is not configured.
|
|
344
362
|
*/
|
|
345
363
|
readonly api: () => DoohbotApiConfig | undefined;
|
|
364
|
+
/**
|
|
365
|
+
* Authentication configuration object.
|
|
366
|
+
* Undefined if authentication is not configured.
|
|
367
|
+
*/
|
|
368
|
+
readonly auth: () => DoohbotAuthConfig | undefined;
|
|
346
369
|
/**
|
|
347
370
|
* Theme customization configuration.
|
|
348
371
|
* Undefined if no theme overrides are provided.
|
|
@@ -356,8 +379,8 @@ declare class DoohbotConfigService implements OnDestroy {
|
|
|
356
379
|
update(value: Partial<DoohbotConfig>): void;
|
|
357
380
|
private validateConfig;
|
|
358
381
|
ngOnDestroy(): void;
|
|
359
|
-
static ɵfac:
|
|
360
|
-
static ɵprov:
|
|
382
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DoohbotConfigService, [{ optional: true; }]>;
|
|
383
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DoohbotConfigService>;
|
|
361
384
|
}
|
|
362
385
|
|
|
363
386
|
interface AuthResult {
|
|
@@ -370,36 +393,66 @@ interface FederatedLoginRequest {
|
|
|
370
393
|
remember_me?: boolean;
|
|
371
394
|
}
|
|
372
395
|
|
|
396
|
+
interface LoginRequest {
|
|
397
|
+
username: string;
|
|
398
|
+
password: string;
|
|
399
|
+
rememberMe?: boolean;
|
|
400
|
+
}
|
|
401
|
+
|
|
373
402
|
declare class StorageService {
|
|
374
403
|
private readonly storageKey;
|
|
375
404
|
private readonly secretKey;
|
|
376
|
-
private readonly storage;
|
|
377
405
|
constructor(config: DoohbotConfig);
|
|
378
406
|
/**
|
|
379
407
|
* Store a value under the given key.
|
|
408
|
+
* @param key The key to store the value under.
|
|
409
|
+
* @param value The value to store (any serializable object).
|
|
410
|
+
* @param session If true, use sessionStorage; otherwise localStorage.
|
|
380
411
|
*/
|
|
381
|
-
set<T>(key: string, value: T): void;
|
|
412
|
+
set<T>(key: string, value: T, session?: boolean): void;
|
|
382
413
|
/**
|
|
383
414
|
* Retrieve a stored value by key.
|
|
415
|
+
* @param key The key to retrieve.
|
|
416
|
+
* @param session If true, use sessionStorage; otherwise localStorage.
|
|
417
|
+
* @returns The stored value or null if not found.
|
|
384
418
|
*/
|
|
385
|
-
get<T>(key: string): T | null;
|
|
419
|
+
get<T>(key: string, session?: boolean): T | null;
|
|
386
420
|
/**
|
|
387
421
|
* Remove a specific key from storage.
|
|
422
|
+
* @param key The key to remove.
|
|
423
|
+
* @param session If true, remove from sessionStorage; otherwise localStorage.
|
|
388
424
|
*/
|
|
389
|
-
remove(key: string): void;
|
|
425
|
+
remove(key: string, session?: boolean): void;
|
|
390
426
|
/**
|
|
391
|
-
* Clear all Doohbot-related storage.
|
|
427
|
+
* Clear all Doohbot-related storage from both localStorage and sessionStorage.
|
|
392
428
|
*/
|
|
393
|
-
|
|
429
|
+
clearStorage(): void;
|
|
394
430
|
/**
|
|
395
431
|
* Validate storage integrity without mutating it.
|
|
432
|
+
* @param session If true, validate sessionStorage; otherwise localStorage.
|
|
433
|
+
* @returns True if storage can be decrypted successfully.
|
|
434
|
+
*/
|
|
435
|
+
isValid(session?: boolean): boolean;
|
|
436
|
+
/**
|
|
437
|
+
* Get all stored values.
|
|
438
|
+
* @param storage The storage medium to use.
|
|
439
|
+
* @returns Object of all stored key/value pairs.
|
|
440
|
+
*/
|
|
441
|
+
private getAll;
|
|
442
|
+
/**
|
|
443
|
+
* Encrypt a string before storing.
|
|
444
|
+
* @param plainText The string to encrypt.
|
|
445
|
+
* @returns Encrypted string.
|
|
396
446
|
*/
|
|
397
|
-
isValid(): boolean;
|
|
398
|
-
private readAll;
|
|
399
447
|
private encrypt;
|
|
448
|
+
/**
|
|
449
|
+
* Decrypt a string from storage.
|
|
450
|
+
* @param cipherText The encrypted string.
|
|
451
|
+
* @returns Decrypted string, or null if decryption fails.
|
|
452
|
+
*/
|
|
400
453
|
private decrypt;
|
|
401
|
-
static ɵfac:
|
|
402
|
-
static ɵprov:
|
|
454
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StorageService, never>;
|
|
455
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StorageService>;
|
|
403
456
|
}
|
|
404
457
|
|
|
405
458
|
declare class HttpService {
|
|
@@ -413,112 +466,93 @@ declare class HttpService {
|
|
|
413
466
|
patch(url: string, param?: object, showLoader?: boolean, headers?: HttpHeaders): Promise<any>;
|
|
414
467
|
put(url: string, param?: object, showLoader?: boolean, headers?: HttpHeaders): Promise<any>;
|
|
415
468
|
delete(url: string, param?: object, showLoader?: boolean, headers?: HttpHeaders): Promise<any>;
|
|
416
|
-
static ɵfac:
|
|
417
|
-
static ɵprov:
|
|
469
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, never>;
|
|
470
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HttpService>;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
declare class SnackbarService {
|
|
474
|
+
private snackBar;
|
|
475
|
+
constructor(snackBar: MatSnackBar);
|
|
476
|
+
private show;
|
|
477
|
+
success(message: string, duration?: number): void;
|
|
478
|
+
warn(message: string, duration?: number): void;
|
|
479
|
+
error(message: string, duration?: number): void;
|
|
480
|
+
info(message: string, duration?: number): void;
|
|
481
|
+
clear(): void;
|
|
482
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarService, never>;
|
|
483
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarService>;
|
|
418
484
|
}
|
|
419
485
|
|
|
420
486
|
declare class AuthService {
|
|
421
487
|
private http;
|
|
422
488
|
private storageService;
|
|
423
489
|
private configService;
|
|
490
|
+
private snackbar;
|
|
424
491
|
private jwtHelper;
|
|
425
|
-
private
|
|
426
|
-
|
|
427
|
-
private readonly isAuthenticatedSubject;
|
|
428
|
-
private readonly federatedAuthTokenSubject;
|
|
492
|
+
private readonly _isAuthenticated;
|
|
493
|
+
readonly isAuthenticated$: Observable<boolean>;
|
|
429
494
|
private readonly rememberMeSubject;
|
|
495
|
+
private readonly federatedAuthTokenSubject;
|
|
430
496
|
private readonly licenseFileSubject;
|
|
431
497
|
private readonly licenseCodeSubject;
|
|
432
|
-
readonly isAuthenticated$: Observable<boolean>;
|
|
433
498
|
private apiBaseUrl;
|
|
434
|
-
/**
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
|
|
444
|
-
|
|
499
|
+
/** Gets if user is authenticated */
|
|
500
|
+
readonly isAuthenticated: i0.Signal<boolean>;
|
|
501
|
+
/** Sets remember_me */
|
|
502
|
+
readonly setRememberMe: (value?: boolean) => void;
|
|
503
|
+
/** Gets remember_me */
|
|
504
|
+
readonly rememberMe: () => boolean | false;
|
|
505
|
+
/** `user_id` of logged in user */
|
|
506
|
+
readonly userId: () => string | null;
|
|
507
|
+
/** `username` of logged in user */
|
|
508
|
+
readonly username: () => string;
|
|
509
|
+
/** Logged-in user avatar URL */
|
|
510
|
+
readonly profileImageUrl: () => string | null;
|
|
511
|
+
/** `roles` of logged in user */
|
|
512
|
+
readonly roles: () => string | null;
|
|
513
|
+
/** `permissions` of logged in user */
|
|
514
|
+
readonly permissions: () => string | null;
|
|
515
|
+
/** `organization_id` of logged in user */
|
|
516
|
+
readonly organizationId: () => string | null;
|
|
517
|
+
/** `company_id` of logged in user */
|
|
518
|
+
readonly companyId: () => string | null;
|
|
519
|
+
/** `access_token` of logged in user */
|
|
520
|
+
readonly accessToken: () => string | null;
|
|
521
|
+
/** `refresh_token` of logged in user */
|
|
522
|
+
readonly refreshToken: () => string | null;
|
|
523
|
+
/** Resolved API base URL */
|
|
524
|
+
readonly apiUrl: () => string;
|
|
525
|
+
/** Sets current license file */
|
|
445
526
|
readonly setLicenseFile: (data: Map<string, string> | null) => void;
|
|
446
|
-
/**
|
|
447
|
-
* Gets current license file
|
|
448
|
-
*/
|
|
527
|
+
/** Gets current license file */
|
|
449
528
|
readonly licenseFile: () => Map<string, string> | null;
|
|
450
|
-
/**
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
readonly setFederatedAuthToken: (token: string | null) => void;
|
|
454
|
-
/**
|
|
455
|
-
* Gets current federated auth token
|
|
456
|
-
*/
|
|
529
|
+
/** Sets current federated auth token */
|
|
530
|
+
readonly setFederatedAuthToken: (token: string | undefined) => void;
|
|
531
|
+
/** Gets current federated auth token */
|
|
457
532
|
readonly federatedAuthToken: () => string | null;
|
|
458
|
-
/**
|
|
459
|
-
* Sets current license code
|
|
460
|
-
*/
|
|
533
|
+
/** Sets current license_code */
|
|
461
534
|
readonly setLicenseCode: (code: string | null) => void;
|
|
462
|
-
/**
|
|
463
|
-
* Gets current license code
|
|
464
|
-
*/
|
|
535
|
+
/** Gets current license_code */
|
|
465
536
|
readonly licenseCode: () => string | null;
|
|
537
|
+
/** Gets current license key for active license code */
|
|
538
|
+
readonly currentLicenseKey: () => string | null;
|
|
539
|
+
constructor(http: HttpService, storageService: StorageService, configService: DoohbotConfigService, snackbar: SnackbarService);
|
|
466
540
|
/**
|
|
467
|
-
*
|
|
541
|
+
* Authenticate user based on stored tokens or refresh tokens.
|
|
468
542
|
*/
|
|
469
|
-
|
|
543
|
+
private authenticate;
|
|
470
544
|
/**
|
|
471
|
-
*
|
|
545
|
+
* Refresh login token.
|
|
472
546
|
*/
|
|
473
|
-
|
|
547
|
+
refreshLogin(): Observable<AuthResult | null>;
|
|
474
548
|
/**
|
|
475
|
-
*
|
|
549
|
+
* True if doohbot API requests that are auth-related
|
|
476
550
|
*/
|
|
477
|
-
|
|
551
|
+
isAuthUrl(url: string): boolean;
|
|
478
552
|
/**
|
|
479
|
-
*
|
|
553
|
+
* True if if not a doohbot API request (e.g. external API calls)
|
|
480
554
|
*/
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Logged-in user display name
|
|
484
|
-
*/
|
|
485
|
-
readonly loggedInUserName: () => string;
|
|
486
|
-
/**
|
|
487
|
-
* Logged-in user avatar URL
|
|
488
|
-
*/
|
|
489
|
-
readonly loggedInUserImageUrl: () => string | null;
|
|
490
|
-
/**
|
|
491
|
-
* Logged-in user role
|
|
492
|
-
*/
|
|
493
|
-
readonly loggedInUserRole: () => string;
|
|
494
|
-
/**`user_id` of logged in user */
|
|
495
|
-
readonly getUserId: () => string | null;
|
|
496
|
-
/**`username` of logged in user */
|
|
497
|
-
readonly getUsername: () => string | null;
|
|
498
|
-
/**`rememberMe` of logged in user */
|
|
499
|
-
readonly getRememberMe: () => string | null;
|
|
500
|
-
/**`roles` of logged in user */
|
|
501
|
-
readonly getRoles: () => string | null;
|
|
502
|
-
/**`permissions` of logged in user */
|
|
503
|
-
readonly getPermissions: () => string | null;
|
|
504
|
-
/**`organization_id` of logged in user */
|
|
505
|
-
readonly getOrganizationId: () => string | null;
|
|
506
|
-
/**`company_id` of logged in user */
|
|
507
|
-
readonly getCompanyId: () => string | null;
|
|
508
|
-
/**`office_id` of logged in user */
|
|
509
|
-
readonly getOfficeId: () => string | null;
|
|
510
|
-
/**`access_token` of logged in user */
|
|
511
|
-
readonly getAccessToken: () => string | null;
|
|
512
|
-
/**`refresh_token` of logged in user */
|
|
513
|
-
readonly getRefreshToken: () => string | null;
|
|
514
|
-
/**
|
|
515
|
-
* Gets if user is authenticated
|
|
516
|
-
*/
|
|
517
|
-
readonly getIsAuthenticated: () => boolean;
|
|
518
|
-
isLoggingIn: _angular_core.WritableSignal<boolean>;
|
|
519
|
-
authError: _angular_core.WritableSignal<string | null>;
|
|
520
|
-
authSuccess: _angular_core.WritableSignal<string | null>;
|
|
521
|
-
constructor(http: HttpService, storageService: StorageService, configService: DoohbotConfigService);
|
|
555
|
+
isDoohbotApiRequest(url: string): boolean;
|
|
522
556
|
/**
|
|
523
557
|
* Initializes the federated authentication flow.
|
|
524
558
|
*
|
|
@@ -529,46 +563,36 @@ declare class AuthService {
|
|
|
529
563
|
* will execute only once when all conditions are satisfied.
|
|
530
564
|
*/
|
|
531
565
|
initFederatedAuthFlow(): void;
|
|
532
|
-
/**
|
|
533
|
-
* Restores authenticated state with all prerequisites satisfied.
|
|
534
|
-
* Handles authentication state for normal manual login.
|
|
535
|
-
*/
|
|
536
|
-
initNormalLoginAuthState(): void;
|
|
537
|
-
/**
|
|
538
|
-
* Authenticate user based on stored tokens or refresh tokens.
|
|
539
|
-
*/
|
|
540
|
-
private authenticate;
|
|
541
566
|
/**
|
|
542
567
|
* Authenticate user with federated credentials
|
|
543
568
|
*/
|
|
544
569
|
federatedLogin(param: FederatedLoginRequest): Promise<boolean>;
|
|
545
570
|
/**
|
|
546
|
-
*
|
|
571
|
+
* Initializes session authentication flow for session auth mode.
|
|
547
572
|
*/
|
|
548
|
-
|
|
573
|
+
initSessionAuthFlow(session: AuthResult | undefined): void;
|
|
549
574
|
/**
|
|
550
|
-
*
|
|
575
|
+
* Authenticate user with credentials
|
|
551
576
|
*/
|
|
552
|
-
|
|
577
|
+
login(param: LoginRequest): Promise<boolean>;
|
|
553
578
|
/**
|
|
554
|
-
* Logout
|
|
579
|
+
* Logout user by clearing session and tokens, and calling logout API to invalidate refresh token.
|
|
555
580
|
*/
|
|
556
|
-
logout(
|
|
581
|
+
logout(): Promise<boolean>;
|
|
557
582
|
private federateLoginHttpHelper;
|
|
558
583
|
private loginHttpHelper;
|
|
559
584
|
private refreshLoginHttpHelper;
|
|
560
585
|
private logoutHttpHelper;
|
|
561
586
|
private buildLicenseHeader;
|
|
562
|
-
setSession
|
|
587
|
+
private setSession;
|
|
563
588
|
private isTokenExpired;
|
|
564
589
|
/**
|
|
565
590
|
* Clear all authentication related data from local storage, session storage, cache, and tokens.
|
|
566
591
|
* This method is called when the user logs out.
|
|
567
592
|
*/
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
static
|
|
571
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthService>;
|
|
593
|
+
clearAuth(): void;
|
|
594
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
595
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
572
596
|
}
|
|
573
597
|
|
|
574
598
|
interface ApiResponse<T> {
|
|
@@ -599,7 +623,7 @@ declare class PersonalizationService {
|
|
|
599
623
|
private storage;
|
|
600
624
|
private authService;
|
|
601
625
|
private _settings;
|
|
602
|
-
settings:
|
|
626
|
+
settings: i0.Signal<PersonalizationSettings>;
|
|
603
627
|
constructor(http: HttpService);
|
|
604
628
|
private getStorageKey;
|
|
605
629
|
/**
|
|
@@ -619,8 +643,8 @@ declare class PersonalizationService {
|
|
|
619
643
|
getCustomInstructionHttpHelper(showLoader?: boolean): Promise<ApiResponse<CustomInstructions>>;
|
|
620
644
|
private loadSettings;
|
|
621
645
|
private saveSettings;
|
|
622
|
-
static ɵfac:
|
|
623
|
-
static ɵprov:
|
|
646
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PersonalizationService, never>;
|
|
647
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PersonalizationService>;
|
|
624
648
|
}
|
|
625
649
|
|
|
626
650
|
type ThemeMode = 'light' | 'dark' | 'auto';
|
|
@@ -630,14 +654,14 @@ declare class ThemeService implements OnDestroy {
|
|
|
630
654
|
private configService;
|
|
631
655
|
private renderer;
|
|
632
656
|
private _theme;
|
|
633
|
-
theme:
|
|
657
|
+
theme: i0.Signal<ThemeMode>;
|
|
634
658
|
private _activeTheme;
|
|
635
|
-
activeTheme:
|
|
659
|
+
activeTheme: i0.Signal<"light-theme" | "dark-theme">;
|
|
636
660
|
private observer;
|
|
637
661
|
constructor(rendererFactory: RendererFactory2, overlay: OverlayContainer, personalization: PersonalizationService, configService: DoohbotConfigService);
|
|
638
662
|
private _currentConfig;
|
|
639
663
|
private rootElement;
|
|
640
|
-
setThemeConfig(
|
|
664
|
+
setThemeConfig(elementRef: ElementRef, renderer: Renderer2, isDarkMode?: boolean): void;
|
|
641
665
|
applyPrimaryColorToGlobal(colorInput: string): void;
|
|
642
666
|
/**
|
|
643
667
|
* Helper to convert hex to comma-separated RGB
|
|
@@ -658,24 +682,11 @@ declare class ThemeService implements OnDestroy {
|
|
|
658
682
|
private cleanupObservers;
|
|
659
683
|
ngOnDestroy(): void;
|
|
660
684
|
/**
|
|
661
|
-
*
|
|
685
|
+
* Manual CSS variable application is now handled via theme.css tokens
|
|
662
686
|
*/
|
|
663
687
|
applyCssVariables(element: HTMLElement, config: DoohbotThemeConfig | undefined): void;
|
|
664
|
-
static ɵfac:
|
|
665
|
-
static ɵprov:
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
declare class FullscreenDirective {
|
|
669
|
-
private el;
|
|
670
|
-
private renderer;
|
|
671
|
-
private isFullScreen;
|
|
672
|
-
private preFullscreenState;
|
|
673
|
-
fullscreenTarget: string;
|
|
674
|
-
constructor(el: ElementRef, renderer: Renderer2);
|
|
675
|
-
toggle(): void;
|
|
676
|
-
getFullscreenState(): boolean;
|
|
677
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FullscreenDirective, never>;
|
|
678
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FullscreenDirective, "[appFullscreen]", never, { "fullscreenTarget": { "alias": "fullscreenTarget"; "required": false; }; }, {}, never, never, true, never>;
|
|
688
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
689
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
679
690
|
}
|
|
680
691
|
|
|
681
692
|
/**
|
|
@@ -700,89 +711,6 @@ interface Message {
|
|
|
700
711
|
copied?: boolean;
|
|
701
712
|
}
|
|
702
713
|
|
|
703
|
-
interface ChatSessionDto {
|
|
704
|
-
response_id: string;
|
|
705
|
-
last_message_at: Date;
|
|
706
|
-
title: string;
|
|
707
|
-
messages: Message[];
|
|
708
|
-
userId: string;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
/**
|
|
712
|
-
* Chat Message from API
|
|
713
|
-
*/
|
|
714
|
-
interface ChatMessage {
|
|
715
|
-
message_id?: string;
|
|
716
|
-
role: MessageRole;
|
|
717
|
-
content: string;
|
|
718
|
-
model_name: string | null;
|
|
719
|
-
prompt_tokens: number | null;
|
|
720
|
-
completion_tokens: number | null;
|
|
721
|
-
created_at: string;
|
|
722
|
-
}
|
|
723
|
-
/**
|
|
724
|
-
* Chat Session from API
|
|
725
|
-
*/
|
|
726
|
-
interface ChatSessionResponse {
|
|
727
|
-
response_id: string;
|
|
728
|
-
title: string;
|
|
729
|
-
last_message_at: string;
|
|
730
|
-
chat_session_id?: string;
|
|
731
|
-
is_active?: boolean;
|
|
732
|
-
created_at?: string;
|
|
733
|
-
updated_at?: string;
|
|
734
|
-
messages?: ChatMessage[];
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
declare class ChatHistoryService {
|
|
738
|
-
private chatApiService;
|
|
739
|
-
sessions: _angular_core.WritableSignal<ChatSessionDto[]>;
|
|
740
|
-
isLoading: _angular_core.WritableSignal<boolean>;
|
|
741
|
-
isLoadingMore: _angular_core.WritableSignal<boolean>;
|
|
742
|
-
hasMore: _angular_core.WritableSignal<boolean>;
|
|
743
|
-
historyOffset: _angular_core.WritableSignal<number>;
|
|
744
|
-
isCacheValid: _angular_core.WritableSignal<boolean>;
|
|
745
|
-
processingSessionId: _angular_core.WritableSignal<string | null>;
|
|
746
|
-
/**
|
|
747
|
-
* Map API session response to ChatSession model
|
|
748
|
-
*/
|
|
749
|
-
mapSessionResponseToSession(sessionResponse: ChatSessionResponse, userId: string): ChatSessionDto;
|
|
750
|
-
/**
|
|
751
|
-
* Load all chat sessions for a specific user
|
|
752
|
-
*/
|
|
753
|
-
loadSessions(userId: string, forceRefresh?: boolean): Promise<void>;
|
|
754
|
-
/**
|
|
755
|
-
* Load more sessions for infinite scroll
|
|
756
|
-
*/
|
|
757
|
-
loadMoreSessions(userId: string): Promise<void>;
|
|
758
|
-
/**
|
|
759
|
-
* Load messages for a specific session
|
|
760
|
-
*/
|
|
761
|
-
loadSessionMessages(sessionId: string): Promise<Message[]>;
|
|
762
|
-
/**
|
|
763
|
-
* Delete a specific session
|
|
764
|
-
*/
|
|
765
|
-
deleteSession(sessionId: string, userId: string): Promise<void>;
|
|
766
|
-
/**
|
|
767
|
-
* Delete all history
|
|
768
|
-
*/
|
|
769
|
-
deleteAllHistory(userId: string): Promise<void>;
|
|
770
|
-
/**
|
|
771
|
-
* Update session title
|
|
772
|
-
*/
|
|
773
|
-
updateSessionTitle(sessionId: string, newTitle: string, userId: string): Promise<boolean>;
|
|
774
|
-
/**
|
|
775
|
-
* Invalidate cache
|
|
776
|
-
*/
|
|
777
|
-
invalidateCache(): void;
|
|
778
|
-
/**
|
|
779
|
-
* Clear all history state
|
|
780
|
-
*/
|
|
781
|
-
clearState(): void;
|
|
782
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatHistoryService, never>;
|
|
783
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ChatHistoryService>;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
714
|
/**
|
|
787
715
|
* ChatUIStateService - Centralized UI state management
|
|
788
716
|
*
|
|
@@ -799,15 +727,15 @@ declare class ChatUIStateService {
|
|
|
799
727
|
/**
|
|
800
728
|
* Whether the chat window is currently open
|
|
801
729
|
*/
|
|
802
|
-
isChatOpen:
|
|
730
|
+
isChatOpen: i0.WritableSignal<boolean>;
|
|
803
731
|
/**
|
|
804
732
|
* Whether the history sidebar is currently open
|
|
805
733
|
*/
|
|
806
|
-
isHistorySidebarOpen:
|
|
734
|
+
isHistorySidebarOpen: i0.WritableSignal<boolean>;
|
|
807
735
|
/**
|
|
808
736
|
* Whether the chat is in fullscreen mode
|
|
809
737
|
*/
|
|
810
|
-
isFullScreen:
|
|
738
|
+
isFullScreen: i0.WritableSignal<boolean>;
|
|
811
739
|
/**
|
|
812
740
|
* ID of the last message that was read by the user
|
|
813
741
|
*/
|
|
@@ -818,12 +746,14 @@ declare class ChatUIStateService {
|
|
|
818
746
|
private messagesSignal;
|
|
819
747
|
/**
|
|
820
748
|
* Computed number of unread bot messages
|
|
749
|
+
* TODO: Actual implementation is to be done
|
|
821
750
|
*/
|
|
822
751
|
unreadCount: Signal<number>;
|
|
823
752
|
/**
|
|
824
753
|
* Effect to automatically mark messages as read when chat is opened
|
|
754
|
+
* TODO: Actual implementation is to be done
|
|
825
755
|
*/
|
|
826
|
-
markAsReadEffect:
|
|
756
|
+
markAsReadEffect: i0.EffectRef;
|
|
827
757
|
/**
|
|
828
758
|
* Set the messages signal reference from an external source
|
|
829
759
|
* This allows the UI state service to track messages from MessageService
|
|
@@ -831,6 +761,7 @@ declare class ChatUIStateService {
|
|
|
831
761
|
setMessagesSignal(messagesSignal: Signal<Message[]>): void;
|
|
832
762
|
/**
|
|
833
763
|
* Toggle the chat window open/close state
|
|
764
|
+
* TODO:
|
|
834
765
|
*/
|
|
835
766
|
toggleChat(): void;
|
|
836
767
|
/**
|
|
@@ -873,8 +804,16 @@ declare class ChatUIStateService {
|
|
|
873
804
|
* Get the last read message ID
|
|
874
805
|
*/
|
|
875
806
|
getLastReadMessageId(): string | null;
|
|
876
|
-
static ɵfac:
|
|
877
|
-
static ɵprov:
|
|
807
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatUIStateService, never>;
|
|
808
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChatUIStateService>;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
interface ChatSessionDto {
|
|
812
|
+
response_id: string;
|
|
813
|
+
last_message_at: Date;
|
|
814
|
+
title: string;
|
|
815
|
+
messages: Message[];
|
|
816
|
+
userId: string;
|
|
878
817
|
}
|
|
879
818
|
|
|
880
819
|
/**
|
|
@@ -882,28 +821,6 @@ declare class ChatUIStateService {
|
|
|
882
821
|
*/
|
|
883
822
|
type PromptMode = 'markdown' | 'plain';
|
|
884
823
|
|
|
885
|
-
/**
|
|
886
|
-
* Error response from chat API
|
|
887
|
-
*/
|
|
888
|
-
interface ChatApiError {
|
|
889
|
-
/**
|
|
890
|
-
* Error message
|
|
891
|
-
*/
|
|
892
|
-
message: string;
|
|
893
|
-
/**
|
|
894
|
-
* Error code
|
|
895
|
-
*/
|
|
896
|
-
code?: string;
|
|
897
|
-
/**
|
|
898
|
-
* HTTP status code
|
|
899
|
-
*/
|
|
900
|
-
statusCode?: number;
|
|
901
|
-
/**
|
|
902
|
-
* Additional error details
|
|
903
|
-
*/
|
|
904
|
-
details?: any;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
824
|
interface ChatStreamMessage {
|
|
908
825
|
role: MessageRole;
|
|
909
826
|
content: string;
|
|
@@ -911,6 +828,7 @@ interface ChatStreamMessage {
|
|
|
911
828
|
|
|
912
829
|
declare class ChatService {
|
|
913
830
|
private apiService;
|
|
831
|
+
private snackbar;
|
|
914
832
|
private authService;
|
|
915
833
|
private configService;
|
|
916
834
|
private config;
|
|
@@ -918,17 +836,16 @@ declare class ChatService {
|
|
|
918
836
|
private chatUIStateService;
|
|
919
837
|
private markdownService;
|
|
920
838
|
private chatSessions;
|
|
921
|
-
messages:
|
|
839
|
+
messages: i0.WritableSignal<Message[]>;
|
|
922
840
|
/**
|
|
923
841
|
* Determine if suggestion chips should be shown
|
|
924
842
|
*/
|
|
925
|
-
showSuggestionChips:
|
|
843
|
+
showSuggestionChips: i0.Signal<boolean>;
|
|
926
844
|
private activeSession;
|
|
927
|
-
isLoadingApi:
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
isStreaming: _angular_core.Signal<boolean>;
|
|
845
|
+
isLoadingApi: i0.WritableSignal<boolean>;
|
|
846
|
+
isBotTyping: i0.WritableSignal<boolean>;
|
|
847
|
+
promptMode: i0.WritableSignal<PromptMode>;
|
|
848
|
+
isStreaming: i0.Signal<boolean>;
|
|
932
849
|
messagesStream: Array<ChatStreamMessage>;
|
|
933
850
|
currentResponse: string;
|
|
934
851
|
getFallbackError(): string;
|
|
@@ -981,78 +898,28 @@ declare class ChatService {
|
|
|
981
898
|
*/
|
|
982
899
|
private ask;
|
|
983
900
|
private stream;
|
|
984
|
-
static ɵfac:
|
|
985
|
-
static ɵprov:
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
interface DialogData {
|
|
989
|
-
title: string;
|
|
990
|
-
message: string;
|
|
991
|
-
confirmText?: string;
|
|
992
|
-
cancelText?: string;
|
|
993
|
-
confirmButtonColor?: 'primary' | 'accent' | 'warn';
|
|
994
|
-
icon?: string;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
interface InputDialogData {
|
|
998
|
-
title: string;
|
|
999
|
-
message: string;
|
|
1000
|
-
initialValue: string;
|
|
1001
|
-
placeholder?: string;
|
|
1002
|
-
confirmText?: string;
|
|
1003
|
-
cancelText?: string;
|
|
1004
|
-
confirmButtonColor?: 'primary' | 'accent' | 'warn';
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
declare class DialogService {
|
|
1008
|
-
private dialog;
|
|
1009
|
-
constructor(dialog: MatDialog);
|
|
1010
|
-
/**
|
|
1011
|
-
* Opens a confirmation dialog with customizable options
|
|
1012
|
-
* @param data Configuration for the dialog
|
|
1013
|
-
* @returns Observable that emits true if confirmed, false if cancelled
|
|
1014
|
-
*/
|
|
1015
|
-
open(data: DialogData): Observable<boolean>;
|
|
1016
|
-
/**
|
|
1017
|
-
* Convenience method for delete confirmation dialogs
|
|
1018
|
-
* @param itemName Name of the item being deleted
|
|
1019
|
-
* @returns Observable that emits true if confirmed, false if cancelled
|
|
1020
|
-
*/
|
|
1021
|
-
confirmDelete(itemName?: string): Observable<boolean>;
|
|
1022
|
-
/**
|
|
1023
|
-
* Opens a dialog with an input field
|
|
1024
|
-
* @param data Configuration for the input dialog
|
|
1025
|
-
* @returns Observable that emits the input value if confirmed, null if cancelled
|
|
1026
|
-
*/
|
|
1027
|
-
openInput(data: InputDialogData): Observable<string | null>;
|
|
1028
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogService, never>;
|
|
1029
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DialogService>;
|
|
901
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatService, never>;
|
|
902
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChatService>;
|
|
1030
903
|
}
|
|
1031
904
|
|
|
1032
905
|
declare class LicenseService {
|
|
1033
906
|
private http;
|
|
907
|
+
private authService;
|
|
1034
908
|
private config;
|
|
1035
|
-
constructor(http: HttpClient, config: DoohbotConfig);
|
|
909
|
+
constructor(http: HttpClient, authService: AuthService, config: DoohbotConfig);
|
|
910
|
+
/**
|
|
911
|
+
* Initializes the license resolver by loading the license file and processing its contents.
|
|
912
|
+
*
|
|
913
|
+
* Resolves license only if passed the `licenseFilePath` in DoohbotConfig.
|
|
914
|
+
*/
|
|
915
|
+
initLicenseResolver(): Promise<void>;
|
|
1036
916
|
/**
|
|
1037
917
|
* Loads license file from a public asset URL.
|
|
1038
918
|
* Library-safe: works only with HTTP-accessible paths.
|
|
1039
919
|
*/
|
|
1040
|
-
loadLicenseFile
|
|
1041
|
-
static ɵfac:
|
|
1042
|
-
static ɵprov:
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
declare class SnackbarService {
|
|
1046
|
-
private snackBar;
|
|
1047
|
-
constructor(snackBar: MatSnackBar);
|
|
1048
|
-
private show;
|
|
1049
|
-
success(message: string, duration?: number): void;
|
|
1050
|
-
warn(message: string, duration?: number): void;
|
|
1051
|
-
error(message: string, duration?: number): void;
|
|
1052
|
-
info(message: string, duration?: number): void;
|
|
1053
|
-
clear(): void;
|
|
1054
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnackbarService, never>;
|
|
1055
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SnackbarService>;
|
|
920
|
+
private loadLicenseFile;
|
|
921
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LicenseService, never>;
|
|
922
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LicenseService>;
|
|
1056
923
|
}
|
|
1057
924
|
|
|
1058
925
|
/**
|
|
@@ -1062,15 +929,11 @@ declare class SnackbarService {
|
|
|
1062
929
|
declare class DoohbotComponent implements OnInit, OnDestroy {
|
|
1063
930
|
private elementRef;
|
|
1064
931
|
private renderer;
|
|
1065
|
-
private dialogService;
|
|
1066
|
-
private snackbarService;
|
|
1067
|
-
private chatHistory;
|
|
1068
932
|
private uiState;
|
|
1069
933
|
private themeService;
|
|
934
|
+
private licenseService;
|
|
1070
935
|
private authService;
|
|
1071
936
|
private chatService;
|
|
1072
|
-
private personalizationService;
|
|
1073
|
-
private licenseService;
|
|
1074
937
|
private configService;
|
|
1075
938
|
/**
|
|
1076
939
|
* Federated authentication token from the host application.
|
|
@@ -1080,10 +943,21 @@ declare class DoohbotComponent implements OnInit, OnDestroy {
|
|
|
1080
943
|
*
|
|
1081
944
|
* @example
|
|
1082
945
|
* ```html
|
|
1083
|
-
* <app-doohbot [
|
|
946
|
+
* <app-doohbot [federatedToken]="accessToken"></app-doohbot>
|
|
1084
947
|
* ```
|
|
1085
948
|
*/
|
|
1086
|
-
|
|
949
|
+
federatedToken?: string;
|
|
950
|
+
/**
|
|
951
|
+
* Session or auth result based login.
|
|
952
|
+
*
|
|
953
|
+
* Should pass host application's session or auth result object containing necessary user and token information.
|
|
954
|
+
*
|
|
955
|
+
* @example
|
|
956
|
+
* ```html
|
|
957
|
+
* <app-doohbot [session]="session"></app-doohbot>
|
|
958
|
+
* ```
|
|
959
|
+
*/
|
|
960
|
+
session?: AuthResult;
|
|
1087
961
|
/**
|
|
1088
962
|
* Whether the user session should be persisted across browser restarts.
|
|
1089
963
|
*
|
|
@@ -1119,84 +993,40 @@ declare class DoohbotComponent implements OnInit, OnDestroy {
|
|
|
1119
993
|
* ```
|
|
1120
994
|
*/
|
|
1121
995
|
licenseCode?: string;
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
processingSessionId: _angular_core.WritableSignal<string | null>;
|
|
1136
|
-
isAuthenticated: _angular_core.WritableSignal<boolean>;
|
|
1137
|
-
isLoggingIn: _angular_core.WritableSignal<boolean>;
|
|
1138
|
-
authError: _angular_core.WritableSignal<string | null>;
|
|
1139
|
-
authSuccess: _angular_core.WritableSignal<string | null>;
|
|
996
|
+
/**
|
|
997
|
+
* Whether the Doohbot UI is in dark mode.
|
|
998
|
+
*
|
|
999
|
+
* When `true`, Doohbot uses a dark theme.
|
|
1000
|
+
* When `false`, Doohbot uses a light theme.
|
|
1001
|
+
* When not provided, Doohbot will attempt to auto-detect the theme based on the host application's theme or system preferences.
|
|
1002
|
+
*
|
|
1003
|
+
* @example
|
|
1004
|
+
* ```html
|
|
1005
|
+
* <app-doohbot [isDarkMode]="true"></app-doohbot>
|
|
1006
|
+
* ```
|
|
1007
|
+
*/
|
|
1008
|
+
isDarkMode?: boolean;
|
|
1140
1009
|
private destroyIsAuthenticated$;
|
|
1141
|
-
|
|
1142
|
-
get enableDrag(): boolean;
|
|
1143
|
-
get enableResize(): boolean;
|
|
1144
|
-
userName: _angular_core.WritableSignal<string>;
|
|
1145
|
-
predefinedMessages: _angular_core.WritableSignal<string[]>;
|
|
1146
|
-
suggestedMessages: _angular_core.WritableSignal<string[]>;
|
|
1147
|
-
maxMessageLength: _angular_core.WritableSignal<number>;
|
|
1148
|
-
readonly doohbotConst: {
|
|
1149
|
-
appTitle: string;
|
|
1150
|
-
appSubtitle: string;
|
|
1151
|
-
welcomeDescription: string;
|
|
1152
|
-
hintText: string;
|
|
1153
|
-
appLogo: string;
|
|
1154
|
-
appTextLogo: string;
|
|
1155
|
-
appHeaderLogo: string;
|
|
1156
|
-
userAvatar: string;
|
|
1157
|
-
botAvatar: string;
|
|
1158
|
-
};
|
|
1159
|
-
private contextCleanup?;
|
|
1160
|
-
chatWindowRef: ElementRef;
|
|
1161
|
-
fullscreenDirective: FullscreenDirective;
|
|
1162
|
-
constructor(elementRef: ElementRef, renderer: Renderer2, dialogService: DialogService, snackbarService: SnackbarService, chatHistory: ChatHistoryService, uiState: ChatUIStateService, themeService: ThemeService, authService: AuthService, chatService: ChatService, personalizationService: PersonalizationService, licenseService: LicenseService, configService: DoohbotConfigService);
|
|
1010
|
+
constructor(elementRef: ElementRef, renderer: Renderer2, uiState: ChatUIStateService, themeService: ThemeService, licenseService: LicenseService, authService: AuthService, chatService: ChatService, configService: DoohbotConfigService);
|
|
1163
1011
|
ngOnInit(): Promise<void>;
|
|
1164
1012
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1165
|
-
initVariableState(): void;
|
|
1166
1013
|
private initializeUI;
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
deleteAllSessions(): Promise<void>;
|
|
1177
|
-
renameSession(event: {
|
|
1178
|
-
sessionId: string;
|
|
1179
|
-
newTitle: string;
|
|
1180
|
-
}): Promise<void>;
|
|
1181
|
-
private loadUserSessions;
|
|
1182
|
-
/**
|
|
1183
|
-
* Load more sessions for infinite scroll
|
|
1184
|
-
*/
|
|
1185
|
-
loadMoreHistory(): Promise<void>;
|
|
1186
|
-
/**
|
|
1187
|
-
* Manually refresh history
|
|
1188
|
-
*/
|
|
1189
|
-
refreshHistory(): Promise<void>;
|
|
1190
|
-
toggleFullScreen(): void;
|
|
1191
|
-
trackByMessageId(index: number, item: any): string;
|
|
1014
|
+
private tryStartAuthFlow;
|
|
1015
|
+
ngOnDestroy(): void;
|
|
1016
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DoohbotComponent, never>;
|
|
1017
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DoohbotComponent, "app-doohbot", never, { "federatedToken": { "alias": "federatedToken"; "required": false; }; "session": { "alias": "session"; "required": false; }; "rememberMe": { "alias": "rememberMe"; "required": false; }; "licenseFile": { "alias": "licenseFile"; "required": false; }; "licenseCode": { "alias": "licenseCode"; "required": false; }; "isDarkMode": { "alias": "isDarkMode"; "required": false; }; }, {}, never, never, true, never>;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
declare class DoohbotService {
|
|
1021
|
+
private authService;
|
|
1022
|
+
constructor();
|
|
1192
1023
|
/**
|
|
1193
|
-
*
|
|
1024
|
+
* Logout the current user by clearing authentication tokens and state.
|
|
1025
|
+
* @returns A promise that resolves to true if logout was successful, false otherwise.
|
|
1194
1026
|
*/
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DoohbotComponent, never>;
|
|
1199
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DoohbotComponent, "app-doohbot", never, { "federatedAuthToken": { "alias": "federatedAuthToken"; "required": false; }; "rememberMe": { "alias": "rememberMe"; "required": false; }; "licenseFile": { "alias": "licenseFile"; "required": false; }; "licenseCode": { "alias": "licenseCode"; "required": false; }; }, {}, never, never, true, never>;
|
|
1027
|
+
logout(): Promise<boolean>;
|
|
1028
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DoohbotService, never>;
|
|
1029
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DoohbotService>;
|
|
1200
1030
|
}
|
|
1201
1031
|
|
|
1202
1032
|
declare class Logger {
|
|
@@ -1215,8 +1045,8 @@ declare class Logger {
|
|
|
1215
1045
|
static info(message: string, ...args: unknown[]): void;
|
|
1216
1046
|
static warn(message: string, ...args: unknown[]): void;
|
|
1217
1047
|
static error(message: string, ...args: unknown[]): void;
|
|
1218
|
-
static ɵfac:
|
|
1219
|
-
static ɵprov:
|
|
1048
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Logger, never>;
|
|
1049
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<Logger>;
|
|
1220
1050
|
}
|
|
1221
1051
|
|
|
1222
1052
|
/**
|
|
@@ -1268,7 +1098,7 @@ declare class Logger {
|
|
|
1268
1098
|
* }).catch(console.error);
|
|
1269
1099
|
* ```
|
|
1270
1100
|
*/
|
|
1271
|
-
declare function provideDoohbot(config?: Partial<DoohbotConfig>):
|
|
1101
|
+
declare function provideDoohbot(config?: Partial<DoohbotConfig>): i0.EnvironmentProviders;
|
|
1272
1102
|
|
|
1273
1103
|
/**
|
|
1274
1104
|
* Injection token for Doohbot configuration.
|
|
@@ -1296,6 +1126,6 @@ declare const doohbotConst: {
|
|
|
1296
1126
|
botAvatar: string;
|
|
1297
1127
|
};
|
|
1298
1128
|
|
|
1299
|
-
export { DOOHBOT_CONFIG, DoohbotComponent, DoohbotConfigService, Logger, doohbotConst, provideDoohbot, resolveDoohbotConfig };
|
|
1129
|
+
export { DOOHBOT_CONFIG, DoohbotComponent, DoohbotConfigService, DoohbotService, Logger, doohbotConst, provideDoohbot, resolveDoohbotConfig };
|
|
1300
1130
|
export type { DoohbotApiConfig, DoohbotConfig, DoohbotThemeConfig };
|
|
1301
1131
|
//# sourceMappingURL=index.d.ts.map
|