@droz-js/sdk 0.20.28 → 0.20.31
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 -1
- package/src/sdks/ai.d.ts +96 -8
- package/src/sdks/ai.js +71 -18
- package/src/sdks/drozbot.d.ts +6 -0
- package/src/sdks/drozbot.js +8 -2
package/package.json
CHANGED
package/src/drozai.d.ts
CHANGED
|
@@ -58,8 +58,11 @@ declare const DrozAi_base: new (options?: import("./client/http").HttpClientOpti
|
|
|
58
58
|
[key: string]: never;
|
|
59
59
|
}>, options?: unknown): Promise<import("./sdks/ai").AiAgentRetentionPolicyQuery>;
|
|
60
60
|
aiAgentConversationMetrics(variables: import("./sdks/ai").Exact<{
|
|
61
|
-
input: import("./sdks/ai").
|
|
61
|
+
input: import("./sdks/ai").AiAgentConversationMetricsInput;
|
|
62
62
|
}>, options?: unknown): Promise<import("./sdks/ai").AiAgentConversationMetricsQuery>;
|
|
63
|
+
aiAgentMetricsSeries(variables: import("./sdks/ai").Exact<{
|
|
64
|
+
input: import("./sdks/ai").AiAgentMetricsSeriesInput;
|
|
65
|
+
}>, options?: unknown): Promise<import("./sdks/ai").AiAgentMetricsSeriesQuery>;
|
|
63
66
|
aiAgentConversationOutcome(variables: import("./sdks/ai").Exact<{
|
|
64
67
|
sessionId: import("./sdks/ai").Scalars["ID"]["input"];
|
|
65
68
|
}>, options?: unknown): Promise<import("./sdks/ai").AiAgentConversationOutcomeQuery>;
|
package/src/sdks/ai.d.ts
CHANGED
|
@@ -179,6 +179,7 @@ export type AiAgentBudgetInput = {
|
|
|
179
179
|
onExceeded: BudgetExceededAction;
|
|
180
180
|
};
|
|
181
181
|
export declare enum AiAgentChannelType {
|
|
182
|
+
Email = "email",
|
|
182
183
|
Web = "web",
|
|
183
184
|
Whatsapp = "whatsapp"
|
|
184
185
|
}
|
|
@@ -311,11 +312,31 @@ export type AiAgentConversationMetrics = {
|
|
|
311
312
|
sessionId: Scalars['ID']['output'];
|
|
312
313
|
startedAt: Scalars['Number']['output'];
|
|
313
314
|
state: AiAgentConversationState;
|
|
314
|
-
status
|
|
315
|
+
status: AiAgentConversationStatus;
|
|
315
316
|
subcategory?: Maybe<AiAgentConversationSubcategory>;
|
|
316
317
|
totalTokens: Scalars['Number']['output'];
|
|
317
318
|
turns: Scalars['Number']['output'];
|
|
318
319
|
};
|
|
320
|
+
export type AiAgentConversationMetricsInput = {
|
|
321
|
+
agentId: Scalars['ID']['input'];
|
|
322
|
+
channel?: InputMaybe<Scalars['String']['input']>;
|
|
323
|
+
from: Scalars['Number']['input'];
|
|
324
|
+
limit?: InputMaybe<Scalars['Number']['input']>;
|
|
325
|
+
offset?: InputMaybe<Scalars['Number']['input']>;
|
|
326
|
+
search?: InputMaybe<Scalars['String']['input']>;
|
|
327
|
+
sortBy?: InputMaybe<AiAgentConversationSortField>;
|
|
328
|
+
sortDirection?: InputMaybe<AiAgentSortDirection>;
|
|
329
|
+
status?: InputMaybe<Array<AiAgentConversationStatus>>;
|
|
330
|
+
to: Scalars['Number']['input'];
|
|
331
|
+
};
|
|
332
|
+
export type AiAgentConversationMetricsPage = {
|
|
333
|
+
items: Array<AiAgentConversationMetrics>;
|
|
334
|
+
limit: Scalars['Number']['output'];
|
|
335
|
+
offset: Scalars['Number']['output'];
|
|
336
|
+
total: Scalars['Number']['output'];
|
|
337
|
+
/** true quando o teto de leitura foi atingido: a página cobre parte do período. */
|
|
338
|
+
truncated: Scalars['Boolean']['output'];
|
|
339
|
+
};
|
|
319
340
|
export type AiAgentConversationOutcome = {
|
|
320
341
|
actions: Array<AiAgentConversationAction>;
|
|
321
342
|
agentId: Scalars['ID']['output'];
|
|
@@ -344,6 +365,11 @@ export type AiAgentConversationOutcome = {
|
|
|
344
365
|
startedAt: Scalars['Number']['output'];
|
|
345
366
|
turns: Scalars['Number']['output'];
|
|
346
367
|
};
|
|
368
|
+
export declare enum AiAgentConversationSortField {
|
|
369
|
+
Date = "DATE",
|
|
370
|
+
Status = "STATUS",
|
|
371
|
+
Subcategory = "SUBCATEGORY"
|
|
372
|
+
}
|
|
347
373
|
export declare enum AiAgentConversationState {
|
|
348
374
|
EmAndamento = "EM_ANDAMENTO",
|
|
349
375
|
EncerradaPorConclusao = "ENCERRADA_POR_CONCLUSAO",
|
|
@@ -352,6 +378,12 @@ export declare enum AiAgentConversationState {
|
|
|
352
378
|
EncerradaPorTeto = "ENCERRADA_POR_TETO",
|
|
353
379
|
EncerradaPorTransbordo = "ENCERRADA_POR_TRANSBORDO"
|
|
354
380
|
}
|
|
381
|
+
export declare enum AiAgentConversationStatus {
|
|
382
|
+
InProgress = "IN_PROGRESS",
|
|
383
|
+
NotEligible = "NOT_ELIGIBLE",
|
|
384
|
+
Resolved = "RESOLVED",
|
|
385
|
+
Unresolved = "UNRESOLVED"
|
|
386
|
+
}
|
|
355
387
|
export declare enum AiAgentConversationSubcategory {
|
|
356
388
|
AbandonoAposEsclarecimento = "ABANDONO_APOS_ESCLARECIMENTO",
|
|
357
389
|
EncerradaPorTeto = "ENCERRADA_POR_TETO",
|
|
@@ -534,7 +566,7 @@ export type AiAgentMetrics = {
|
|
|
534
566
|
toolCalls: Scalars['Number']['output'];
|
|
535
567
|
/** Chamadas de ferramenta que falharam. */
|
|
536
568
|
toolCallsFailed: Scalars['Number']['output'];
|
|
537
|
-
/** Falhas por classe
|
|
569
|
+
/** Falhas por classe, com os valores de `AiAgentTracedToolCall.errorClass`. */
|
|
538
570
|
toolErrorsByClass: Array<AiAgentMetricsCount>;
|
|
539
571
|
/** Falhas por conexao externa, identificada pelo host — responde "qual integracao esta caindo". */
|
|
540
572
|
toolErrorsByConnection: Array<AiAgentMetricsCount>;
|
|
@@ -563,6 +595,10 @@ export type AiAgentMetrics = {
|
|
|
563
595
|
/** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
|
|
564
596
|
unresolvedRate?: Maybe<Scalars['Number']['output']>;
|
|
565
597
|
};
|
|
598
|
+
export declare enum AiAgentMetricsBucket {
|
|
599
|
+
Day = "DAY",
|
|
600
|
+
Week = "WEEK"
|
|
601
|
+
}
|
|
566
602
|
export type AiAgentMetricsCount = {
|
|
567
603
|
count: Scalars['Number']['output'];
|
|
568
604
|
key: Scalars['String']['output'];
|
|
@@ -573,6 +609,34 @@ export type AiAgentMetricsInput = {
|
|
|
573
609
|
from: Scalars['Number']['input'];
|
|
574
610
|
to: Scalars['Number']['input'];
|
|
575
611
|
};
|
|
612
|
+
export type AiAgentMetricsSeries = {
|
|
613
|
+
points: Array<AiAgentMetricsSeriesPoint>;
|
|
614
|
+
/** true quando o teto de leitura foi atingido: a série cobre parte do período. */
|
|
615
|
+
truncated: Scalars['Boolean']['output'];
|
|
616
|
+
};
|
|
617
|
+
/** IANA name of the viewer time zone, e.g. America/Sao_Paulo. A week starts on Monday. */
|
|
618
|
+
export type AiAgentMetricsSeriesInput = {
|
|
619
|
+
agentId: Scalars['ID']['input'];
|
|
620
|
+
bucket: AiAgentMetricsBucket;
|
|
621
|
+
channel?: InputMaybe<Scalars['String']['input']>;
|
|
622
|
+
from: Scalars['Number']['input'];
|
|
623
|
+
timezone: Scalars['String']['input'];
|
|
624
|
+
to: Scalars['Number']['input'];
|
|
625
|
+
};
|
|
626
|
+
export type AiAgentMetricsSeriesPoint = {
|
|
627
|
+
abandonmentRate?: Maybe<Scalars['Number']['output']>;
|
|
628
|
+
conversations: Scalars['Number']['output'];
|
|
629
|
+
conversationsAbandoned: Scalars['Number']['output'];
|
|
630
|
+
conversationsEligible: Scalars['Number']['output'];
|
|
631
|
+
conversationsHandoffNeed: Scalars['Number']['output'];
|
|
632
|
+
conversationsResolved: Scalars['Number']['output'];
|
|
633
|
+
conversationsUnresolved: Scalars['Number']['output'];
|
|
634
|
+
/** Local date (YYYY-MM-DD) of the first day of the bucket. */
|
|
635
|
+
date: Scalars['String']['output'];
|
|
636
|
+
handoffNeedRate?: Maybe<Scalars['Number']['output']>;
|
|
637
|
+
resolvedRate?: Maybe<Scalars['Number']['output']>;
|
|
638
|
+
unresolvedRate?: Maybe<Scalars['Number']['output']>;
|
|
639
|
+
};
|
|
576
640
|
/** A mesma janela, sem agente: a listagem quer todos de uma vez. */
|
|
577
641
|
export type AiAgentMetricsWindowInput = {
|
|
578
642
|
channel?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -716,6 +780,10 @@ export type AiAgentSentimentCount = {
|
|
|
716
780
|
count: Scalars['Number']['output'];
|
|
717
781
|
key: AiAgentSentiment;
|
|
718
782
|
};
|
|
783
|
+
export declare enum AiAgentSortDirection {
|
|
784
|
+
Asc = "ASC",
|
|
785
|
+
Desc = "DESC"
|
|
786
|
+
}
|
|
719
787
|
export type AiAgentSpec = {
|
|
720
788
|
/** @deprecated Ignorado. O tipo da ferramenta sai do método do conector. O campo sai na próxima versão. */
|
|
721
789
|
allowWriteTools?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -866,7 +934,11 @@ export type AiAgentTrace = {
|
|
|
866
934
|
export type AiAgentTracedToolCall = {
|
|
867
935
|
/** O sistema externo, pelo host. Sem path nem query, que carregam parametro do cliente. */
|
|
868
936
|
connection?: Maybe<Scalars['String']['output']>;
|
|
869
|
-
/**
|
|
937
|
+
/**
|
|
938
|
+
* `unauthenticated`, `not_configured`, `not_migrated`, `needs_approval`, `rejected_arguments`, `timeout`, `upstream` ou `indeterminate_write`.
|
|
939
|
+
* `timeout` cobre o tempo esgotado no sistema do cliente e na chamada ao apiconnectors.
|
|
940
|
+
* `indeterminate_write` e o timeout de escrita nao idempotente: nao se sabe se a acao foi feita.
|
|
941
|
+
*/
|
|
870
942
|
errorClass?: Maybe<Scalars['String']['output']>;
|
|
871
943
|
name: Scalars['String']['output'];
|
|
872
944
|
/**
|
|
@@ -1145,7 +1217,7 @@ export type QnAInstance = {
|
|
|
1145
1217
|
export type Query = {
|
|
1146
1218
|
/** O que a suíte deste agente aceita hoje. O teto por cenário já vem dividido pelos cenários dele. */
|
|
1147
1219
|
aiAgentCheckLimits: AiAgentCheckLimits;
|
|
1148
|
-
aiAgentConversationMetrics:
|
|
1220
|
+
aiAgentConversationMetrics: AiAgentConversationMetricsPage;
|
|
1149
1221
|
aiAgentConversationOutcome?: Maybe<AiAgentConversationOutcome>;
|
|
1150
1222
|
/**
|
|
1151
1223
|
* §4.8: as bases do Droz Base do tenant. A chamada e entre services, com App Token — nao ha
|
|
@@ -1155,6 +1227,7 @@ export type Query = {
|
|
|
1155
1227
|
aiAgentMetrics: AiAgentMetrics;
|
|
1156
1228
|
/** As metricas da janela para todos os agentes, numa ida so. Agente sem rastro vem com zeros. */
|
|
1157
1229
|
aiAgentMetricsByAgent: Array<AiAgentMetrics>;
|
|
1230
|
+
aiAgentMetricsSeries: AiAgentMetricsSeries;
|
|
1158
1231
|
/**
|
|
1159
1232
|
* A politica de retencao em vigor para o tenant, com os padroes aplicados quando ele nao
|
|
1160
1233
|
* configurou a propria. Existe para a politica ser verificavel de fora, nao so estar escrita.
|
|
@@ -1201,7 +1274,7 @@ export type QueryAiAgentCheckLimitsArgs = {
|
|
|
1201
1274
|
agentId: Scalars['ID']['input'];
|
|
1202
1275
|
};
|
|
1203
1276
|
export type QueryAiAgentConversationMetricsArgs = {
|
|
1204
|
-
input:
|
|
1277
|
+
input: AiAgentConversationMetricsInput;
|
|
1205
1278
|
};
|
|
1206
1279
|
export type QueryAiAgentConversationOutcomeArgs = {
|
|
1207
1280
|
sessionId: Scalars['ID']['input'];
|
|
@@ -1212,6 +1285,9 @@ export type QueryAiAgentMetricsArgs = {
|
|
|
1212
1285
|
export type QueryAiAgentMetricsByAgentArgs = {
|
|
1213
1286
|
input: AiAgentMetricsWindowInput;
|
|
1214
1287
|
};
|
|
1288
|
+
export type QueryAiAgentMetricsSeriesArgs = {
|
|
1289
|
+
input: AiAgentMetricsSeriesInput;
|
|
1290
|
+
};
|
|
1215
1291
|
export type QueryAiAgentRoutingPreviewArgs = {
|
|
1216
1292
|
input: AiAgentRoutingPreviewInput;
|
|
1217
1293
|
};
|
|
@@ -1587,10 +1663,20 @@ export type AiAgentRetentionPolicyQuery = {
|
|
|
1587
1663
|
});
|
|
1588
1664
|
};
|
|
1589
1665
|
export type AiAgentConversationMetricsQueryVariables = Exact<{
|
|
1590
|
-
input:
|
|
1666
|
+
input: AiAgentConversationMetricsInput;
|
|
1591
1667
|
}>;
|
|
1592
1668
|
export type AiAgentConversationMetricsQuery = {
|
|
1593
|
-
aiAgentConversationMetrics:
|
|
1669
|
+
aiAgentConversationMetrics: (Pick<AiAgentConversationMetricsPage, 'total' | 'limit' | 'offset' | 'truncated'> & {
|
|
1670
|
+
items: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
|
|
1671
|
+
});
|
|
1672
|
+
};
|
|
1673
|
+
export type AiAgentMetricsSeriesQueryVariables = Exact<{
|
|
1674
|
+
input: AiAgentMetricsSeriesInput;
|
|
1675
|
+
}>;
|
|
1676
|
+
export type AiAgentMetricsSeriesQuery = {
|
|
1677
|
+
aiAgentMetricsSeries: (Pick<AiAgentMetricsSeries, 'truncated'> & {
|
|
1678
|
+
points: Array<Pick<AiAgentMetricsSeriesPoint, 'date' | 'conversations' | 'conversationsEligible' | 'conversationsResolved' | 'conversationsUnresolved' | 'conversationsHandoffNeed' | 'conversationsAbandoned' | 'resolvedRate' | 'unresolvedRate' | 'handoffNeedRate' | 'abandonmentRate'>>;
|
|
1679
|
+
});
|
|
1594
1680
|
};
|
|
1595
1681
|
export type AiAgentConversationOutcomeQueryVariables = Exact<{
|
|
1596
1682
|
sessionId: Scalars['ID']['input'];
|
|
@@ -1860,7 +1946,8 @@ export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId
|
|
|
1860
1946
|
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 ";
|
|
1861
1947
|
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 ";
|
|
1862
1948
|
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 ";
|
|
1863
|
-
export declare const AiAgentConversationMetricsDocument = "\n query aiAgentConversationMetrics($input:
|
|
1949
|
+
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 truncated\n }\n}\n ";
|
|
1950
|
+
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 ";
|
|
1864
1951
|
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
1952
|
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 ";
|
|
1866
1953
|
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 ";
|
|
@@ -1913,6 +2000,7 @@ export declare function getSdk<C>(requester: Requester<C>): {
|
|
|
1913
2000
|
setAiAgentRetentionPolicy(variables: SetAiAgentRetentionPolicyMutationVariables, options?: C): Promise<SetAiAgentRetentionPolicyMutation>;
|
|
1914
2001
|
aiAgentRetentionPolicy(variables?: AiAgentRetentionPolicyQueryVariables, options?: C): Promise<AiAgentRetentionPolicyQuery>;
|
|
1915
2002
|
aiAgentConversationMetrics(variables: AiAgentConversationMetricsQueryVariables, options?: C): Promise<AiAgentConversationMetricsQuery>;
|
|
2003
|
+
aiAgentMetricsSeries(variables: AiAgentMetricsSeriesQueryVariables, options?: C): Promise<AiAgentMetricsSeriesQuery>;
|
|
1916
2004
|
aiAgentConversationOutcome(variables: AiAgentConversationOutcomeQueryVariables, options?: C): Promise<AiAgentConversationOutcomeQuery>;
|
|
1917
2005
|
saveAiAgentUseCase(variables: SaveAiAgentUseCaseMutationVariables, options?: C): Promise<SaveAiAgentUseCaseMutation>;
|
|
1918
2006
|
saveAiAgentProcedure(variables: SaveAiAgentProcedureMutationVariables, options?: C): Promise<SaveAiAgentProcedureMutation>;
|
package/src/sdks/ai.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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 = 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;
|
|
4
|
+
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.AiAgentSortDirection = exports.AiAgentSentiment = exports.AiAgentScoreBand = exports.AiAgentRiskAlert = exports.AiAgentMetricsBucket = exports.AiAgentHandoffReason = exports.AiAgentConversationSubcategory = exports.AiAgentConversationStatus = exports.AiAgentConversationState = exports.AiAgentConversationSortField = 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.AiAgentMetricsSeriesDocument = exports.AiAgentConversationMetricsDocument = exports.AiAgentRetentionPolicyDocument = exports.SetAiAgentRetentionPolicyDocument = exports.ListAiAgentScenariosDocument = exports.AiAgentTraceDocument = exports.AiAgentUseCaseOverlapDocument = exports.ListAiAgentToolsDocument = exports.ListAiAgentProceduresDocument = exports.ListAiAgentUseCasesDocument = exports.RemoveAiAgentDocument = void 0;
|
|
6
6
|
exports.getSdk = getSdk;
|
|
7
7
|
var AiAgentAnalysisFailureReason;
|
|
8
8
|
(function (AiAgentAnalysisFailureReason) {
|
|
@@ -11,6 +11,7 @@ var AiAgentAnalysisFailureReason;
|
|
|
11
11
|
})(AiAgentAnalysisFailureReason || (exports.AiAgentAnalysisFailureReason = AiAgentAnalysisFailureReason = {}));
|
|
12
12
|
var AiAgentChannelType;
|
|
13
13
|
(function (AiAgentChannelType) {
|
|
14
|
+
AiAgentChannelType["Email"] = "email";
|
|
14
15
|
AiAgentChannelType["Web"] = "web";
|
|
15
16
|
AiAgentChannelType["Whatsapp"] = "whatsapp";
|
|
16
17
|
})(AiAgentChannelType || (exports.AiAgentChannelType = AiAgentChannelType = {}));
|
|
@@ -32,6 +33,12 @@ var AiAgentConversationClass;
|
|
|
32
33
|
AiAgentConversationClass["NaoResolvida"] = "NAO_RESOLVIDA";
|
|
33
34
|
AiAgentConversationClass["Resolvida"] = "RESOLVIDA";
|
|
34
35
|
})(AiAgentConversationClass || (exports.AiAgentConversationClass = AiAgentConversationClass = {}));
|
|
36
|
+
var AiAgentConversationSortField;
|
|
37
|
+
(function (AiAgentConversationSortField) {
|
|
38
|
+
AiAgentConversationSortField["Date"] = "DATE";
|
|
39
|
+
AiAgentConversationSortField["Status"] = "STATUS";
|
|
40
|
+
AiAgentConversationSortField["Subcategory"] = "SUBCATEGORY";
|
|
41
|
+
})(AiAgentConversationSortField || (exports.AiAgentConversationSortField = AiAgentConversationSortField = {}));
|
|
35
42
|
var AiAgentConversationState;
|
|
36
43
|
(function (AiAgentConversationState) {
|
|
37
44
|
AiAgentConversationState["EmAndamento"] = "EM_ANDAMENTO";
|
|
@@ -41,6 +48,13 @@ var AiAgentConversationState;
|
|
|
41
48
|
AiAgentConversationState["EncerradaPorTeto"] = "ENCERRADA_POR_TETO";
|
|
42
49
|
AiAgentConversationState["EncerradaPorTransbordo"] = "ENCERRADA_POR_TRANSBORDO";
|
|
43
50
|
})(AiAgentConversationState || (exports.AiAgentConversationState = AiAgentConversationState = {}));
|
|
51
|
+
var AiAgentConversationStatus;
|
|
52
|
+
(function (AiAgentConversationStatus) {
|
|
53
|
+
AiAgentConversationStatus["InProgress"] = "IN_PROGRESS";
|
|
54
|
+
AiAgentConversationStatus["NotEligible"] = "NOT_ELIGIBLE";
|
|
55
|
+
AiAgentConversationStatus["Resolved"] = "RESOLVED";
|
|
56
|
+
AiAgentConversationStatus["Unresolved"] = "UNRESOLVED";
|
|
57
|
+
})(AiAgentConversationStatus || (exports.AiAgentConversationStatus = AiAgentConversationStatus = {}));
|
|
44
58
|
var AiAgentConversationSubcategory;
|
|
45
59
|
(function (AiAgentConversationSubcategory) {
|
|
46
60
|
AiAgentConversationSubcategory["AbandonoAposEsclarecimento"] = "ABANDONO_APOS_ESCLARECIMENTO";
|
|
@@ -72,6 +86,11 @@ var AiAgentHandoffReason;
|
|
|
72
86
|
AiAgentHandoffReason["Undeclared"] = "undeclared";
|
|
73
87
|
AiAgentHandoffReason["Unresolved"] = "unresolved";
|
|
74
88
|
})(AiAgentHandoffReason || (exports.AiAgentHandoffReason = AiAgentHandoffReason = {}));
|
|
89
|
+
var AiAgentMetricsBucket;
|
|
90
|
+
(function (AiAgentMetricsBucket) {
|
|
91
|
+
AiAgentMetricsBucket["Day"] = "DAY";
|
|
92
|
+
AiAgentMetricsBucket["Week"] = "WEEK";
|
|
93
|
+
})(AiAgentMetricsBucket || (exports.AiAgentMetricsBucket = AiAgentMetricsBucket = {}));
|
|
75
94
|
var AiAgentRiskAlert;
|
|
76
95
|
(function (AiAgentRiskAlert) {
|
|
77
96
|
AiAgentRiskAlert["Cancelamento"] = "cancelamento";
|
|
@@ -92,6 +111,11 @@ var AiAgentSentiment;
|
|
|
92
111
|
AiAgentSentiment["Neutro"] = "neutro";
|
|
93
112
|
AiAgentSentiment["Positivo"] = "positivo";
|
|
94
113
|
})(AiAgentSentiment || (exports.AiAgentSentiment = AiAgentSentiment = {}));
|
|
114
|
+
var AiAgentSortDirection;
|
|
115
|
+
(function (AiAgentSortDirection) {
|
|
116
|
+
AiAgentSortDirection["Asc"] = "ASC";
|
|
117
|
+
AiAgentSortDirection["Desc"] = "DESC";
|
|
118
|
+
})(AiAgentSortDirection || (exports.AiAgentSortDirection = AiAgentSortDirection = {}));
|
|
95
119
|
var AiAgentTechnicalFailure;
|
|
96
120
|
(function (AiAgentTechnicalFailure) {
|
|
97
121
|
AiAgentTechnicalFailure["Erro_5Xx"] = "ERRO_5XX";
|
|
@@ -707,23 +731,49 @@ exports.AiAgentRetentionPolicyDocument = `
|
|
|
707
731
|
}
|
|
708
732
|
`;
|
|
709
733
|
exports.AiAgentConversationMetricsDocument = `
|
|
710
|
-
query aiAgentConversationMetrics($input:
|
|
734
|
+
query aiAgentConversationMetrics($input: AiAgentConversationMetricsInput!) {
|
|
711
735
|
aiAgentConversationMetrics(input: $input) {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
736
|
+
items {
|
|
737
|
+
sessionId
|
|
738
|
+
channel
|
|
739
|
+
turns
|
|
740
|
+
startedAt
|
|
741
|
+
lastTurnAt
|
|
742
|
+
totalTokens
|
|
743
|
+
costMicroUsd
|
|
744
|
+
durationMs
|
|
745
|
+
lastOutcome
|
|
746
|
+
state
|
|
747
|
+
status
|
|
748
|
+
subcategory
|
|
749
|
+
contactReason
|
|
750
|
+
contactReasonTag
|
|
751
|
+
channelType
|
|
752
|
+
}
|
|
753
|
+
total
|
|
754
|
+
limit
|
|
755
|
+
offset
|
|
756
|
+
truncated
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
`;
|
|
760
|
+
exports.AiAgentMetricsSeriesDocument = `
|
|
761
|
+
query aiAgentMetricsSeries($input: AiAgentMetricsSeriesInput!) {
|
|
762
|
+
aiAgentMetricsSeries(input: $input) {
|
|
763
|
+
points {
|
|
764
|
+
date
|
|
765
|
+
conversations
|
|
766
|
+
conversationsEligible
|
|
767
|
+
conversationsResolved
|
|
768
|
+
conversationsUnresolved
|
|
769
|
+
conversationsHandoffNeed
|
|
770
|
+
conversationsAbandoned
|
|
771
|
+
resolvedRate
|
|
772
|
+
unresolvedRate
|
|
773
|
+
handoffNeedRate
|
|
774
|
+
abandonmentRate
|
|
775
|
+
}
|
|
776
|
+
truncated
|
|
727
777
|
}
|
|
728
778
|
}
|
|
729
779
|
`;
|
|
@@ -1088,6 +1138,9 @@ function getSdk(requester) {
|
|
|
1088
1138
|
aiAgentConversationMetrics(variables, options) {
|
|
1089
1139
|
return requester(exports.AiAgentConversationMetricsDocument, variables, options);
|
|
1090
1140
|
},
|
|
1141
|
+
aiAgentMetricsSeries(variables, options) {
|
|
1142
|
+
return requester(exports.AiAgentMetricsSeriesDocument, variables, options);
|
|
1143
|
+
},
|
|
1091
1144
|
aiAgentConversationOutcome(variables, options) {
|
|
1092
1145
|
return requester(exports.AiAgentConversationOutcomeDocument, variables, options);
|
|
1093
1146
|
},
|
package/src/sdks/drozbot.d.ts
CHANGED
|
@@ -194,6 +194,11 @@ export type ChatbotConversation = {
|
|
|
194
194
|
transferredTo?: Maybe<Scalars['String']['output']>;
|
|
195
195
|
updatedAt: Scalars['DateTime']['output'];
|
|
196
196
|
};
|
|
197
|
+
export declare enum ConversationChannelKind {
|
|
198
|
+
Other = "OTHER",
|
|
199
|
+
Web = "WEB",
|
|
200
|
+
Whatsapp = "WHATSAPP"
|
|
201
|
+
}
|
|
197
202
|
export type CreateDrozBotInstanceInput = {
|
|
198
203
|
callbackBaseUrl?: InputMaybe<Scalars['String']['input']>;
|
|
199
204
|
credentialId: Scalars['ID']['input'];
|
|
@@ -221,6 +226,7 @@ export type CreateDrozBotTicketCommentsInput = {
|
|
|
221
226
|
export type CreateDrozBotTicketInput = {
|
|
222
227
|
/** Abre a sessão já no agente de IA, sem depender de automação ligada à instância. */
|
|
223
228
|
agentId?: InputMaybe<Scalars['ID']['input']>;
|
|
229
|
+
channel?: InputMaybe<ConversationChannelKind>;
|
|
224
230
|
collectedFacts?: InputMaybe<Scalars['JSON']['input']>;
|
|
225
231
|
comment?: InputMaybe<Scalars['String']['input']>;
|
|
226
232
|
/** Destino da conversa quando o agente passa para uma pessoa: DRN da instância que recebe (fila do Droz Chat, Zendesk, Salesforce...). Ausente: a sessão encerra. */
|
package/src/sdks/drozbot.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.serviceName = exports.InternalWhatsAppActiveDispatchDocument = exports.RegisterRootCredentialDocument = exports.ListWhatsAppBotTemplatesDocument = exports.GetWhatsAppBotDetailsDocument = exports.ListWhatsAppBotsDocument = exports.EvaluateDrozbotTalkAnalysisOutputDocument = exports.AnalyzeDrozbotTalkDocument = exports.GetDrozbotTalkAnalysisEmbedUrlDocument = exports.DrozbotTalkConversationDocument = exports.TriggerDrozbotTalkAnalysisBackfillDocument = exports.TriggerDrozbotTalkAnalysisBatchDocument = exports.TriggerDrozbotTalkAnalysisIngestDocument = exports.ListDrozbotTalkAnalysesDocument = void 0;
|
|
4
|
+
exports.DrozbotTalkAnalysisIntentionsDocument = exports.DrozbotAiTalkAnalysisPendingRetriesDocument = exports.DrozbotAiTalkAnalysisInputsDocument = exports.FetchDrozbotTalkAnalysisDatasetDocument = exports.PredictIntentDocument = exports.UpsertIntentDictionaryDocument = exports.ListIntentDictionaryDocument = exports.GetIntentDictionaryDocument = exports.CreateDrozBotTicketCommentDocument = exports.CreateDrozBotTicketCommentsDocument = exports.CreateDrozBotTicketDocument = exports.RemoveDrozBotInstanceDocument = exports.UpdateDrozBotInstanceDocument = exports.CreateDrozBotInstanceDocument = exports.GetCustomerByPhoneDocument = exports.ListDrozBotInstancesDocument = exports.GetDrozBotInstanceDocument = exports.SyncChatbotConversationsDocument = exports.RequestDrozBotAssessDocument = exports.RunDrozbotAiActionHumanizedAnswerDocument = exports.RunDrozbotAiActionDocument = exports.DrozBotWhatsAppTemplateFragmentDoc = exports.DrozBotWhatsAppBotFragmentDoc = exports.DrozbotTalkAnalysisFragmentDoc = exports.DrozbotTalkAnalysisEvaluationFragmentDoc = exports.DrozbotTalkAnalysisInputFragmentDoc = exports.IntentFragmentDoc = exports.IntentDictionaryFragmentDoc = exports.DrozBotCustomerFragmentDoc = exports.DrozBotTicketCommentFragmentDoc = exports.DrozbotFragmentDoc = exports.AiActionVariableValueFragmentDoc = exports.Typenames = exports.DrozbotTalkAnalysisSentiment = exports.DrozbotTalkAnalysisSatisfactionLevel = exports.DrozbotTalkAnalysisCustomerEffortLabel = exports.DrozbotTalkAnalysisAbandonmentType = exports.DrozbotBatchJobStatus = exports.DrozbotAiTalkAnalysisProcessingStatus = exports.DrozbotAiAction = exports.DrozBotWhatsAppTemplateTypes = exports.DrozBotWhatsAppTemplateStates = exports.DrozBotWhatsAppBotProviders = exports.DrozBotTicketMessageSender = exports.DrozBotIntegrationType = exports.DrozBotAssessType = exports.ConversationChannelKind = exports.Can = exports.AppInstanceStatus = exports.AiActionDataSourceType = void 0;
|
|
5
|
+
exports.serviceName = exports.InternalWhatsAppActiveDispatchDocument = exports.RegisterRootCredentialDocument = exports.ListWhatsAppBotTemplatesDocument = exports.GetWhatsAppBotDetailsDocument = exports.ListWhatsAppBotsDocument = exports.EvaluateDrozbotTalkAnalysisOutputDocument = exports.AnalyzeDrozbotTalkDocument = exports.GetDrozbotTalkAnalysisEmbedUrlDocument = exports.DrozbotTalkConversationDocument = exports.TriggerDrozbotTalkAnalysisBackfillDocument = exports.TriggerDrozbotTalkAnalysisBatchDocument = exports.TriggerDrozbotTalkAnalysisIngestDocument = exports.ListDrozbotTalkAnalysesDocument = exports.GetDrozbotTalkAnalysisDocument = void 0;
|
|
6
6
|
exports.getSdk = getSdk;
|
|
7
7
|
var AiActionDataSourceType;
|
|
8
8
|
(function (AiActionDataSourceType) {
|
|
@@ -22,6 +22,12 @@ var Can;
|
|
|
22
22
|
Can["Remove"] = "remove";
|
|
23
23
|
Can["Write"] = "write";
|
|
24
24
|
})(Can || (exports.Can = Can = {}));
|
|
25
|
+
var ConversationChannelKind;
|
|
26
|
+
(function (ConversationChannelKind) {
|
|
27
|
+
ConversationChannelKind["Other"] = "OTHER";
|
|
28
|
+
ConversationChannelKind["Web"] = "WEB";
|
|
29
|
+
ConversationChannelKind["Whatsapp"] = "WHATSAPP";
|
|
30
|
+
})(ConversationChannelKind || (exports.ConversationChannelKind = ConversationChannelKind = {}));
|
|
25
31
|
var DrozBotAssessType;
|
|
26
32
|
(function (DrozBotAssessType) {
|
|
27
33
|
DrozBotAssessType["Csat"] = "CSAT";
|