max-agent-ui 0.0.39 → 0.0.41

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;
@@ -127,6 +137,7 @@ interface AssistantDeveloperTrace {
127
137
  steps: AssistantTraceStep[];
128
138
  }
129
139
  interface AssistantCard {
140
+ person?: AssistantPerson;
130
141
  title: string;
131
142
  subtitle?: string;
132
143
  metrics: Array<{
@@ -167,6 +178,7 @@ interface AssistantExtractedIntent {
167
178
  api?: AssistantApiCall;
168
179
  }
169
180
  interface AssistantDisplayResponse {
181
+ availablePeople?: AssistantAvailablePerson[];
170
182
  agentInferredResponse?: string;
171
183
  userQuery?: string;
172
184
  agentExtractedIntent?: AssistantExtractedIntent;
@@ -228,6 +240,9 @@ interface AssistantVisualisation {
228
240
  yAxisLabel?: string;
229
241
  }
230
242
  interface AssistantShiftCard {
243
+ team?: string;
244
+ employee?: string;
245
+ selection?: AssistantSuggestionOption;
231
246
  id?: string | number;
232
247
  startTime: string;
233
248
  endTime: string;
@@ -242,6 +257,7 @@ interface AssistantShiftCard {
242
257
  }
243
258
  interface AssistantShiftCardGroup {
244
259
  title: string;
260
+ variant?: 'definition' | 'rota' | 'assignment';
245
261
  shifts: AssistantShiftCard[];
246
262
  }
247
263
  interface AssistantRotaCalendar {
@@ -262,16 +278,27 @@ interface AssistantRotaCalendar {
262
278
  }>;
263
279
  }
264
280
  interface AssistantResponseTableColumn {
281
+ secondaryField?: string;
282
+ kind?: 'person';
265
283
  field: string;
266
284
  header: string;
267
285
  }
268
286
  interface AssistantResponseTable {
287
+ people?: AssistantPerson[];
288
+ bulkActions?: AssistantResponseTableAction[];
269
289
  title?: string;
290
+ actionsHeader?: string;
270
291
  columns: AssistantResponseTableColumn[];
271
292
  rows: AssistantFieldMap[];
272
293
  actions?: AssistantResponseTableAction[];
273
294
  pagination?: AssistantResponseTablePagination;
274
295
  }
296
+ interface AssistantPerson {
297
+ name: string;
298
+ id?: string | number;
299
+ code?: string | number;
300
+ photo?: string;
301
+ }
275
302
  interface AssistantResponseTablePagination {
276
303
  query: string;
277
304
  offset: number;
@@ -284,6 +311,8 @@ interface AssistantResponseTablePagination {
284
311
  nextOffset?: number;
285
312
  }
286
313
  interface AssistantResponseTableAction {
314
+ outlined?: boolean;
315
+ disabled?: boolean;
287
316
  rowIndex: number;
288
317
  label: string;
289
318
  message: string;
@@ -455,85 +484,7 @@ interface AssistantBootstrapConfig {
455
484
  initialSuggestions: string[];
456
485
  }
457
486
 
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
- }
487
+ declare function personCard(card: AssistantCard): AssistantCard;
537
488
 
538
489
  declare const ASSISTANT_UI_COPY: {
539
490
  title: string;
@@ -588,6 +539,7 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
588
539
  private supportQueryInput?;
589
540
  private feedbackInput?;
590
541
  app?: AssistantProduct;
542
+ entityIcons: AssistantEntityIcons;
591
543
  assistantApiUrl?: string;
592
544
  user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
593
545
  context?: Partial<AssistantRequestContext> | (() => Partial<AssistantRequestContext>);
@@ -621,7 +573,6 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
621
573
  protected readonly supportTicketError: _angular_core.WritableSignal<string | undefined>;
622
574
  protected readonly supportTicketSubmissionFailed: _angular_core.WritableSignal<boolean>;
623
575
  protected supportTicketForm: SupportTicketFormValue;
624
- constructor(assistantService: MaxAssistantService, exportService: MaxAssistantExportService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
625
576
  ngOnInit(): void;
626
577
  ngDoCheck(): void;
627
578
  resetSession(): void;
@@ -679,6 +630,7 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
679
630
  protected isTraceStepExpanded(messageId: string, stepId: number): boolean;
680
631
  protected toggleTraceStep(messageId: string, stepId: number): void;
681
632
  protected getResponseGrid(responseDetails: AssistantDisplayResponse): AssistantResponseTable[];
633
+ protected readonly personCard: typeof personCard;
682
634
  protected retrieveNextTablePage(message: AssistantMessage, table: AssistantResponseTable, tableIndex: number): void;
683
635
  protected tablePageStatus(table: AssistantResponseTable): string;
684
636
  protected hasNextTablePage(table: AssistantResponseTable): boolean;
@@ -752,38 +704,121 @@ declare class MaxAssistantComponent implements OnInit, DoCheck {
752
704
  private scrollToLatest;
753
705
  private scrollToMessage;
754
706
  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>;
707
+ 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>;
708
+ }
709
+
710
+ interface MaxAssistantConfig {
711
+ /** Per-request transient state supplied by the assistant, never persisted by the host. */
712
+ conversationStateVersion?: 1;
713
+ conversationState?: string;
714
+ apiBaseUrl?: string;
715
+ assistantApiUrl?: string;
716
+ app?: AssistantProduct;
717
+ user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
718
+ context?: Partial<AssistantRequestContext> | (() => Partial<AssistantRequestContext>);
719
+ requestHeaders?: Record<string, string> | (() => Record<string, string>);
720
+ }
721
+ declare const MAX_ASSISTANT_CONFIG: InjectionToken<MaxAssistantConfig>;
722
+
723
+ declare class MaxAssistantFeedbackService {
724
+ private readonly config;
725
+ private readonly http;
726
+ readonly endpoint: string;
727
+ readonly method: "POST";
728
+ constructor(config: MaxAssistantConfig, http: HttpClient | null);
729
+ submitFeedback(feedback: AssistantFeedbackRequest, config?: MaxAssistantConfig): Observable<AssistantFeedbackResponse>;
730
+ private getFeedbackUrl;
731
+ private getHeaders;
732
+ private getUser;
733
+ private mergeConfig;
734
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantFeedbackService, [null, { optional: true; }]>;
735
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantFeedbackService>;
736
+ }
737
+
738
+ declare class MaxAssistantService {
739
+ private readonly config;
740
+ private readonly http;
741
+ constructor(config: MaxAssistantConfig, http: HttpClient | null);
742
+ sendMessage(message: string, conversationId?: string, config?: MaxAssistantConfig, confirmation?: AssistantConfirmation, history?: AssistantConversationMessage[], onProgress?: (activity: AssistantChatActivity) => void): Observable<AssistantChatResponse>;
743
+ confirmAction(actionId: number, decision: AssistantConfirmation['decision'], conversationId: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
744
+ sendStructuredAction(message: string, action: AssistantStructuredAction, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
745
+ retrieveAnalyticsPage(message: string, analyticsPage: AssistantAnalyticsPage, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
746
+ private postMessage;
747
+ private streamMessage;
748
+ private getChatUrl;
749
+ private getApp;
750
+ private getUser;
751
+ private getRequestUser;
752
+ private getOptionalText;
753
+ private getContext;
754
+ private getHeaders;
755
+ private compactConfig;
756
+ private mergeConfig;
757
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantService, [null, { optional: true; }]>;
758
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantService>;
759
+ }
760
+
761
+ declare class MaxAssistantSupportService {
762
+ private readonly config;
763
+ private readonly http;
764
+ readonly ticketsEndpoint = "/ticket";
765
+ readonly tagsEndpoint = "/selection/lookup/supportticket/tag";
766
+ readonly severitiesEndpoint = "/selection/lookup/supportticket/severity";
767
+ constructor(config: MaxAssistantConfig, http: HttpClient | null);
768
+ getSupportTags(): Observable<AssistantSupportTag[]>;
769
+ getSupportSeverities(): Observable<AssistantSupportSeverity[]>;
770
+ submitTicket(ticket: AssistantSupportTicketRequest, config?: MaxAssistantConfig): Observable<AssistantSupportTicketResponse>;
771
+ private toTicketResponse;
772
+ private getHeaders;
773
+ private getEndpoint;
774
+ private getUser;
775
+ private mergeConfig;
776
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantSupportService, [null, { optional: true; }]>;
777
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantSupportService>;
756
778
  }
757
779
 
758
780
  declare class MaxAgentEntityOptionComponent {
759
781
  entity: AssistantSuggestionEntity;
760
782
  disabled: boolean;
783
+ availability?: AssistantAvailablePerson;
784
+ icons: AssistantEntityIcons;
761
785
  selected: EventEmitter<void>;
762
786
  protected get isPerson(): boolean;
763
- protected get displayCode(): string | number | undefined;
764
- protected get initials(): string;
765
787
  protected get entityColor(): string | undefined;
766
788
  protected get entityTextColor(): string | undefined;
767
789
  protected get entityIcon(): string;
768
790
  protected choose(): void;
769
791
  private normaliseColor;
770
792
  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>;
793
+ 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>;
794
+ }
795
+
796
+ declare class MaxAgentPersonComponent implements OnChanges {
797
+ person: AssistantPerson;
798
+ protected photoUnavailable: boolean;
799
+ private previousPhoto?;
800
+ ngOnChanges(): void;
801
+ protected get code(): string | number | undefined;
802
+ protected get photo(): string | undefined;
803
+ protected get initials(): string;
804
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAgentPersonComponent, never>;
805
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MaxAgentPersonComponent, "max-agent-person", never, { "person": { "alias": "person"; "required": true; }; }, {}, never, never, true, never>;
772
806
  }
773
807
 
774
- type MaxAgentShiftCardVariant = 'definition' | 'rota';
808
+ type MaxAgentShiftCardVariant = 'definition' | 'rota' | 'assignment';
775
809
  declare class MaxAgentShiftCardComponent {
776
810
  shift: AssistantShiftCard;
777
811
  variant: MaxAgentShiftCardVariant;
812
+ icons: AssistantEntityIcons;
813
+ protected get assignmentColor(): string | undefined;
778
814
  protected get accentColor(): string;
779
815
  protected get timeLabel(): string;
780
816
  protected get departmentLabel(): string;
781
817
  protected get taskLabel(): string;
782
- private formatTime;
783
818
  private formatTimeToAmPm;
784
819
  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>;
820
+ 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
821
  }
787
822
 
788
- 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 };
823
+ export { MAX_ASSISTANT_CONFIG, MaxAgentEntityOptionComponent, MaxAgentPersonComponent, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantFeedbackService, MaxAssistantService, MaxAssistantSupportService };
824
+ 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, AssistantPerson, 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.41",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },