@droz-js/sdk 0.20.24 → 0.20.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/package.json +1 -1
- package/src/drozai.d.ts +4 -0
- package/src/sdks/ai.d.ts +273 -15
- package/src/sdks/ai.js +232 -2
package/package.json
CHANGED
package/src/drozai.d.ts
CHANGED
|
@@ -78,6 +78,10 @@ declare const DrozAi_base: new (options?: import("./client/http").HttpClientOpti
|
|
|
78
78
|
rememberAiAgentSessionFacts(variables: import("./sdks/ai").Exact<{
|
|
79
79
|
input: import("./sdks/ai").RememberAiAgentSessionFactsInput;
|
|
80
80
|
}>, options?: unknown): Promise<import("./sdks/ai").RememberAiAgentSessionFactsMutation>;
|
|
81
|
+
listAiAgentApprovals(variables: import("./sdks/ai").Exact<{
|
|
82
|
+
agentId: import("./sdks/ai").Scalars["ID"]["input"];
|
|
83
|
+
status?: import("./sdks/ai").InputMaybe<import("./sdks/ai").Scalars["String"]["input"]>;
|
|
84
|
+
}>, options?: unknown): Promise<import("./sdks/ai").ListAiAgentApprovalsQuery>;
|
|
81
85
|
resolveAiAgentApproval(variables: import("./sdks/ai").Exact<{
|
|
82
86
|
input: import("./sdks/ai").ResolveAiAgentApprovalInput;
|
|
83
87
|
}>, options?: unknown): Promise<import("./sdks/ai").ResolveAiAgentApprovalMutation>;
|
package/src/sdks/ai.d.ts
CHANGED
|
@@ -127,6 +127,27 @@ export type AgentInfo = {
|
|
|
127
127
|
name: Scalars['String']['output'];
|
|
128
128
|
picture?: Maybe<Scalars['String']['output']>;
|
|
129
129
|
};
|
|
130
|
+
export declare enum AiAgentAnalysisFailureReason {
|
|
131
|
+
InvalidReply = "invalid_reply",
|
|
132
|
+
ModelError = "model_error"
|
|
133
|
+
}
|
|
134
|
+
export type AiAgentApproval = {
|
|
135
|
+
agentId: Scalars['ID']['output'];
|
|
136
|
+
args: Scalars['JSON']['output'];
|
|
137
|
+
channelId: Scalars['String']['output'];
|
|
138
|
+
customerId?: Maybe<Scalars['String']['output']>;
|
|
139
|
+
decidedAt?: Maybe<Scalars['Number']['output']>;
|
|
140
|
+
decidedBy?: Maybe<Scalars['String']['output']>;
|
|
141
|
+
/** Epoch ms. Depois disso a pendencia nao pode mais ser decidida. */
|
|
142
|
+
expiresAt: Scalars['Number']['output'];
|
|
143
|
+
/** Epoch ms. Junto de `sessionId`, identifica a pendencia em `resolveAiAgentApproval`. */
|
|
144
|
+
requestedAt: Scalars['Number']['output'];
|
|
145
|
+
sessionId: Scalars['ID']['output'];
|
|
146
|
+
/** `pending`, `approved`, `rejected` ou `expired`. */
|
|
147
|
+
status: Scalars['String']['output'];
|
|
148
|
+
toolId: Scalars['ID']['output'];
|
|
149
|
+
toolName: Scalars['String']['output'];
|
|
150
|
+
};
|
|
130
151
|
export type AiAgentAuthoringRefInput = {
|
|
131
152
|
agentId: Scalars['ID']['input'];
|
|
132
153
|
id: Scalars['ID']['input'];
|
|
@@ -157,6 +178,10 @@ export type AiAgentBudgetInput = {
|
|
|
157
178
|
maxToolCalls: Scalars['Int']['input'];
|
|
158
179
|
onExceeded: BudgetExceededAction;
|
|
159
180
|
};
|
|
181
|
+
export declare enum AiAgentChannelType {
|
|
182
|
+
Web = "web",
|
|
183
|
+
Whatsapp = "whatsapp"
|
|
184
|
+
}
|
|
160
185
|
export type AiAgentCheckLimits = {
|
|
161
186
|
/** Já dividido pelos cenários deste agente: é o maior valor que a suíte dele sustenta. */
|
|
162
187
|
maxRunsPerScenario: Scalars['Int']['output'];
|
|
@@ -202,30 +227,114 @@ export type AiAgentCompetingPair = {
|
|
|
202
227
|
/** Similaridade entre as duas descricoes, de 0 a 1. */
|
|
203
228
|
score: Scalars['Number']['output'];
|
|
204
229
|
};
|
|
230
|
+
export type AiAgentContactReason = {
|
|
231
|
+
/** Nome do caso de uso publicado, item do `can`, `Outro` ou `Fora do escopo`. */
|
|
232
|
+
name: Scalars['String']['output'];
|
|
233
|
+
/** Mascarado quando a politica de retencao pede. */
|
|
234
|
+
other?: Maybe<Scalars['String']['output']>;
|
|
235
|
+
source: AiAgentContactReasonSource;
|
|
236
|
+
tag?: Maybe<Scalars['String']['output']>;
|
|
237
|
+
useCaseId?: Maybe<Scalars['ID']['output']>;
|
|
238
|
+
};
|
|
239
|
+
export declare enum AiAgentContactReasonSource {
|
|
240
|
+
Agent = "agent",
|
|
241
|
+
Analysis = "analysis"
|
|
242
|
+
}
|
|
243
|
+
export type AiAgentContactReasons = {
|
|
244
|
+
abandonment: Array<AiAgentMetricsCount>;
|
|
245
|
+
all: Array<AiAgentMetricsCount>;
|
|
246
|
+
handoff: Array<AiAgentMetricsCount>;
|
|
247
|
+
};
|
|
248
|
+
export type AiAgentConversationAction = {
|
|
249
|
+
at: Scalars['Number']['output'];
|
|
250
|
+
name: Scalars['String']['output'];
|
|
251
|
+
ok: Scalars['Boolean']['output'];
|
|
252
|
+
/** Campos que a ferramenta declarou devolver; mascarado quando a politica de retencao pede. */
|
|
253
|
+
result: Scalars['String']['output'];
|
|
254
|
+
toolId: Scalars['ID']['output'];
|
|
255
|
+
};
|
|
256
|
+
export type AiAgentConversationAnalysis = {
|
|
257
|
+
agentClarity?: Maybe<Scalars['Int']['output']>;
|
|
258
|
+
agentScore?: Maybe<Scalars['Int']['output']>;
|
|
259
|
+
/** `excelente` a partir de 85, `bom` de 60, `regular` de 40. */
|
|
260
|
+
agentScoreBand?: Maybe<AiAgentScoreBand>;
|
|
261
|
+
analysisVersion: Scalars['Int']['output'];
|
|
262
|
+
analyzedAt: Scalars['Number']['output'];
|
|
263
|
+
contactReason?: Maybe<Scalars['String']['output']>;
|
|
264
|
+
contactReasonId?: Maybe<Scalars['ID']['output']>;
|
|
265
|
+
contactReasonOther?: Maybe<Scalars['String']['output']>;
|
|
266
|
+
contactReasonSource?: Maybe<AiAgentContactReasonSource>;
|
|
267
|
+
contactReasonTag?: Maybe<Scalars['String']['output']>;
|
|
268
|
+
costMicroUsd?: Maybe<Scalars['Number']['output']>;
|
|
269
|
+
/** De 0 a 100; 100 e o cliente nao ter precisado se esforcar. */
|
|
270
|
+
customerEffortScore?: Maybe<Scalars['Int']['output']>;
|
|
271
|
+
/** Estimativa do modelo, de 1 a 5; nao e a pesquisa respondida pelo cliente. */
|
|
272
|
+
estimatedSatisfaction?: Maybe<Scalars['Int']['output']>;
|
|
273
|
+
failed?: Maybe<Scalars['Boolean']['output']>;
|
|
274
|
+
failureReason?: Maybe<AiAgentAnalysisFailureReason>;
|
|
275
|
+
humanRequests?: Maybe<Scalars['Int']['output']>;
|
|
276
|
+
/** Mascaradas quando a politica de retencao pede. */
|
|
277
|
+
knowledgeGaps: Array<Scalars['String']['output']>;
|
|
278
|
+
model?: Maybe<Scalars['String']['output']>;
|
|
279
|
+
repeatedInformation?: Maybe<Scalars['Boolean']['output']>;
|
|
280
|
+
riskAlerts: Array<AiAgentRiskAlert>;
|
|
281
|
+
sentimentEnd?: Maybe<AiAgentSentiment>;
|
|
282
|
+
sentimentStart?: Maybe<AiAgentSentiment>;
|
|
283
|
+
/** Mascarado quando a politica de retencao pede. */
|
|
284
|
+
summary?: Maybe<Scalars['String']['output']>;
|
|
285
|
+
};
|
|
286
|
+
export declare enum AiAgentConversationClass {
|
|
287
|
+
NaoElegivel = "NAO_ELEGIVEL",
|
|
288
|
+
NaoResolvida = "NAO_RESOLVIDA",
|
|
289
|
+
Resolvida = "RESOLVIDA"
|
|
290
|
+
}
|
|
291
|
+
export type AiAgentConversationClassification = {
|
|
292
|
+
/** Ausente enquanto a conversa esta em andamento. */
|
|
293
|
+
classification?: Maybe<AiAgentConversationClass>;
|
|
294
|
+
consumesAllowance: Scalars['Boolean']['output'];
|
|
295
|
+
definitionVersion: Scalars['String']['output'];
|
|
296
|
+
eligibleForResolution: Scalars['Boolean']['output'];
|
|
297
|
+
inactivityWindowMs: Scalars['Number']['output'];
|
|
298
|
+
state: AiAgentConversationState;
|
|
299
|
+
subcategory?: Maybe<AiAgentConversationSubcategory>;
|
|
300
|
+
technicalFailure?: Maybe<AiAgentTechnicalFailure>;
|
|
301
|
+
};
|
|
205
302
|
export type AiAgentConversationMetrics = {
|
|
206
303
|
channel?: Maybe<Scalars['String']['output']>;
|
|
304
|
+
channelType?: Maybe<AiAgentChannelType>;
|
|
305
|
+
contactReason?: Maybe<Scalars['String']['output']>;
|
|
306
|
+
contactReasonTag?: Maybe<Scalars['String']['output']>;
|
|
207
307
|
costMicroUsd: Scalars['Number']['output'];
|
|
208
308
|
durationMs: Scalars['Number']['output'];
|
|
209
309
|
lastOutcome: Scalars['String']['output'];
|
|
210
310
|
lastTurnAt: Scalars['Number']['output'];
|
|
211
311
|
sessionId: Scalars['ID']['output'];
|
|
212
312
|
startedAt: Scalars['Number']['output'];
|
|
313
|
+
state: AiAgentConversationState;
|
|
314
|
+
status?: Maybe<AiAgentConversationClass>;
|
|
315
|
+
subcategory?: Maybe<AiAgentConversationSubcategory>;
|
|
213
316
|
totalTokens: Scalars['Number']['output'];
|
|
214
317
|
turns: Scalars['Number']['output'];
|
|
215
318
|
};
|
|
216
319
|
export type AiAgentConversationOutcome = {
|
|
320
|
+
actions: Array<AiAgentConversationAction>;
|
|
217
321
|
agentId: Scalars['ID']['output'];
|
|
218
322
|
/** Escrito pelo modelo ao transferir ou encerrar; nao substitui o que foi medido. */
|
|
219
323
|
agentSummary?: Maybe<Scalars['String']['output']>;
|
|
220
324
|
agentVersion: Scalars['String']['output'];
|
|
325
|
+
/** Ausente ate a conversa encerrada ser analisada. */
|
|
326
|
+
analysis?: Maybe<AiAgentConversationAnalysis>;
|
|
327
|
+
channelType?: Maybe<AiAgentChannelType>;
|
|
328
|
+
classification: AiAgentConversationClassification;
|
|
221
329
|
/** Fatos da sessao; chave e valor mascarados quando a politica de retencao pede. */
|
|
222
330
|
collectedData: Scalars['JSON']['output'];
|
|
223
331
|
/** false quando a retencao ja apagou a sessao. */
|
|
224
332
|
collectedDataAvailable: Scalars['Boolean']['output'];
|
|
333
|
+
contactReason?: Maybe<AiAgentContactReason>;
|
|
225
334
|
/** Motivo da parada do ultimo turno, quando houve. */
|
|
226
335
|
haltReason?: Maybe<Scalars['String']['output']>;
|
|
227
336
|
/** Motivo do ultimo pedido de pessoa, com os mesmos valores de `handoffsByReason`. */
|
|
228
|
-
handoffReason?: Maybe<
|
|
337
|
+
handoffReason?: Maybe<AiAgentHandoffReason>;
|
|
229
338
|
lastTurnAt: Scalars['Number']['output'];
|
|
230
339
|
/** O que o agente disse ao consumidor que vai acontecer. */
|
|
231
340
|
promisedNextStep?: Maybe<Scalars['String']['output']>;
|
|
@@ -235,6 +344,30 @@ export type AiAgentConversationOutcome = {
|
|
|
235
344
|
startedAt: Scalars['Number']['output'];
|
|
236
345
|
turns: Scalars['Number']['output'];
|
|
237
346
|
};
|
|
347
|
+
export declare enum AiAgentConversationState {
|
|
348
|
+
EmAndamento = "EM_ANDAMENTO",
|
|
349
|
+
EncerradaPorConclusao = "ENCERRADA_POR_CONCLUSAO",
|
|
350
|
+
EncerradaPorFalhaTecnica = "ENCERRADA_POR_FALHA_TECNICA",
|
|
351
|
+
EncerradaPorInatividade = "ENCERRADA_POR_INATIVIDADE",
|
|
352
|
+
EncerradaPorTeto = "ENCERRADA_POR_TETO",
|
|
353
|
+
EncerradaPorTransbordo = "ENCERRADA_POR_TRANSBORDO"
|
|
354
|
+
}
|
|
355
|
+
export declare enum AiAgentConversationSubcategory {
|
|
356
|
+
AbandonoAposEsclarecimento = "ABANDONO_APOS_ESCLARECIMENTO",
|
|
357
|
+
EncerradaPorTeto = "ENCERRADA_POR_TETO",
|
|
358
|
+
FalhaTecnica = "FALHA_TECNICA",
|
|
359
|
+
Indefinido = "INDEFINIDO",
|
|
360
|
+
InterlocutorAutomatico = "INTERLOCUTOR_AUTOMATICO",
|
|
361
|
+
PromptInjection = "PROMPT_INJECTION",
|
|
362
|
+
ResolvidaConfirmada = "RESOLVIDA_CONFIRMADA",
|
|
363
|
+
ResolvidaPresumida = "RESOLVIDA_PRESUMIDA",
|
|
364
|
+
SaudacaoSemDemanda = "SAUDACAO_SEM_DEMANDA",
|
|
365
|
+
SemCobertura = "SEM_COBERTURA",
|
|
366
|
+
SemConhecimento = "SEM_CONHECIMENTO",
|
|
367
|
+
TransbordoPorAutodiagnostico = "TRANSBORDO_POR_AUTODIAGNOSTICO",
|
|
368
|
+
TransbordoPorNecessidadeCliente = "TRANSBORDO_POR_NECESSIDADE_CLIENTE",
|
|
369
|
+
TransbordoPorProcedimento = "TRANSBORDO_POR_PROCEDIMENTO"
|
|
370
|
+
}
|
|
238
371
|
/**
|
|
239
372
|
* Como este agente passa o atendimento para uma pessoa.
|
|
240
373
|
*
|
|
@@ -252,6 +385,23 @@ export type AiAgentHandoffInput = {
|
|
|
252
385
|
target?: InputMaybe<Scalars['String']['input']>;
|
|
253
386
|
transition: Scalars['String']['input'];
|
|
254
387
|
};
|
|
388
|
+
export declare enum AiAgentHandoffReason {
|
|
389
|
+
BudgetExceeded = "budget_exceeded",
|
|
390
|
+
CannotResolve = "cannot_resolve",
|
|
391
|
+
CustomerRequest = "customer_request",
|
|
392
|
+
KnowledgeGap = "knowledge_gap",
|
|
393
|
+
OutOfScope = "out_of_scope",
|
|
394
|
+
PeriodBudgetExceeded = "period_budget_exceeded",
|
|
395
|
+
PolicyRequiresHuman = "policy_requires_human",
|
|
396
|
+
ProviderUnavailable = "provider_unavailable",
|
|
397
|
+
ToolFailure = "tool_failure",
|
|
398
|
+
Undeclared = "undeclared",
|
|
399
|
+
Unresolved = "unresolved"
|
|
400
|
+
}
|
|
401
|
+
export type AiAgentHandoffReasonCount = {
|
|
402
|
+
count: Scalars['Number']['output'];
|
|
403
|
+
key: AiAgentHandoffReason;
|
|
404
|
+
};
|
|
255
405
|
export type AiAgentIdentity = {
|
|
256
406
|
displayName: Scalars['String']['output'];
|
|
257
407
|
openingMessage?: Maybe<Scalars['String']['output']>;
|
|
@@ -274,7 +424,17 @@ export type AiAgentKnowledgeBase = {
|
|
|
274
424
|
title: Scalars['String']['output'];
|
|
275
425
|
};
|
|
276
426
|
export type AiAgentMetrics = {
|
|
427
|
+
/** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
|
|
428
|
+
abandonmentRate?: Maybe<Scalars['Number']['output']>;
|
|
429
|
+
agentClarityAvg?: Maybe<Scalars['Float']['output']>;
|
|
277
430
|
agentId: Scalars['ID']['output'];
|
|
431
|
+
agentScoreAvg?: Maybe<Scalars['Float']['output']>;
|
|
432
|
+
agentScoreAvgBand?: Maybe<AiAgentScoreBand>;
|
|
433
|
+
agentScoreBands: Array<AiAgentScoreBandCount>;
|
|
434
|
+
/** true quando os numeros de analise cobrem so parte do periodo. */
|
|
435
|
+
analysesTruncated: Scalars['Boolean']['output'];
|
|
436
|
+
analysisCostMicroUsd: Scalars['Number']['output'];
|
|
437
|
+
analyzedConversations: Scalars['Number']['output'];
|
|
278
438
|
answeredTurns: Scalars['Number']['output'];
|
|
279
439
|
/**
|
|
280
440
|
* Turnos que responderam mesmo com uma conexao falha no meio. E a superficie de risco do guardrail de
|
|
@@ -294,7 +454,11 @@ export type AiAgentMetrics = {
|
|
|
294
454
|
cachedInputTokens: Scalars['Number']['output'];
|
|
295
455
|
/** Turnos respondidos pelo cache, sem chamada ao modelo. E o ganho da otimizacao de §4.9. */
|
|
296
456
|
cachedTurns: Scalars['Number']['output'];
|
|
457
|
+
classificationDefinitionVersion: Scalars['String']['output'];
|
|
458
|
+
contactReasons: AiAgentContactReasons;
|
|
297
459
|
conversations: Scalars['Number']['output'];
|
|
460
|
+
conversationsByClassification: Array<AiAgentMetricsCount>;
|
|
461
|
+
conversationsEligible: Scalars['Number']['output'];
|
|
298
462
|
/**
|
|
299
463
|
* Conversas em que algum turno **pediu** uma pessoa. Pedido, nao confirmacao: o disparo da transicao
|
|
300
464
|
* e best-effort, entao nem toda solicitacao virou transferencia de fato.
|
|
@@ -308,6 +472,7 @@ export type AiAgentMetrics = {
|
|
|
308
472
|
conversationsInconclusive: Scalars['Number']['output'];
|
|
309
473
|
/** Conversas resolvidas sob a regra declarada em `resolutionDefinition`. */
|
|
310
474
|
conversationsResolved: Scalars['Number']['output'];
|
|
475
|
+
conversationsResolvedByDefinition: Scalars['Number']['output'];
|
|
311
476
|
/** Gasto da janela em micro-dolar (1e-6 USD), inteiro. */
|
|
312
477
|
costMicroUsd: Scalars['Number']['output'];
|
|
313
478
|
/**
|
|
@@ -315,6 +480,7 @@ export type AiAgentMetrics = {
|
|
|
315
480
|
* conversa resolveu no periodo — dividir por zero nao vira zero.
|
|
316
481
|
*/
|
|
317
482
|
costMicroUsdPerResolvedConversation?: Maybe<Scalars['Number']['output']>;
|
|
483
|
+
customerEffortScoreAvg?: Maybe<Scalars['Float']['output']>;
|
|
318
484
|
/**
|
|
319
485
|
* Escalonou, mas a transicao nao tem destino declarado. Fica a parte de proposito: somar a um dos
|
|
320
486
|
* dois lados seria supor para onde o fluxo do tenant leva.
|
|
@@ -324,16 +490,22 @@ export type AiAgentMetrics = {
|
|
|
324
490
|
escalatedToFlow: Scalars['Number']['output'];
|
|
325
491
|
/** Escalonamentos cujo destino o autor declarou como pessoa. */
|
|
326
492
|
escalatedToHuman: Scalars['Number']['output'];
|
|
493
|
+
estimatedSatisfactionAvg?: Maybe<Scalars['Float']['output']>;
|
|
494
|
+
failedAnalyses: Scalars['Number']['output'];
|
|
327
495
|
from: Scalars['Number']['output'];
|
|
328
496
|
haltReasons: Array<AiAgentMetricsCount>;
|
|
329
497
|
haltedTurns: Scalars['Number']['output'];
|
|
498
|
+
/** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
|
|
499
|
+
handoffNeedRate?: Maybe<Scalars['Number']['output']>;
|
|
500
|
+
/** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
|
|
501
|
+
handoffProcedureRate?: Maybe<Scalars['Number']['output']>;
|
|
330
502
|
/**
|
|
331
503
|
* Por que a pessoa foi pedida. Declarado pelo agente: `customer_request`, `out_of_scope`,
|
|
332
504
|
* `knowledge_gap`, `policy_requires_human`, `cannot_resolve`, `tool_failure`; `undeclared` quando ele
|
|
333
505
|
* transferiu sem declarar. Da plataforma: `tool_failure`, `provider_unavailable`, `budget_exceeded`,
|
|
334
506
|
* `period_budget_exceeded` e `unresolved` quando o agente parou sem concluir.
|
|
335
507
|
*/
|
|
336
|
-
handoffsByReason: Array<
|
|
508
|
+
handoffsByReason: Array<AiAgentHandoffReasonCount>;
|
|
337
509
|
/** Turnos que terminaram pedindo uma pessoa (pedido, nao transferencia). */
|
|
338
510
|
humanRequestedTurns: Scalars['Number']['output'];
|
|
339
511
|
/** Turnos que precisaram de cliente identificado e nao tinham um — a medida do atrito de identificacao. */
|
|
@@ -353,6 +525,11 @@ export type AiAgentMetrics = {
|
|
|
353
525
|
* janela — sem dado e zero por cento nao sao a mesma coisa.
|
|
354
526
|
*/
|
|
355
527
|
resolutionRate?: Maybe<Scalars['Number']['output']>;
|
|
528
|
+
/** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
|
|
529
|
+
resolvedRate?: Maybe<Scalars['Number']['output']>;
|
|
530
|
+
riskAlerts: Array<AiAgentRiskAlertCount>;
|
|
531
|
+
sentimentAtEnd: Array<AiAgentSentimentCount>;
|
|
532
|
+
sentimentAtStart: Array<AiAgentSentimentCount>;
|
|
356
533
|
to: Scalars['Number']['output'];
|
|
357
534
|
toolCalls: Scalars['Number']['output'];
|
|
358
535
|
/** Chamadas de ferramenta que falharam. */
|
|
@@ -361,6 +538,7 @@ export type AiAgentMetrics = {
|
|
|
361
538
|
toolErrorsByClass: Array<AiAgentMetricsCount>;
|
|
362
539
|
/** Falhas por conexao externa, identificada pelo host — responde "qual integracao esta caindo". */
|
|
363
540
|
toolErrorsByConnection: Array<AiAgentMetricsCount>;
|
|
541
|
+
topKnowledgeGaps: Array<AiAgentMetricsCount>;
|
|
364
542
|
/** Assuntos mais frequentes da janela, escolhidos no conjunto fechado do `can` de cada agente. */
|
|
365
543
|
topTopics: Array<AiAgentMetricsCount>;
|
|
366
544
|
/** As perguntas mais frequentes sem resposta, agrupadas por texto normalizado. */
|
|
@@ -382,6 +560,8 @@ export type AiAgentMetrics = {
|
|
|
382
560
|
* **piso**, nao total — nao decidir preco sem olhar este numero.
|
|
383
561
|
*/
|
|
384
562
|
unpricedTurns: Scalars['Number']['output'];
|
|
563
|
+
/** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
|
|
564
|
+
unresolvedRate?: Maybe<Scalars['Number']['output']>;
|
|
385
565
|
};
|
|
386
566
|
export type AiAgentMetricsCount = {
|
|
387
567
|
count: Scalars['Number']['output'];
|
|
@@ -438,6 +618,16 @@ export type AiAgentRetentionPolicyInput = {
|
|
|
438
618
|
days: AiAgentRetentionDaysInput;
|
|
439
619
|
masksPersonalData: Scalars['Boolean']['input'];
|
|
440
620
|
};
|
|
621
|
+
export declare enum AiAgentRiskAlert {
|
|
622
|
+
Cancelamento = "cancelamento",
|
|
623
|
+
Justica = "justica",
|
|
624
|
+
Procon = "procon",
|
|
625
|
+
ReclameAqui = "reclame_aqui"
|
|
626
|
+
}
|
|
627
|
+
export type AiAgentRiskAlertCount = {
|
|
628
|
+
count: Scalars['Number']['output'];
|
|
629
|
+
key: AiAgentRiskAlert;
|
|
630
|
+
};
|
|
441
631
|
export type AiAgentRoutedExample = {
|
|
442
632
|
/** `high`, `medium` ou `low`. */
|
|
443
633
|
confidence: Scalars['String']['output'];
|
|
@@ -507,6 +697,25 @@ export type AiAgentScenarioTurn = {
|
|
|
507
697
|
/** 1 para o primeiro turno do cenário. */
|
|
508
698
|
turn: Scalars['Int']['output'];
|
|
509
699
|
};
|
|
700
|
+
export declare enum AiAgentScoreBand {
|
|
701
|
+
Bom = "bom",
|
|
702
|
+
Excelente = "excelente",
|
|
703
|
+
Regular = "regular",
|
|
704
|
+
Ruim = "ruim"
|
|
705
|
+
}
|
|
706
|
+
export type AiAgentScoreBandCount = {
|
|
707
|
+
count: Scalars['Number']['output'];
|
|
708
|
+
key: AiAgentScoreBand;
|
|
709
|
+
};
|
|
710
|
+
export declare enum AiAgentSentiment {
|
|
711
|
+
Negativo = "negativo",
|
|
712
|
+
Neutro = "neutro",
|
|
713
|
+
Positivo = "positivo"
|
|
714
|
+
}
|
|
715
|
+
export type AiAgentSentimentCount = {
|
|
716
|
+
count: Scalars['Number']['output'];
|
|
717
|
+
key: AiAgentSentiment;
|
|
718
|
+
};
|
|
510
719
|
export type AiAgentSpec = {
|
|
511
720
|
/** @deprecated Ignorado. O tipo da ferramenta sai do método do conector. O campo sai na próxima versão. */
|
|
512
721
|
allowWriteTools?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -565,6 +774,12 @@ export type AiAgentSummary = {
|
|
|
565
774
|
/** Momento da versao mais recente, no ar ou nao — o "ultima alteracao" da listagem. */
|
|
566
775
|
updatedAt: Scalars['Number']['output'];
|
|
567
776
|
};
|
|
777
|
+
export declare enum AiAgentTechnicalFailure {
|
|
778
|
+
Erro_5Xx = "ERRO_5XX",
|
|
779
|
+
FerramentaIndisponivel = "FERRAMENTA_INDISPONIVEL",
|
|
780
|
+
LimiteOperacional = "LIMITE_OPERACIONAL",
|
|
781
|
+
Timeout = "TIMEOUT"
|
|
782
|
+
}
|
|
568
783
|
export type AiAgentTool = {
|
|
569
784
|
/** `pre_approved` (padrao) ou `human_approval`. */
|
|
570
785
|
approval?: Maybe<Scalars['String']['output']>;
|
|
@@ -627,6 +842,7 @@ export type AiAgentTrace = {
|
|
|
627
842
|
agentId: Scalars['ID']['output'];
|
|
628
843
|
agentVersion: Scalars['String']['output'];
|
|
629
844
|
answer: Scalars['String']['output'];
|
|
845
|
+
channelType?: Maybe<AiAgentChannelType>;
|
|
630
846
|
/** Ausente no turno que não selecionou ferramentas (cache, contraparte automática) e no registrado antes do campo existir. */
|
|
631
847
|
excludedTools?: Maybe<Array<AiAgentToolExclusion>>;
|
|
632
848
|
/** Presente so quando o turno parou por limite; ausente quando respondeu. */
|
|
@@ -672,6 +888,8 @@ export type AiAgentUseCase = {
|
|
|
672
888
|
* produz roteamento ruim.
|
|
673
889
|
*/
|
|
674
890
|
subjectDescription: Scalars['String']['output'];
|
|
891
|
+
/** Minusculas e digitos, separados por - ou _. */
|
|
892
|
+
tag?: Maybe<Scalars['String']['output']>;
|
|
675
893
|
updatedAt: Scalars['Number']['output'];
|
|
676
894
|
};
|
|
677
895
|
export type AiAgentUseCaseOverlap = {
|
|
@@ -960,6 +1178,11 @@ export type Query = {
|
|
|
960
1178
|
getHttpEndpoint?: Maybe<Scalars['String']['output']>;
|
|
961
1179
|
getNlpInstance?: Maybe<NlpInstance>;
|
|
962
1180
|
getQnAInstance?: Maybe<QnAInstance>;
|
|
1181
|
+
/**
|
|
1182
|
+
* A fila e o historico de aprovacao humana do agente, da mais recente para a mais antiga. `status`
|
|
1183
|
+
* filtra por `pending`, `approved`, `rejected` ou `expired`; pendente fora do prazo ja vem `expired`.
|
|
1184
|
+
*/
|
|
1185
|
+
listAiAgentApprovals: Array<AiAgentApproval>;
|
|
963
1186
|
/** Os procedimentos do agente (§6.2): o plano em linguagem natural. */
|
|
964
1187
|
listAiAgentProcedures: Array<AiAgentProcedure>;
|
|
965
1188
|
listAiAgentScenarios: Array<AiAgentScenario>;
|
|
@@ -1008,6 +1231,10 @@ export type QueryGetNlpInstanceArgs = {
|
|
|
1008
1231
|
export type QueryGetQnAInstanceArgs = {
|
|
1009
1232
|
id: Scalars['ID']['input'];
|
|
1010
1233
|
};
|
|
1234
|
+
export type QueryListAiAgentApprovalsArgs = {
|
|
1235
|
+
agentId: Scalars['ID']['input'];
|
|
1236
|
+
status?: InputMaybe<Scalars['String']['input']>;
|
|
1237
|
+
};
|
|
1011
1238
|
export type QueryListAiAgentProceduresArgs = {
|
|
1012
1239
|
agentId: Scalars['ID']['input'];
|
|
1013
1240
|
};
|
|
@@ -1051,7 +1278,8 @@ export type RemoveQnAInstanceInput = {
|
|
|
1051
1278
|
};
|
|
1052
1279
|
export type ResolveAiAgentApprovalInput = {
|
|
1053
1280
|
agentId: Scalars['ID']['input'];
|
|
1054
|
-
|
|
1281
|
+
/** Ignorado: quem decidiu e o usuario autenticado. */
|
|
1282
|
+
decidedBy?: InputMaybe<Scalars['String']['input']>;
|
|
1055
1283
|
/** `approved` executa a acao guardada; `rejected` avisa o consumidor e nao executa nada. */
|
|
1056
1284
|
decision: Scalars['String']['input'];
|
|
1057
1285
|
/** Identifica a pendencia junto da sessao: e o momento em que a acao foi enfileirada. */
|
|
@@ -1099,6 +1327,8 @@ export type SaveAiAgentUseCaseInput = {
|
|
|
1099
1327
|
procedureId?: InputMaybe<Scalars['ID']['input']>;
|
|
1100
1328
|
status: Scalars['String']['input'];
|
|
1101
1329
|
subjectDescription: Scalars['String']['input'];
|
|
1330
|
+
/** Ausente apaga a tag gravada. */
|
|
1331
|
+
tag?: InputMaybe<Scalars['String']['input']>;
|
|
1102
1332
|
};
|
|
1103
1333
|
export type SearchResultsFacet = {
|
|
1104
1334
|
name: Scalars['String']['output'];
|
|
@@ -1191,6 +1421,7 @@ export declare enum Typenames {
|
|
|
1191
1421
|
AiAgentAnswerCache = "AiAgentAnswerCache",
|
|
1192
1422
|
AiAgentApproval = "AiAgentApproval",
|
|
1193
1423
|
AiAgentCheckRun = "AiAgentCheckRun",
|
|
1424
|
+
AiAgentConversationAnalysis = "AiAgentConversationAnalysis",
|
|
1194
1425
|
AiAgentEvalReport = "AiAgentEvalReport",
|
|
1195
1426
|
AiAgentProcedure = "AiAgentProcedure",
|
|
1196
1427
|
AiAgentRetentionPolicy = "AiAgentRetentionPolicy",
|
|
@@ -1291,7 +1522,7 @@ export type RemoveAiAgentMutationVariables = Exact<{
|
|
|
1291
1522
|
input: AiAgentRefInput;
|
|
1292
1523
|
}>;
|
|
1293
1524
|
export type RemoveAiAgentMutation = Pick<Mutation, 'removeAiAgent'>;
|
|
1294
|
-
export type AiAgentUseCaseFragment = Pick<AiAgentUseCase, 'id' | 'name' | 'subjectDescription' | 'procedureId' | 'status' | 'updatedAt'>;
|
|
1525
|
+
export type AiAgentUseCaseFragment = Pick<AiAgentUseCase, 'id' | 'name' | 'subjectDescription' | 'procedureId' | 'tag' | 'status' | 'updatedAt'>;
|
|
1295
1526
|
export type AiAgentProcedureFragment = Pick<AiAgentProcedure, 'id' | 'name' | 'guidanceSteps' | 'toolIds' | 'contingency' | 'executionAutonomy' | 'status' | 'updatedAt'>;
|
|
1296
1527
|
export type AiAgentToolFragment = (Pick<AiAgentTool, 'toolId' | 'name' | 'description' | 'effect' | 'availability' | 'requiresAuthenticatedCustomer' | 'onFailure' | 'customerScope' | 'returns' | 'approval'> & {
|
|
1297
1528
|
parameters: Array<Pick<AiAgentToolParameter, 'name' | 'type' | 'required' | 'description' | 'grounding'>>;
|
|
@@ -1359,13 +1590,18 @@ export type AiAgentConversationMetricsQueryVariables = Exact<{
|
|
|
1359
1590
|
input: AiAgentMetricsInput;
|
|
1360
1591
|
}>;
|
|
1361
1592
|
export type AiAgentConversationMetricsQuery = {
|
|
1362
|
-
aiAgentConversationMetrics: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome'>>;
|
|
1593
|
+
aiAgentConversationMetrics: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
|
|
1363
1594
|
};
|
|
1364
1595
|
export type AiAgentConversationOutcomeQueryVariables = Exact<{
|
|
1365
1596
|
sessionId: Scalars['ID']['input'];
|
|
1366
1597
|
}>;
|
|
1367
1598
|
export type AiAgentConversationOutcomeQuery = {
|
|
1368
|
-
aiAgentConversationOutcome?: Maybe<Pick<AiAgentConversationOutcome, 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason'
|
|
1599
|
+
aiAgentConversationOutcome?: Maybe<(Pick<AiAgentConversationOutcome, 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason' | 'handoffReason' | 'agentSummary' | 'promisedNextStep' | 'channelType'> & {
|
|
1600
|
+
classification: Pick<AiAgentConversationClassification, 'state' | 'classification' | 'subcategory' | 'technicalFailure' | 'eligibleForResolution' | 'consumesAllowance' | 'inactivityWindowMs' | 'definitionVersion'>;
|
|
1601
|
+
actions: Array<Pick<AiAgentConversationAction, 'toolId' | 'name' | 'ok' | 'result' | 'at'>>;
|
|
1602
|
+
contactReason?: Maybe<Pick<AiAgentContactReason, 'name' | 'useCaseId' | 'tag' | 'other' | 'source'>>;
|
|
1603
|
+
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'>>;
|
|
1604
|
+
})>;
|
|
1369
1605
|
};
|
|
1370
1606
|
export type SaveAiAgentUseCaseMutationVariables = Exact<{
|
|
1371
1607
|
input: SaveAiAgentUseCaseInput;
|
|
@@ -1391,6 +1627,14 @@ export type RememberAiAgentSessionFactsMutationVariables = Exact<{
|
|
|
1391
1627
|
input: RememberAiAgentSessionFactsInput;
|
|
1392
1628
|
}>;
|
|
1393
1629
|
export type RememberAiAgentSessionFactsMutation = Pick<Mutation, 'rememberAiAgentSessionFacts'>;
|
|
1630
|
+
export type AiAgentApprovalFragment = Pick<AiAgentApproval, 'agentId' | 'sessionId' | 'toolId' | 'toolName' | 'args' | 'channelId' | 'customerId' | 'requestedAt' | 'expiresAt' | 'status' | 'decidedBy' | 'decidedAt'>;
|
|
1631
|
+
export type ListAiAgentApprovalsQueryVariables = Exact<{
|
|
1632
|
+
agentId: Scalars['ID']['input'];
|
|
1633
|
+
status?: InputMaybe<Scalars['String']['input']>;
|
|
1634
|
+
}>;
|
|
1635
|
+
export type ListAiAgentApprovalsQuery = {
|
|
1636
|
+
listAiAgentApprovals: Array<AiAgentApprovalFragment>;
|
|
1637
|
+
};
|
|
1394
1638
|
export type ResolveAiAgentApprovalMutationVariables = Exact<{
|
|
1395
1639
|
input: ResolveAiAgentApprovalInput;
|
|
1396
1640
|
}>;
|
|
@@ -1447,8 +1691,19 @@ export type AiAgentCheckLimitsQueryVariables = Exact<{
|
|
|
1447
1691
|
export type AiAgentCheckLimitsQuery = {
|
|
1448
1692
|
aiAgentCheckLimits: Pick<AiAgentCheckLimits, 'minRunsPerScenario' | 'maxRunsPerScenario' | 'maxSuiteRuns' | 'scenarioCount'>;
|
|
1449
1693
|
};
|
|
1450
|
-
export type AiAgentMetricsReportFragment = (Pick<AiAgentMetrics, 'agentId' | 'from' | 'to' | 'truncated' | 'conversations' | 'conversationsResolved' | 'conversationsInconclusive' | 'conversationsHandoffRequested' | 'resolutionRate' | 'resolutionDefinition' | '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'> & {
|
|
1451
|
-
|
|
1694
|
+
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'> & {
|
|
1695
|
+
conversationsByClassification: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
|
|
1696
|
+
sentimentAtStart: Array<Pick<AiAgentSentimentCount, 'key' | 'count'>>;
|
|
1697
|
+
sentimentAtEnd: Array<Pick<AiAgentSentimentCount, 'key' | 'count'>>;
|
|
1698
|
+
riskAlerts: Array<Pick<AiAgentRiskAlertCount, 'key' | 'count'>>;
|
|
1699
|
+
topKnowledgeGaps: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
|
|
1700
|
+
agentScoreBands: Array<Pick<AiAgentScoreBandCount, 'key' | 'count'>>;
|
|
1701
|
+
contactReasons: {
|
|
1702
|
+
all: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
|
|
1703
|
+
handoff: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
|
|
1704
|
+
abandonment: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
|
|
1705
|
+
};
|
|
1706
|
+
handoffsByReason: Array<Pick<AiAgentHandoffReasonCount, 'key' | 'count'>>;
|
|
1452
1707
|
turnsByModel: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
|
|
1453
1708
|
topTopics: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
|
|
1454
1709
|
topUnansweredQuestions: Array<Pick<AiAgentMetricsCount, 'key' | 'count'>>;
|
|
@@ -1578,13 +1833,14 @@ export declare const AiAgentSpecFragmentDoc = "\n fragment aiAgentSpec on AiA
|
|
|
1578
1833
|
export declare const AiAgentToolExclusionFragmentDoc = "\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
|
|
1579
1834
|
export declare const AiAgentVersionWithSpecFragmentDoc = "\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 ";
|
|
1580
1835
|
export declare const AiAgentListingMetricsFragmentDoc = "\n fragment aiAgentListingMetrics on AiAgentMetrics {\n agentId\n conversations\n conversationsResolved\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n costMicroUsd\n}\n ";
|
|
1581
|
-
export declare const AiAgentUseCaseFragmentDoc = "\n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n status\n updatedAt\n}\n ";
|
|
1836
|
+
export declare const AiAgentUseCaseFragmentDoc = "\n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n tag\n status\n updatedAt\n}\n ";
|
|
1582
1837
|
export declare const AiAgentProcedureFragmentDoc = "\n fragment aiAgentProcedure on AiAgentProcedure {\n id\n name\n guidanceSteps\n toolIds\n contingency\n executionAutonomy\n status\n updatedAt\n}\n ";
|
|
1583
1838
|
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 ";
|
|
1584
1839
|
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 ";
|
|
1585
1840
|
export declare const AiAgentScenarioFragmentDoc = "\n fragment aiAgentScenario on AiAgentScenario {\n scenarioId\n description\n customerId\n turns\n expectations\n}\n ";
|
|
1841
|
+
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 ";
|
|
1586
1842
|
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 ";
|
|
1587
|
-
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 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 ";
|
|
1843
|
+
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 ";
|
|
1588
1844
|
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 ";
|
|
1589
1845
|
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 ";
|
|
1590
1846
|
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 ";
|
|
@@ -1596,7 +1852,7 @@ export declare const UnpublishAiAgentVersionDocument = "\n mutation unpublish
|
|
|
1596
1852
|
export declare const RollbackAiAgentVersionDocument = "\n mutation rollbackAiAgentVersion($input: AiAgentVersionRefInput!) {\n rollbackAiAgentVersion(input: $input) {\n ...aiAgentVersion\n }\n}\n \n fragment aiAgentVersion on AiAgentVersion {\n agentId\n version\n status\n createdAt\n}\n ";
|
|
1597
1853
|
export declare const RemoveAiAgentVersionDocument = "\n mutation removeAiAgentVersion($input: AiAgentVersionRefInput!) {\n removeAiAgentVersion(input: $input) {\n ...aiAgentVersion\n }\n}\n \n fragment aiAgentVersion on AiAgentVersion {\n agentId\n version\n status\n createdAt\n}\n ";
|
|
1598
1854
|
export declare const RemoveAiAgentDocument = "\n mutation removeAiAgent($input: AiAgentRefInput!) {\n removeAiAgent(input: $input)\n}\n ";
|
|
1599
|
-
export declare const ListAiAgentUseCasesDocument = "\n query listAiAgentUseCases($agentId: ID!) {\n listAiAgentUseCases(agentId: $agentId) {\n ...aiAgentUseCase\n }\n}\n \n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n status\n updatedAt\n}\n ";
|
|
1855
|
+
export declare const ListAiAgentUseCasesDocument = "\n query listAiAgentUseCases($agentId: ID!) {\n listAiAgentUseCases(agentId: $agentId) {\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 ";
|
|
1600
1856
|
export declare const ListAiAgentProceduresDocument = "\n query listAiAgentProcedures($agentId: ID!) {\n listAiAgentProcedures(agentId: $agentId) {\n ...aiAgentProcedure\n }\n}\n \n fragment aiAgentProcedure on AiAgentProcedure {\n id\n name\n guidanceSteps\n toolIds\n contingency\n executionAutonomy\n status\n updatedAt\n}\n ";
|
|
1601
1857
|
export declare const ListAiAgentToolsDocument = "\n query listAiAgentTools {\n listAiAgentTools {\n ...aiAgentTool\n }\n}\n \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 ";
|
|
1602
1858
|
export declare const AiAgentUseCaseOverlapDocument = "\n query aiAgentUseCaseOverlap($agentId: ID!) {\n aiAgentUseCaseOverlap(agentId: $agentId) {\n threshold\n pairs {\n left\n right\n score\n }\n }\n}\n ";
|
|
@@ -1604,13 +1860,14 @@ export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId
|
|
|
1604
1860
|
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 ";
|
|
1605
1861
|
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 ";
|
|
1606
1862
|
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 ";
|
|
1607
|
-
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 }\n}\n ";
|
|
1608
|
-
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 }\n}\n ";
|
|
1609
|
-
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 status\n updatedAt\n}\n ";
|
|
1863
|
+
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 ";
|
|
1864
|
+
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 ";
|
|
1865
|
+
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 ";
|
|
1610
1866
|
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 status\n updatedAt\n}\n ";
|
|
1611
1867
|
export declare const RemoveAiAgentUseCaseDocument = "\n mutation removeAiAgentUseCase($input: AiAgentAuthoringRefInput!) {\n removeAiAgentUseCase(input: $input)\n}\n ";
|
|
1612
1868
|
export declare const RemoveAiAgentProcedureDocument = "\n mutation removeAiAgentProcedure($input: AiAgentAuthoringRefInput!) {\n removeAiAgentProcedure(input: $input)\n}\n ";
|
|
1613
1869
|
export declare const RememberAiAgentSessionFactsDocument = "\n mutation rememberAiAgentSessionFacts($input: RememberAiAgentSessionFactsInput!) {\n rememberAiAgentSessionFacts(input: $input)\n}\n ";
|
|
1870
|
+
export declare const ListAiAgentApprovalsDocument = "\n query listAiAgentApprovals($agentId: ID!, $status: String) {\n listAiAgentApprovals(agentId: $agentId, status: $status) {\n ...aiAgentApproval\n }\n}\n \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 ";
|
|
1614
1871
|
export declare const ResolveAiAgentApprovalDocument = "\n mutation resolveAiAgentApproval($input: ResolveAiAgentApprovalInput!) {\n resolveAiAgentApproval(input: $input)\n}\n ";
|
|
1615
1872
|
export declare const RegisterAiAgentToolDocument = "\n mutation registerAiAgentTool($input: RegisterAiAgentToolInput!) {\n registerAiAgentTool(input: $input) {\n ...aiAgentTool\n }\n}\n \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 ";
|
|
1616
1873
|
export declare const UnregisterAiAgentToolDocument = "\n mutation unregisterAiAgentTool($input: UnregisterAiAgentToolInput!) {\n unregisterAiAgentTool(input: $input)\n}\n ";
|
|
@@ -1619,7 +1876,7 @@ export declare const SaveAiAgentScenarioDocument = "\n mutation saveAiAgentSc
|
|
|
1619
1876
|
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 ";
|
|
1620
1877
|
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 ";
|
|
1621
1878
|
export declare const AiAgentCheckLimitsDocument = "\n query aiAgentCheckLimits($agentId: ID!) {\n aiAgentCheckLimits(agentId: $agentId) {\n minRunsPerScenario\n maxRunsPerScenario\n maxSuiteRuns\n scenarioCount\n }\n}\n ";
|
|
1622
|
-
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 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 ";
|
|
1879
|
+
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 ";
|
|
1623
1880
|
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}\n \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
|
|
1624
1881
|
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 ";
|
|
1625
1882
|
export declare const AiAgentKnowledgeBasesDocument = "\n query aiAgentKnowledgeBases {\n aiAgentKnowledgeBases {\n id\n title\n isPublic\n }\n}\n ";
|
|
@@ -1662,6 +1919,7 @@ export declare function getSdk<C>(requester: Requester<C>): {
|
|
|
1662
1919
|
removeAiAgentUseCase(variables: RemoveAiAgentUseCaseMutationVariables, options?: C): Promise<RemoveAiAgentUseCaseMutation>;
|
|
1663
1920
|
removeAiAgentProcedure(variables: RemoveAiAgentProcedureMutationVariables, options?: C): Promise<RemoveAiAgentProcedureMutation>;
|
|
1664
1921
|
rememberAiAgentSessionFacts(variables: RememberAiAgentSessionFactsMutationVariables, options?: C): Promise<RememberAiAgentSessionFactsMutation>;
|
|
1922
|
+
listAiAgentApprovals(variables: ListAiAgentApprovalsQueryVariables, options?: C): Promise<ListAiAgentApprovalsQuery>;
|
|
1665
1923
|
resolveAiAgentApproval(variables: ResolveAiAgentApprovalMutationVariables, options?: C): Promise<ResolveAiAgentApprovalMutation>;
|
|
1666
1924
|
registerAiAgentTool(variables: RegisterAiAgentToolMutationVariables, options?: C): Promise<RegisterAiAgentToolMutation>;
|
|
1667
1925
|
unregisterAiAgentTool(variables: UnregisterAiAgentToolMutationVariables, options?: C): Promise<UnregisterAiAgentToolMutation>;
|
package/src/sdks/ai.js
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.serviceName = exports.RemoveQnAInstanceDocument = exports.UpdateQnAInstanceDocument = exports.CreateQnAInstanceDocument = exports.TestQnAInstanceDocument = exports.ListQnAInstancesDocument = exports.GetQnAInstanceDocument = exports.TestNlpInstanceDocument = exports.RemoveNlpInstanceDocument = exports.UpdateNlpInstanceDocument = exports.CreateNlpInstanceDocument = exports.ListNlpInstancesDocument = exports.GetNlpInstanceDocument = exports.ExtractImageMetadataDocument = exports.AiAgentKnowledgeBasesDocument = exports.AiAgentRoutingPreviewDocument = exports.AiAgentVersionSpecDocument = exports.AiAgentMetricsDocument = exports.AiAgentCheckLimitsDocument = exports.GetAiAgentCheckRunDocument = exports.CheckAiAgentVersionDocument = exports.SaveAiAgentScenarioDocument = exports.RemoveAiAgentScenarioDocument = exports.UnregisterAiAgentToolDocument = exports.RegisterAiAgentToolDocument = exports.ResolveAiAgentApprovalDocument = void 0;
|
|
4
|
+
exports.ListAiAgentToolsDocument = exports.ListAiAgentProceduresDocument = exports.ListAiAgentUseCasesDocument = exports.RemoveAiAgentDocument = exports.RemoveAiAgentVersionDocument = exports.RollbackAiAgentVersionDocument = exports.UnpublishAiAgentVersionDocument = exports.PublishAiAgentVersionDocument = exports.DraftAiAgentDocument = exports.AiAgentMetricsByAgentDocument = exports.ListAiAgentVersionsDocument = exports.ListAiAgentsDocument = exports.QnaFragmentFragmentDoc = exports.NlpInstanceFragmentDoc = exports.AiAgentMetricsReportFragmentDoc = exports.AiAgentCheckRunFragmentDoc = exports.AiAgentApprovalFragmentDoc = exports.AiAgentScenarioFragmentDoc = exports.AiAgentTraceFragmentDoc = exports.AiAgentToolFragmentDoc = exports.AiAgentProcedureFragmentDoc = exports.AiAgentUseCaseFragmentDoc = exports.AiAgentListingMetricsFragmentDoc = exports.AiAgentVersionWithSpecFragmentDoc = exports.AiAgentToolExclusionFragmentDoc = exports.AiAgentSpecFragmentDoc = exports.AiAgentVersionFragmentDoc = exports.AiAgentSummaryFragmentDoc = exports.Typenames = exports.ToolParameterType = exports.ToolEffect = exports.ToolAvailability = exports.TonePreset = exports.ParameterGrounding = exports.Can = exports.BudgetExceededAction = exports.AppInstanceStatus = exports.AiAgentVersionStatus = exports.AiAgentTechnicalFailure = exports.AiAgentSentiment = exports.AiAgentScoreBand = exports.AiAgentRiskAlert = exports.AiAgentHandoffReason = exports.AiAgentConversationSubcategory = exports.AiAgentConversationState = exports.AiAgentConversationClass = exports.AiAgentContactReasonSource = exports.AiAgentCheckRunStatus = exports.AiAgentChannelType = exports.AiAgentAnalysisFailureReason = void 0;
|
|
5
|
+
exports.serviceName = exports.RemoveQnAInstanceDocument = exports.UpdateQnAInstanceDocument = exports.CreateQnAInstanceDocument = exports.TestQnAInstanceDocument = exports.ListQnAInstancesDocument = exports.GetQnAInstanceDocument = exports.TestNlpInstanceDocument = exports.RemoveNlpInstanceDocument = exports.UpdateNlpInstanceDocument = exports.CreateNlpInstanceDocument = exports.ListNlpInstancesDocument = exports.GetNlpInstanceDocument = exports.ExtractImageMetadataDocument = exports.AiAgentKnowledgeBasesDocument = exports.AiAgentRoutingPreviewDocument = exports.AiAgentVersionSpecDocument = exports.AiAgentMetricsDocument = exports.AiAgentCheckLimitsDocument = exports.GetAiAgentCheckRunDocument = exports.CheckAiAgentVersionDocument = exports.SaveAiAgentScenarioDocument = exports.RemoveAiAgentScenarioDocument = exports.UnregisterAiAgentToolDocument = exports.RegisterAiAgentToolDocument = exports.ResolveAiAgentApprovalDocument = exports.ListAiAgentApprovalsDocument = exports.RememberAiAgentSessionFactsDocument = exports.RemoveAiAgentProcedureDocument = exports.RemoveAiAgentUseCaseDocument = exports.SaveAiAgentProcedureDocument = exports.SaveAiAgentUseCaseDocument = exports.AiAgentConversationOutcomeDocument = exports.AiAgentConversationMetricsDocument = exports.AiAgentRetentionPolicyDocument = exports.SetAiAgentRetentionPolicyDocument = exports.ListAiAgentScenariosDocument = exports.AiAgentTraceDocument = exports.AiAgentUseCaseOverlapDocument = void 0;
|
|
6
6
|
exports.getSdk = getSdk;
|
|
7
|
+
var AiAgentAnalysisFailureReason;
|
|
8
|
+
(function (AiAgentAnalysisFailureReason) {
|
|
9
|
+
AiAgentAnalysisFailureReason["InvalidReply"] = "invalid_reply";
|
|
10
|
+
AiAgentAnalysisFailureReason["ModelError"] = "model_error";
|
|
11
|
+
})(AiAgentAnalysisFailureReason || (exports.AiAgentAnalysisFailureReason = AiAgentAnalysisFailureReason = {}));
|
|
12
|
+
var AiAgentChannelType;
|
|
13
|
+
(function (AiAgentChannelType) {
|
|
14
|
+
AiAgentChannelType["Web"] = "web";
|
|
15
|
+
AiAgentChannelType["Whatsapp"] = "whatsapp";
|
|
16
|
+
})(AiAgentChannelType || (exports.AiAgentChannelType = AiAgentChannelType = {}));
|
|
7
17
|
var AiAgentCheckRunStatus;
|
|
8
18
|
(function (AiAgentCheckRunStatus) {
|
|
9
19
|
AiAgentCheckRunStatus["Failed"] = "failed";
|
|
@@ -11,6 +21,84 @@ var AiAgentCheckRunStatus;
|
|
|
11
21
|
AiAgentCheckRunStatus["Running"] = "running";
|
|
12
22
|
AiAgentCheckRunStatus["Succeeded"] = "succeeded";
|
|
13
23
|
})(AiAgentCheckRunStatus || (exports.AiAgentCheckRunStatus = AiAgentCheckRunStatus = {}));
|
|
24
|
+
var AiAgentContactReasonSource;
|
|
25
|
+
(function (AiAgentContactReasonSource) {
|
|
26
|
+
AiAgentContactReasonSource["Agent"] = "agent";
|
|
27
|
+
AiAgentContactReasonSource["Analysis"] = "analysis";
|
|
28
|
+
})(AiAgentContactReasonSource || (exports.AiAgentContactReasonSource = AiAgentContactReasonSource = {}));
|
|
29
|
+
var AiAgentConversationClass;
|
|
30
|
+
(function (AiAgentConversationClass) {
|
|
31
|
+
AiAgentConversationClass["NaoElegivel"] = "NAO_ELEGIVEL";
|
|
32
|
+
AiAgentConversationClass["NaoResolvida"] = "NAO_RESOLVIDA";
|
|
33
|
+
AiAgentConversationClass["Resolvida"] = "RESOLVIDA";
|
|
34
|
+
})(AiAgentConversationClass || (exports.AiAgentConversationClass = AiAgentConversationClass = {}));
|
|
35
|
+
var AiAgentConversationState;
|
|
36
|
+
(function (AiAgentConversationState) {
|
|
37
|
+
AiAgentConversationState["EmAndamento"] = "EM_ANDAMENTO";
|
|
38
|
+
AiAgentConversationState["EncerradaPorConclusao"] = "ENCERRADA_POR_CONCLUSAO";
|
|
39
|
+
AiAgentConversationState["EncerradaPorFalhaTecnica"] = "ENCERRADA_POR_FALHA_TECNICA";
|
|
40
|
+
AiAgentConversationState["EncerradaPorInatividade"] = "ENCERRADA_POR_INATIVIDADE";
|
|
41
|
+
AiAgentConversationState["EncerradaPorTeto"] = "ENCERRADA_POR_TETO";
|
|
42
|
+
AiAgentConversationState["EncerradaPorTransbordo"] = "ENCERRADA_POR_TRANSBORDO";
|
|
43
|
+
})(AiAgentConversationState || (exports.AiAgentConversationState = AiAgentConversationState = {}));
|
|
44
|
+
var AiAgentConversationSubcategory;
|
|
45
|
+
(function (AiAgentConversationSubcategory) {
|
|
46
|
+
AiAgentConversationSubcategory["AbandonoAposEsclarecimento"] = "ABANDONO_APOS_ESCLARECIMENTO";
|
|
47
|
+
AiAgentConversationSubcategory["EncerradaPorTeto"] = "ENCERRADA_POR_TETO";
|
|
48
|
+
AiAgentConversationSubcategory["FalhaTecnica"] = "FALHA_TECNICA";
|
|
49
|
+
AiAgentConversationSubcategory["Indefinido"] = "INDEFINIDO";
|
|
50
|
+
AiAgentConversationSubcategory["InterlocutorAutomatico"] = "INTERLOCUTOR_AUTOMATICO";
|
|
51
|
+
AiAgentConversationSubcategory["PromptInjection"] = "PROMPT_INJECTION";
|
|
52
|
+
AiAgentConversationSubcategory["ResolvidaConfirmada"] = "RESOLVIDA_CONFIRMADA";
|
|
53
|
+
AiAgentConversationSubcategory["ResolvidaPresumida"] = "RESOLVIDA_PRESUMIDA";
|
|
54
|
+
AiAgentConversationSubcategory["SaudacaoSemDemanda"] = "SAUDACAO_SEM_DEMANDA";
|
|
55
|
+
AiAgentConversationSubcategory["SemCobertura"] = "SEM_COBERTURA";
|
|
56
|
+
AiAgentConversationSubcategory["SemConhecimento"] = "SEM_CONHECIMENTO";
|
|
57
|
+
AiAgentConversationSubcategory["TransbordoPorAutodiagnostico"] = "TRANSBORDO_POR_AUTODIAGNOSTICO";
|
|
58
|
+
AiAgentConversationSubcategory["TransbordoPorNecessidadeCliente"] = "TRANSBORDO_POR_NECESSIDADE_CLIENTE";
|
|
59
|
+
AiAgentConversationSubcategory["TransbordoPorProcedimento"] = "TRANSBORDO_POR_PROCEDIMENTO";
|
|
60
|
+
})(AiAgentConversationSubcategory || (exports.AiAgentConversationSubcategory = AiAgentConversationSubcategory = {}));
|
|
61
|
+
var AiAgentHandoffReason;
|
|
62
|
+
(function (AiAgentHandoffReason) {
|
|
63
|
+
AiAgentHandoffReason["BudgetExceeded"] = "budget_exceeded";
|
|
64
|
+
AiAgentHandoffReason["CannotResolve"] = "cannot_resolve";
|
|
65
|
+
AiAgentHandoffReason["CustomerRequest"] = "customer_request";
|
|
66
|
+
AiAgentHandoffReason["KnowledgeGap"] = "knowledge_gap";
|
|
67
|
+
AiAgentHandoffReason["OutOfScope"] = "out_of_scope";
|
|
68
|
+
AiAgentHandoffReason["PeriodBudgetExceeded"] = "period_budget_exceeded";
|
|
69
|
+
AiAgentHandoffReason["PolicyRequiresHuman"] = "policy_requires_human";
|
|
70
|
+
AiAgentHandoffReason["ProviderUnavailable"] = "provider_unavailable";
|
|
71
|
+
AiAgentHandoffReason["ToolFailure"] = "tool_failure";
|
|
72
|
+
AiAgentHandoffReason["Undeclared"] = "undeclared";
|
|
73
|
+
AiAgentHandoffReason["Unresolved"] = "unresolved";
|
|
74
|
+
})(AiAgentHandoffReason || (exports.AiAgentHandoffReason = AiAgentHandoffReason = {}));
|
|
75
|
+
var AiAgentRiskAlert;
|
|
76
|
+
(function (AiAgentRiskAlert) {
|
|
77
|
+
AiAgentRiskAlert["Cancelamento"] = "cancelamento";
|
|
78
|
+
AiAgentRiskAlert["Justica"] = "justica";
|
|
79
|
+
AiAgentRiskAlert["Procon"] = "procon";
|
|
80
|
+
AiAgentRiskAlert["ReclameAqui"] = "reclame_aqui";
|
|
81
|
+
})(AiAgentRiskAlert || (exports.AiAgentRiskAlert = AiAgentRiskAlert = {}));
|
|
82
|
+
var AiAgentScoreBand;
|
|
83
|
+
(function (AiAgentScoreBand) {
|
|
84
|
+
AiAgentScoreBand["Bom"] = "bom";
|
|
85
|
+
AiAgentScoreBand["Excelente"] = "excelente";
|
|
86
|
+
AiAgentScoreBand["Regular"] = "regular";
|
|
87
|
+
AiAgentScoreBand["Ruim"] = "ruim";
|
|
88
|
+
})(AiAgentScoreBand || (exports.AiAgentScoreBand = AiAgentScoreBand = {}));
|
|
89
|
+
var AiAgentSentiment;
|
|
90
|
+
(function (AiAgentSentiment) {
|
|
91
|
+
AiAgentSentiment["Negativo"] = "negativo";
|
|
92
|
+
AiAgentSentiment["Neutro"] = "neutro";
|
|
93
|
+
AiAgentSentiment["Positivo"] = "positivo";
|
|
94
|
+
})(AiAgentSentiment || (exports.AiAgentSentiment = AiAgentSentiment = {}));
|
|
95
|
+
var AiAgentTechnicalFailure;
|
|
96
|
+
(function (AiAgentTechnicalFailure) {
|
|
97
|
+
AiAgentTechnicalFailure["Erro_5Xx"] = "ERRO_5XX";
|
|
98
|
+
AiAgentTechnicalFailure["FerramentaIndisponivel"] = "FERRAMENTA_INDISPONIVEL";
|
|
99
|
+
AiAgentTechnicalFailure["LimiteOperacional"] = "LIMITE_OPERACIONAL";
|
|
100
|
+
AiAgentTechnicalFailure["Timeout"] = "TIMEOUT";
|
|
101
|
+
})(AiAgentTechnicalFailure || (exports.AiAgentTechnicalFailure = AiAgentTechnicalFailure = {}));
|
|
14
102
|
var AiAgentVersionStatus;
|
|
15
103
|
(function (AiAgentVersionStatus) {
|
|
16
104
|
AiAgentVersionStatus["Draft"] = "draft";
|
|
@@ -71,6 +159,7 @@ var Typenames;
|
|
|
71
159
|
Typenames["AiAgentAnswerCache"] = "AiAgentAnswerCache";
|
|
72
160
|
Typenames["AiAgentApproval"] = "AiAgentApproval";
|
|
73
161
|
Typenames["AiAgentCheckRun"] = "AiAgentCheckRun";
|
|
162
|
+
Typenames["AiAgentConversationAnalysis"] = "AiAgentConversationAnalysis";
|
|
74
163
|
Typenames["AiAgentEvalReport"] = "AiAgentEvalReport";
|
|
75
164
|
Typenames["AiAgentProcedure"] = "AiAgentProcedure";
|
|
76
165
|
Typenames["AiAgentRetentionPolicy"] = "AiAgentRetentionPolicy";
|
|
@@ -174,6 +263,7 @@ exports.AiAgentUseCaseFragmentDoc = `
|
|
|
174
263
|
name
|
|
175
264
|
subjectDescription
|
|
176
265
|
procedureId
|
|
266
|
+
tag
|
|
177
267
|
status
|
|
178
268
|
updatedAt
|
|
179
269
|
}
|
|
@@ -250,6 +340,22 @@ exports.AiAgentScenarioFragmentDoc = `
|
|
|
250
340
|
expectations
|
|
251
341
|
}
|
|
252
342
|
`;
|
|
343
|
+
exports.AiAgentApprovalFragmentDoc = `
|
|
344
|
+
fragment aiAgentApproval on AiAgentApproval {
|
|
345
|
+
agentId
|
|
346
|
+
sessionId
|
|
347
|
+
toolId
|
|
348
|
+
toolName
|
|
349
|
+
args
|
|
350
|
+
channelId
|
|
351
|
+
customerId
|
|
352
|
+
requestedAt
|
|
353
|
+
expiresAt
|
|
354
|
+
status
|
|
355
|
+
decidedBy
|
|
356
|
+
decidedAt
|
|
357
|
+
}
|
|
358
|
+
`;
|
|
253
359
|
exports.AiAgentCheckRunFragmentDoc = `
|
|
254
360
|
fragment aiAgentCheckRun on AiAgentCheckRun {
|
|
255
361
|
runId
|
|
@@ -315,6 +421,61 @@ exports.AiAgentMetricsReportFragmentDoc = `
|
|
|
315
421
|
conversationsHandoffRequested
|
|
316
422
|
resolutionRate
|
|
317
423
|
resolutionDefinition
|
|
424
|
+
conversationsByClassification {
|
|
425
|
+
key
|
|
426
|
+
count
|
|
427
|
+
}
|
|
428
|
+
conversationsEligible
|
|
429
|
+
conversationsResolvedByDefinition
|
|
430
|
+
resolvedRate
|
|
431
|
+
unresolvedRate
|
|
432
|
+
handoffProcedureRate
|
|
433
|
+
handoffNeedRate
|
|
434
|
+
abandonmentRate
|
|
435
|
+
classificationDefinitionVersion
|
|
436
|
+
analyzedConversations
|
|
437
|
+
estimatedSatisfactionAvg
|
|
438
|
+
sentimentAtStart {
|
|
439
|
+
key
|
|
440
|
+
count
|
|
441
|
+
}
|
|
442
|
+
sentimentAtEnd {
|
|
443
|
+
key
|
|
444
|
+
count
|
|
445
|
+
}
|
|
446
|
+
riskAlerts {
|
|
447
|
+
key
|
|
448
|
+
count
|
|
449
|
+
}
|
|
450
|
+
topKnowledgeGaps {
|
|
451
|
+
key
|
|
452
|
+
count
|
|
453
|
+
}
|
|
454
|
+
analysisCostMicroUsd
|
|
455
|
+
failedAnalyses
|
|
456
|
+
analysesTruncated
|
|
457
|
+
agentScoreAvg
|
|
458
|
+
agentScoreAvgBand
|
|
459
|
+
agentScoreBands {
|
|
460
|
+
key
|
|
461
|
+
count
|
|
462
|
+
}
|
|
463
|
+
agentClarityAvg
|
|
464
|
+
customerEffortScoreAvg
|
|
465
|
+
contactReasons {
|
|
466
|
+
all {
|
|
467
|
+
key
|
|
468
|
+
count
|
|
469
|
+
}
|
|
470
|
+
handoff {
|
|
471
|
+
key
|
|
472
|
+
count
|
|
473
|
+
}
|
|
474
|
+
abandonment {
|
|
475
|
+
key
|
|
476
|
+
count
|
|
477
|
+
}
|
|
478
|
+
}
|
|
318
479
|
escalatedToHuman
|
|
319
480
|
escalatedToFlow
|
|
320
481
|
escalatedTargetUndeclared
|
|
@@ -557,6 +718,12 @@ exports.AiAgentConversationMetricsDocument = `
|
|
|
557
718
|
costMicroUsd
|
|
558
719
|
durationMs
|
|
559
720
|
lastOutcome
|
|
721
|
+
state
|
|
722
|
+
status
|
|
723
|
+
subcategory
|
|
724
|
+
contactReason
|
|
725
|
+
contactReasonTag
|
|
726
|
+
channelType
|
|
560
727
|
}
|
|
561
728
|
}
|
|
562
729
|
`;
|
|
@@ -574,6 +741,59 @@ exports.AiAgentConversationOutcomeDocument = `
|
|
|
574
741
|
startedAt
|
|
575
742
|
lastTurnAt
|
|
576
743
|
haltReason
|
|
744
|
+
handoffReason
|
|
745
|
+
agentSummary
|
|
746
|
+
promisedNextStep
|
|
747
|
+
classification {
|
|
748
|
+
state
|
|
749
|
+
classification
|
|
750
|
+
subcategory
|
|
751
|
+
technicalFailure
|
|
752
|
+
eligibleForResolution
|
|
753
|
+
consumesAllowance
|
|
754
|
+
inactivityWindowMs
|
|
755
|
+
definitionVersion
|
|
756
|
+
}
|
|
757
|
+
channelType
|
|
758
|
+
actions {
|
|
759
|
+
toolId
|
|
760
|
+
name
|
|
761
|
+
ok
|
|
762
|
+
result
|
|
763
|
+
at
|
|
764
|
+
}
|
|
765
|
+
contactReason {
|
|
766
|
+
name
|
|
767
|
+
useCaseId
|
|
768
|
+
tag
|
|
769
|
+
other
|
|
770
|
+
source
|
|
771
|
+
}
|
|
772
|
+
analysis {
|
|
773
|
+
analysisVersion
|
|
774
|
+
failed
|
|
775
|
+
failureReason
|
|
776
|
+
sentimentStart
|
|
777
|
+
sentimentEnd
|
|
778
|
+
estimatedSatisfaction
|
|
779
|
+
riskAlerts
|
|
780
|
+
knowledgeGaps
|
|
781
|
+
repeatedInformation
|
|
782
|
+
humanRequests
|
|
783
|
+
contactReason
|
|
784
|
+
contactReasonId
|
|
785
|
+
contactReasonTag
|
|
786
|
+
contactReasonOther
|
|
787
|
+
contactReasonSource
|
|
788
|
+
summary
|
|
789
|
+
agentScore
|
|
790
|
+
agentScoreBand
|
|
791
|
+
agentClarity
|
|
792
|
+
customerEffortScore
|
|
793
|
+
model
|
|
794
|
+
costMicroUsd
|
|
795
|
+
analyzedAt
|
|
796
|
+
}
|
|
577
797
|
}
|
|
578
798
|
}
|
|
579
799
|
`;
|
|
@@ -606,6 +826,13 @@ exports.RememberAiAgentSessionFactsDocument = `
|
|
|
606
826
|
rememberAiAgentSessionFacts(input: $input)
|
|
607
827
|
}
|
|
608
828
|
`;
|
|
829
|
+
exports.ListAiAgentApprovalsDocument = `
|
|
830
|
+
query listAiAgentApprovals($agentId: ID!, $status: String) {
|
|
831
|
+
listAiAgentApprovals(agentId: $agentId, status: $status) {
|
|
832
|
+
...aiAgentApproval
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
${exports.AiAgentApprovalFragmentDoc}`;
|
|
609
836
|
exports.ResolveAiAgentApprovalDocument = `
|
|
610
837
|
mutation resolveAiAgentApproval($input: ResolveAiAgentApprovalInput!) {
|
|
611
838
|
resolveAiAgentApproval(input: $input)
|
|
@@ -879,6 +1106,9 @@ function getSdk(requester) {
|
|
|
879
1106
|
rememberAiAgentSessionFacts(variables, options) {
|
|
880
1107
|
return requester(exports.RememberAiAgentSessionFactsDocument, variables, options);
|
|
881
1108
|
},
|
|
1109
|
+
listAiAgentApprovals(variables, options) {
|
|
1110
|
+
return requester(exports.ListAiAgentApprovalsDocument, variables, options);
|
|
1111
|
+
},
|
|
882
1112
|
resolveAiAgentApproval(variables, options) {
|
|
883
1113
|
return requester(exports.ResolveAiAgentApprovalDocument, variables, options);
|
|
884
1114
|
},
|