max-agent-ui 0.0.38 → 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;
@@ -442,6 +459,8 @@ interface AssistantMessage {
442
459
  actionDecision?: AssistantConfirmation['decision'];
443
460
  capabilityKey?: string;
444
461
  isError?: boolean;
462
+ isOffline?: boolean;
463
+ isAccessUnavailable?: boolean;
445
464
  isStreaming?: boolean;
446
465
  processingUpdates?: AssistantChatProgress[];
447
466
  streamingContent?: string;
@@ -453,86 +472,6 @@ interface AssistantBootstrapConfig {
453
472
  initialSuggestions: string[];
454
473
  }
455
474
 
456
- interface MaxAssistantConfig {
457
- /** Per-request transient state supplied by the assistant, never persisted by the host. */
458
- conversationStateVersion?: 1;
459
- conversationState?: string;
460
- apiBaseUrl?: string;
461
- assistantApiUrl?: string;
462
- app?: AssistantProduct;
463
- user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
464
- context?: Partial<AssistantRequestContext> | (() => Partial<AssistantRequestContext>);
465
- requestHeaders?: Record<string, string> | (() => Record<string, string>);
466
- }
467
- declare const MAX_ASSISTANT_CONFIG: InjectionToken<MaxAssistantConfig>;
468
-
469
- declare class MaxAssistantService {
470
- private readonly config;
471
- private readonly http;
472
- constructor(config: MaxAssistantConfig, http: HttpClient | null);
473
- sendMessage(message: string, conversationId?: string, config?: MaxAssistantConfig, confirmation?: AssistantConfirmation, history?: AssistantConversationMessage[], onProgress?: (activity: AssistantChatActivity) => void): Observable<AssistantChatResponse>;
474
- confirmAction(actionId: number, decision: AssistantConfirmation['decision'], conversationId: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
475
- sendStructuredAction(message: string, action: AssistantStructuredAction, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
476
- retrieveAnalyticsPage(message: string, analyticsPage: AssistantAnalyticsPage, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
477
- private postMessage;
478
- private streamMessage;
479
- private getChatUrl;
480
- private getApp;
481
- private getUser;
482
- private getRequestUser;
483
- private getOptionalText;
484
- private getContext;
485
- private getHeaders;
486
- private compactConfig;
487
- private mergeConfig;
488
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantService, [null, { optional: true; }]>;
489
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantService>;
490
- }
491
-
492
- declare class MaxAssistantFeedbackService {
493
- private readonly config;
494
- private readonly http;
495
- readonly endpoint: string;
496
- readonly method: "POST";
497
- constructor(config: MaxAssistantConfig, http: HttpClient | null);
498
- submitFeedback(feedback: AssistantFeedbackRequest, config?: MaxAssistantConfig): Observable<AssistantFeedbackResponse>;
499
- private getFeedbackUrl;
500
- private getHeaders;
501
- private getUser;
502
- private mergeConfig;
503
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantFeedbackService, [null, { optional: true; }]>;
504
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantFeedbackService>;
505
- }
506
-
507
- declare class MaxAssistantExportService {
508
- exportTableToExcel(table: AssistantResponseTable): Promise<void>;
509
- exportVisualisationToPdf(visualisation: AssistantVisualisation, visualisationElement: HTMLElement): Promise<void>;
510
- private toExportCellValue;
511
- private exportFileName;
512
- private downloadFile;
513
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantExportService, never>;
514
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantExportService>;
515
- }
516
-
517
- declare class MaxAssistantSupportService {
518
- private readonly config;
519
- private readonly http;
520
- readonly ticketsEndpoint = "/ticket";
521
- readonly tagsEndpoint = "/selection/lookup/supportticket/tag";
522
- readonly severitiesEndpoint = "/selection/lookup/supportticket/severity";
523
- constructor(config: MaxAssistantConfig, http: HttpClient | null);
524
- getSupportTags(): Observable<AssistantSupportTag[]>;
525
- getSupportSeverities(): Observable<AssistantSupportSeverity[]>;
526
- submitTicket(ticket: AssistantSupportTicketRequest, config?: MaxAssistantConfig): Observable<AssistantSupportTicketResponse>;
527
- private toTicketResponse;
528
- private getHeaders;
529
- private getEndpoint;
530
- private getUser;
531
- private mergeConfig;
532
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantSupportService, [null, { optional: true; }]>;
533
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantSupportService>;
534
- }
535
-
536
475
  declare const ASSISTANT_UI_COPY: {
537
476
  title: string;
538
477
  subtitle: string;
@@ -545,6 +484,10 @@ declare const ASSISTANT_UI_COPY: {
545
484
  placeholder: string;
546
485
  startingMessage: string;
547
486
  errorMessage: string;
487
+ offlineTitle: string;
488
+ accessUnavailableTitle: string;
489
+ accessUnavailableMessage: string;
490
+ offlineMessage: string;
548
491
  };
549
492
  interface SupportTicketFormValue {
550
493
  name: string;
@@ -582,6 +525,7 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
582
525
  private supportQueryInput?;
583
526
  private feedbackInput?;
584
527
  app?: AssistantProduct;
528
+ entityIcons: AssistantEntityIcons;
585
529
  assistantApiUrl?: string;
586
530
  user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
587
531
  context?: Partial<AssistantRequestContext> | (() => Partial<AssistantRequestContext>);
@@ -615,7 +559,6 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
615
559
  protected readonly supportTicketError: _angular_core.WritableSignal<string | undefined>;
616
560
  protected readonly supportTicketSubmissionFailed: _angular_core.WritableSignal<boolean>;
617
561
  protected supportTicketForm: SupportTicketFormValue;
618
- constructor(assistantService: MaxAssistantService, exportService: MaxAssistantExportService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
619
562
  ngOnInit(): void;
620
563
  ngDoCheck(): void;
621
564
  resetSession(): void;
@@ -665,6 +608,7 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
665
608
  protected getTableRowActions(table: AssistantResponseTable, rowIndex: number): AssistantResponseTableAction[];
666
609
  protected useTableAction(action: AssistantResponseTableAction): void;
667
610
  protected resolvePendingAction(message: AssistantMessage, decision: AssistantConfirmation['decision']): void;
611
+ private createErrorMessage;
668
612
  private resolveErrorMessage;
669
613
  protected onComposerKeydown(event: KeyboardEvent): void;
670
614
  protected isDetailsVisible(messageId: string): boolean;
@@ -745,12 +689,86 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
745
689
  private scrollToLatest;
746
690
  private scrollToMessage;
747
691
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantComponent, never>;
748
- 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>;
749
763
  }
750
764
 
751
- declare class MaxAgentEntityOptionComponent {
765
+ declare class MaxAgentEntityOptionComponent implements OnChanges {
752
766
  entity: AssistantSuggestionEntity;
753
767
  disabled: boolean;
768
+ availability?: AssistantAvailablePerson;
769
+ icons: AssistantEntityIcons;
770
+ protected photoUnavailable: boolean;
771
+ ngOnChanges(): void;
754
772
  selected: EventEmitter<void>;
755
773
  protected get isPerson(): boolean;
756
774
  protected get displayCode(): string | number | undefined;
@@ -761,13 +779,15 @@ declare class MaxAgentEntityOptionComponent {
761
779
  protected choose(): void;
762
780
  private normaliseColor;
763
781
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAgentEntityOptionComponent, never>;
764
- 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>;
765
783
  }
766
784
 
767
- type MaxAgentShiftCardVariant = 'definition' | 'rota';
785
+ type MaxAgentShiftCardVariant = 'definition' | 'rota' | 'assignment';
768
786
  declare class MaxAgentShiftCardComponent {
769
787
  shift: AssistantShiftCard;
770
788
  variant: MaxAgentShiftCardVariant;
789
+ icons: AssistantEntityIcons;
790
+ protected get assignmentColor(): string | undefined;
771
791
  protected get accentColor(): string;
772
792
  protected get timeLabel(): string;
773
793
  protected get departmentLabel(): string;
@@ -775,8 +795,8 @@ declare class MaxAgentShiftCardComponent {
775
795
  private formatTime;
776
796
  private formatTimeToAmPm;
777
797
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAgentShiftCardComponent, never>;
778
- 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>;
779
799
  }
780
800
 
781
801
  export { MAX_ASSISTANT_CONFIG, MaxAgentEntityOptionComponent, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantFeedbackService, MaxAssistantService, MaxAssistantSupportService };
782
- 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.38",
3
+ "version": "0.0.40",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },