@adzen/doohbot 1.0.1 → 1.0.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.
Files changed (92) hide show
  1. package/README.md +20 -14
  2. package/fesm2022/adzen-doohbot.mjs +4622 -0
  3. package/fesm2022/adzen-doohbot.mjs.map +1 -0
  4. package/index.d.ts +1301 -0
  5. package/index.d.ts.map +1 -0
  6. package/package.json +29 -57
  7. package/src/lib/app/chat/components/chat-button/chat-button.component.scss +115 -0
  8. package/src/lib/app/chat/components/chat-footer/chat-footer.component.scss +14 -0
  9. package/src/lib/app/chat/components/chat-header/chat-header.component.scss +82 -0
  10. package/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.scss +369 -0
  11. package/src/lib/app/chat/components/chat-message/chat-message.component.scss +235 -0
  12. package/src/lib/app/chat/components/chat-window/chat-window.component.scss +194 -0
  13. package/src/lib/app/chat/components/message-input/message-input.component.scss +59 -0
  14. package/src/lib/app/chat/components/message-list/message-list.component.scss +258 -0
  15. package/src/lib/app/login/login-form.component.scss +213 -0
  16. package/src/lib/app/personalization/personalization-dialog.component.scss +177 -0
  17. package/src/lib/app/personalization/sections/account/account-section.component.scss +209 -0
  18. package/src/lib/app/personalization/sections/instruction/instruction-section.component.scss +63 -0
  19. package/src/lib/app/personalization/sections/preferences/preferences-section.component.scss +199 -0
  20. package/src/lib/app/personalization/sections/terms/terms-section.component.scss +74 -0
  21. package/src/lib/doohbot.component.scss +18 -0
  22. package/{projects/doohbot/src/lib/shared/chips/chips.scss → src/lib/shared/chips/chips.component.scss} +3 -1
  23. package/src/lib/shared/dialog/dialog.component.scss +90 -0
  24. package/src/lib/shared/dropdown-menu/dropdown-menu.component.scss +53 -0
  25. package/src/lib/shared/input-dialog/input-dialog.component.scss +71 -0
  26. package/src/lib/shared/popout/popout.scss +0 -0
  27. package/src/lib/shared/snackbar/snackbar.component.scss +125 -0
  28. package/src/lib/styles/_theme.scss +69 -0
  29. package/src/lib/styles/material-override.scss +338 -0
  30. package/{projects/doohbot/src/lib/utils → src/lib/styles}/utility.scss +85 -33
  31. package/src/lib/theme/index.scss +8 -0
  32. package/src/lib/theme/palettes/aqua.scss +88 -0
  33. package/src/lib/theme/palettes/candy.scss +88 -0
  34. package/src/lib/theme/palettes/doohbot.scss +88 -0
  35. package/src/lib/theme/palettes/forest.scss +88 -0
  36. package/src/lib/theme/palettes/midnight.scss +88 -0
  37. package/src/lib/theme/palettes/slate.scss +88 -0
  38. package/src/lib/theme/palettes/sunset.scss +86 -0
  39. package/src/lib/theme/themes.scss +7 -0
  40. package/src/lib/theme/tokens/semantic.scss +102 -0
  41. package/.editorconfig +0 -17
  42. package/.vscode/extensions.json +0 -4
  43. package/.vscode/launch.json +0 -26
  44. package/.vscode/settings.json +0 -13
  45. package/.vscode/tasks.json +0 -42
  46. package/adzen-doohbot-0.0.1.tgz +0 -0
  47. package/adzen-doohbot-1.0.0.tgz +0 -0
  48. package/adzen-doohbot-1.0.1.tgz +0 -0
  49. package/angular.json +0 -119
  50. package/projects/doohbot/README.md +0 -63
  51. package/projects/doohbot/ng-package.json +0 -16
  52. package/projects/doohbot/package.json +0 -12
  53. package/projects/doohbot/src/lib/directives/draggable/draggable-dialog.directive.ts +0 -62
  54. package/projects/doohbot/src/lib/directives/draggable/draggable-dialog.module.ts +0 -9
  55. package/projects/doohbot/src/lib/directives/resizable/resizable-dialog.directive.ts +0 -163
  56. package/projects/doohbot/src/lib/directives/resizable/resizable-dialog.module.ts +0 -9
  57. package/projects/doohbot/src/lib/doohbot.html +0 -216
  58. package/projects/doohbot/src/lib/doohbot.scss +0 -568
  59. package/projects/doohbot/src/lib/doohbot.spec.ts +0 -21
  60. package/projects/doohbot/src/lib/doohbot.ts +0 -345
  61. package/projects/doohbot/src/lib/elements/elements.ts +0 -25
  62. package/projects/doohbot/src/lib/helpers/predefined_messages.ts +0 -2
  63. package/projects/doohbot/src/lib/inputs/doohbot-input.ts +0 -25
  64. package/projects/doohbot/src/lib/model/doohbot.intents.ts +0 -24
  65. package/projects/doohbot/src/lib/model/message.ts +0 -13
  66. package/projects/doohbot/src/lib/model/token.ts +0 -3
  67. package/projects/doohbot/src/lib/services/messaging.service.ts +0 -73
  68. package/projects/doohbot/src/lib/shared/chips/chips.html +0 -9
  69. package/projects/doohbot/src/lib/shared/chips/chips.spec.ts +0 -23
  70. package/projects/doohbot/src/lib/shared/chips/chips.ts +0 -18
  71. package/projects/doohbot/src/lib/shared/snackbar/snackbar.html +0 -7
  72. package/projects/doohbot/src/lib/shared/snackbar/snackbar.scss +0 -73
  73. package/projects/doohbot/src/lib/shared/snackbar/snackbar.spec.ts +0 -21
  74. package/projects/doohbot/src/lib/shared/snackbar/snackbar.ts +0 -44
  75. package/projects/doohbot/src/lib/utils/material-override.scss +0 -312
  76. package/projects/doohbot/src/public-api.ts +0 -5
  77. package/projects/doohbot/tsconfig.lib.json +0 -19
  78. package/projects/doohbot/tsconfig.lib.prod.json +0 -11
  79. package/projects/doohbot/tsconfig.spec.json +0 -14
  80. package/projects/doohbot-element/public/favicon.ico +0 -0
  81. package/projects/doohbot-element/src/app/app.config.ts +0 -12
  82. package/projects/doohbot-element/src/app/app.html +0 -1
  83. package/projects/doohbot-element/src/app/app.routes.ts +0 -3
  84. package/projects/doohbot-element/src/app/app.spec.ts +0 -23
  85. package/projects/doohbot-element/src/app/app.ts +0 -10
  86. package/projects/doohbot-element/src/index.html +0 -15
  87. package/projects/doohbot-element/src/main.ts +0 -6
  88. package/projects/doohbot-element/src/styles.scss +0 -15
  89. package/projects/doohbot-element/tsconfig.app.json +0 -15
  90. package/projects/doohbot-element/tsconfig.spec.json +0 -14
  91. package/tsconfig.json +0 -43
  92. /package/{projects/doohbot-element/src/app/app.scss → src/lib/shared/menu-item/menu-item.component.scss} +0 -0
