max-agent-ui 0.0.25 → 0.0.27

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
@@ -28,6 +28,10 @@ interface AssistantConfirmation {
28
28
  actionId: number;
29
29
  decision: 'approve' | 'reject';
30
30
  }
31
+ interface AssistantAnalyticsPage {
32
+ offset: number;
33
+ pageSize: 250;
34
+ }
31
35
  interface AssistantStructuredAction {
32
36
  capabilityKey: string;
33
37
  arguments: AssistantFieldMap;
@@ -235,6 +239,16 @@ interface AssistantResponseTable {
235
239
  columns: AssistantResponseTableColumn[];
236
240
  rows: AssistantFieldMap[];
237
241
  actions?: AssistantResponseTableAction[];
242
+ pagination?: AssistantResponseTablePagination;
243
+ }
244
+ interface AssistantResponseTablePagination {
245
+ query: string;
246
+ offset: number;
247
+ pageSize: 250;
248
+ totalRecords: number;
249
+ returnedRecords: number;
250
+ remainingRecords: number;
251
+ nextOffset?: number;
238
252
  }
239
253
  interface AssistantResponseTableAction {
240
254
  rowIndex: number;
@@ -253,11 +267,15 @@ interface AssistantUser {
253
267
  token?: string;
254
268
  version?: string;
255
269
  }
256
- type AssistantSupportTicketSeverity = 'low' | 'medium' | 'high' | 'critical';
257
270
  type AssistantSupportTagSeverity = 'success' | 'secondary' | 'info' | 'warn' | 'danger' | 'contrast';
258
- interface AssistantSupportTag {
259
- value: string;
271
+ interface AssistantSelectableEntity {
272
+ id: number;
260
273
  label: string;
274
+ }
275
+ interface AssistantSupportSeverity extends AssistantSelectableEntity {
276
+ color: string;
277
+ }
278
+ interface AssistantSupportTag extends AssistantSelectableEntity {
261
279
  icon: string;
262
280
  severity: AssistantSupportTagSeverity;
263
281
  }
@@ -267,13 +285,13 @@ interface AssistantSupportTicketRequest {
267
285
  phone?: string;
268
286
  subject: string;
269
287
  query: string;
270
- severity: AssistantSupportTicketSeverity;
271
- tags: string[];
288
+ severity: AssistantSupportSeverity;
289
+ tags: AssistantSelectableEntity[];
272
290
  app: AssistantProduct;
273
291
  }
274
292
  interface AssistantSupportTicketResponse {
275
293
  success: boolean;
276
- ticketReference: string;
294
+ ticketReference?: string;
277
295
  message: string;
278
296
  submittedAt: string;
279
297
  }
@@ -304,6 +322,7 @@ interface AssistantChatRequest {
304
322
  user?: Pick<AssistantUser, 'name' | 'username' | 'email'>;
305
323
  context?: AssistantRequestContext;
306
324
  confirmation?: AssistantConfirmation;
325
+ analyticsPage?: AssistantAnalyticsPage;
307
326
  structuredAction?: AssistantStructuredAction;
308
327
  }
309
328
  interface AssistantChatProgress {
@@ -405,6 +424,7 @@ declare class MaxAssistantService {
405
424
  sendMessage(message: string, conversationId?: string, config?: MaxAssistantConfig, confirmation?: AssistantConfirmation, history?: AssistantConversationMessage[], onProgress?: (progress: AssistantChatProgress) => void): Observable<AssistantChatResponse>;
406
425
  confirmAction(actionId: number, decision: AssistantConfirmation['decision'], conversationId: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
407
426
  sendStructuredAction(message: string, action: AssistantStructuredAction, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
427
+ retrieveAnalyticsPage(message: string, analyticsPage: AssistantAnalyticsPage, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
408
428
  private postMessage;
409
429
  private streamMessage;
410
430
  private getChatUrl;
@@ -442,11 +462,20 @@ declare class MaxAssistantExportService {
442
462
  }
443
463
 
444
464
  declare class MaxAssistantSupportService {
445
- readonly tagsEndpoint = "selection/support-tags";
446
- readonly ticketsEndpoint = "support/tickets";
465
+ private readonly config;
466
+ private readonly http;
467
+ readonly ticketsEndpoint = "/ticket";
468
+ readonly tagsEndpoint = "/selection/lookup/supportticket/tag";
469
+ readonly severitiesEndpoint = "/selection/lookup/supportticket/severity";
470
+ constructor(config: MaxAssistantConfig, http: HttpClient | null);
447
471
  getSupportTags(): Observable<AssistantSupportTag[]>;
448
- submitTicket(_ticket: AssistantSupportTicketRequest): Observable<AssistantSupportTicketResponse>;
449
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantSupportService, never>;
472
+ getSupportSeverities(): Observable<AssistantSupportSeverity[]>;
473
+ submitTicket(ticket: AssistantSupportTicketRequest, config?: MaxAssistantConfig): Observable<AssistantSupportTicketResponse>;
474
+ private toTicketResponse;
475
+ private getHeaders;
476
+ private getUser;
477
+ private mergeConfig;
478
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantSupportService, [null, { optional: true; }]>;
450
479
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantSupportService>;
451
480
  }
452
481
 
@@ -469,8 +498,8 @@ interface SupportTicketFormValue {
469
498
  phone: string;
470
499
  subject: string;
471
500
  query: string;
472
- severity: AssistantSupportTicketSeverity;
473
- tags: string[];
501
+ severity: AssistantSupportSeverity | null;
502
+ tags: AssistantSupportTag[];
474
503
  }
475
504
  interface FeedbackFormValue {
476
505
  name: string;
@@ -510,6 +539,8 @@ declare class MaxAssistantComponent implements OnInit {
510
539
  protected readonly messages: _angular_core.WritableSignal<AssistantMessage[]>;
511
540
  protected readonly expandedDetailMessageIds: _angular_core.WritableSignal<ReadonlySet<string>>;
512
541
  protected readonly expandedTraceStepKeys: _angular_core.WritableSignal<ReadonlySet<string>>;
542
+ protected readonly loadingTablePage: _angular_core.WritableSignal<string | undefined>;
543
+ protected readonly tablePageErrors: _angular_core.WritableSignal<Readonly<Record<string, string>>>;
513
544
  protected readonly feedbackVisible: _angular_core.WritableSignal<boolean>;
514
545
  protected readonly feedbackSubmitting: _angular_core.WritableSignal<boolean>;
515
546
  protected readonly feedbackResult: _angular_core.WritableSignal<AssistantFeedbackResponse | undefined>;
@@ -523,13 +554,10 @@ declare class MaxAssistantComponent implements OnInit {
523
554
  protected readonly supportTicketSubmitting: _angular_core.WritableSignal<boolean>;
524
555
  protected readonly supportTagsLoading: _angular_core.WritableSignal<boolean>;
525
556
  protected readonly supportTags: _angular_core.WritableSignal<AssistantSupportTag[]>;
557
+ protected readonly supportSeverities: _angular_core.WritableSignal<AssistantSupportSeverity[]>;
526
558
  protected readonly supportTicketResult: _angular_core.WritableSignal<AssistantSupportTicketResponse | undefined>;
527
559
  protected readonly supportTicketError: _angular_core.WritableSignal<string | undefined>;
528
- protected readonly supportSeverityOptions: Array<{
529
- label: string;
530
- value: AssistantSupportTicketSeverity;
531
- severity: AssistantSupportTagSeverity;
532
- }>;
560
+ protected readonly supportTicketSubmissionFailed: _angular_core.WritableSignal<boolean>;
533
561
  protected supportTicketForm: SupportTicketFormValue;
534
562
  constructor(assistantService: MaxAssistantService, exportService: MaxAssistantExportService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
535
563
  ngOnInit(): void;
@@ -563,6 +591,7 @@ declare class MaxAssistantComponent implements OnInit {
563
591
  protected openSupportTicket(): void;
564
592
  protected closeSupportTicket(restoreComposerFocus?: boolean): void;
565
593
  protected canSubmitSupportTicket(): boolean;
594
+ protected supportSeverityColor(color: string): string;
566
595
  protected submitSupportTicket(): void;
567
596
  protected openFeedback(responseMessage: AssistantMessage): void;
568
597
  protected closeFeedback(restoreComposerFocus?: boolean): void;
@@ -580,6 +609,12 @@ declare class MaxAssistantComponent implements OnInit {
580
609
  protected isTraceStepExpanded(messageId: string, stepId: number): boolean;
581
610
  protected toggleTraceStep(messageId: string, stepId: number): void;
582
611
  protected getResponseGrid(responseDetails: AssistantDisplayResponse): AssistantResponseTable[];
612
+ protected retrieveNextTablePage(message: AssistantMessage, table: AssistantResponseTable, tableIndex: number): void;
613
+ protected tablePageStatus(table: AssistantResponseTable): string;
614
+ protected hasNextTablePage(table: AssistantResponseTable): boolean;
615
+ protected nextTablePageLabel(pagination: AssistantResponseTablePagination): string;
616
+ protected isTablePageLoading(messageId: string, tableIndex: number): boolean;
617
+ protected tablePageError(messageId: string, tableIndex: number): string | undefined;
583
618
  protected exportTable(table: AssistantResponseTable): void;
584
619
  protected exportVisualisation(visualisation: AssistantVisualisation): void;
585
620
  protected chartTotal(visualisation: AssistantVisualisation): number;
@@ -611,6 +646,9 @@ declare class MaxAssistantComponent implements OnInit {
611
646
  private appendMessage;
612
647
  private updateStreamingMessage;
613
648
  private replaceMessage;
649
+ private mergeTablePage;
650
+ private mergeDeveloperTraces;
651
+ private tablePageKey;
614
652
  private createDefaultMessages;
615
653
  private getInitialMessage;
616
654
  private getConfiguredUser;
@@ -672,4 +710,4 @@ declare class MaxAgentShiftCardComponent {
672
710
  }
673
711
 
674
712
  export { MAX_ASSISTANT_CONFIG, MaxAgentEntityOptionComponent, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantFeedbackService, MaxAssistantService, MaxAssistantSupportService };
675
- 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 };
713
+ export type { AssistantAnalyticsPage, 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, 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, MaxAgentShiftCardVariant, MaxAssistantConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "max-agent-ui",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },