max-agent-ui 0.0.21 → 0.0.23

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
@@ -44,10 +44,20 @@ interface AssistantConversationMessage {
44
44
  interface AssistantSuggestionOption {
45
45
  label: string;
46
46
  message: string;
47
- presentation?: 'capability_card';
47
+ presentation?: 'capability_card' | 'person_card' | 'entity_tag';
48
48
  section?: string;
49
+ entity?: AssistantSuggestionEntity;
49
50
  structuredAction?: AssistantStructuredAction;
50
51
  }
52
+ interface AssistantSuggestionEntity {
53
+ kind: 'person' | 'employee' | 'team' | 'role' | 'location' | 'position' | 'department' | 'entity';
54
+ id?: string | number;
55
+ name: string;
56
+ code?: string | number;
57
+ photo?: string;
58
+ color?: string;
59
+ textColor?: string;
60
+ }
51
61
  type AssistantSuggestion = string | AssistantSuggestionOption;
52
62
  interface AssistantPendingAction {
53
63
  id: number;
@@ -118,6 +128,7 @@ interface AssistantCard {
118
128
  metrics: Array<{
119
129
  label: string;
120
130
  value: string;
131
+ list?: boolean;
121
132
  tone?: 'default' | 'positive' | 'warning';
122
133
  }>;
123
134
  footer?: string;
@@ -179,6 +190,7 @@ interface AssistantVisualisation {
179
190
  labels: string[];
180
191
  values: number[];
181
192
  colors?: string[];
193
+ valueLabel?: string;
182
194
  }
183
195
  interface AssistantShiftCard {
184
196
  id?: string | number;
@@ -288,7 +300,8 @@ interface AssistantChatRequest {
288
300
  conversationId?: string;
289
301
  history: AssistantConversationMessage[];
290
302
  app: AssistantProduct;
291
- context: AssistantRequestContext;
303
+ user?: Pick<AssistantUser, 'name' | 'username' | 'email'>;
304
+ context?: AssistantRequestContext;
292
305
  confirmation?: AssistantConfirmation;
293
306
  structuredAction?: AssistantStructuredAction;
294
307
  }
@@ -396,9 +409,12 @@ declare class MaxAssistantService {
396
409
  private getChatUrl;
397
410
  private getApp;
398
411
  private getUser;
412
+ private getRequestUser;
413
+ private getOptionalText;
399
414
  private getContext;
400
415
  private getHeaders;
401
416
  private compactConfig;
417
+ private mergeConfig;
402
418
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantService, [null, { optional: true; }]>;
403
419
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantService>;
404
420
  }
@@ -450,6 +466,10 @@ interface FeedbackFormValue {
450
466
  assistantResponse: string;
451
467
  feedback: string;
452
468
  }
469
+ interface AssistantEntitySuggestionOption extends AssistantSuggestionOption {
470
+ presentation: 'person_card' | 'entity_tag';
471
+ entity: AssistantSuggestionEntity;
472
+ }
453
473
  declare class MaxAssistantComponent implements OnInit {
454
474
  private readonly assistantService;
455
475
  private readonly feedbackService;
@@ -465,6 +485,7 @@ declare class MaxAssistantComponent implements OnInit {
465
485
  user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
466
486
  context?: Partial<AssistantRequestContext> | (() => Partial<AssistantRequestContext>);
467
487
  requestHeaders?: Record<string, string> | (() => Record<string, string>);
488
+ developerDetailsEnabled: boolean;
468
489
  hostAction: EventEmitter<AssistantHostAction>;
469
490
  closeRequested: EventEmitter<void>;
470
491
  protected readonly isSending: _angular_core.WritableSignal<boolean>;
@@ -473,7 +494,6 @@ declare class MaxAssistantComponent implements OnInit {
473
494
  protected readonly messages: _angular_core.WritableSignal<AssistantMessage[]>;
474
495
  protected readonly expandedDetailMessageIds: _angular_core.WritableSignal<ReadonlySet<string>>;
475
496
  protected readonly expandedTraceStepKeys: _angular_core.WritableSignal<ReadonlySet<string>>;
476
- protected readonly developerDetailsEnabled: boolean;
477
497
  protected readonly feedbackVisible: _angular_core.WritableSignal<boolean>;
478
498
  protected readonly feedbackSubmitting: _angular_core.WritableSignal<boolean>;
479
499
  protected readonly feedbackResult: _angular_core.WritableSignal<AssistantFeedbackResponse | undefined>;
@@ -506,11 +526,18 @@ declare class MaxAssistantComponent implements OnInit {
506
526
  protected clearChatSession(): void;
507
527
  protected sendMessage(message?: string): void;
508
528
  protected suggestionLabel(suggestion: AssistantSuggestion): string;
529
+ protected isListMetric(metric: {
530
+ label: string;
531
+ value: string;
532
+ list?: boolean;
533
+ }): boolean;
509
534
  protected hasCapabilitySuggestions(suggestions?: AssistantSuggestion[]): boolean;
510
535
  protected capabilitySuggestionGroups(suggestions?: AssistantSuggestion[]): Array<{
511
536
  section: string;
512
537
  options: AssistantSuggestionOption[];
513
538
  }>;
539
+ protected hasEntitySuggestions(suggestions?: AssistantSuggestion[]): boolean;
540
+ protected entitySuggestionOptions(suggestions?: AssistantSuggestion[]): AssistantEntitySuggestionOption[];
514
541
  protected useSuggestion(suggestion: AssistantSuggestion): void;
515
542
  protected performHostAction(action: AssistantHostAction): void;
516
543
  protected requestClose(): void;
@@ -535,6 +562,7 @@ declare class MaxAssistantComponent implements OnInit {
535
562
  protected isTraceStepExpanded(messageId: string, stepId: number): boolean;
536
563
  protected toggleTraceStep(messageId: string, stepId: number): void;
537
564
  protected getResponseGrid(responseDetails: AssistantDisplayResponse): AssistantResponseTable[];
565
+ protected hasStructuredPresentation(message: AssistantMessage, responseDetails: AssistantDisplayResponse): boolean;
538
566
  protected chartTotal(visualisation: AssistantVisualisation): number;
539
567
  protected chartColor(visualisation: AssistantVisualisation, index: number): string;
540
568
  protected doughnutDashArray(visualisation: AssistantVisualisation, index: number): string;
@@ -591,7 +619,23 @@ declare class MaxAssistantComponent implements OnInit {
591
619
  private getConversationHistory;
592
620
  private scrollToLatest;
593
621
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantComponent, never>;
594
- 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; }; }, { "hostAction": "hostAction"; "closeRequested": "closeRequested"; }, never, never, true, never>;
622
+ 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>;
623
+ }
624
+
625
+ declare class MaxAgentEntityOptionComponent {
626
+ entity: AssistantSuggestionEntity;
627
+ disabled: boolean;
628
+ selected: EventEmitter<void>;
629
+ protected get isPerson(): boolean;
630
+ protected get displayCode(): string | number | undefined;
631
+ protected get initials(): string;
632
+ protected get entityColor(): string | undefined;
633
+ protected get entityTextColor(): string | undefined;
634
+ protected get entityIcon(): string;
635
+ protected choose(): void;
636
+ private normaliseColor;
637
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAgentEntityOptionComponent, never>;
638
+ 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>;
595
639
  }
596
640
 
597
641
  type MaxAgentShiftCardVariant = 'definition' | 'rota';
@@ -608,5 +652,5 @@ declare class MaxAgentShiftCardComponent {
608
652
  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>;
609
653
  }
610
654
 
611
- export { MAX_ASSISTANT_CONFIG, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantFeedbackService, MaxAssistantService, MaxAssistantSupportService };
612
- export type { AssistantApiCall, AssistantCard, AssistantChatProgress, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantConfirmation, AssistantContextResolution, AssistantConversationMessage, AssistantDeveloperTrace, AssistantDisplayResponse, AssistantExtractedIntent, AssistantFeedbackCategory, AssistantFeedbackRequest, AssistantFeedbackResponse, AssistantFieldMap, AssistantFieldValue, AssistantHostAction, AssistantMessage, AssistantPendingAction, AssistantProduct, AssistantRequestContext, AssistantResponseTable, AssistantResponseTableAction, AssistantResponseTableColumn, AssistantRotaCalendar, AssistantSearchResult, AssistantShiftCard, AssistantShiftCardGroup, AssistantSource, AssistantStructuredAction, AssistantSuggestion, AssistantSuggestionOption, AssistantSupportTag, AssistantSupportTagSeverity, AssistantSupportTicketRequest, AssistantSupportTicketResponse, AssistantSupportTicketSeverity, AssistantToolExecution, AssistantTraceControl, AssistantTraceStep, AssistantTraceStepCategory, AssistantTraceStepMetadata, AssistantTraceStepStatus, AssistantTraceTechnology, AssistantUser, AssistantVisualisation, MaxAgentShiftCardVariant, MaxAssistantConfig };
655
+ export { MAX_ASSISTANT_CONFIG, MaxAgentEntityOptionComponent, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantFeedbackService, MaxAssistantService, MaxAssistantSupportService };
656
+ export type { AssistantApiCall, AssistantCard, AssistantChatProgress, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantConfirmation, AssistantContextResolution, AssistantConversationMessage, AssistantDeveloperTrace, AssistantDisplayResponse, AssistantExtractedIntent, AssistantFeedbackCategory, AssistantFeedbackRequest, AssistantFeedbackResponse, AssistantFieldMap, AssistantFieldValue, AssistantHostAction, AssistantMessage, AssistantPendingAction, AssistantProduct, AssistantRequestContext, AssistantResponseTable, AssistantResponseTableAction, AssistantResponseTableColumn, AssistantRotaCalendar, AssistantSearchResult, AssistantShiftCard, AssistantShiftCardGroup, AssistantSource, AssistantStructuredAction, AssistantSuggestion, AssistantSuggestionEntity, AssistantSuggestionOption, AssistantSupportTag, AssistantSupportTagSeverity, AssistantSupportTicketRequest, AssistantSupportTicketResponse, AssistantSupportTicketSeverity, AssistantToolExecution, AssistantTraceControl, AssistantTraceStep, AssistantTraceStepCategory, AssistantTraceStepMetadata, AssistantTraceStepStatus, AssistantTraceTechnology, AssistantUser, AssistantVisualisation, MaxAgentShiftCardVariant, MaxAssistantConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "max-agent-ui",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },