max-agent-ui 0.0.25 → 0.0.28

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 {
@@ -390,6 +409,7 @@ interface AssistantBootstrapConfig {
390
409
  }
391
410
 
392
411
  interface MaxAssistantConfig {
412
+ apiBaseUrl?: string;
393
413
  assistantApiUrl?: string;
394
414
  app?: AssistantProduct;
395
415
  user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
@@ -405,6 +425,7 @@ declare class MaxAssistantService {
405
425
  sendMessage(message: string, conversationId?: string, config?: MaxAssistantConfig, confirmation?: AssistantConfirmation, history?: AssistantConversationMessage[], onProgress?: (progress: AssistantChatProgress) => void): Observable<AssistantChatResponse>;
406
426
  confirmAction(actionId: number, decision: AssistantConfirmation['decision'], conversationId: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
407
427
  sendStructuredAction(message: string, action: AssistantStructuredAction, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
428
+ retrieveAnalyticsPage(message: string, analyticsPage: AssistantAnalyticsPage, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
408
429
  private postMessage;
409
430
  private streamMessage;
410
431
  private getChatUrl;
@@ -442,11 +463,21 @@ declare class MaxAssistantExportService {
442
463
  }
443
464
 
444
465
  declare class MaxAssistantSupportService {
445
- readonly tagsEndpoint = "selection/support-tags";
446
- readonly ticketsEndpoint = "support/tickets";
466
+ private readonly config;
467
+ private readonly http;
468
+ readonly ticketsEndpoint = "/ticket";
469
+ readonly tagsEndpoint = "/selection/lookup/supportticket/tag";
470
+ readonly severitiesEndpoint = "/selection/lookup/supportticket/severity";
471
+ constructor(config: MaxAssistantConfig, http: HttpClient | null);
447
472
  getSupportTags(): Observable<AssistantSupportTag[]>;
448
- submitTicket(_ticket: AssistantSupportTicketRequest): Observable<AssistantSupportTicketResponse>;
449
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantSupportService, never>;
473
+ getSupportSeverities(): Observable<AssistantSupportSeverity[]>;
474
+ submitTicket(ticket: AssistantSupportTicketRequest, config?: MaxAssistantConfig): Observable<AssistantSupportTicketResponse>;
475
+ private toTicketResponse;
476
+ private getHeaders;
477
+ private getEndpoint;
478
+ private getUser;
479
+ private mergeConfig;
480
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantSupportService, [null, { optional: true; }]>;
450
481
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantSupportService>;
451
482
  }
452
483
 
@@ -469,8 +500,8 @@ interface SupportTicketFormValue {
469
500
  phone: string;
470
501
  subject: string;
471
502
  query: string;
472
- severity: AssistantSupportTicketSeverity;
473
- tags: string[];
503
+ severity: AssistantSupportSeverity | null;
504
+ tags: AssistantSupportTag[];
474
505
  }
475
506
  interface FeedbackFormValue {
476
507
  name: string;
@@ -510,6 +541,8 @@ declare class MaxAssistantComponent implements OnInit {
510
541
  protected readonly messages: _angular_core.WritableSignal<AssistantMessage[]>;
511
542
  protected readonly expandedDetailMessageIds: _angular_core.WritableSignal<ReadonlySet<string>>;
512
543
  protected readonly expandedTraceStepKeys: _angular_core.WritableSignal<ReadonlySet<string>>;
544
+ protected readonly loadingTablePage: _angular_core.WritableSignal<string | undefined>;
545
+ protected readonly tablePageErrors: _angular_core.WritableSignal<Readonly<Record<string, string>>>;
513
546
  protected readonly feedbackVisible: _angular_core.WritableSignal<boolean>;
514
547
  protected readonly feedbackSubmitting: _angular_core.WritableSignal<boolean>;
515
548
  protected readonly feedbackResult: _angular_core.WritableSignal<AssistantFeedbackResponse | undefined>;
@@ -523,13 +556,10 @@ declare class MaxAssistantComponent implements OnInit {
523
556
  protected readonly supportTicketSubmitting: _angular_core.WritableSignal<boolean>;
524
557
  protected readonly supportTagsLoading: _angular_core.WritableSignal<boolean>;
525
558
  protected readonly supportTags: _angular_core.WritableSignal<AssistantSupportTag[]>;
559
+ protected readonly supportSeverities: _angular_core.WritableSignal<AssistantSupportSeverity[]>;
526
560
  protected readonly supportTicketResult: _angular_core.WritableSignal<AssistantSupportTicketResponse | undefined>;
527
561
  protected readonly supportTicketError: _angular_core.WritableSignal<string | undefined>;
528
- protected readonly supportSeverityOptions: Array<{
529
- label: string;
530
- value: AssistantSupportTicketSeverity;
531
- severity: AssistantSupportTagSeverity;
532
- }>;
562
+ protected readonly supportTicketSubmissionFailed: _angular_core.WritableSignal<boolean>;
533
563
  protected supportTicketForm: SupportTicketFormValue;
534
564
  constructor(assistantService: MaxAssistantService, exportService: MaxAssistantExportService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
535
565
  ngOnInit(): void;
@@ -563,6 +593,7 @@ declare class MaxAssistantComponent implements OnInit {
563
593
  protected openSupportTicket(): void;
564
594
  protected closeSupportTicket(restoreComposerFocus?: boolean): void;
565
595
  protected canSubmitSupportTicket(): boolean;
596
+ protected supportSeverityColor(color: string): string;
566
597
  protected submitSupportTicket(): void;
567
598
  protected openFeedback(responseMessage: AssistantMessage): void;
568
599
  protected closeFeedback(restoreComposerFocus?: boolean): void;
@@ -580,6 +611,12 @@ declare class MaxAssistantComponent implements OnInit {
580
611
  protected isTraceStepExpanded(messageId: string, stepId: number): boolean;
581
612
  protected toggleTraceStep(messageId: string, stepId: number): void;
582
613
  protected getResponseGrid(responseDetails: AssistantDisplayResponse): AssistantResponseTable[];
614
+ protected retrieveNextTablePage(message: AssistantMessage, table: AssistantResponseTable, tableIndex: number): void;
615
+ protected tablePageStatus(table: AssistantResponseTable): string;
616
+ protected hasNextTablePage(table: AssistantResponseTable): boolean;
617
+ protected nextTablePageLabel(pagination: AssistantResponseTablePagination): string;
618
+ protected isTablePageLoading(messageId: string, tableIndex: number): boolean;
619
+ protected tablePageError(messageId: string, tableIndex: number): string | undefined;
583
620
  protected exportTable(table: AssistantResponseTable): void;
584
621
  protected exportVisualisation(visualisation: AssistantVisualisation): void;
585
622
  protected chartTotal(visualisation: AssistantVisualisation): number;
@@ -611,6 +648,9 @@ declare class MaxAssistantComponent implements OnInit {
611
648
  private appendMessage;
612
649
  private updateStreamingMessage;
613
650
  private replaceMessage;
651
+ private mergeTablePage;
652
+ private mergeDeveloperTraces;
653
+ private tablePageKey;
614
654
  private createDefaultMessages;
615
655
  private getInitialMessage;
616
656
  private getConfiguredUser;
@@ -672,4 +712,4 @@ declare class MaxAgentShiftCardComponent {
672
712
  }
673
713
 
674
714
  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 };
715
+ 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.28",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },