max-agent-ui 0.0.19 → 0.0.21

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
@@ -41,11 +41,14 @@ interface AssistantConversationMessage {
41
41
  content: string;
42
42
  capabilityKey?: string;
43
43
  }
44
- type AssistantSuggestion = string | {
44
+ interface AssistantSuggestionOption {
45
45
  label: string;
46
46
  message: string;
47
+ presentation?: 'capability_card';
48
+ section?: string;
47
49
  structuredAction?: AssistantStructuredAction;
48
- };
50
+ }
51
+ type AssistantSuggestion = string | AssistantSuggestionOption;
49
52
  interface AssistantPendingAction {
50
53
  id: number;
51
54
  summary: string;
@@ -261,6 +264,24 @@ interface AssistantSupportTicketResponse {
261
264
  message: string;
262
265
  submittedAt: string;
263
266
  }
267
+ type AssistantFeedbackCategory = 'incorrect' | 'incomplete' | 'unclear' | 'unexpected' | 'suggestion' | 'other';
268
+ interface AssistantFeedbackRequest {
269
+ name: string;
270
+ email: string;
271
+ phone?: string;
272
+ category: AssistantFeedbackCategory;
273
+ query: string;
274
+ assistantResponse?: string;
275
+ feedback: string;
276
+ app: AssistantProduct;
277
+ conversationId?: string;
278
+ }
279
+ interface AssistantFeedbackResponse {
280
+ success: boolean;
281
+ feedbackReference: string;
282
+ message: string;
283
+ submittedAt: string;
284
+ }
264
285
  interface AssistantChatRequest {
265
286
  message: string;
266
287
  stream?: boolean;
@@ -382,6 +403,14 @@ declare class MaxAssistantService {
382
403
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantService>;
383
404
  }
384
405
 
406
+ declare class MaxAssistantFeedbackService {
407
+ readonly endpoint = "/agent-api/v1/feedback";
408
+ readonly method: "POST";
409
+ submitFeedback(_feedback: AssistantFeedbackRequest): Observable<AssistantFeedbackResponse>;
410
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantFeedbackService, never>;
411
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantFeedbackService>;
412
+ }
413
+
385
414
  declare class MaxAssistantSupportService {
386
415
  readonly tagsEndpoint = "selection/support-tags";
387
416
  readonly ticketsEndpoint = "support/tickets";
@@ -398,6 +427,8 @@ declare const ASSISTANT_UI_COPY: {
398
427
  clearTooltip: string;
399
428
  closeLabel: string;
400
429
  closeTooltip: string;
430
+ feedbackLabel: string;
431
+ feedbackTooltip: string;
401
432
  placeholder: string;
402
433
  startingMessage: string;
403
434
  errorMessage: string;
@@ -410,14 +441,25 @@ interface SupportTicketFormValue {
410
441
  severity: AssistantSupportTicketSeverity;
411
442
  tags: string[];
412
443
  }
444
+ interface FeedbackFormValue {
445
+ name: string;
446
+ email: string;
447
+ phone: string;
448
+ category: AssistantFeedbackCategory;
449
+ query: string;
450
+ assistantResponse: string;
451
+ feedback: string;
452
+ }
413
453
  declare class MaxAssistantComponent implements OnInit {
414
454
  private readonly assistantService;
455
+ private readonly feedbackService;
415
456
  private readonly supportService;
416
457
  private readonly destroyRef;
417
458
  private readonly defaultConfig;
418
459
  private messagesViewport?;
419
460
  private composerInput?;
420
461
  private supportQueryInput?;
462
+ private feedbackInput?;
421
463
  app?: AssistantProduct;
422
464
  assistantApiUrl?: string;
423
465
  user?: Partial<AssistantUser> | (() => Partial<AssistantUser>);
@@ -432,6 +474,15 @@ declare class MaxAssistantComponent implements OnInit {
432
474
  protected readonly expandedDetailMessageIds: _angular_core.WritableSignal<ReadonlySet<string>>;
433
475
  protected readonly expandedTraceStepKeys: _angular_core.WritableSignal<ReadonlySet<string>>;
434
476
  protected readonly developerDetailsEnabled: boolean;
477
+ protected readonly feedbackVisible: _angular_core.WritableSignal<boolean>;
478
+ protected readonly feedbackSubmitting: _angular_core.WritableSignal<boolean>;
479
+ protected readonly feedbackResult: _angular_core.WritableSignal<AssistantFeedbackResponse | undefined>;
480
+ protected readonly feedbackError: _angular_core.WritableSignal<string | undefined>;
481
+ protected readonly feedbackCategoryOptions: Array<{
482
+ label: string;
483
+ value: AssistantFeedbackCategory;
484
+ }>;
485
+ protected feedbackForm: FeedbackFormValue;
435
486
  protected readonly supportTicketVisible: _angular_core.WritableSignal<boolean>;
436
487
  protected readonly supportTicketSubmitting: _angular_core.WritableSignal<boolean>;
437
488
  protected readonly supportTagsLoading: _angular_core.WritableSignal<boolean>;
@@ -444,7 +495,7 @@ declare class MaxAssistantComponent implements OnInit {
444
495
  severity: AssistantSupportTagSeverity;
445
496
  }>;
446
497
  protected supportTicketForm: SupportTicketFormValue;
447
- constructor(assistantService: MaxAssistantService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
498
+ constructor(assistantService: MaxAssistantService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
448
499
  ngOnInit(): void;
449
500
  focusComposer(): void;
450
501
  protected get uiCopy(): typeof ASSISTANT_UI_COPY;
@@ -455,6 +506,11 @@ declare class MaxAssistantComponent implements OnInit {
455
506
  protected clearChatSession(): void;
456
507
  protected sendMessage(message?: string): void;
457
508
  protected suggestionLabel(suggestion: AssistantSuggestion): string;
509
+ protected hasCapabilitySuggestions(suggestions?: AssistantSuggestion[]): boolean;
510
+ protected capabilitySuggestionGroups(suggestions?: AssistantSuggestion[]): Array<{
511
+ section: string;
512
+ options: AssistantSuggestionOption[];
513
+ }>;
458
514
  protected useSuggestion(suggestion: AssistantSuggestion): void;
459
515
  protected performHostAction(action: AssistantHostAction): void;
460
516
  protected requestClose(): void;
@@ -463,6 +519,10 @@ declare class MaxAssistantComponent implements OnInit {
463
519
  protected closeSupportTicket(restoreComposerFocus?: boolean): void;
464
520
  protected canSubmitSupportTicket(): boolean;
465
521
  protected submitSupportTicket(): void;
522
+ protected openFeedback(responseMessage: AssistantMessage): void;
523
+ protected closeFeedback(restoreComposerFocus?: boolean): void;
524
+ protected canSubmitFeedback(): boolean;
525
+ protected submitFeedback(): void;
466
526
  protected searchResultIcon(type: string): string;
467
527
  protected searchActionIcon(action: AssistantSearchResult['actions'][number]): string;
468
528
  protected getTableRowActions(table: AssistantResponseTable, rowIndex: number): AssistantResponseTableAction[];
@@ -508,6 +568,8 @@ declare class MaxAssistantComponent implements OnInit {
508
568
  private getInitialMessage;
509
569
  private getConfiguredUser;
510
570
  private createSupportTicketForm;
571
+ private createFeedbackForm;
572
+ private getConversationPair;
511
573
  private getUserText;
512
574
  private createAssistantResponseMessage;
513
575
  private createMessage;
@@ -546,5 +608,5 @@ declare class MaxAgentShiftCardComponent {
546
608
  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>;
547
609
  }
548
610
 
549
- export { MAX_ASSISTANT_CONFIG, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantService, MaxAssistantSupportService };
550
- export type { AssistantApiCall, AssistantCard, AssistantChatProgress, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantConfirmation, AssistantContextResolution, AssistantConversationMessage, AssistantDeveloperTrace, AssistantDisplayResponse, AssistantExtractedIntent, AssistantFieldMap, AssistantFieldValue, AssistantHostAction, AssistantMessage, AssistantPendingAction, AssistantProduct, AssistantRequestContext, AssistantResponseTable, AssistantResponseTableAction, AssistantResponseTableColumn, AssistantRotaCalendar, AssistantSearchResult, AssistantShiftCard, AssistantShiftCardGroup, AssistantSource, AssistantStructuredAction, AssistantSuggestion, AssistantSupportTag, AssistantSupportTagSeverity, AssistantSupportTicketRequest, AssistantSupportTicketResponse, AssistantSupportTicketSeverity, AssistantToolExecution, AssistantTraceControl, AssistantTraceStep, AssistantTraceStepCategory, AssistantTraceStepMetadata, AssistantTraceStepStatus, AssistantTraceTechnology, AssistantUser, AssistantVisualisation, MaxAgentShiftCardVariant, MaxAssistantConfig };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "max-agent-ui",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },