max-agent-ui 0.0.39 → 0.0.40

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { InjectionToken, OnInit, DoCheck, EventEmitter, DestroyRef } from '@angular/core';
2
+ import { OnInit, DoCheck, EventEmitter, InjectionToken, OnChanges } from '@angular/core';
3
3
  import { HttpClient } from '@angular/common/http';
4
4
  import { Observable } from 'rxjs';
5
5
 
@@ -62,6 +62,16 @@ interface AssistantSuggestionEntity {
62
62
  color?: string;
63
63
  textColor?: string;
64
64
  }
65
+ interface AssistantAvailablePerson extends AssistantSuggestionEntity {
66
+ team: string;
67
+ role: string;
68
+ location: string;
69
+ }
70
+ interface AssistantEntityIcons {
71
+ team?: string;
72
+ role?: string;
73
+ location?: string;
74
+ }
65
75
  type AssistantSuggestion = string | AssistantSuggestionOption;
66
76
  interface AssistantPendingAction {
67
77
  id: number;
@@ -167,6 +177,7 @@ interface AssistantExtractedIntent {
167
177
  api?: AssistantApiCall;
168
178
  }
169
179
  interface AssistantDisplayResponse {
180
+ availablePeople?: AssistantAvailablePerson[];
170
181
  agentInferredResponse?: string;
171
182
  userQuery?: string;
172
183
  agentExtractedIntent?: AssistantExtractedIntent;
@@ -228,6 +239,9 @@ interface AssistantVisualisation {
228
239
  yAxisLabel?: string;
229
240
  }
230
241
  interface AssistantShiftCard {
242
+ team?: string;
243
+ employee?: string;
244
+ selection?: AssistantSuggestionOption;
231
245
  id?: string | number;
232
246
  startTime: string;
233
247
  endTime: string;
@@ -242,6 +256,7 @@ interface AssistantShiftCard {
242
256
  }
243
257
  interface AssistantShiftCardGroup {
244
258
  title: string;
259
+ variant?: 'definition' | 'rota' | 'assignment';
245
260
  shifts: AssistantShiftCard[];
246
261
  }
247
262
  interface AssistantRotaCalendar {
@@ -267,6 +282,7 @@ interface AssistantResponseTableColumn {
267
282
  }
268
283
  interface AssistantResponseTable {
269
284
  title?: string;
285
+ actionsHeader?: string;
270
286
  columns: AssistantResponseTableColumn[];
271
287
  rows: AssistantFieldMap[];
272
288
  actions?: AssistantResponseTableAction[];
@@ -284,6 +300,7 @@ interface AssistantResponseTablePagination {
284
300
  nextOffset?: number;
285
301
  }
286
302
  interface AssistantResponseTableAction {
303
+ disabled?: boolean;
287
304
  rowIndex: number;
288
305
  label: string;
289
306
  message: string;
@@ -455,86 +472,6 @@ interface AssistantBootstrapConfig {
455
472
  initialSuggestions: string[];
456
473
  }
457
474
 
458
- interface MaxAssistantConfig {
459
- /** Per-request transient state supplied by the assistant, never persisted by the host. */
460
- conversationStateVersion?: 1;
461
- conversationState?: string;
462
- apiBaseUrl?: string;
463
- assistantApiUrl?: string;
464
- app?: AssistantProduct;
465
- user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
466
- context?: Partial<AssistantRequestContext> | (() => Partial<AssistantRequestContext>);
467
- requestHeaders?: Record<string, string> | (() => Record<string, string>);
468
- }
469
- declare const MAX_ASSISTANT_CONFIG: InjectionToken<MaxAssistantConfig>;
470
-
471
- declare class MaxAssistantService {
472
- private readonly config;
473
- private readonly http;
474
- constructor(config: MaxAssistantConfig, http: HttpClient | null);
475
- sendMessage(message: string, conversationId?: string, config?: MaxAssistantConfig, confirmation?: AssistantConfirmation, history?: AssistantConversationMessage[], onProgress?: (activity: AssistantChatActivity) => void): Observable<AssistantChatResponse>;
476
- confirmAction(actionId: number, decision: AssistantConfirmation['decision'], conversationId: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
477
- sendStructuredAction(message: string, action: AssistantStructuredAction, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
478
- retrieveAnalyticsPage(message: string, analyticsPage: AssistantAnalyticsPage, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
479
- private postMessage;
480
- private streamMessage;
481
- private getChatUrl;
482
- private getApp;
483
- private getUser;
484
- private getRequestUser;
485
- private getOptionalText;
486
- private getContext;
487
- private getHeaders;
488
- private compactConfig;
489
- private mergeConfig;
490
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantService, [null, { optional: true; }]>;
491
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantService>;
492
- }
493
-
494
- declare class MaxAssistantFeedbackService {
495
- private readonly config;
496
- private readonly http;
497
- readonly endpoint: string;
498
- readonly method: "POST";
499
- constructor(config: MaxAssistantConfig, http: HttpClient | null);
500
- submitFeedback(feedback: AssistantFeedbackRequest, config?: MaxAssistantConfig): Observable<AssistantFeedbackResponse>;
501
- private getFeedbackUrl;
502
- private getHeaders;
503
- private getUser;
504
- private mergeConfig;
505
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantFeedbackService, [null, { optional: true; }]>;
506
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantFeedbackService>;
507
- }
508
-
509
- declare class MaxAssistantExportService {
510
- exportTableToExcel(table: AssistantResponseTable): Promise<void>;
511
- exportVisualisationToPdf(visualisation: AssistantVisualisation, visualisationElement: HTMLElement): Promise<void>;
512
- private toExportCellValue;
513
- private exportFileName;
514
- private downloadFile;
515
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantExportService, never>;
516
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantExportService>;
517
- }
518
-
519
- declare class MaxAssistantSupportService {
520
- private readonly config;
521
- private readonly http;
522
- readonly ticketsEndpoint = "/ticket";
523
- readonly tagsEndpoint = "/selection/lookup/supportticket/tag";
524
- readonly severitiesEndpoint = "/selection/lookup/supportticket/severity";
525
- constructor(config: MaxAssistantConfig, http: HttpClient | null);
526
- getSupportTags(): Observable<AssistantSupportTag[]>;
527
- getSupportSeverities(): Observable<AssistantSupportSeverity[]>;
528
- submitTicket(ticket: AssistantSupportTicketRequest, config?: MaxAssistantConfig): Observable<AssistantSupportTicketResponse>;
529
- private toTicketResponse;
530
- private getHeaders;
531
- private getEndpoint;
532
- private getUser;
533
- private mergeConfig;
534
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantSupportService, [null, { optional: true; }]>;
535
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantSupportService>;
536
- }
537
-
538
475
  declare const ASSISTANT_UI_COPY: {
539
476
  title: string;
540
477
  subtitle: string;
@@ -588,6 +525,7 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
588
525
  private supportQueryInput?;
589
526
  private feedbackInput?;
590
527
  app?: AssistantProduct;
528
+ entityIcons: AssistantEntityIcons;
591
529
  assistantApiUrl?: string;
592
530
  user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
593
531
  context?: Partial<AssistantRequestContext> | (() => Partial<AssistantRequestContext>);
@@ -621,7 +559,6 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
621
559
  protected readonly supportTicketError: _angular_core.WritableSignal<string | undefined>;
622
560
  protected readonly supportTicketSubmissionFailed: _angular_core.WritableSignal<boolean>;
623
561
  protected supportTicketForm: SupportTicketFormValue;
624
- constructor(assistantService: MaxAssistantService, exportService: MaxAssistantExportService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
625
562
  ngOnInit(): void;
626
563
  ngDoCheck(): void;
627
564
  resetSession(): void;
@@ -752,12 +689,86 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
752
689
  private scrollToLatest;
753
690
  private scrollToMessage;
754
691
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantComponent, never>;
755
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MaxAssistantComponent, "max-assistant", never, { "app": { "alias": "app"; "required": false; }; "assistantApiUrl": { "alias": "assistantApiUrl"; "required": false; }; "user": { "alias": "user"; "required": false; }; "context": { "alias": "context"; "required": false; }; "requestHeaders": { "alias": "requestHeaders"; "required": false; }; "developerDetailsEnabled": { "alias": "developerDetailsEnabled"; "required": false; }; }, { "hostAction": "hostAction"; "closeRequested": "closeRequested"; }, never, never, true, never>;
692
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MaxAssistantComponent, "max-assistant", never, { "app": { "alias": "app"; "required": false; }; "entityIcons": { "alias": "entityIcons"; "required": false; }; "assistantApiUrl": { "alias": "assistantApiUrl"; "required": false; }; "user": { "alias": "user"; "required": false; }; "context": { "alias": "context"; "required": false; }; "requestHeaders": { "alias": "requestHeaders"; "required": false; }; "developerDetailsEnabled": { "alias": "developerDetailsEnabled"; "required": false; }; }, { "hostAction": "hostAction"; "closeRequested": "closeRequested"; }, never, never, true, never>;
693
+ }
694
+
695
+ interface MaxAssistantConfig {
696
+ /** Per-request transient state supplied by the assistant, never persisted by the host. */
697
+ conversationStateVersion?: 1;
698
+ conversationState?: string;
699
+ apiBaseUrl?: string;
700
+ assistantApiUrl?: string;
701
+ app?: AssistantProduct;
702
+ user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
703
+ context?: Partial<AssistantRequestContext> | (() => Partial<AssistantRequestContext>);
704
+ requestHeaders?: Record<string, string> | (() => Record<string, string>);
705
+ }
706
+ declare const MAX_ASSISTANT_CONFIG: InjectionToken<MaxAssistantConfig>;
707
+
708
+ declare class MaxAssistantFeedbackService {
709
+ private readonly config;
710
+ private readonly http;
711
+ readonly endpoint: string;
712
+ readonly method: "POST";
713
+ constructor(config: MaxAssistantConfig, http: HttpClient | null);
714
+ submitFeedback(feedback: AssistantFeedbackRequest, config?: MaxAssistantConfig): Observable<AssistantFeedbackResponse>;
715
+ private getFeedbackUrl;
716
+ private getHeaders;
717
+ private getUser;
718
+ private mergeConfig;
719
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantFeedbackService, [null, { optional: true; }]>;
720
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantFeedbackService>;
721
+ }
722
+
723
+ declare class MaxAssistantService {
724
+ private readonly config;
725
+ private readonly http;
726
+ constructor(config: MaxAssistantConfig, http: HttpClient | null);
727
+ sendMessage(message: string, conversationId?: string, config?: MaxAssistantConfig, confirmation?: AssistantConfirmation, history?: AssistantConversationMessage[], onProgress?: (activity: AssistantChatActivity) => void): Observable<AssistantChatResponse>;
728
+ confirmAction(actionId: number, decision: AssistantConfirmation['decision'], conversationId: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
729
+ sendStructuredAction(message: string, action: AssistantStructuredAction, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
730
+ retrieveAnalyticsPage(message: string, analyticsPage: AssistantAnalyticsPage, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
731
+ private postMessage;
732
+ private streamMessage;
733
+ private getChatUrl;
734
+ private getApp;
735
+ private getUser;
736
+ private getRequestUser;
737
+ private getOptionalText;
738
+ private getContext;
739
+ private getHeaders;
740
+ private compactConfig;
741
+ private mergeConfig;
742
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantService, [null, { optional: true; }]>;
743
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantService>;
744
+ }
745
+
746
+ declare class MaxAssistantSupportService {
747
+ private readonly config;
748
+ private readonly http;
749
+ readonly ticketsEndpoint = "/ticket";
750
+ readonly tagsEndpoint = "/selection/lookup/supportticket/tag";
751
+ readonly severitiesEndpoint = "/selection/lookup/supportticket/severity";
752
+ constructor(config: MaxAssistantConfig, http: HttpClient | null);
753
+ getSupportTags(): Observable<AssistantSupportTag[]>;
754
+ getSupportSeverities(): Observable<AssistantSupportSeverity[]>;
755
+ submitTicket(ticket: AssistantSupportTicketRequest, config?: MaxAssistantConfig): Observable<AssistantSupportTicketResponse>;
756
+ private toTicketResponse;
757
+ private getHeaders;
758
+ private getEndpoint;
759
+ private getUser;
760
+ private mergeConfig;
761
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantSupportService, [null, { optional: true; }]>;
762
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantSupportService>;
756
763
  }
757
764
 
758
- declare class MaxAgentEntityOptionComponent {
765
+ declare class MaxAgentEntityOptionComponent implements OnChanges {
759
766
  entity: AssistantSuggestionEntity;
760
767
  disabled: boolean;
768
+ availability?: AssistantAvailablePerson;
769
+ icons: AssistantEntityIcons;
770
+ protected photoUnavailable: boolean;
771
+ ngOnChanges(): void;
761
772
  selected: EventEmitter<void>;
762
773
  protected get isPerson(): boolean;
763
774
  protected get displayCode(): string | number | undefined;
@@ -768,13 +779,15 @@ declare class MaxAgentEntityOptionComponent {
768
779
  protected choose(): void;
769
780
  private normaliseColor;
770
781
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAgentEntityOptionComponent, never>;
771
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MaxAgentEntityOptionComponent, "max-agent-entity-option", never, { "entity": { "alias": "entity"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selected": "selected"; }, never, never, true, never>;
782
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MaxAgentEntityOptionComponent, "max-agent-entity-option", never, { "entity": { "alias": "entity"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; "availability": { "alias": "availability"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; }, { "selected": "selected"; }, never, never, true, never>;
772
783
  }
773
784
 
774
- type MaxAgentShiftCardVariant = 'definition' | 'rota';
785
+ type MaxAgentShiftCardVariant = 'definition' | 'rota' | 'assignment';
775
786
  declare class MaxAgentShiftCardComponent {
776
787
  shift: AssistantShiftCard;
777
788
  variant: MaxAgentShiftCardVariant;
789
+ icons: AssistantEntityIcons;
790
+ protected get assignmentColor(): string | undefined;
778
791
  protected get accentColor(): string;
779
792
  protected get timeLabel(): string;
780
793
  protected get departmentLabel(): string;
@@ -782,8 +795,8 @@ declare class MaxAgentShiftCardComponent {
782
795
  private formatTime;
783
796
  private formatTimeToAmPm;
784
797
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAgentShiftCardComponent, never>;
785
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MaxAgentShiftCardComponent, "max-agent-shift-card", never, { "shift": { "alias": "shift"; "required": true; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, never, true, never>;
798
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MaxAgentShiftCardComponent, "max-agent-shift-card", never, { "shift": { "alias": "shift"; "required": true; }; "variant": { "alias": "variant"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; }, {}, never, never, true, never>;
786
799
  }
787
800
 
788
801
  export { MAX_ASSISTANT_CONFIG, MaxAgentEntityOptionComponent, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantFeedbackService, MaxAssistantService, MaxAssistantSupportService };
789
- export type { AssistantAnalyticsPage, AssistantApiCall, AssistantCard, AssistantChatActivity, AssistantChatData, AssistantChatDelta, AssistantChatProgress, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantConfirmation, AssistantContextResolution, AssistantConversationMessage, AssistantDeveloperTrace, AssistantDisplayResponse, AssistantExtractedIntent, AssistantFeedbackCategory, AssistantFeedbackRequest, AssistantFeedbackResponse, AssistantFieldMap, AssistantFieldValue, AssistantHelpGuide, AssistantHelpIcon, AssistantHostAction, AssistantMessage, AssistantPendingAction, AssistantProduct, AssistantRequestContext, AssistantResponseTable, AssistantResponseTableAction, AssistantResponseTableColumn, AssistantResponseTablePagination, AssistantRotaCalendar, AssistantSearchResult, AssistantSelectableEntity, AssistantShiftCard, AssistantShiftCardGroup, AssistantSource, AssistantStructuredAction, AssistantSuggestion, AssistantSuggestionEntity, AssistantSuggestionOption, AssistantSupportSeverity, AssistantSupportTag, AssistantSupportTagSeverity, AssistantSupportTicketRequest, AssistantSupportTicketResponse, AssistantToolExecution, AssistantTraceControl, AssistantTraceStep, AssistantTraceStepCategory, AssistantTraceStepMetadata, AssistantTraceStepStatus, AssistantTraceTechnology, AssistantUser, AssistantVisualisation, AssistantVisualisationDataset, AssistantVisualisationType, MaxAgentShiftCardVariant, MaxAssistantConfig };
802
+ export type { AssistantAnalyticsPage, AssistantApiCall, AssistantAvailablePerson, AssistantCard, AssistantChatActivity, AssistantChatData, AssistantChatDelta, AssistantChatProgress, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantConfirmation, AssistantContextResolution, AssistantConversationMessage, AssistantDeveloperTrace, AssistantDisplayResponse, AssistantEntityIcons, AssistantExtractedIntent, AssistantFeedbackCategory, AssistantFeedbackRequest, AssistantFeedbackResponse, AssistantFieldMap, AssistantFieldValue, AssistantHelpGuide, AssistantHelpIcon, AssistantHostAction, AssistantMessage, AssistantPendingAction, AssistantProduct, AssistantRequestContext, AssistantResponseTable, AssistantResponseTableAction, AssistantResponseTableColumn, AssistantResponseTablePagination, AssistantRotaCalendar, AssistantSearchResult, AssistantSelectableEntity, AssistantShiftCard, AssistantShiftCardGroup, AssistantSource, AssistantStructuredAction, AssistantSuggestion, AssistantSuggestionEntity, AssistantSuggestionOption, AssistantSupportSeverity, AssistantSupportTag, AssistantSupportTagSeverity, AssistantSupportTicketRequest, AssistantSupportTicketResponse, AssistantToolExecution, AssistantTraceControl, AssistantTraceStep, AssistantTraceStepCategory, AssistantTraceStepMetadata, AssistantTraceStepStatus, AssistantTraceTechnology, AssistantUser, AssistantVisualisation, AssistantVisualisationDataset, AssistantVisualisationType, MaxAgentShiftCardVariant, MaxAssistantConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "max-agent-ui",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },