@droz-js/sdk 0.25.5 → 0.25.7

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/src/sdks/ai.d.ts CHANGED
@@ -238,6 +238,12 @@ export declare enum AiAgentCheckRunStatus {
238
238
  Running = "running",
239
239
  Succeeded = "succeeded"
240
240
  }
241
+ export type AiAgentClassificationCount = {
242
+ count: Scalars['Number']['output'];
243
+ state: AiAgentConversationState;
244
+ subcategory?: Maybe<AiAgentConversationSubcategory>;
245
+ technicalFailure?: Maybe<AiAgentTechnicalFailure>;
246
+ };
241
247
  export type AiAgentCompetingPair = {
242
248
  left: Scalars['ID']['output'];
243
249
  right: Scalars['ID']['output'];
@@ -301,9 +307,9 @@ export type AiAgentConversationAnalysis = {
301
307
  summary?: Maybe<Scalars['String']['output']>;
302
308
  };
303
309
  export declare enum AiAgentConversationClass {
304
- NaoElegivel = "NAO_ELEGIVEL",
305
- NaoResolvida = "NAO_RESOLVIDA",
306
- Resolvida = "RESOLVIDA"
310
+ NotEligible = "NOT_ELIGIBLE",
311
+ Resolved = "RESOLVED",
312
+ Unresolved = "UNRESOLVED"
307
313
  }
308
314
  export type AiAgentConversationClassification = {
309
315
  /** Ausente enquanto a conversa esta em andamento. */
@@ -313,9 +319,22 @@ export type AiAgentConversationClassification = {
313
319
  eligibleForResolution: Scalars['Boolean']['output'];
314
320
  inactivityWindowMs: Scalars['Number']['output'];
315
321
  state: AiAgentConversationState;
322
+ status: AiAgentConversationStatus;
316
323
  subcategory?: Maybe<AiAgentConversationSubcategory>;
317
324
  technicalFailure?: Maybe<AiAgentTechnicalFailure>;
318
325
  };
326
+ export type AiAgentConversationDateRange = {
327
+ max: Scalars['Number']['output'];
328
+ min: Scalars['Number']['output'];
329
+ };
330
+ export type AiAgentConversationFacet = {
331
+ name: Scalars['String']['output'];
332
+ values: Array<AiAgentConversationFacetValue>;
333
+ };
334
+ export type AiAgentConversationFacetValue = {
335
+ count: Scalars['Number']['output'];
336
+ value: Scalars['String']['output'];
337
+ };
319
338
  export type AiAgentConversationMetrics = {
320
339
  channel?: Maybe<Scalars['String']['output']>;
321
340
  channelType?: Maybe<AiAgentChannelType>;
@@ -328,11 +347,46 @@ export type AiAgentConversationMetrics = {
328
347
  sessionId: Scalars['ID']['output'];
329
348
  startedAt: Scalars['Number']['output'];
330
349
  state: AiAgentConversationState;
331
- status?: Maybe<AiAgentConversationClass>;
350
+ status: AiAgentConversationStatus;
332
351
  subcategory?: Maybe<AiAgentConversationSubcategory>;
333
352
  totalTokens: Scalars['Number']['output'];
334
353
  turns: Scalars['Number']['output'];
335
354
  };
355
+ export type AiAgentConversationMetricsInput = {
356
+ activeDispatch?: InputMaybe<Scalars['Boolean']['input']>;
357
+ agentId: Scalars['ID']['input'];
358
+ channel?: InputMaybe<Scalars['String']['input']>;
359
+ dateFrom?: InputMaybe<Scalars['Number']['input']>;
360
+ dateTo?: InputMaybe<Scalars['Number']['input']>;
361
+ from: Scalars['Number']['input'];
362
+ hasRiskAlert?: InputMaybe<Scalars['Boolean']['input']>;
363
+ limit?: InputMaybe<Scalars['Number']['input']>;
364
+ offset?: InputMaybe<Scalars['Number']['input']>;
365
+ scoreBand?: InputMaybe<Array<AiAgentScoreBand>>;
366
+ search?: InputMaybe<Scalars['String']['input']>;
367
+ sentimentEnd?: InputMaybe<Array<AiAgentSentiment>>;
368
+ sentimentStart?: InputMaybe<Array<AiAgentSentiment>>;
369
+ sortBy?: InputMaybe<AiAgentConversationSortField>;
370
+ sortDirection?: InputMaybe<AiAgentSortDirection>;
371
+ status?: InputMaybe<Array<AiAgentConversationStatus>>;
372
+ subcategory?: InputMaybe<Array<AiAgentConversationSubcategory>>;
373
+ to: Scalars['Number']['input'];
374
+ useCaseId?: InputMaybe<Array<Scalars['ID']['input']>>;
375
+ };
376
+ export type AiAgentConversationMetricsPage = {
377
+ /** Intervalo de `lastTurnAt` do conjunto filtrado pelos outros filtros, sem `dateFrom` e `dateTo`. Ausente quando o conjunto é vazio. */
378
+ dateRange?: Maybe<AiAgentConversationDateRange>;
379
+ /** Cada faceta conta sobre o conjunto filtrado pelos outros filtros, sem o seu próprio. */
380
+ facets: Array<AiAgentConversationFacet>;
381
+ /** true quando há conversa com alerta de risco no conjunto filtrado pelos outros filtros, sem `hasRiskAlert`. Mesma base do facet `riskAlert`. */
382
+ hasRiskAlerts: Scalars['Boolean']['output'];
383
+ items: Array<AiAgentConversationMetrics>;
384
+ limit: Scalars['Number']['output'];
385
+ offset: Scalars['Number']['output'];
386
+ total: Scalars['Number']['output'];
387
+ /** true quando o teto de leitura foi atingido: a página cobre parte do período. */
388
+ truncated: Scalars['Boolean']['output'];
389
+ };
336
390
  export type AiAgentConversationOutcome = {
337
391
  actions: Array<AiAgentConversationAction>;
338
392
  agentId: Scalars['ID']['output'];
@@ -357,33 +411,158 @@ export type AiAgentConversationOutcome = {
357
411
  promisedNextStep?: Maybe<Scalars['String']['output']>;
358
412
  resolution: Scalars['String']['output'];
359
413
  resolutionDefinition: Scalars['String']['output'];
414
+ /** Fim da janela de reversão por recontato. Ausente quando a conversa não reverte. */
415
+ reversibleUntil?: Maybe<Scalars['Number']['output']>;
360
416
  sessionId: Scalars['ID']['output'];
361
417
  startedAt: Scalars['Number']['output'];
362
418
  turns: Scalars['Number']['output'];
363
419
  };
420
+ export declare enum AiAgentConversationSortField {
421
+ Date = "DATE",
422
+ Status = "STATUS",
423
+ Subcategory = "SUBCATEGORY"
424
+ }
364
425
  export declare enum AiAgentConversationState {
365
- EmAndamento = "EM_ANDAMENTO",
366
- EncerradaPorConclusao = "ENCERRADA_POR_CONCLUSAO",
367
- EncerradaPorFalhaTecnica = "ENCERRADA_POR_FALHA_TECNICA",
368
- EncerradaPorInatividade = "ENCERRADA_POR_INATIVIDADE",
369
- EncerradaPorTeto = "ENCERRADA_POR_TETO",
370
- EncerradaPorTransbordo = "ENCERRADA_POR_TRANSBORDO"
426
+ ClosedByCap = "CLOSED_BY_CAP",
427
+ ClosedByConclusion = "CLOSED_BY_CONCLUSION",
428
+ ClosedByHandoff = "CLOSED_BY_HANDOFF",
429
+ ClosedByInactivity = "CLOSED_BY_INACTIVITY",
430
+ ClosedByTechnicalFailure = "CLOSED_BY_TECHNICAL_FAILURE",
431
+ InProgress = "IN_PROGRESS"
432
+ }
433
+ export declare enum AiAgentConversationStatus {
434
+ InProgress = "IN_PROGRESS",
435
+ NotEligible = "NOT_ELIGIBLE",
436
+ Resolved = "RESOLVED",
437
+ Unresolved = "UNRESOLVED"
371
438
  }
372
439
  export declare enum AiAgentConversationSubcategory {
373
- AbandonoAposEsclarecimento = "ABANDONO_APOS_ESCLARECIMENTO",
374
- EncerradaPorTeto = "ENCERRADA_POR_TETO",
375
- FalhaTecnica = "FALHA_TECNICA",
376
- Indefinido = "INDEFINIDO",
377
- InterlocutorAutomatico = "INTERLOCUTOR_AUTOMATICO",
440
+ AbandonedAfterClarification = "ABANDONED_AFTER_CLARIFICATION",
441
+ AutomatedInterlocutor = "AUTOMATED_INTERLOCUTOR",
442
+ CapReached = "CAP_REACHED",
443
+ ConfirmedResolution = "CONFIRMED_RESOLUTION",
444
+ GreetingWithoutDemand = "GREETING_WITHOUT_DEMAND",
445
+ HandoffByCustomerNeed = "HANDOFF_BY_CUSTOMER_NEED",
446
+ HandoffByProcedure = "HANDOFF_BY_PROCEDURE",
447
+ HandoffBySelfDiagnosis = "HANDOFF_BY_SELF_DIAGNOSIS",
448
+ NoCoverage = "NO_COVERAGE",
449
+ NoKnowledge = "NO_KNOWLEDGE",
450
+ PresumedResolution = "PRESUMED_RESOLUTION",
378
451
  PromptInjection = "PROMPT_INJECTION",
379
- ResolvidaConfirmada = "RESOLVIDA_CONFIRMADA",
380
- ResolvidaPresumida = "RESOLVIDA_PRESUMIDA",
381
- SaudacaoSemDemanda = "SAUDACAO_SEM_DEMANDA",
382
- SemCobertura = "SEM_COBERTURA",
383
- SemConhecimento = "SEM_CONHECIMENTO",
384
- TransbordoPorAutodiagnostico = "TRANSBORDO_POR_AUTODIAGNOSTICO",
385
- TransbordoPorNecessidadeCliente = "TRANSBORDO_POR_NECESSIDADE_CLIENTE",
386
- TransbordoPorProcedimento = "TRANSBORDO_POR_PROCEDIMENTO"
452
+ TechnicalFailure = "TECHNICAL_FAILURE",
453
+ Undefined = "UNDEFINED"
454
+ }
455
+ export type AiAgentDashboard = {
456
+ abandonment: AiAgentDashboardIndicator;
457
+ /** Absent when no dispatch was sent in the window. Absent is not zero. */
458
+ activeDispatches?: Maybe<AiAgentDashboardActiveDispatches>;
459
+ agentId: Scalars['ID']['output'];
460
+ /** Absent when no conversation was analyzed in the window. Absent is not zero. */
461
+ agentScoreAvg?: Maybe<Scalars['Float']['output']>;
462
+ agentScoreAvgBand?: Maybe<AiAgentScoreBand>;
463
+ analysesTruncated: Scalars['Boolean']['output'];
464
+ analyzedConversations: Scalars['Number']['output'];
465
+ bucket: AiAgentMetricsBucket;
466
+ contactReasons: AiAgentDashboardContactReasons;
467
+ conversations: AiAgentDashboardIndicator;
468
+ handoffNeed: AiAgentDashboardIndicator;
469
+ handoffProcedure: AiAgentDashboardIndicator;
470
+ /** Do agente, não da janela. Vira true na primeira conversa aberta pela resposta a um disparo ativo. */
471
+ hasActiveDispatches: Scalars['Boolean']['output'];
472
+ knowledgeGaps: Array<AiAgentDashboardKnowledgeGap>;
473
+ previousWindow: AiAgentDashboardWindow;
474
+ procedures: Array<AiAgentDashboardProcedure>;
475
+ resolved: AiAgentDashboardIndicator;
476
+ scoreBands: Array<AiAgentDashboardScoreBand>;
477
+ sentimentAtEnd: Array<AiAgentDashboardSentiment>;
478
+ sentimentAtStart: Array<AiAgentDashboardSentiment>;
479
+ series: Array<AiAgentDashboardSeriesPoint>;
480
+ timezone: Scalars['String']['output'];
481
+ /** true when the read cap was reached in any window: the numbers cover part of the period. */
482
+ truncated: Scalars['Boolean']['output'];
483
+ unresolved: AiAgentDashboardIndicator;
484
+ window: AiAgentDashboardWindow;
485
+ };
486
+ /** `answered` and `unanswered` are the share of the dispatches whose window is closed, one decimal. Absent while none is closed. */
487
+ export type AiAgentDashboardActiveDispatches = {
488
+ answered: AiAgentDashboardIndicator;
489
+ sent: AiAgentDashboardIndicator;
490
+ unanswered: AiAgentDashboardIndicator;
491
+ };
492
+ /** Sorted by count, highest first. */
493
+ export type AiAgentDashboardContactReason = {
494
+ count: Scalars['Number']['output'];
495
+ key: Scalars['String']['output'];
496
+ percent: Scalars['Float']['output'];
497
+ };
498
+ export type AiAgentDashboardContactReasons = {
499
+ abandonment: Array<AiAgentDashboardContactReason>;
500
+ all: Array<AiAgentDashboardContactReason>;
501
+ handoff: Array<AiAgentDashboardContactReason>;
502
+ };
503
+ /** `value` is absent when the window has no data. */
504
+ export type AiAgentDashboardIndicator = {
505
+ polarity: AiAgentMetricPolarity;
506
+ value?: Maybe<Scalars['Float']['output']>;
507
+ variation: AiAgentVariation;
508
+ };
509
+ export type AiAgentDashboardInput = {
510
+ agentId: Scalars['ID']['input'];
511
+ channel?: InputMaybe<Scalars['String']['input']>;
512
+ from: Scalars['Number']['input'];
513
+ timezone: Scalars['String']['input'];
514
+ to: Scalars['Number']['input'];
515
+ };
516
+ /** Counted once per conversation. `level` is over the conversations that consulted the knowledge base. */
517
+ export type AiAgentDashboardKnowledgeGap = {
518
+ count: Scalars['Number']['output'];
519
+ key: Scalars['String']['output'];
520
+ level: AiAgentFrequencyLevel;
521
+ };
522
+ /** The procedure of the use case assigned to each conversation. `level` is over all conversations of the window. */
523
+ export type AiAgentDashboardProcedure = {
524
+ count: Scalars['Number']['output'];
525
+ key: Scalars['ID']['output'];
526
+ level: AiAgentFrequencyLevel;
527
+ name: Scalars['String']['output'];
528
+ };
529
+ /** `percent` is the share of the band in the window total, with one decimal. Absent when the total is zero. */
530
+ export type AiAgentDashboardScoreBand = {
531
+ band: AiAgentScoreBand;
532
+ count: Scalars['Number']['output'];
533
+ percent?: Maybe<Scalars['Float']['output']>;
534
+ polarity: AiAgentMetricPolarity;
535
+ variation: AiAgentVariation;
536
+ };
537
+ export type AiAgentDashboardSentiment = {
538
+ count: Scalars['Number']['output'];
539
+ percent?: Maybe<Scalars['Float']['output']>;
540
+ polarity: AiAgentMetricPolarity;
541
+ sentiment: AiAgentSentiment;
542
+ variation: AiAgentVariation;
543
+ };
544
+ /** `date` and `endDate` are local dates (YYYY-MM-DD) of the first and last day of the bucket, inside the window. */
545
+ export type AiAgentDashboardSeriesPoint = {
546
+ abandonmentRate?: Maybe<Scalars['Number']['output']>;
547
+ conversations: Scalars['Number']['output'];
548
+ conversationsAbandoned: Scalars['Number']['output'];
549
+ conversationsEligible: Scalars['Number']['output'];
550
+ conversationsHandoffNeed: Scalars['Number']['output'];
551
+ conversationsResolved: Scalars['Number']['output'];
552
+ conversationsUnresolved: Scalars['Number']['output'];
553
+ date: Scalars['String']['output'];
554
+ endDate: Scalars['String']['output'];
555
+ handoffNeedRate?: Maybe<Scalars['Number']['output']>;
556
+ resolvedRate?: Maybe<Scalars['Number']['output']>;
557
+ unresolvedRate?: Maybe<Scalars['Number']['output']>;
558
+ };
559
+ export type AiAgentDashboardWindow = {
560
+ from: Scalars['Number']['output'];
561
+ to: Scalars['Number']['output'];
562
+ };
563
+ export declare enum AiAgentExecutionAutonomy {
564
+ Autonomous = "autonomous",
565
+ NeedsApproval = "needsApproval"
387
566
  }
388
567
  /** Selo de frequência de um item das listas do dashboard: Muito frequente, Frequente ou Pouco frequente. */
389
568
  export declare enum AiAgentFrequencyLevel {
@@ -446,6 +625,11 @@ export type AiAgentKnowledgeBase = {
446
625
  isPublic: Scalars['Boolean']['output'];
447
626
  title: Scalars['String']['output'];
448
627
  };
628
+ export declare enum AiAgentMetricPolarity {
629
+ HigherIsBetter = "HIGHER_IS_BETTER",
630
+ HigherIsWorse = "HIGHER_IS_WORSE",
631
+ Neutral = "NEUTRAL"
632
+ }
449
633
  export type AiAgentMetrics = {
450
634
  /** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
451
635
  abandonmentRate?: Maybe<Scalars['Number']['output']>;
@@ -477,9 +661,11 @@ export type AiAgentMetrics = {
477
661
  cachedInputTokens: Scalars['Number']['output'];
478
662
  /** Turnos respondidos pelo cache, sem chamada ao modelo. E o ganho da otimizacao de §4.9. */
479
663
  cachedTurns: Scalars['Number']['output'];
664
+ classificationBreakdown: Array<AiAgentClassificationCount>;
480
665
  classificationDefinitionVersion: Scalars['String']['output'];
481
666
  contactReasons: AiAgentContactReasons;
482
667
  conversations: Scalars['Number']['output'];
668
+ /** @deprecated A chave junta subcategoria e falha tecnica numa string. Use classificationBreakdown. */
483
669
  conversationsByClassification: Array<AiAgentMetricsCount>;
484
670
  conversationsEligible: Scalars['Number']['output'];
485
671
  /**
@@ -586,6 +772,10 @@ export type AiAgentMetrics = {
586
772
  /** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
587
773
  unresolvedRate?: Maybe<Scalars['Number']['output']>;
588
774
  };
775
+ export declare enum AiAgentMetricsBucket {
776
+ Day = "DAY",
777
+ Week = "WEEK"
778
+ }
589
779
  export type AiAgentMetricsCount = {
590
780
  count: Scalars['Number']['output'];
591
781
  key: Scalars['String']['output'];
@@ -596,6 +786,34 @@ export type AiAgentMetricsInput = {
596
786
  from: Scalars['Number']['input'];
597
787
  to: Scalars['Number']['input'];
598
788
  };
789
+ export type AiAgentMetricsSeries = {
790
+ points: Array<AiAgentMetricsSeriesPoint>;
791
+ /** true quando o teto de leitura foi atingido: a série cobre parte do período. */
792
+ truncated: Scalars['Boolean']['output'];
793
+ };
794
+ /** IANA name of the viewer time zone, e.g. America/Sao_Paulo. A week starts on Monday. */
795
+ export type AiAgentMetricsSeriesInput = {
796
+ agentId: Scalars['ID']['input'];
797
+ bucket: AiAgentMetricsBucket;
798
+ channel?: InputMaybe<Scalars['String']['input']>;
799
+ from: Scalars['Number']['input'];
800
+ timezone: Scalars['String']['input'];
801
+ to: Scalars['Number']['input'];
802
+ };
803
+ export type AiAgentMetricsSeriesPoint = {
804
+ abandonmentRate?: Maybe<Scalars['Number']['output']>;
805
+ conversations: Scalars['Number']['output'];
806
+ conversationsAbandoned: Scalars['Number']['output'];
807
+ conversationsEligible: Scalars['Number']['output'];
808
+ conversationsHandoffNeed: Scalars['Number']['output'];
809
+ conversationsResolved: Scalars['Number']['output'];
810
+ conversationsUnresolved: Scalars['Number']['output'];
811
+ /** Local date (YYYY-MM-DD) of the first day of the bucket. */
812
+ date: Scalars['String']['output'];
813
+ handoffNeedRate?: Maybe<Scalars['Number']['output']>;
814
+ resolvedRate?: Maybe<Scalars['Number']['output']>;
815
+ unresolvedRate?: Maybe<Scalars['Number']['output']>;
816
+ };
599
817
  /** A mesma janela, sem agente: a listagem quer todos de uma vez. */
600
818
  export type AiAgentMetricsWindowInput = {
601
819
  channel?: InputMaybe<Scalars['String']['input']>;
@@ -608,8 +826,7 @@ export type AiAgentProcedure = {
608
826
  continuesAfterApproval: Scalars['Boolean']['output'];
609
827
  deniedReplyTemplate?: Maybe<Scalars['String']['output']>;
610
828
  endsConversationAfterInforming: Scalars['Boolean']['output'];
611
- /** `autonomous` ou `needsApproval`. Ferramenta irreversivel exige `needsApproval`. */
612
- executionAutonomy: Scalars['String']['output'];
829
+ executionAutonomy: AiAgentExecutionAutonomy;
613
830
  expiredReplyTemplate?: Maybe<Scalars['String']['output']>;
614
831
  /** As etapas como o autor instruiria uma pessoa. O texto e a fonte da verdade (§6.2). */
615
832
  guidanceSteps: Array<Scalars['String']['output']>;
@@ -648,8 +865,8 @@ export type AiAgentRetentionPolicyInput = {
648
865
  masksPersonalData: Scalars['Boolean']['input'];
649
866
  };
650
867
  export declare enum AiAgentRiskAlert {
651
- Cancelamento = "cancelamento",
652
- Justica = "justica",
868
+ Cancellation = "cancellation",
869
+ LegalAction = "legal_action",
653
870
  Procon = "procon",
654
871
  ReclameAqui = "reclame_aqui"
655
872
  }
@@ -727,24 +944,28 @@ export type AiAgentScenarioTurn = {
727
944
  turn: Scalars['Int']['output'];
728
945
  };
729
946
  export declare enum AiAgentScoreBand {
730
- Bom = "bom",
731
- Excelente = "excelente",
732
- Regular = "regular",
733
- Ruim = "ruim"
947
+ Excellent = "excellent",
948
+ Good = "good",
949
+ Poor = "poor",
950
+ Regular = "regular"
734
951
  }
735
952
  export type AiAgentScoreBandCount = {
736
953
  count: Scalars['Number']['output'];
737
954
  key: AiAgentScoreBand;
738
955
  };
739
956
  export declare enum AiAgentSentiment {
740
- Negativo = "negativo",
741
- Neutro = "neutro",
742
- Positivo = "positivo"
957
+ Negative = "negative",
958
+ Neutral = "neutral",
959
+ Positive = "positive"
743
960
  }
744
961
  export type AiAgentSentimentCount = {
745
962
  count: Scalars['Number']['output'];
746
963
  key: AiAgentSentiment;
747
964
  };
965
+ export declare enum AiAgentSortDirection {
966
+ Asc = "ASC",
967
+ Desc = "DESC"
968
+ }
748
969
  export type AiAgentSpec = {
749
970
  /** @deprecated Ignorado. O tipo da ferramenta sai do método do conector. O campo sai na próxima versão. */
750
971
  allowWriteTools?: Maybe<Scalars['Boolean']['output']>;
@@ -806,10 +1027,10 @@ export type AiAgentSummary = {
806
1027
  updatedAt: Scalars['Number']['output'];
807
1028
  };
808
1029
  export declare enum AiAgentTechnicalFailure {
809
- Erro_5Xx = "ERRO_5XX",
810
- FerramentaIndisponivel = "FERRAMENTA_INDISPONIVEL",
811
- LimiteOperacional = "LIMITE_OPERACIONAL",
812
- Timeout = "TIMEOUT"
1030
+ Error_5Xx = "ERROR_5XX",
1031
+ OperationalLimit = "OPERATIONAL_LIMIT",
1032
+ Timeout = "TIMEOUT",
1033
+ ToolUnavailable = "TOOL_UNAVAILABLE"
813
1034
  }
814
1035
  export type AiAgentTool = {
815
1036
  /** `pre_approved` (padrao) ou `human_approval`. */
@@ -887,7 +1108,7 @@ export type AiAgentTrace = {
887
1108
  outcome: Scalars['String']['output'];
888
1109
  promptBuilderVersion: Scalars['Int']['output'];
889
1110
  /** Identifica o prompt que gerou este turno sem guardar o prompt inteiro. */
890
- promptFingerprint: Scalars['String']['output'];
1111
+ promptFingerprint?: Maybe<Scalars['String']['output']>;
891
1112
  sessionId: Scalars['ID']['output'];
892
1113
  startedAt: Scalars['Float']['output'];
893
1114
  steps: Scalars['Int']['output'];
@@ -933,6 +1154,15 @@ export type AiAgentUseCaseOverlap = {
933
1154
  /** O limiar aplicado, publicado junto do resultado para o aviso nao ser lido como cada um quiser. */
934
1155
  threshold: Scalars['Number']['output'];
935
1156
  };
1157
+ /** `value` is absent when there is no base to compare: no previous data, or a previous count of zero for PERCENT. */
1158
+ export type AiAgentVariation = {
1159
+ unit: AiAgentVariationUnit;
1160
+ value?: Maybe<Scalars['Number']['output']>;
1161
+ };
1162
+ export declare enum AiAgentVariationUnit {
1163
+ Percent = "PERCENT",
1164
+ Points = "POINTS"
1165
+ }
936
1166
  export type AiAgentVersion = {
937
1167
  agentId: Scalars['ID']['output'];
938
1168
  createdAt: Scalars['DateTime']['output'];
@@ -1180,8 +1410,9 @@ export type QnAInstance = {
1180
1410
  export type Query = {
1181
1411
  /** O que a suíte deste agente aceita hoje. O teto por cenário já vem dividido pelos cenários dele. */
1182
1412
  aiAgentCheckLimits: AiAgentCheckLimits;
1183
- aiAgentConversationMetrics: Array<AiAgentConversationMetrics>;
1413
+ aiAgentConversationMetrics: AiAgentConversationMetricsPage;
1184
1414
  aiAgentConversationOutcome?: Maybe<AiAgentConversationOutcome>;
1415
+ aiAgentDashboard: AiAgentDashboard;
1185
1416
  /**
1186
1417
  * §4.8: as bases do Droz Base do tenant. A chamada e entre services, com App Token — nao ha
1187
1418
  * credencial de cliente. O recorte do agente e a selecao do autor em `knowledgeBaseIds`.
@@ -1190,6 +1421,7 @@ export type Query = {
1190
1421
  aiAgentMetrics: AiAgentMetrics;
1191
1422
  /** As metricas da janela para todos os agentes, numa ida so. Agente sem rastro vem com zeros. */
1192
1423
  aiAgentMetricsByAgent: Array<AiAgentMetrics>;
1424
+ aiAgentMetricsSeries: AiAgentMetricsSeries;
1193
1425
  /**
1194
1426
  * A politica de retencao em vigor para o tenant, com os padroes aplicados quando ele nao
1195
1427
  * configurou a propria. Existe para a politica ser verificavel de fora, nao so estar escrita.
@@ -1236,17 +1468,23 @@ export type QueryAiAgentCheckLimitsArgs = {
1236
1468
  agentId: Scalars['ID']['input'];
1237
1469
  };
1238
1470
  export type QueryAiAgentConversationMetricsArgs = {
1239
- input: AiAgentMetricsInput;
1471
+ input: AiAgentConversationMetricsInput;
1240
1472
  };
1241
1473
  export type QueryAiAgentConversationOutcomeArgs = {
1242
1474
  sessionId: Scalars['ID']['input'];
1243
1475
  };
1476
+ export type QueryAiAgentDashboardArgs = {
1477
+ input: AiAgentDashboardInput;
1478
+ };
1244
1479
  export type QueryAiAgentMetricsArgs = {
1245
1480
  input: AiAgentMetricsInput;
1246
1481
  };
1247
1482
  export type QueryAiAgentMetricsByAgentArgs = {
1248
1483
  input: AiAgentMetricsWindowInput;
1249
1484
  };
1485
+ export type QueryAiAgentMetricsSeriesArgs = {
1486
+ input: AiAgentMetricsSeriesInput;
1487
+ };
1250
1488
  export type QueryAiAgentRoutingPreviewArgs = {
1251
1489
  input: AiAgentRoutingPreviewInput;
1252
1490
  };
@@ -1328,7 +1566,7 @@ export type SaveAiAgentProcedureInput = {
1328
1566
  continuesAfterApproval?: InputMaybe<Scalars['Boolean']['input']>;
1329
1567
  deniedReplyTemplate?: InputMaybe<Scalars['String']['input']>;
1330
1568
  endsConversationAfterInforming?: InputMaybe<Scalars['Boolean']['input']>;
1331
- executionAutonomy: Scalars['String']['input'];
1569
+ executionAutonomy: AiAgentExecutionAutonomy;
1332
1570
  expiredReplyTemplate?: InputMaybe<Scalars['String']['input']>;
1333
1571
  guidanceSteps: Array<Scalars['String']['input']>;
1334
1572
  id: Scalars['ID']['input'];
@@ -1440,10 +1678,10 @@ export type TokenUsage = {
1440
1678
  };
1441
1679
  export declare enum TonePreset {
1442
1680
  Cordial = "cordial",
1443
- Descontraido = "descontraido",
1444
- Direto = "direto",
1681
+ Direct = "direct",
1445
1682
  Formal = "formal",
1446
- Tecnico = "tecnico"
1683
+ Relaxed = "relaxed",
1684
+ Technical = "technical"
1447
1685
  }
1448
1686
  export declare enum ToolAvailability {
1449
1687
  Available = "available",
@@ -1467,6 +1705,8 @@ export declare enum Typenames {
1467
1705
  AiAgentConversation = "AiAgentConversation",
1468
1706
  AiAgentConversationAnalysis = "AiAgentConversationAnalysis",
1469
1707
  AiAgentConversationPointer = "AiAgentConversationPointer",
1708
+ AiAgentConversationStarted = "AiAgentConversationStarted",
1709
+ AiAgentDispatchingAgent = "AiAgentDispatchingAgent",
1470
1710
  AiAgentEvalReport = "AiAgentEvalReport",
1471
1711
  AiAgentExternalTermination = "AiAgentExternalTermination",
1472
1712
  AiAgentOpenConversation = "AiAgentOpenConversation",
@@ -1635,17 +1875,71 @@ export type AiAgentRetentionPolicyQuery = {
1635
1875
  });
1636
1876
  };
1637
1877
  export type AiAgentConversationMetricsQueryVariables = Exact<{
1638
- input: AiAgentMetricsInput;
1878
+ input: AiAgentConversationMetricsInput;
1639
1879
  }>;
1640
1880
  export type AiAgentConversationMetricsQuery = {
1641
- aiAgentConversationMetrics: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
1881
+ aiAgentConversationMetrics: (Pick<AiAgentConversationMetricsPage, 'total' | 'limit' | 'offset' | 'hasRiskAlerts' | 'truncated'> & {
1882
+ items: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
1883
+ facets: Array<(Pick<AiAgentConversationFacet, 'name'> & {
1884
+ values: Array<Pick<AiAgentConversationFacetValue, 'value' | 'count'>>;
1885
+ })>;
1886
+ dateRange?: Maybe<Pick<AiAgentConversationDateRange, 'min' | 'max'>>;
1887
+ });
1888
+ };
1889
+ export type AiAgentMetricsSeriesQueryVariables = Exact<{
1890
+ input: AiAgentMetricsSeriesInput;
1891
+ }>;
1892
+ export type AiAgentMetricsSeriesQuery = {
1893
+ aiAgentMetricsSeries: (Pick<AiAgentMetricsSeries, 'truncated'> & {
1894
+ points: Array<Pick<AiAgentMetricsSeriesPoint, 'date' | 'conversations' | 'conversationsEligible' | 'conversationsResolved' | 'conversationsUnresolved' | 'conversationsHandoffNeed' | 'conversationsAbandoned' | 'resolvedRate' | 'unresolvedRate' | 'handoffNeedRate' | 'abandonmentRate'>>;
1895
+ });
1642
1896
  };
1897
+ export type AiAgentDashboardQueryVariables = Exact<{
1898
+ input: AiAgentDashboardInput;
1899
+ }>;
1900
+ export type AiAgentDashboardQuery = {
1901
+ aiAgentDashboard: (Pick<AiAgentDashboard, 'agentId' | 'timezone' | 'bucket' | 'agentScoreAvg' | 'agentScoreAvgBand' | 'analyzedConversations' | 'hasActiveDispatches' | 'truncated' | 'analysesTruncated'> & {
1902
+ window: Pick<AiAgentDashboardWindow, 'from' | 'to'>;
1903
+ previousWindow: Pick<AiAgentDashboardWindow, 'from' | 'to'>;
1904
+ conversations: AiAgentDashboardIndicatorFragment;
1905
+ resolved: AiAgentDashboardIndicatorFragment;
1906
+ unresolved: AiAgentDashboardIndicatorFragment;
1907
+ handoffProcedure: AiAgentDashboardIndicatorFragment;
1908
+ handoffNeed: AiAgentDashboardIndicatorFragment;
1909
+ abandonment: AiAgentDashboardIndicatorFragment;
1910
+ scoreBands: Array<(Pick<AiAgentDashboardScoreBand, 'band' | 'count' | 'percent' | 'polarity'> & {
1911
+ variation: Pick<AiAgentVariation, 'unit' | 'value'>;
1912
+ })>;
1913
+ activeDispatches?: Maybe<{
1914
+ sent: AiAgentDashboardIndicatorFragment;
1915
+ answered: AiAgentDashboardIndicatorFragment;
1916
+ unanswered: AiAgentDashboardIndicatorFragment;
1917
+ }>;
1918
+ sentimentAtStart: Array<AiAgentDashboardSentimentFragment>;
1919
+ sentimentAtEnd: Array<AiAgentDashboardSentimentFragment>;
1920
+ contactReasons: {
1921
+ all: Array<AiAgentDashboardContactReasonFragment>;
1922
+ handoff: Array<AiAgentDashboardContactReasonFragment>;
1923
+ abandonment: Array<AiAgentDashboardContactReasonFragment>;
1924
+ };
1925
+ procedures: Array<Pick<AiAgentDashboardProcedure, 'key' | 'name' | 'count' | 'level'>>;
1926
+ knowledgeGaps: Array<Pick<AiAgentDashboardKnowledgeGap, 'key' | 'count' | 'level'>>;
1927
+ series: Array<Pick<AiAgentDashboardSeriesPoint, 'date' | 'endDate' | 'conversations' | 'conversationsEligible' | 'conversationsResolved' | 'conversationsUnresolved' | 'conversationsHandoffNeed' | 'conversationsAbandoned' | 'resolvedRate' | 'unresolvedRate' | 'handoffNeedRate' | 'abandonmentRate'>>;
1928
+ });
1929
+ };
1930
+ export type AiAgentDashboardIndicatorFragment = (Pick<AiAgentDashboardIndicator, 'value' | 'polarity'> & {
1931
+ variation: Pick<AiAgentVariation, 'unit' | 'value'>;
1932
+ });
1933
+ export type AiAgentDashboardSentimentFragment = (Pick<AiAgentDashboardSentiment, 'sentiment' | 'count' | 'percent' | 'polarity'> & {
1934
+ variation: Pick<AiAgentVariation, 'unit' | 'value'>;
1935
+ });
1936
+ export type AiAgentDashboardContactReasonFragment = Pick<AiAgentDashboardContactReason, 'key' | 'count' | 'percent'>;
1643
1937
  export type AiAgentConversationOutcomeQueryVariables = Exact<{
1644
1938
  sessionId: Scalars['ID']['input'];
1645
1939
  }>;
1646
1940
  export type AiAgentConversationOutcomeQuery = {
1647
- aiAgentConversationOutcome?: Maybe<(Pick<AiAgentConversationOutcome, 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason' | 'handoffReason' | 'agentSummary' | 'promisedNextStep' | 'channelType'> & {
1648
- classification: Pick<AiAgentConversationClassification, 'state' | 'classification' | 'subcategory' | 'technicalFailure' | 'eligibleForResolution' | 'consumesAllowance' | 'inactivityWindowMs' | 'definitionVersion'>;
1941
+ aiAgentConversationOutcome?: Maybe<(Pick<AiAgentConversationOutcome, 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason' | 'handoffReason' | 'agentSummary' | 'promisedNextStep' | 'channelType' | 'reversibleUntil'> & {
1942
+ classification: Pick<AiAgentConversationClassification, 'state' | 'status' | 'classification' | 'subcategory' | 'technicalFailure' | 'eligibleForResolution' | 'consumesAllowance' | 'inactivityWindowMs' | 'definitionVersion'>;
1649
1943
  actions: Array<Pick<AiAgentConversationAction, 'toolId' | 'name' | 'ok' | 'result' | 'at'>>;
1650
1944
  contactReason?: Maybe<Pick<AiAgentContactReason, 'name' | 'useCaseId' | 'tag' | 'other' | 'source'>>;
1651
1945
  analysis?: Maybe<Pick<AiAgentConversationAnalysis, 'analysisVersion' | 'failed' | 'failureReason' | 'sentimentStart' | 'sentimentEnd' | 'estimatedSatisfaction' | 'riskAlerts' | 'knowledgeGaps' | 'repeatedInformation' | 'humanRequests' | 'contactReason' | 'contactReasonId' | 'contactReasonTag' | 'contactReasonOther' | 'contactReasonSource' | 'summary' | 'agentScore' | 'agentScoreBand' | 'agentClarity' | 'customerEffortScore' | 'model' | 'costMicroUsd' | 'analyzedAt'>>;
@@ -1741,6 +2035,7 @@ export type AiAgentCheckLimitsQuery = {
1741
2035
  };
1742
2036
  export type AiAgentMetricsReportFragment = (Pick<AiAgentMetrics, 'agentId' | 'from' | 'to' | 'truncated' | 'conversations' | 'conversationsResolved' | 'conversationsInconclusive' | 'conversationsHandoffRequested' | 'resolutionRate' | 'resolutionDefinition' | 'conversationsEligible' | 'conversationsResolvedByDefinition' | 'resolvedRate' | 'unresolvedRate' | 'handoffProcedureRate' | 'handoffNeedRate' | 'abandonmentRate' | 'classificationDefinitionVersion' | 'analyzedConversations' | 'estimatedSatisfactionAvg' | 'analysisCostMicroUsd' | 'failedAnalyses' | 'analysesTruncated' | 'agentScoreAvg' | 'agentScoreAvgBand' | 'agentClarityAvg' | 'customerEffortScoreAvg' | 'escalatedToHuman' | 'escalatedToFlow' | 'escalatedTargetUndeclared' | 'humanRequestedTurns' | 'costMicroUsd' | 'costMicroUsdPerResolvedConversation' | 'unpricedTurns' | 'inputTokens' | 'outputTokens' | 'totalTokens' | 'cachedInputTokens' | 'cachedTurns' | 'llmCalls' | 'avgTurnDurationMs' | 'p95TurnDurationMs' | 'avgLlmLatencyMs' | 'turns' | 'answeredTurns' | 'answeredWithFailedConnectionTurns' | 'unansweredTurns' | 'unansweredDefinition' | 'blockedTurns' | 'haltedTurns' | 'budgetExceededTurns' | 'identificationRequiredTurns' | 'toolCalls' | 'toolCallsFailed' | 'knowledgeRetrieved' | 'knowledgeEmpty' | 'knowledgeUnavailable' | 'knowledgeSkipped'> & {
1743
2037
  conversationsByClassification: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
2038
+ classificationBreakdown: Array<Pick<AiAgentClassificationCount, 'state' | 'subcategory' | 'technicalFailure' | 'count'>>;
1744
2039
  sentimentAtStart: Array<Pick<AiAgentSentimentCount, 'key' | 'count'>>;
1745
2040
  sentimentAtEnd: Array<Pick<AiAgentSentimentCount, 'key' | 'count'>>;
1746
2041
  riskAlerts: Array<Pick<AiAgentRiskAlertCount, 'key' | 'count'>>;
@@ -1886,9 +2181,12 @@ export declare const AiAgentProcedureFragmentDoc = "\n fragment aiAgentProced
1886
2181
  export declare const AiAgentToolFragmentDoc = "\n fragment aiAgentTool on AiAgentTool {\n toolId\n name\n description\n effect\n availability\n requiresAuthenticatedCustomer\n onFailure\n customerScope\n returns\n approval\n parameters {\n name\n type\n required\n description\n grounding\n }\n}\n ";
1887
2182
  export declare const AiAgentTraceFragmentDoc = "\n fragment aiAgentTrace on AiAgentTrace {\n sessionId\n turn\n agentId\n agentVersion\n input\n promptBuilderVersion\n masterRuleVersion\n identificationRequired\n promptFingerprint\n knowledgeOrigins\n outcome\n haltReason\n steps\n answer\n startedAt\n excludedTools {\n ...aiAgentToolExclusion\n }\n toolCalls {\n toolId\n name\n result\n ok\n connection\n errorClass\n }\n}\n ";
1888
2183
  export declare const AiAgentScenarioFragmentDoc = "\n fragment aiAgentScenario on AiAgentScenario {\n scenarioId\n description\n customerId\n turns\n expectations\n}\n ";
2184
+ export declare const AiAgentDashboardIndicatorFragmentDoc = "\n fragment aiAgentDashboardIndicator on AiAgentDashboardIndicator {\n value\n polarity\n variation {\n unit\n value\n }\n}\n ";
2185
+ export declare const AiAgentDashboardSentimentFragmentDoc = "\n fragment aiAgentDashboardSentiment on AiAgentDashboardSentiment {\n sentiment\n count\n percent\n polarity\n variation {\n unit\n value\n }\n}\n ";
2186
+ export declare const AiAgentDashboardContactReasonFragmentDoc = "\n fragment aiAgentDashboardContactReason on AiAgentDashboardContactReason {\n key\n count\n percent\n}\n ";
1889
2187
  export declare const AiAgentApprovalFragmentDoc = "\n fragment aiAgentApproval on AiAgentApproval {\n agentId\n sessionId\n toolId\n toolName\n args\n channelId\n customerId\n requestedAt\n expiresAt\n status\n decidedBy\n decidedAt\n}\n ";
1890
2188
  export declare const AiAgentCheckRunFragmentDoc = "\n fragment aiAgentCheckRun on AiAgentCheckRun {\n runId\n agentId\n version\n status\n requestedAt\n startedAt\n finishedAt\n totalRuns\n completedRuns\n error\n excludedTools {\n ...aiAgentToolExclusion\n }\n result {\n safeToPublish\n reports {\n scenarioId\n runs\n cut\n measured\n passed\n rate\n handoffReasons {\n key\n count\n }\n turns {\n turn\n runs\n answered\n grounded\n blocked\n identificationRequired\n toolNames {\n key\n count\n }\n blockCategories {\n key\n count\n }\n }\n }\n regressions {\n scenarioId\n before\n after\n }\n }\n}\n ";
1891
- export declare const AiAgentMetricsReportFragmentDoc = "\n fragment aiAgentMetricsReport on AiAgentMetrics {\n agentId\n from\n to\n truncated\n conversations\n conversationsResolved\n conversationsInconclusive\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n conversationsByClassification {\n key\n count\n }\n conversationsEligible\n conversationsResolvedByDefinition\n resolvedRate\n unresolvedRate\n handoffProcedureRate\n handoffNeedRate\n abandonmentRate\n classificationDefinitionVersion\n analyzedConversations\n estimatedSatisfactionAvg\n sentimentAtStart {\n key\n count\n }\n sentimentAtEnd {\n key\n count\n }\n riskAlerts {\n key\n count\n }\n topKnowledgeGaps {\n key\n count\n }\n analysisCostMicroUsd\n failedAnalyses\n analysesTruncated\n agentScoreAvg\n agentScoreAvgBand\n agentScoreBands {\n key\n count\n }\n agentClarityAvg\n customerEffortScoreAvg\n contactReasons {\n all {\n key\n count\n }\n handoff {\n key\n count\n }\n abandonment {\n key\n count\n }\n }\n escalatedToHuman\n escalatedToFlow\n escalatedTargetUndeclared\n handoffsByReason {\n key\n count\n }\n humanRequestedTurns\n costMicroUsd\n costMicroUsdPerResolvedConversation\n unpricedTurns\n inputTokens\n outputTokens\n totalTokens\n cachedInputTokens\n cachedTurns\n llmCalls\n turnsByModel {\n key\n count\n }\n avgTurnDurationMs\n p95TurnDurationMs\n avgLlmLatencyMs\n turns\n answeredTurns\n answeredWithFailedConnectionTurns\n unansweredTurns\n unansweredDefinition\n topTopics {\n key\n count\n }\n topUnansweredQuestions {\n key\n count\n }\n blockedTurns\n blocksByCategory {\n key\n count\n }\n haltedTurns\n haltReasons {\n key\n count\n }\n budgetExceededTurns\n identificationRequiredTurns\n toolCalls\n toolCallsFailed\n toolErrorsByConnection {\n key\n count\n }\n toolErrorsByClass {\n key\n count\n }\n knowledgeRetrieved\n knowledgeEmpty\n knowledgeUnavailable\n knowledgeSkipped\n}\n ";
2189
+ export declare const AiAgentMetricsReportFragmentDoc = "\n fragment aiAgentMetricsReport on AiAgentMetrics {\n agentId\n from\n to\n truncated\n conversations\n conversationsResolved\n conversationsInconclusive\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n conversationsByClassification {\n key\n count\n }\n classificationBreakdown {\n state\n subcategory\n technicalFailure\n count\n }\n conversationsEligible\n conversationsResolvedByDefinition\n resolvedRate\n unresolvedRate\n handoffProcedureRate\n handoffNeedRate\n abandonmentRate\n classificationDefinitionVersion\n analyzedConversations\n estimatedSatisfactionAvg\n sentimentAtStart {\n key\n count\n }\n sentimentAtEnd {\n key\n count\n }\n riskAlerts {\n key\n count\n }\n topKnowledgeGaps {\n key\n count\n }\n analysisCostMicroUsd\n failedAnalyses\n analysesTruncated\n agentScoreAvg\n agentScoreAvgBand\n agentScoreBands {\n key\n count\n }\n agentClarityAvg\n customerEffortScoreAvg\n contactReasons {\n all {\n key\n count\n }\n handoff {\n key\n count\n }\n abandonment {\n key\n count\n }\n }\n escalatedToHuman\n escalatedToFlow\n escalatedTargetUndeclared\n handoffsByReason {\n key\n count\n }\n humanRequestedTurns\n costMicroUsd\n costMicroUsdPerResolvedConversation\n unpricedTurns\n inputTokens\n outputTokens\n totalTokens\n cachedInputTokens\n cachedTurns\n llmCalls\n turnsByModel {\n key\n count\n }\n avgTurnDurationMs\n p95TurnDurationMs\n avgLlmLatencyMs\n turns\n answeredTurns\n answeredWithFailedConnectionTurns\n unansweredTurns\n unansweredDefinition\n topTopics {\n key\n count\n }\n topUnansweredQuestions {\n key\n count\n }\n blockedTurns\n blocksByCategory {\n key\n count\n }\n haltedTurns\n haltReasons {\n key\n count\n }\n budgetExceededTurns\n identificationRequiredTurns\n toolCalls\n toolCallsFailed\n toolErrorsByConnection {\n key\n count\n }\n toolErrorsByClass {\n key\n count\n }\n knowledgeRetrieved\n knowledgeEmpty\n knowledgeUnavailable\n knowledgeSkipped\n}\n ";
1892
2190
  export declare const NlpInstanceFragmentDoc = "\n fragment nlpInstance on NlpInstance {\n id\n name\n drn\n options {\n transition\n samples\n }\n createdAt\n updatedAt\n}\n ";
1893
2191
  export declare const QnaFragmentFragmentDoc = "\n fragment qnaFragment on QnAInstance {\n id\n name\n drn\n credentialsId\n tryToReplyOnTransition\n createdAt\n updatedAt\n}\n ";
1894
2192
  export declare const ListAiAgentsDocument = "\n query listAiAgents {\n listAiAgents {\n ...aiAgentSummary\n }\n}\n \n fragment aiAgentSummary on AiAgentSummary {\n agentId\n name\n liveVersion\n channels\n updatedAt\n queuedApprovals\n status\n}\n ";
@@ -1908,8 +2206,10 @@ export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId
1908
2206
  export declare const ListAiAgentScenariosDocument = "\n query listAiAgentScenarios($agentId: ID!) {\n listAiAgentScenarios(agentId: $agentId) {\n ...aiAgentScenario\n }\n}\n \n fragment aiAgentScenario on AiAgentScenario {\n scenarioId\n description\n customerId\n turns\n expectations\n}\n ";
1909
2207
  export declare const SetAiAgentRetentionPolicyDocument = "\n mutation setAiAgentRetentionPolicy($input: AiAgentRetentionPolicyInput!) {\n setAiAgentRetentionPolicy(input: $input) {\n days {\n transcript\n session_state\n long_term_memory\n }\n masksPersonalData\n }\n}\n ";
1910
2208
  export declare const AiAgentRetentionPolicyDocument = "\n query aiAgentRetentionPolicy {\n aiAgentRetentionPolicy {\n days {\n transcript\n session_state\n long_term_memory\n }\n masksPersonalData\n }\n}\n ";
1911
- export declare const AiAgentConversationMetricsDocument = "\n query aiAgentConversationMetrics($input: AiAgentMetricsInput!) {\n aiAgentConversationMetrics(input: $input) {\n sessionId\n channel\n turns\n startedAt\n lastTurnAt\n totalTokens\n costMicroUsd\n durationMs\n lastOutcome\n state\n status\n subcategory\n contactReason\n contactReasonTag\n channelType\n }\n}\n ";
1912
- export declare const AiAgentConversationOutcomeDocument = "\n query aiAgentConversationOutcome($sessionId: ID!) {\n aiAgentConversationOutcome(sessionId: $sessionId) {\n sessionId\n agentId\n agentVersion\n resolution\n resolutionDefinition\n collectedData\n collectedDataAvailable\n turns\n startedAt\n lastTurnAt\n haltReason\n handoffReason\n agentSummary\n promisedNextStep\n classification {\n state\n classification\n subcategory\n technicalFailure\n eligibleForResolution\n consumesAllowance\n inactivityWindowMs\n definitionVersion\n }\n channelType\n actions {\n toolId\n name\n ok\n result\n at\n }\n contactReason {\n name\n useCaseId\n tag\n other\n source\n }\n analysis {\n analysisVersion\n failed\n failureReason\n sentimentStart\n sentimentEnd\n estimatedSatisfaction\n riskAlerts\n knowledgeGaps\n repeatedInformation\n humanRequests\n contactReason\n contactReasonId\n contactReasonTag\n contactReasonOther\n contactReasonSource\n summary\n agentScore\n agentScoreBand\n agentClarity\n customerEffortScore\n model\n costMicroUsd\n analyzedAt\n }\n }\n}\n ";
2209
+ export declare const AiAgentConversationMetricsDocument = "\n query aiAgentConversationMetrics($input: AiAgentConversationMetricsInput!) {\n aiAgentConversationMetrics(input: $input) {\n items {\n sessionId\n channel\n turns\n startedAt\n lastTurnAt\n totalTokens\n costMicroUsd\n durationMs\n lastOutcome\n state\n status\n subcategory\n contactReason\n contactReasonTag\n channelType\n }\n total\n limit\n offset\n facets {\n name\n values {\n value\n count\n }\n }\n hasRiskAlerts\n dateRange {\n min\n max\n }\n truncated\n }\n}\n ";
2210
+ export declare const AiAgentMetricsSeriesDocument = "\n query aiAgentMetricsSeries($input: AiAgentMetricsSeriesInput!) {\n aiAgentMetricsSeries(input: $input) {\n points {\n date\n conversations\n conversationsEligible\n conversationsResolved\n conversationsUnresolved\n conversationsHandoffNeed\n conversationsAbandoned\n resolvedRate\n unresolvedRate\n handoffNeedRate\n abandonmentRate\n }\n truncated\n }\n}\n ";
2211
+ export declare const AiAgentDashboardDocument = "\n query aiAgentDashboard($input: AiAgentDashboardInput!) {\n aiAgentDashboard(input: $input) {\n agentId\n timezone\n window {\n from\n to\n }\n previousWindow {\n from\n to\n }\n bucket\n conversations {\n ...aiAgentDashboardIndicator\n }\n resolved {\n ...aiAgentDashboardIndicator\n }\n unresolved {\n ...aiAgentDashboardIndicator\n }\n handoffProcedure {\n ...aiAgentDashboardIndicator\n }\n handoffNeed {\n ...aiAgentDashboardIndicator\n }\n abandonment {\n ...aiAgentDashboardIndicator\n }\n scoreBands {\n band\n count\n percent\n polarity\n variation {\n unit\n value\n }\n }\n agentScoreAvg\n agentScoreAvgBand\n analyzedConversations\n hasActiveDispatches\n activeDispatches {\n sent {\n ...aiAgentDashboardIndicator\n }\n answered {\n ...aiAgentDashboardIndicator\n }\n unanswered {\n ...aiAgentDashboardIndicator\n }\n }\n sentimentAtStart {\n ...aiAgentDashboardSentiment\n }\n sentimentAtEnd {\n ...aiAgentDashboardSentiment\n }\n contactReasons {\n all {\n ...aiAgentDashboardContactReason\n }\n handoff {\n ...aiAgentDashboardContactReason\n }\n abandonment {\n ...aiAgentDashboardContactReason\n }\n }\n procedures {\n key\n name\n count\n level\n }\n knowledgeGaps {\n key\n count\n level\n }\n series {\n date\n endDate\n conversations\n conversationsEligible\n conversationsResolved\n conversationsUnresolved\n conversationsHandoffNeed\n conversationsAbandoned\n resolvedRate\n unresolvedRate\n handoffNeedRate\n abandonmentRate\n }\n truncated\n analysesTruncated\n }\n}\n \n fragment aiAgentDashboardIndicator on AiAgentDashboardIndicator {\n value\n polarity\n variation {\n unit\n value\n }\n}\n \n\n fragment aiAgentDashboardSentiment on AiAgentDashboardSentiment {\n sentiment\n count\n percent\n polarity\n variation {\n unit\n value\n }\n}\n \n\n fragment aiAgentDashboardContactReason on AiAgentDashboardContactReason {\n key\n count\n percent\n}\n ";
2212
+ export declare const AiAgentConversationOutcomeDocument = "\n query aiAgentConversationOutcome($sessionId: ID!) {\n aiAgentConversationOutcome(sessionId: $sessionId) {\n sessionId\n agentId\n agentVersion\n resolution\n resolutionDefinition\n collectedData\n collectedDataAvailable\n turns\n startedAt\n lastTurnAt\n haltReason\n handoffReason\n agentSummary\n promisedNextStep\n classification {\n state\n status\n classification\n subcategory\n technicalFailure\n eligibleForResolution\n consumesAllowance\n inactivityWindowMs\n definitionVersion\n }\n channelType\n reversibleUntil\n actions {\n toolId\n name\n ok\n result\n at\n }\n contactReason {\n name\n useCaseId\n tag\n other\n source\n }\n analysis {\n analysisVersion\n failed\n failureReason\n sentimentStart\n sentimentEnd\n estimatedSatisfaction\n riskAlerts\n knowledgeGaps\n repeatedInformation\n humanRequests\n contactReason\n contactReasonId\n contactReasonTag\n contactReasonOther\n contactReasonSource\n summary\n agentScore\n agentScoreBand\n agentClarity\n customerEffortScore\n model\n costMicroUsd\n analyzedAt\n }\n }\n}\n ";
1913
2213
  export declare const SaveAiAgentUseCaseDocument = "\n mutation saveAiAgentUseCase($input: SaveAiAgentUseCaseInput!) {\n saveAiAgentUseCase(input: $input) {\n ...aiAgentUseCase\n }\n}\n \n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n tag\n status\n updatedAt\n}\n ";
1914
2214
  export declare const SaveAiAgentProcedureDocument = "\n mutation saveAiAgentProcedure($input: SaveAiAgentProcedureInput!) {\n saveAiAgentProcedure(input: $input) {\n ...aiAgentProcedure\n }\n}\n \n fragment aiAgentProcedure on AiAgentProcedure {\n id\n name\n guidanceSteps\n toolIds\n contingency\n executionAutonomy\n endsConversationAfterInforming\n continuesAfterApproval\n approvedReplyTemplate\n deniedReplyTemplate\n expiredReplyTemplate\n replyEmailSubject\n status\n updatedAt\n}\n ";
1915
2215
  export declare const RemoveAiAgentUseCaseDocument = "\n mutation removeAiAgentUseCase($input: AiAgentAuthoringRefInput!) {\n removeAiAgentUseCase(input: $input)\n}\n ";
@@ -1924,7 +2224,7 @@ export declare const SaveAiAgentScenarioDocument = "\n mutation saveAiAgentSc
1924
2224
  export declare const CheckAiAgentVersionDocument = "\n mutation checkAiAgentVersion($input: CheckAiAgentVersionInput!) {\n checkAiAgentVersion(input: $input) {\n ...aiAgentCheckRun\n }\n}\n \n fragment aiAgentCheckRun on AiAgentCheckRun {\n runId\n agentId\n version\n status\n requestedAt\n startedAt\n finishedAt\n totalRuns\n completedRuns\n error\n excludedTools {\n ...aiAgentToolExclusion\n }\n result {\n safeToPublish\n reports {\n scenarioId\n runs\n cut\n measured\n passed\n rate\n handoffReasons {\n key\n count\n }\n turns {\n turn\n runs\n answered\n grounded\n blocked\n identificationRequired\n toolNames {\n key\n count\n }\n blockCategories {\n key\n count\n }\n }\n }\n regressions {\n scenarioId\n before\n after\n }\n }\n}\n \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
1925
2225
  export declare const GetAiAgentCheckRunDocument = "\n query getAiAgentCheckRun($agentId: ID!, $runId: ID!) {\n getAiAgentCheckRun(agentId: $agentId, runId: $runId) {\n ...aiAgentCheckRun\n }\n}\n \n fragment aiAgentCheckRun on AiAgentCheckRun {\n runId\n agentId\n version\n status\n requestedAt\n startedAt\n finishedAt\n totalRuns\n completedRuns\n error\n excludedTools {\n ...aiAgentToolExclusion\n }\n result {\n safeToPublish\n reports {\n scenarioId\n runs\n cut\n measured\n passed\n rate\n handoffReasons {\n key\n count\n }\n turns {\n turn\n runs\n answered\n grounded\n blocked\n identificationRequired\n toolNames {\n key\n count\n }\n blockCategories {\n key\n count\n }\n }\n }\n regressions {\n scenarioId\n before\n after\n }\n }\n}\n \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
1926
2226
  export declare const AiAgentCheckLimitsDocument = "\n query aiAgentCheckLimits($agentId: ID!) {\n aiAgentCheckLimits(agentId: $agentId) {\n minRunsPerScenario\n maxRunsPerScenario\n maxSuiteRuns\n scenarioCount\n }\n}\n ";
1927
- export declare const AiAgentMetricsDocument = "\n query aiAgentMetrics($input: AiAgentMetricsInput!) {\n aiAgentMetrics(input: $input) {\n ...aiAgentMetricsReport\n }\n}\n \n fragment aiAgentMetricsReport on AiAgentMetrics {\n agentId\n from\n to\n truncated\n conversations\n conversationsResolved\n conversationsInconclusive\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n conversationsByClassification {\n key\n count\n }\n conversationsEligible\n conversationsResolvedByDefinition\n resolvedRate\n unresolvedRate\n handoffProcedureRate\n handoffNeedRate\n abandonmentRate\n classificationDefinitionVersion\n analyzedConversations\n estimatedSatisfactionAvg\n sentimentAtStart {\n key\n count\n }\n sentimentAtEnd {\n key\n count\n }\n riskAlerts {\n key\n count\n }\n topKnowledgeGaps {\n key\n count\n }\n analysisCostMicroUsd\n failedAnalyses\n analysesTruncated\n agentScoreAvg\n agentScoreAvgBand\n agentScoreBands {\n key\n count\n }\n agentClarityAvg\n customerEffortScoreAvg\n contactReasons {\n all {\n key\n count\n }\n handoff {\n key\n count\n }\n abandonment {\n key\n count\n }\n }\n escalatedToHuman\n escalatedToFlow\n escalatedTargetUndeclared\n handoffsByReason {\n key\n count\n }\n humanRequestedTurns\n costMicroUsd\n costMicroUsdPerResolvedConversation\n unpricedTurns\n inputTokens\n outputTokens\n totalTokens\n cachedInputTokens\n cachedTurns\n llmCalls\n turnsByModel {\n key\n count\n }\n avgTurnDurationMs\n p95TurnDurationMs\n avgLlmLatencyMs\n turns\n answeredTurns\n answeredWithFailedConnectionTurns\n unansweredTurns\n unansweredDefinition\n topTopics {\n key\n count\n }\n topUnansweredQuestions {\n key\n count\n }\n blockedTurns\n blocksByCategory {\n key\n count\n }\n haltedTurns\n haltReasons {\n key\n count\n }\n budgetExceededTurns\n identificationRequiredTurns\n toolCalls\n toolCallsFailed\n toolErrorsByConnection {\n key\n count\n }\n toolErrorsByClass {\n key\n count\n }\n knowledgeRetrieved\n knowledgeEmpty\n knowledgeUnavailable\n knowledgeSkipped\n}\n ";
2227
+ export declare const AiAgentMetricsDocument = "\n query aiAgentMetrics($input: AiAgentMetricsInput!) {\n aiAgentMetrics(input: $input) {\n ...aiAgentMetricsReport\n }\n}\n \n fragment aiAgentMetricsReport on AiAgentMetrics {\n agentId\n from\n to\n truncated\n conversations\n conversationsResolved\n conversationsInconclusive\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n conversationsByClassification {\n key\n count\n }\n classificationBreakdown {\n state\n subcategory\n technicalFailure\n count\n }\n conversationsEligible\n conversationsResolvedByDefinition\n resolvedRate\n unresolvedRate\n handoffProcedureRate\n handoffNeedRate\n abandonmentRate\n classificationDefinitionVersion\n analyzedConversations\n estimatedSatisfactionAvg\n sentimentAtStart {\n key\n count\n }\n sentimentAtEnd {\n key\n count\n }\n riskAlerts {\n key\n count\n }\n topKnowledgeGaps {\n key\n count\n }\n analysisCostMicroUsd\n failedAnalyses\n analysesTruncated\n agentScoreAvg\n agentScoreAvgBand\n agentScoreBands {\n key\n count\n }\n agentClarityAvg\n customerEffortScoreAvg\n contactReasons {\n all {\n key\n count\n }\n handoff {\n key\n count\n }\n abandonment {\n key\n count\n }\n }\n escalatedToHuman\n escalatedToFlow\n escalatedTargetUndeclared\n handoffsByReason {\n key\n count\n }\n humanRequestedTurns\n costMicroUsd\n costMicroUsdPerResolvedConversation\n unpricedTurns\n inputTokens\n outputTokens\n totalTokens\n cachedInputTokens\n cachedTurns\n llmCalls\n turnsByModel {\n key\n count\n }\n avgTurnDurationMs\n p95TurnDurationMs\n avgLlmLatencyMs\n turns\n answeredTurns\n answeredWithFailedConnectionTurns\n unansweredTurns\n unansweredDefinition\n topTopics {\n key\n count\n }\n topUnansweredQuestions {\n key\n count\n }\n blockedTurns\n blocksByCategory {\n key\n count\n }\n haltedTurns\n haltReasons {\n key\n count\n }\n budgetExceededTurns\n identificationRequiredTurns\n toolCalls\n toolCallsFailed\n toolErrorsByConnection {\n key\n count\n }\n toolErrorsByClass {\n key\n count\n }\n knowledgeRetrieved\n knowledgeEmpty\n knowledgeUnavailable\n knowledgeSkipped\n}\n ";
1928
2228
  export declare const AiAgentVersionSpecDocument = "\n query aiAgentVersionSpec($agentId: ID!) {\n listAiAgentVersions(agentId: $agentId) {\n ...aiAgentVersionWithSpec\n }\n}\n \n fragment aiAgentVersionWithSpec on AiAgentVersion {\n agentId\n version\n status\n createdAt\n spec {\n ...aiAgentSpec\n }\n excludedTools {\n ...aiAgentToolExclusion\n }\n}\n \n\n fragment aiAgentSpec on AiAgentSpec {\n identity {\n displayName\n role\n tone\n toneNotes\n openingMessage\n outOfScopeBehaviour\n }\n can\n cannot\n knowledgeBaseIds\n knowledgeFallback\n toolIds\n budget {\n maxSteps\n maxToolCalls\n maxTokens\n maxCostMicroUsd\n maxPeriodCostMicroUsd\n onExceeded\n }\n handoff {\n transition\n target\n }\n channels\n conversationTiming {\n channel\n abandonAfterMs\n remindAfterMs\n metaWindowMs\n reminderMessage\n renewalMessage\n }\n}\n \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
1929
2229
  export declare const AiAgentRoutingPreviewDocument = "\n query aiAgentRoutingPreview($input: AiAgentRoutingPreviewInput!) {\n aiAgentRoutingPreview(input: $input) {\n high\n medium\n examples {\n message\n useCaseId\n score\n confidence\n }\n }\n}\n ";
1930
2230
  export declare const AiAgentKnowledgeBasesDocument = "\n query aiAgentKnowledgeBases {\n aiAgentKnowledgeBases {\n id\n title\n isPublic\n }\n}\n ";
@@ -1961,6 +2261,8 @@ export declare function getSdk<C>(requester: Requester<C>): {
1961
2261
  setAiAgentRetentionPolicy(variables: SetAiAgentRetentionPolicyMutationVariables, options?: C): Promise<SetAiAgentRetentionPolicyMutation>;
1962
2262
  aiAgentRetentionPolicy(variables?: AiAgentRetentionPolicyQueryVariables, options?: C): Promise<AiAgentRetentionPolicyQuery>;
1963
2263
  aiAgentConversationMetrics(variables: AiAgentConversationMetricsQueryVariables, options?: C): Promise<AiAgentConversationMetricsQuery>;
2264
+ aiAgentMetricsSeries(variables: AiAgentMetricsSeriesQueryVariables, options?: C): Promise<AiAgentMetricsSeriesQuery>;
2265
+ aiAgentDashboard(variables: AiAgentDashboardQueryVariables, options?: C): Promise<AiAgentDashboardQuery>;
1964
2266
  aiAgentConversationOutcome(variables: AiAgentConversationOutcomeQueryVariables, options?: C): Promise<AiAgentConversationOutcomeQuery>;
1965
2267
  saveAiAgentUseCase(variables: SaveAiAgentUseCaseMutationVariables, options?: C): Promise<SaveAiAgentUseCaseMutation>;
1966
2268
  saveAiAgentProcedure(variables: SaveAiAgentProcedureMutationVariables, options?: C): Promise<SaveAiAgentProcedureMutation>;