package/index.d.ts ADDED
@@ -0,0 +1,1301 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnDestroy, RendererFactory2, ElementRef, Renderer2, Signal, OnInit, SimpleChanges, InjectionToken } from '@angular/core';
3
+ import { Observable } from 'rxjs';
4
+ import { HttpClient, HttpHeaders } from '@angular/common/http';
5
+ import { OverlayContainer } from '@angular/cdk/overlay';
6
+ 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
+
16
+ /**
17
+ * Configuration for Doohbot API integration.
18
+ *
19
+ * Defines how Doohbot communicates with a backend API,
20
+ * either the default Doohbot service or a custom/self-hosted implementation.
21
+ */
22
+ interface DoohbotApiConfig {
23
+ /**
24
+ * Base URL of the backend API.
25
+ *
26
+ * Must be a publicly accessible HTTP(S) endpoint.
27
+ *
28
+ * @example 'https://api.doohbot.com/'
29
+ */
30
+ baseUrl: string;
31
+ /**
32
+ * Optional API key used for authenticating API requests.
33
+ *
34
+ * If omitted, authentication is expected to be handled
35
+ * via federated login or other mechanisms.
36
+ */
37
+ apiKey?: string;
38
+ /**
39
+ * Additional HTTP headers to include with every API request.
40
+ *
41
+ * Useful for custom authentication schemes, tracing headers,
42
+ * or gateway integrations.
43
+ *
44
+ * @example { 'X-Tenant-Id': 'acme' }
45
+ */
46
+ customHeaders?: Record<string, string>;
47
+ /**
48
+ * Enables automatic retry for transient API failures.
49
+ *
50
+ * Retries are typically applied to network errors or
51
+ * idempotent requests only.
52
+ *
53
+ * @default true
54
+ */
55
+ enableRetry?: boolean;
56
+ /**
57
+ * Maximum number of retry attempts when retries are enabled.
58
+ *
59
+ * @default 2
60
+ */
61
+ retryAttempts?: number;
62
+ /**
63
+ * Delay between retry attempts, in milliseconds.
64
+ *
65
+ * @default 1000
66
+ */
67
+ retryDelay?: number;
68
+ }
69
+
70
+ /**
71
+ * Theme and visual customization options for Doohbot.
72
+ * All properties are optional and can be partially overridden.
73
+ */
74
+ interface DoohbotThemeConfig {
75
+ /**
76
+ * Enables dragging of the chatbot window.
77
+ * @default false
78
+ */
79
+ enableDrag?: boolean;
80
+ /**
81
+ * Enables resizing of the chatbot window.
82
+ * @default false
83
+ */
84
+ enableResize?: boolean;
85
+ /**
86
+ * Defines the chatbot button layout style.
87
+ * - `fab`: Floating action button
88
+ * - `sidebar`: Fixed sidebar
89
+ * - `sidebar-top`: Sidebar anchored to top
90
+ * - `sidebar-bottom`: Sidebar anchored to bottom
91
+ * @default 'fab'
92
+ */
93
+ buttonStyle?: 'fab' | 'sidebar' | 'sidebar-top' | 'sidebar-bottom';
94
+ /**
95
+ * Font family applied to all chatbot text.
96
+ * Accepts any valid CSS font-family value.
97
+ * @example 'Inter, Roboto, sans-serif'
98
+ */
99
+ fontFamily?: string;
100
+ /**
101
+ * Predefined color palette for the chatbot.
102
+ * If provided, it overrides individual color settings with palette defaults.
103
+ * @example 'aqua'
104
+ */
105
+ palette?: 'doohbot' | 'aqua' | 'candy' | 'forest' | 'midnight' | 'sunset' | 'slate';
106
+ /**
107
+ * Primary brand color used for accents and highlights.
108
+ * @example '#4f46e5'
109
+ */
110
+ primaryColor?: string;
111
+ /**
112
+ * Secondary brand color used for secondary accents.
113
+ * @example '#6366f1'
114
+ */
115
+ secondaryColor?: string;
116
+ /**
117
+ * Background color of the chatbot window.
118
+ * @example '#ffffff'
119
+ */
120
+ backgroundColor?: string;
121
+ /**
122
+ * Background color of the chat input field.
123
+ * @example '#f9fafb'
124
+ */
125
+ chatInputColor?: string;
126
+ /**
127
+ * Primary text color.
128
+ * @example '#111827'
129
+ */
130
+ textColor?: string;
131
+ /**
132
+ * Alternative text color for muted or secondary text.
133
+ * @example '#6b7280'
134
+ */
135
+ textAltColor?: string;
136
+ /**
137
+ * Secondary text color for less prominent text.
138
+ * @example '#9ca3af'
139
+ */
140
+ secondaryTextColor?: string;
141
+ /**
142
+ * Hint or placeholder text color.
143
+ * @example '#9ca3af'
144
+ */
145
+ hintTextColor?: string;
146
+ /**
147
+ * Background color for buttons.
148
+ * @example '#4f46e5'
149
+ */
150
+ buttonColor?: string;
151
+ /**
152
+ * Background color for user messages.
153
+ * @example '#e0e7ff'
154
+ */
155
+ userMessageColor?: string;
156
+ /**
157
+ * Background color for bot messages.
158
+ * @example '#f3f4f6'
159
+ */
160
+ botMessageColor?: string;
161
+ /**
162
+ * Text color for user messages.
163
+ * @example '#1f2937'
164
+ */
165
+ userTextColor?: string;
166
+ /**
167
+ * Text color for bot messages.
168
+ * @example '#111827'
169
+ */
170
+ botTextColor?: string;
171
+ /**
172
+ * Border color used across chatbot UI elements.
173
+ * @example '#e5e7eb'
174
+ */
175
+ borderColor?: string;
176
+ /**
177
+ * Border shadow color for elevated elements.
178
+ * @example 'rgba(0, 0, 0, 0.1)'
179
+ */
180
+ borderShadowColor?: string;
181
+ /**
182
+ * Top border accent color.
183
+ * @example '#4f46e5'
184
+ */
185
+ borderTopColor?: string;
186
+ /**
187
+ * Color of the typing indicator animation.
188
+ * @example '#6b7280'
189
+ */
190
+ typingIndicatorColor?: string;
191
+ /**
192
+ * Utility white color reference.
193
+ * @example '#ffffff'
194
+ */
195
+ white?: string;
196
+ /**
197
+ * Utility black color reference.
198
+ * @example '#000000'
199
+ */
200
+ black?: string;
201
+ /**
202
+ * Utility grey color reference.
203
+ * @example '#9ca3af'
204
+ */
205
+ grey?: string;
206
+ /**
207
+ * Utility red color reference.
208
+ * @example '#ef4444'
209
+ */
210
+ red?: string;
211
+ /**
212
+ * Utility yellow color reference.
213
+ * @example '#facc15'
214
+ */
215
+ yellow?: string;
216
+ /**
217
+ * Utility orange color reference.
218
+ * @example '#f97316'
219
+ */
220
+ orange?: string;
221
+ /**
222
+ * Utility green color reference.
223
+ * @example '#22c55e'
224
+ */
225
+ green?: string;
226
+ /**
227
+ * Utility blue color reference.
228
+ * @example '#3b82f6'
229
+ */
230
+ blue?: string;
231
+ }
232
+
233
+ /**
234
+ * Root configuration contract for the Doohbot library.
235
+ *
236
+ * This interface defines all runtime, integration, and customization
237
+ * options required to initialize and operate Doohbot inside a host application.
238
+ *
239
+ * Designed to be provided via dependency injection (e.g. `provideDoohbot()`).
240
+ */
241
+ interface DoohbotConfig {
242
+ /**
243
+ * Runtime environment in which Doohbot is running.
244
+ * Used for environment-specific behavior such as logging,
245
+ * feature flags, and API behavior.
246
+ *
247
+ * @example 'production'
248
+ */
249
+ environment: 'development' | 'test' | 'stage' | 'production';
250
+ /**
251
+ * Public URL path to the license file.
252
+ *
253
+ * The license file must be accessible via HTTP (e.g. served from `/assets`).
254
+ * File system paths are not supported.
255
+ *
256
+ * @example 'assets/doohbot_license.json'
257
+ */
258
+ licenseFilePath?: string;
259
+ /**
260
+ * Secret used for encrypting persisted client-side data.
261
+ * If not provided, default will be used.
262
+ */
263
+ storageSecret?: string;
264
+ /**
265
+ * Chats use the `streaming` by default.
266
+ * Pass `true` to use normal http calls for chat.
267
+ */
268
+ useNonStreamingChat?: boolean;
269
+ /**
270
+ * Optional API configuration.
271
+ * Use this to override the default Doohbot backend
272
+ * or integrate with a custom/self-hosted API.
273
+ */
274
+ api?: DoohbotApiConfig;
275
+ /**
276
+ * Optional theme and visual customization options.
277
+ *
278
+ * Provides full control over the chatbot’s appearance, including:
279
+ * - Button layout and style
280
+ * - Colors (primary, secondary, backgrounds, borders, messages)
281
+ * - Fonts
282
+ * - Dragging/resizing behavior
283
+ *
284
+ * Only the fields you specify will override defaults; any omitted
285
+ * fields will use the library’s default values.
286
+ *
287
+ * @example
288
+ * ```ts
289
+ * theme: {
290
+ * buttonStyle: 'fab',
291
+ * primaryColor: '#4f46e5',
292
+ * backgroundColor: '#ffffff',
293
+ * textColor: '#111827',
294
+ * userMessageColor: '#e0e7ff',
295
+ * botMessageColor: '#f3f4f6',
296
+ * fontFamily: 'Inter, Roboto, sans-serif',
297
+ * enableDrag: true,
298
+ * enableResize: true
299
+ * }
300
+ * ```
301
+ */
302
+ theme?: DoohbotThemeConfig;
303
+ }
304
+
305
+ /**
306
+ * Centralized service for managing Doohbot configuration.
307
+ * Provides reactive access and runtime updates.
308
+ * Singleton via providedIn: 'root'.
309
+ */
310
+ declare class DoohbotConfigService implements OnDestroy {
311
+ private configSignal;
312
+ private readonly configSubject;
313
+ readonly config$: Observable<DoohbotConfig>;
314
+ /**
315
+ * Current runtime environment for Doohbot.
316
+ *
317
+ * Drives environment-specific behavior such as:
318
+ * - API behavior
319
+ * - logging verbosity
320
+ * - feature toggles
321
+ * - safety defaults
322
+ *
323
+ * This value is mandatory and always resolved during bootstrap.
324
+ */
325
+ readonly environment: () => DoohbotConfig["environment"];
326
+ /**
327
+ * Path to the public license file.
328
+ * Returns an empty string if not configured.
329
+ */
330
+ readonly licenseFilePath: () => string;
331
+ /**
332
+ * Secret used for encrypting persisted client-side data.
333
+ * If not provided, default will be used.
334
+ */
335
+ readonly storageSecret: () => string;
336
+ /**
337
+ * Chats use the `streaming` by default.
338
+ * Pass `true` to use normal http calls for chat.
339
+ */
340
+ readonly useNonStreamingChat: () => boolean;
341
+ /**
342
+ * Full API configuration object.
343
+ * Undefined if API integration is not configured.
344
+ */
345
+ readonly api: () => DoohbotApiConfig | undefined;
346
+ /**
347
+ * Theme customization configuration.
348
+ * Undefined if no theme overrides are provided.
349
+ */
350
+ readonly theme: () => DoohbotThemeConfig | undefined;
351
+ constructor(injectedConfig?: Partial<DoohbotConfig>);
352
+ /**
353
+ * Update configuration at runtime.
354
+ * @param value Partial config updates
355
+ */
356
+ update(value: Partial<DoohbotConfig>): void;
357
+ private validateConfig;
358
+ ngOnDestroy(): void;
359
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DoohbotConfigService, [{ optional: true; }]>;
360
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<DoohbotConfigService>;
361
+ }
362
+
363
+ interface AuthResult {
364
+ access_token: string;
365
+ refresh_token: string;
366
+ }
367
+
368
+ interface FederatedLoginRequest {
369
+ access_token: string;
370
+ remember_me?: boolean;
371
+ }
372
+
373
+ declare class StorageService {
374
+ private readonly storageKey;
375
+ private readonly secretKey;
376
+ private readonly storage;
377
+ constructor(config: DoohbotConfig);
378
+ /**
379
+ * Store a value under the given key.
380
+ */
381
+ set<T>(key: string, value: T): void;
382
+ /**
383
+ * Retrieve a stored value by key.
384
+ */
385
+ get<T>(key: string): T | null;
386
+ /**
387
+ * Remove a specific key from storage.
388
+ */
389
+ remove(key: string): void;
390
+ /**
391
+ * Clear all Doohbot-related storage.
392
+ */
393
+ clear(): void;
394
+ /**
395
+ * Validate storage integrity without mutating it.
396
+ */
397
+ isValid(): boolean;
398
+ private readAll;
399
+ private encrypt;
400
+ private decrypt;
401
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StorageService, never>;
402
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<StorageService>;
403
+ }
404
+
405
+ declare class HttpService {
406
+ private http;
407
+ private configService;
408
+ constructor(http: HttpClient, configService: DoohbotConfigService);
409
+ get apiUrl(): string;
410
+ get(url: string, param?: object, nestedParam?: boolean, showLoader?: boolean, refresh?: boolean, headers?: HttpHeaders): Promise<any>;
411
+ private buildHttpParams;
412
+ post(url: string, param?: object, showLoader?: boolean, headers?: HttpHeaders): Promise<any>;
413
+ patch(url: string, param?: object, showLoader?: boolean, headers?: HttpHeaders): Promise<any>;
414
+ put(url: string, param?: object, showLoader?: boolean, headers?: HttpHeaders): Promise<any>;
415
+ delete(url: string, param?: object, showLoader?: boolean, headers?: HttpHeaders): Promise<any>;
416
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HttpService, never>;
417
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<HttpService>;
418
+ }
419
+
420
+ declare class AuthService {
421
+ private http;
422
+ private storageService;
423
+ private configService;
424
+ private jwtHelper;
425
+ private isRefreshing;
426
+ private refreshTokenSubject;
427
+ private readonly isAuthenticatedSubject;
428
+ private readonly federatedAuthTokenSubject;
429
+ private readonly rememberMeSubject;
430
+ private readonly licenseFileSubject;
431
+ private readonly licenseCodeSubject;
432
+ readonly isAuthenticated$: Observable<boolean>;
433
+ private apiBaseUrl;
434
+ /**
435
+ * True if request is an auth endpoint
436
+ */
437
+ isAuthUrl(url: string): boolean;
438
+ /**
439
+ * True if request goes to our backend API
440
+ */
441
+ isInternalApiRequest(url: string): boolean;
442
+ /**
443
+ * Sets current license file
444
+ */
445
+ readonly setLicenseFile: (data: Map<string, string> | null) => void;
446
+ /**
447
+ * Gets current license file
448
+ */
449
+ readonly licenseFile: () => Map<string, string> | null;
450
+ /**
451
+ * Sets current federated auth token
452
+ */
453
+ readonly setFederatedAuthToken: (token: string | null) => void;
454
+ /**
455
+ * Gets current federated auth token
456
+ */
457
+ readonly federatedAuthToken: () => string | null;
458
+ /**
459
+ * Sets current license code
460
+ */
461
+ readonly setLicenseCode: (code: string | null) => void;
462
+ /**
463
+ * Gets current license code
464
+ */
465
+ readonly licenseCode: () => string | null;
466
+ /**
467
+ * Sets rememberMe
468
+ */
469
+ readonly setRememberMe: (value: boolean | false) => void;
470
+ /**
471
+ * Gets rememberMe
472
+ */
473
+ readonly rememberMe: () => boolean | false;
474
+ /**
475
+ * Gets current license key for active license code
476
+ */
477
+ readonly currentLicenseKey: () => string | null;
478
+ /**
479
+ * Resolved API base URL
480
+ */
481
+ readonly apiUrl: () => string;
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);
522
+ /**
523
+ * Initializes the federated authentication flow.
524
+ *
525
+ * Validates all required prerequisites (configuration, license, tokens)
526
+ * and triggers authentication only when the system is in a valid state.
527
+ *
528
+ * This method is idempotent and safe to call multiple times; authentication
529
+ * will execute only once when all conditions are satisfied.
530
+ */
531
+ 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
+ /**
542
+ * Authenticate user with federated credentials
543
+ */
544
+ federatedLogin(param: FederatedLoginRequest): Promise<boolean>;
545
+ /**
546
+ * Authenticate user with credentials
547
+ */
548
+ login(param: LoginRequest): Promise<boolean>;
549
+ /**
550
+ * Refresh login token. Concurrent calls wait for the first refresh to complete.
551
+ */
552
+ refreshLogin(): Observable<AuthResult | null>;
553
+ /**
554
+ * Logout logic enhanced with UI signals
555
+ */
556
+ logout(refreshToken?: string): Promise<boolean>;
557
+ private federateLoginHttpHelper;
558
+ private loginHttpHelper;
559
+ private refreshLoginHttpHelper;
560
+ private logoutHttpHelper;
561
+ private buildLicenseHeader;
562
+ setSession(session: AuthResult, rememberMe?: boolean): void;
563
+ private isTokenExpired;
564
+ /**
565
+ * Clear all authentication related data from local storage, session storage, cache, and tokens.
566
+ * This method is called when the user logs out.
567
+ */
568
+ clear(): void;
569
+ clearTabInfo(): void;
570
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthService, never>;
571
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthService>;
572
+ }
573
+
574
+ interface ApiResponse<T> {
575
+ success: boolean;
576
+ message: string;
577
+ data?: T;
578
+ }
579
+
580
+ interface CustomInstructions {
581
+ instructions?: string;
582
+ preferences?: string;
583
+ user_context_id?: string;
584
+ }
585
+ interface AppearanceSettings {
586
+ theme: 'light' | 'dark' | 'auto';
587
+ language: string;
588
+ }
589
+ interface PersonalizationSettings {
590
+ customInstructions: CustomInstructions;
591
+ appearance: AppearanceSettings;
592
+ meta: {
593
+ version: number;
594
+ lastUpdated: number;
595
+ };
596
+ }
597
+ declare class PersonalizationService {
598
+ private http;
599
+ private storage;
600
+ private authService;
601
+ private _settings;
602
+ settings: _angular_core.Signal<PersonalizationSettings>;
603
+ constructor(http: HttpService);
604
+ private getStorageKey;
605
+ /**
606
+ * Update custom instructions
607
+ */
608
+ updateInstructions(instructions: Partial<CustomInstructions>): void;
609
+ /**
610
+ * Update appearance settings
611
+ */
612
+ updateAppearance(appearance: Partial<AppearanceSettings>): void;
613
+ /**
614
+ * Reset all personalization to defaults
615
+ */
616
+ resetToDefaults(): void;
617
+ saveCustomInstructions(data: CustomInstructions): Promise<void>;
618
+ loadCustomInstructions(): void;
619
+ getCustomInstructionHttpHelper(showLoader?: boolean): Promise<ApiResponse<CustomInstructions>>;
620
+ private loadSettings;
621
+ private saveSettings;
622
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PersonalizationService, never>;
623
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<PersonalizationService>;
624
+ }
625
+
626
+ type ThemeMode = 'light' | 'dark' | 'auto';
627
+ declare class ThemeService implements OnDestroy {
628
+ private overlay;
629
+ private personalization;
630
+ private configService;
631
+ private renderer;
632
+ private _theme;
633
+ theme: _angular_core.Signal<ThemeMode>;
634
+ private _activeTheme;
635
+ activeTheme: _angular_core.Signal<"light-theme" | "dark-theme">;
636
+ private observer;
637
+ constructor(rendererFactory: RendererFactory2, overlay: OverlayContainer, personalization: PersonalizationService, configService: DoohbotConfigService);
638
+ private _currentConfig;
639
+ private rootElement;
640
+ setThemeConfig(config: DoohbotThemeConfig, rootElement: HTMLElement): void;
641
+ applyPrimaryColorToGlobal(colorInput: string): void;
642
+ /**
643
+ * Helper to convert hex to comma-separated RGB
644
+ */
645
+ private hexToRgb;
646
+ /**
647
+ * Simple luminance-based contrast calculation
648
+ * Returns #ffffff for dark colors and #000000 for light colors
649
+ */
650
+ private getContrastColor;
651
+ setTheme(mode: ThemeMode): void;
652
+ private updateActiveTheme;
653
+ private handleAutoTheme;
654
+ private detectAndApplyParentTheme;
655
+ private isParentDark;
656
+ private applyThemeToGlobal;
657
+ private applyPaletteToGlobal;
658
+ private cleanupObservers;
659
+ ngOnDestroy(): void;
660
+ /**
661
+ * @deprecated Manual CSS variable application is now handled via theme.css tokens
662
+ */
663
+ applyCssVariables(element: HTMLElement, config: DoohbotThemeConfig | undefined): void;
664
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
665
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
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>;
679
+ }
680
+
681
+ /**
682
+ * Message role types for chat messages
683
+ */
684
+ type MessageRole = 'user' | 'model';
685
+
686
+ interface Message {
687
+ id: string;
688
+ sender: MessageRole;
689
+ senderName?: string;
690
+ text: string;
691
+ textHtml?: SafeHtml;
692
+ chunks?: string[];
693
+ timestamp?: Date;
694
+ showSuggestions?: boolean;
695
+ platformTenant?: string;
696
+ subTenant?: string;
697
+ agent?: string;
698
+ completed: boolean;
699
+ isHistory: boolean;
700
+ copied?: boolean;
701
+ }
702
+
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
+ /**
787
+ * ChatUIStateService - Centralized UI state management
788
+ *
789
+ * Manages all UI-related state for the chat component including:
790
+ * - Chat window open/close state
791
+ * - History sidebar visibility
792
+ * - Unread message tracking
793
+ * - Fullscreen state
794
+ *
795
+ * This service uses Angular signals for reactive state management,
796
+ * allowing components to subscribe to state changes efficiently.
797
+ */
798
+ declare class ChatUIStateService {
799
+ /**
800
+ * Whether the chat window is currently open
801
+ */
802
+ isChatOpen: _angular_core.WritableSignal<boolean>;
803
+ /**
804
+ * Whether the history sidebar is currently open
805
+ */
806
+ isHistorySidebarOpen: _angular_core.WritableSignal<boolean>;
807
+ /**
808
+ * Whether the chat is in fullscreen mode
809
+ */
810
+ isFullScreen: _angular_core.WritableSignal<boolean>;
811
+ /**
812
+ * ID of the last message that was read by the user
813
+ */
814
+ private lastReadMessageId;
815
+ /**
816
+ * Reference to current messages (injected from outside)
817
+ */
818
+ private messagesSignal;
819
+ /**
820
+ * Computed number of unread bot messages
821
+ */
822
+ unreadCount: Signal<number>;
823
+ /**
824
+ * Effect to automatically mark messages as read when chat is opened
825
+ */
826
+ markAsReadEffect: _angular_core.EffectRef;
827
+ /**
828
+ * Set the messages signal reference from an external source
829
+ * This allows the UI state service to track messages from MessageService
830
+ */
831
+ setMessagesSignal(messagesSignal: Signal<Message[]>): void;
832
+ /**
833
+ * Toggle the chat window open/close state
834
+ */
835
+ toggleChat(): void;
836
+ /**
837
+ * Toggle the history sidebar open/close state
838
+ */
839
+ toggleHistorySidebar(): void;
840
+ /**
841
+ * Close the chat window
842
+ */
843
+ closeChat(): void;
844
+ /**
845
+ * Open the chat window
846
+ */
847
+ openChat(): void;
848
+ /**
849
+ * Close the history sidebar
850
+ */
851
+ closeHistorySidebar(): void;
852
+ /**
853
+ * Open the history sidebar
854
+ */
855
+ openHistorySidebar(): void;
856
+ /**
857
+ * Toggle fullscreen mode
858
+ */
859
+ toggleFullscreen(): void;
860
+ /**
861
+ * Set fullscreen state
862
+ */
863
+ setFullscreen(isFullscreen: boolean): void;
864
+ /**
865
+ * Manually mark messages as read up to a specific message ID
866
+ */
867
+ markMessagesAsRead(messageId: string): void;
868
+ /**
869
+ * Reset last read message ID
870
+ */
871
+ resetLastRead(): void;
872
+ /**
873
+ * Get the last read message ID
874
+ */
875
+ getLastReadMessageId(): string | null;
876
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatUIStateService, never>;
877
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ChatUIStateService>;
878
+ }
879
+
880
+ /**
881
+ * Prompt mode
882
+ */
883
+ type PromptMode = 'markdown' | 'plain';
884
+
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
+ interface ChatStreamMessage {
908
+ role: MessageRole;
909
+ content: string;
910
+ }
911
+
912
+ declare class ChatService {
913
+ private apiService;
914
+ private authService;
915
+ private configService;
916
+ private config;
917
+ private chatHistoryService;
918
+ private chatUIStateService;
919
+ private markdownService;
920
+ private chatSessions;
921
+ messages: _angular_core.WritableSignal<Message[]>;
922
+ /**
923
+ * Determine if suggestion chips should be shown
924
+ */
925
+ showSuggestionChips: _angular_core.Signal<boolean>;
926
+ private activeSession;
927
+ isLoadingApi: _angular_core.WritableSignal<boolean>;
928
+ apiError: _angular_core.WritableSignal<ChatApiError | null>;
929
+ isBotTyping: _angular_core.WritableSignal<boolean>;
930
+ promptMode: _angular_core.WritableSignal<PromptMode>;
931
+ isStreaming: _angular_core.Signal<boolean>;
932
+ messagesStream: Array<ChatStreamMessage>;
933
+ currentResponse: string;
934
+ getFallbackError(): string;
935
+ constructor();
936
+ /**
937
+ * Create a new chat session
938
+ */
939
+ createSession(userId: string, sessionId: string): ChatSessionDto;
940
+ /**
941
+ * Start a new chat session
942
+ */
943
+ startNewSession(sessionId?: string): void;
944
+ /**
945
+ * Load an existing session
946
+ */
947
+ loadSession(session: ChatSessionDto): void;
948
+ /**
949
+ * Get active session
950
+ */
951
+ getActiveSession(): ChatSessionDto | null;
952
+ /**
953
+ * Clear messages for current session and start new one
954
+ */
955
+ clearMessages(): void;
956
+ /**
957
+ * Add message to current session
958
+ */
959
+ addMessage(message: Message): void;
960
+ /**
961
+ * Continue a chat session
962
+ */
963
+ continueSession(sessionId: string): Promise<void>;
964
+ /**
965
+ * Process a user message: add it, get bot reply, and add bot reply
966
+ */
967
+ sendMessage(text: string, maxLength?: number): Promise<void>;
968
+ /**
969
+ * Generates a unique message ID to prevent collisions
970
+ */
971
+ private generateMessageId;
972
+ /**
973
+ * Builds a chat request payload with the given user text and optional active session
974
+ * @param {string} userInput - The text provided by the user
975
+ * @returns {ChatRequest} - A chat request payload with the user text and optional active session
976
+ * @memberof ChatService
977
+ */
978
+ private buildChatRequest;
979
+ /**
980
+ * Send chat message using standard endpoint and return the response content.
981
+ */
982
+ private ask;
983
+ private stream;
984
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatService, never>;
985
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ChatService>;
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>;
1030
+ }
1031
+
1032
+ declare class LicenseService {
1033
+ private http;
1034
+ private config;
1035
+ constructor(http: HttpClient, config: DoohbotConfig);
1036
+ /**
1037
+ * Loads license file from a public asset URL.
1038
+ * Library-safe: works only with HTTP-accessible paths.
1039
+ */
1040
+ loadLicenseFile(): Promise<Map<string, string> | undefined>;
1041
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LicenseService, never>;
1042
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<LicenseService>;
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>;
1056
+ }
1057
+
1058
+ /**
1059
+ * Doohbot Main Component
1060
+ * Root component of the Doohbot library
1061
+ */
1062
+ declare class DoohbotComponent implements OnInit, OnDestroy {
1063
+ private elementRef;
1064
+ private renderer;
1065
+ private dialogService;
1066
+ private snackbarService;
1067
+ private chatHistory;
1068
+ private uiState;
1069
+ private themeService;
1070
+ private authService;
1071
+ private chatService;
1072
+ private personalizationService;
1073
+ private licenseService;
1074
+ private configService;
1075
+ /**
1076
+ * Federated authentication token from the host application.
1077
+ *
1078
+ * Used for SSO / federated login. The token must be issued by a
1079
+ * trusted issuer configured in the Doohbot admin panel.
1080
+ *
1081
+ * @example
1082
+ * ```html
1083
+ * <app-doohbot [federatedAuthToken]="authToken"></app-doohbot>
1084
+ * ```
1085
+ */
1086
+ federatedAuthToken?: string;
1087
+ /**
1088
+ * Whether the user session should be persisted across browser restarts.
1089
+ *
1090
+ * When `true`, Doohbot stores auth state in `localStorage`.
1091
+ * When `false`, `sessionStorage` is used instead.
1092
+ *
1093
+ * @example
1094
+ * ```html
1095
+ * <app-doohbot [rememberMe]="true"></app-doohbot>
1096
+ * ```
1097
+ */
1098
+ rememberMe?: boolean;
1099
+ /**
1100
+ * License file json object.
1101
+ *
1102
+ * Required only when the `licenseFilePath` is not passed from `provideDoohbot()`.
1103
+ *
1104
+ * @example
1105
+ * ```html
1106
+ * <app-doohbot [licenseFile]="licenseFile"></app-doohbot>
1107
+ * ```
1108
+ */
1109
+ licenseFile?: Map<string, string>;
1110
+ /**
1111
+ * License code used to activate licensed features.
1112
+ *
1113
+ * Required only when multiple licenses are configured.
1114
+ * Can change dynamically per tenant, user, or role.
1115
+ *
1116
+ * @example
1117
+ * ```html
1118
+ * <app-doohbot [licenseCode]="licenseCode"></app-doohbot>
1119
+ * ```
1120
+ */
1121
+ licenseCode?: string;
1122
+ isChatOpen: _angular_core.WritableSignal<boolean>;
1123
+ isHistorySidebarOpen: _angular_core.WritableSignal<boolean>;
1124
+ isFullScreen: _angular_core.WritableSignal<boolean>;
1125
+ unreadCount: any;
1126
+ messages: _angular_core.WritableSignal<Message[]>;
1127
+ isBotTyping: _angular_core.WritableSignal<boolean>;
1128
+ isStreaming: any;
1129
+ messageError: any;
1130
+ showSuggestionChips: any;
1131
+ chatSessions: _angular_core.WritableSignal<ChatSessionDto[]>;
1132
+ hasMoreHistory: _angular_core.WritableSignal<boolean>;
1133
+ isLoadingMore: _angular_core.WritableSignal<boolean>;
1134
+ isLoadingSessions: _angular_core.WritableSignal<boolean>;
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>;
1140
+ private destroyIsAuthenticated$;
1141
+ activeButtonStyle: any;
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);
1163
+ ngOnInit(): Promise<void>;
1164
+ ngOnChanges(changes: SimpleChanges): void;
1165
+ initVariableState(): void;
1166
+ private initializeUI;
1167
+ onLogin(param: LoginRequest): void;
1168
+ performLogout(): void;
1169
+ toggleChat(): void;
1170
+ sendMessage(text: string): Promise<void>;
1171
+ clearChat(): void;
1172
+ clearMessageError(): void;
1173
+ toggleHistorySidebar(): void;
1174
+ loadChatSession(session: ChatSessionDto): void;
1175
+ deleteSession(sessionId: string): Promise<void>;
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;
1192
+ /**
1193
+ * Resolve and update the username from all available sources
1194
+ */
1195
+ updateUserName(): void;
1196
+ userAvatarUrl(): string;
1197
+ ngOnDestroy(): void;
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>;
1200
+ }
1201
+
1202
+ declare class Logger {
1203
+ private configService;
1204
+ private static instance;
1205
+ private prefix;
1206
+ private styles;
1207
+ constructor(configService: DoohbotConfigService);
1208
+ /** bind once */
1209
+ static init(instance: Logger): void;
1210
+ private canLog;
1211
+ info(message: string, ...args: unknown[]): void;
1212
+ warn(message: string, ...args: unknown[]): void;
1213
+ error(message: string, ...args: unknown[]): void;
1214
+ private static get logger();
1215
+ static info(message: string, ...args: unknown[]): void;
1216
+ static warn(message: string, ...args: unknown[]): void;
1217
+ static error(message: string, ...args: unknown[]): void;
1218
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Logger, never>;
1219
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<Logger>;
1220
+ }
1221
+
1222
+ /**
1223
+ * Provides all necessary Doohbot dependencies for standalone Angular applications.
1224
+ *
1225
+ * This provider:
1226
+ * - Registers the Doohbot configuration via dependency injection
1227
+ * - Registers HTTP interceptors required for authentication and licensing
1228
+ * - Does NOT provide `HttpClientModule` — the host application must provide it
1229
+ *
1230
+ * Use this when you want Doohbot to manage authentication, licensing,
1231
+ * and API integration automatically.
1232
+ *
1233
+ * @param config Partial configuration. Missing values are resolved using library defaults.
1234
+ * @returns EnvironmentProviders for use with `bootstrapApplication`
1235
+ *
1236
+ * @example
1237
+ * ```ts
1238
+ * // main.ts
1239
+ * import { bootstrapApplication } from '@angular/platform-browser';
1240
+ * import { importProvidersFrom } from '@angular/core';
1241
+ * import { HttpClientModule } from '@angular/common/http';
1242
+ * import { AppComponent } from './app/app.component';
1243
+ * import { provideDoohbot } from 'doohbot';
1244
+ *
1245
+ * bootstrapApplication(AppComponent, {
1246
+ * providers: [
1247
+ * importProvidersFrom(HttpClientModule),
1248
+ * provideDoohbot({
1249
+ * environment: 'production',
1250
+ * licenseFilePath: 'assets/doohbot_license.json',
1251
+ * // Optional api configuration if want to use your own api
1252
+ * api: {
1253
+ * apiBaseUrl: 'https://api.doohbot.com/',
1254
+ * apiKey: 'your-api-key',
1255
+ * },
1256
+ * // Optional theme configuration if want to match doohbot to your application theme
1257
+ * theme: {
1258
+ * buttonStyle: 'fab',
1259
+ * primaryColor: '#4f46e5',
1260
+ * backgroundColor: '#ffffff',
1261
+ * textColor: '#111827',
1262
+ * fontFamily: 'Inter, Roboto, sans-serif',
1263
+ * enableDrag: true,
1264
+ * enableResize: true
1265
+ * }
1266
+ * }),
1267
+ * ],
1268
+ * }).catch(console.error);
1269
+ * ```
1270
+ */
1271
+ declare function provideDoohbot(config?: Partial<DoohbotConfig>): _angular_core.EnvironmentProviders;
1272
+
1273
+ /**
1274
+ * Injection token for Doohbot configuration.
1275
+ * Used to inject user-provided or default config into services.
1276
+ */
1277
+ declare const DOOHBOT_CONFIG: InjectionToken<DoohbotConfig>;
1278
+
1279
+ /**
1280
+ * Merges user-provided config overrides with defaults.
1281
+ *
1282
+ * @param overrides - Partial config to override defaults
1283
+ * @returns Fully resolved DoohbotConfig object
1284
+ */
1285
+ declare function resolveDoohbotConfig(overrides?: Partial<DoohbotConfig>): DoohbotConfig;
1286
+
1287
+ declare const doohbotConst: {
1288
+ appTitle: string;
1289
+ appSubtitle: string;
1290
+ welcomeDescription: string;
1291
+ hintText: string;
1292
+ appLogo: string;
1293
+ appTextLogo: string;
1294
+ appHeaderLogo: string;
1295
+ userAvatar: string;
1296
+ botAvatar: string;
1297
+ };
1298
+
1299
+ export { DOOHBOT_CONFIG, DoohbotComponent, DoohbotConfigService, Logger, doohbotConst, provideDoohbot, resolveDoohbotConfig };
1300
+ export type { DoohbotApiConfig, DoohbotConfig, DoohbotThemeConfig };
1301
+ //# sourceMappingURL=index.d.ts.map