@droz-js/sdk 0.20.27 → 0.20.29
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 +94 -8
- package/src/sdks/ai.js +70 -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
|
@@ -311,11 +311,31 @@ export type AiAgentConversationMetrics = {
|
|
|
311
311
|
sessionId: Scalars['ID']['output'];
|
|
312
312
|
startedAt: Scalars['Number']['output'];
|
|
313
313
|
state: AiAgentConversationState;
|
|
314
|
-
status
|
|
314
|
+
status: AiAgentConversationStatus;
|
|
315
315
|
subcategory?: Maybe<AiAgentConversationSubcategory>;
|
|
316
316
|
totalTokens: Scalars['Number']['output'];
|
|
317
317
|
turns: Scalars['Number']['output'];
|
|
318
318
|
};
|
|
319
|
+
export type AiAgentConversationMetricsInput = {
|
|
320
|
+
agentId: Scalars['ID']['input'];
|
|
321
|
+
channel?: InputMaybe<Scalars['String']['input']>;
|
|
322
|
+
from: Scalars['Number']['input'];
|
|
323
|
+
limit?: InputMaybe<Scalars['Number']['input']>;
|
|
324
|
+
offset?: InputMaybe<Scalars['Number']['input']>;
|
|
325
|
+
search?: InputMaybe<Scalars['String']['input']>;
|
|
326
|
+
sortBy?: InputMaybe<AiAgentConversationSortField>;
|
|
327
|
+
sortDirection?: InputMaybe<AiAgentSortDirection>;
|
|
328
|
+
status?: InputMaybe<Array<AiAgentConversationStatus>>;
|
|
329
|
+
to: Scalars['Number']['input'];
|
|
330
|
+
};
|
|
331
|
+
export type AiAgentConversationMetricsPage = {
|
|
332
|
+
items: Array<AiAgentConversationMetrics>;
|
|
333
|
+
limit: Scalars['Number']['output'];
|
|
334
|
+
offset: Scalars['Number']['output'];
|
|
335
|
+
total: Scalars['Number']['output'];
|
|
336
|
+
/** true quando o teto de leitura foi atingido: a página cobre parte do período. */
|
|
337
|
+
truncated: Scalars['Boolean']['output'];
|
|
338
|
+
};
|
|
319
339
|
export type AiAgentConversationOutcome = {
|
|
320
340
|
actions: Array<AiAgentConversationAction>;
|
|
321
341
|
agentId: Scalars['ID']['output'];
|
|
@@ -344,6 +364,11 @@ export type AiAgentConversationOutcome = {
|
|
|
344
364
|
startedAt: Scalars['Number']['output'];
|
|
345
365
|
turns: Scalars['Number']['output'];
|
|
346
366
|
};
|
|
367
|
+
export declare enum AiAgentConversationSortField {
|
|
368
|
+
Date = "DATE",
|
|
369
|
+
Status = "STATUS",
|
|
370
|
+
Subcategory = "SUBCATEGORY"
|
|
371
|
+
}
|
|
347
372
|
export declare enum AiAgentConversationState {
|
|
348
373
|
EmAndamento = "EM_ANDAMENTO",
|
|
349
374
|
EncerradaPorConclusao = "ENCERRADA_POR_CONCLUSAO",
|
|
@@ -352,6 +377,12 @@ export declare enum AiAgentConversationState {
|
|
|
352
377
|
EncerradaPorTeto = "ENCERRADA_POR_TETO",
|
|
353
378
|
EncerradaPorTransbordo = "ENCERRADA_POR_TRANSBORDO"
|
|
354
379
|
}
|
|
380
|
+
export declare enum AiAgentConversationStatus {
|
|
381
|
+
InProgress = "IN_PROGRESS",
|
|
382
|
+
NotEligible = "NOT_ELIGIBLE",
|
|
383
|
+
Resolved = "RESOLVED",
|
|
384
|
+
Unresolved = "UNRESOLVED"
|
|
385
|
+
}
|
|
355
386
|
export declare enum AiAgentConversationSubcategory {
|
|
356
387
|
AbandonoAposEsclarecimento = "ABANDONO_APOS_ESCLARECIMENTO",
|
|
357
388
|
EncerradaPorTeto = "ENCERRADA_POR_TETO",
|
|
@@ -534,7 +565,7 @@ export type AiAgentMetrics = {
|
|
|
534
565
|
toolCalls: Scalars['Number']['output'];
|
|
535
566
|
/** Chamadas de ferramenta que falharam. */
|
|
536
567
|
toolCallsFailed: Scalars['Number']['output'];
|
|
537
|
-
/** Falhas por classe
|
|
568
|
+
/** Falhas por classe, com os valores de `AiAgentTracedToolCall.errorClass`. */
|
|
538
569
|
toolErrorsByClass: Array<AiAgentMetricsCount>;
|
|
539
570
|
/** Falhas por conexao externa, identificada pelo host — responde "qual integracao esta caindo". */
|
|
540
571
|
toolErrorsByConnection: Array<AiAgentMetricsCount>;
|
|
@@ -563,6 +594,10 @@ export type AiAgentMetrics = {
|
|
|
563
594
|
/** Pontos percentuais inteiros sobre `conversationsEligible`; ausente sem conversa elegível. */
|
|
564
595
|
unresolvedRate?: Maybe<Scalars['Number']['output']>;
|
|
565
596
|
};
|
|
597
|
+
export declare enum AiAgentMetricsBucket {
|
|
598
|
+
Day = "DAY",
|
|
599
|
+
Week = "WEEK"
|
|
600
|
+
}
|
|
566
601
|
export type AiAgentMetricsCount = {
|
|
567
602
|
count: Scalars['Number']['output'];
|
|
568
603
|
key: Scalars['String']['output'];
|
|
@@ -573,6 +608,34 @@ export type AiAgentMetricsInput = {
|
|
|
573
608
|
from: Scalars['Number']['input'];
|
|
574
609
|
to: Scalars['Number']['input'];
|
|
575
610
|
};
|
|
611
|
+
export type AiAgentMetricsSeries = {
|
|
612
|
+
points: Array<AiAgentMetricsSeriesPoint>;
|
|
613
|
+
/** true quando o teto de leitura foi atingido: a série cobre parte do período. */
|
|
614
|
+
truncated: Scalars['Boolean']['output'];
|
|
615
|
+
};
|
|
616
|
+
/** IANA name of the viewer time zone, e.g. America/Sao_Paulo. A week starts on Monday. */
|
|
617
|
+
export type AiAgentMetricsSeriesInput = {
|
|
618
|
+
agentId: Scalars['ID']['input'];
|
|
619
|
+
bucket: AiAgentMetricsBucket;
|
|
620
|
+
channel?: InputMaybe<Scalars['String']['input']>;
|
|
621
|
+
from: Scalars['Number']['input'];
|
|
622
|
+
timezone: Scalars['String']['input'];
|
|
623
|
+
to: Scalars['Number']['input'];
|
|
624
|
+
};
|
|
625
|
+
export type AiAgentMetricsSeriesPoint = {
|
|
626
|
+
abandonmentRate?: Maybe<Scalars['Number']['output']>;
|
|
627
|
+
conversations: Scalars['Number']['output'];
|
|
628
|
+
conversationsAbandoned: Scalars['Number']['output'];
|
|
629
|
+
conversationsEligible: Scalars['Number']['output'];
|
|
630
|
+
conversationsHandoffNeed: Scalars['Number']['output'];
|
|
631
|
+
conversationsResolved: Scalars['Number']['output'];
|
|
632
|
+
conversationsUnresolved: Scalars['Number']['output'];
|
|
633
|
+
/** Local date (YYYY-MM-DD) of the first day of the bucket. */
|
|
634
|
+
date: Scalars['String']['output'];
|
|
635
|
+
handoffNeedRate?: Maybe<Scalars['Number']['output']>;
|
|
636
|
+
resolvedRate?: Maybe<Scalars['Number']['output']>;
|
|
637
|
+
unresolvedRate?: Maybe<Scalars['Number']['output']>;
|
|
638
|
+
};
|
|
576
639
|
/** A mesma janela, sem agente: a listagem quer todos de uma vez. */
|
|
577
640
|
export type AiAgentMetricsWindowInput = {
|
|
578
641
|
channel?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -716,6 +779,10 @@ export type AiAgentSentimentCount = {
|
|
|
716
779
|
count: Scalars['Number']['output'];
|
|
717
780
|
key: AiAgentSentiment;
|
|
718
781
|
};
|
|
782
|
+
export declare enum AiAgentSortDirection {
|
|
783
|
+
Asc = "ASC",
|
|
784
|
+
Desc = "DESC"
|
|
785
|
+
}
|
|
719
786
|
export type AiAgentSpec = {
|
|
720
787
|
/** @deprecated Ignorado. O tipo da ferramenta sai do método do conector. O campo sai na próxima versão. */
|
|
721
788
|
allowWriteTools?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -866,7 +933,10 @@ export type AiAgentTrace = {
|
|
|
866
933
|
export type AiAgentTracedToolCall = {
|
|
867
934
|
/** O sistema externo, pelo host. Sem path nem query, que carregam parametro do cliente. */
|
|
868
935
|
connection?: Maybe<Scalars['String']['output']>;
|
|
869
|
-
/**
|
|
936
|
+
/**
|
|
937
|
+
* `unauthenticated`, `not_configured`, `not_migrated`, `needs_approval`, `rejected_arguments`, `timeout` ou `upstream`.
|
|
938
|
+
* `timeout` cobre o tempo esgotado no sistema do cliente e na chamada ao apiconnectors.
|
|
939
|
+
*/
|
|
870
940
|
errorClass?: Maybe<Scalars['String']['output']>;
|
|
871
941
|
name: Scalars['String']['output'];
|
|
872
942
|
/**
|
|
@@ -1145,7 +1215,7 @@ export type QnAInstance = {
|
|
|
1145
1215
|
export type Query = {
|
|
1146
1216
|
/** O que a suíte deste agente aceita hoje. O teto por cenário já vem dividido pelos cenários dele. */
|
|
1147
1217
|
aiAgentCheckLimits: AiAgentCheckLimits;
|
|
1148
|
-
aiAgentConversationMetrics:
|
|
1218
|
+
aiAgentConversationMetrics: AiAgentConversationMetricsPage;
|
|
1149
1219
|
aiAgentConversationOutcome?: Maybe<AiAgentConversationOutcome>;
|
|
1150
1220
|
/**
|
|
1151
1221
|
* §4.8: as bases do Droz Base do tenant. A chamada e entre services, com App Token — nao ha
|
|
@@ -1155,6 +1225,7 @@ export type Query = {
|
|
|
1155
1225
|
aiAgentMetrics: AiAgentMetrics;
|
|
1156
1226
|
/** As metricas da janela para todos os agentes, numa ida so. Agente sem rastro vem com zeros. */
|
|
1157
1227
|
aiAgentMetricsByAgent: Array<AiAgentMetrics>;
|
|
1228
|
+
aiAgentMetricsSeries: AiAgentMetricsSeries;
|
|
1158
1229
|
/**
|
|
1159
1230
|
* A politica de retencao em vigor para o tenant, com os padroes aplicados quando ele nao
|
|
1160
1231
|
* configurou a propria. Existe para a politica ser verificavel de fora, nao so estar escrita.
|
|
@@ -1201,7 +1272,7 @@ export type QueryAiAgentCheckLimitsArgs = {
|
|
|
1201
1272
|
agentId: Scalars['ID']['input'];
|
|
1202
1273
|
};
|
|
1203
1274
|
export type QueryAiAgentConversationMetricsArgs = {
|
|
1204
|
-
input:
|
|
1275
|
+
input: AiAgentConversationMetricsInput;
|
|
1205
1276
|
};
|
|
1206
1277
|
export type QueryAiAgentConversationOutcomeArgs = {
|
|
1207
1278
|
sessionId: Scalars['ID']['input'];
|
|
@@ -1212,6 +1283,9 @@ export type QueryAiAgentMetricsArgs = {
|
|
|
1212
1283
|
export type QueryAiAgentMetricsByAgentArgs = {
|
|
1213
1284
|
input: AiAgentMetricsWindowInput;
|
|
1214
1285
|
};
|
|
1286
|
+
export type QueryAiAgentMetricsSeriesArgs = {
|
|
1287
|
+
input: AiAgentMetricsSeriesInput;
|
|
1288
|
+
};
|
|
1215
1289
|
export type QueryAiAgentRoutingPreviewArgs = {
|
|
1216
1290
|
input: AiAgentRoutingPreviewInput;
|
|
1217
1291
|
};
|
|
@@ -1587,10 +1661,20 @@ export type AiAgentRetentionPolicyQuery = {
|
|
|
1587
1661
|
});
|
|
1588
1662
|
};
|
|
1589
1663
|
export type AiAgentConversationMetricsQueryVariables = Exact<{
|
|
1590
|
-
input:
|
|
1664
|
+
input: AiAgentConversationMetricsInput;
|
|
1591
1665
|
}>;
|
|
1592
1666
|
export type AiAgentConversationMetricsQuery = {
|
|
1593
|
-
aiAgentConversationMetrics:
|
|
1667
|
+
aiAgentConversationMetrics: (Pick<AiAgentConversationMetricsPage, 'total' | 'limit' | 'offset' | 'truncated'> & {
|
|
1668
|
+
items: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
|
|
1669
|
+
});
|
|
1670
|
+
};
|
|
1671
|
+
export type AiAgentMetricsSeriesQueryVariables = Exact<{
|
|
1672
|
+
input: AiAgentMetricsSeriesInput;
|
|
1673
|
+
}>;
|
|
1674
|
+
export type AiAgentMetricsSeriesQuery = {
|
|
1675
|
+
aiAgentMetricsSeries: (Pick<AiAgentMetricsSeries, 'truncated'> & {
|
|
1676
|
+
points: Array<Pick<AiAgentMetricsSeriesPoint, 'date' | 'conversations' | 'conversationsEligible' | 'conversationsResolved' | 'conversationsUnresolved' | 'conversationsHandoffNeed' | 'conversationsAbandoned' | 'resolvedRate' | 'unresolvedRate' | 'handoffNeedRate' | 'abandonmentRate'>>;
|
|
1677
|
+
});
|
|
1594
1678
|
};
|
|
1595
1679
|
export type AiAgentConversationOutcomeQueryVariables = Exact<{
|
|
1596
1680
|
sessionId: Scalars['ID']['input'];
|
|
@@ -1860,7 +1944,8 @@ export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId
|
|
|
1860
1944
|
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
1945
|
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
1946
|
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:
|
|
1947
|
+
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 ";
|
|
1948
|
+
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
1949
|
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
1950
|
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
1951
|
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 +1998,7 @@ export declare function getSdk<C>(requester: Requester<C>): {
|
|
|
1913
1998
|
setAiAgentRetentionPolicy(variables: SetAiAgentRetentionPolicyMutationVariables, options?: C): Promise<SetAiAgentRetentionPolicyMutation>;
|
|
1914
1999
|
aiAgentRetentionPolicy(variables?: AiAgentRetentionPolicyQueryVariables, options?: C): Promise<AiAgentRetentionPolicyQuery>;
|
|
1915
2000
|
aiAgentConversationMetrics(variables: AiAgentConversationMetricsQueryVariables, options?: C): Promise<AiAgentConversationMetricsQuery>;
|
|
2001
|
+
aiAgentMetricsSeries(variables: AiAgentMetricsSeriesQueryVariables, options?: C): Promise<AiAgentMetricsSeriesQuery>;
|
|
1916
2002
|
aiAgentConversationOutcome(variables: AiAgentConversationOutcomeQueryVariables, options?: C): Promise<AiAgentConversationOutcomeQuery>;
|
|
1917
2003
|
saveAiAgentUseCase(variables: SaveAiAgentUseCaseMutationVariables, options?: C): Promise<SaveAiAgentUseCaseMutation>;
|
|
1918
2004
|
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) {
|
|
@@ -32,6 +32,12 @@ var AiAgentConversationClass;
|
|
|
32
32
|
AiAgentConversationClass["NaoResolvida"] = "NAO_RESOLVIDA";
|
|
33
33
|
AiAgentConversationClass["Resolvida"] = "RESOLVIDA";
|
|
34
34
|
})(AiAgentConversationClass || (exports.AiAgentConversationClass = AiAgentConversationClass = {}));
|
|
35
|
+
var AiAgentConversationSortField;
|
|
36
|
+
(function (AiAgentConversationSortField) {
|
|
37
|
+
AiAgentConversationSortField["Date"] = "DATE";
|
|
38
|
+
AiAgentConversationSortField["Status"] = "STATUS";
|
|
39
|
+
AiAgentConversationSortField["Subcategory"] = "SUBCATEGORY";
|
|
40
|
+
})(AiAgentConversationSortField || (exports.AiAgentConversationSortField = AiAgentConversationSortField = {}));
|
|
35
41
|
var AiAgentConversationState;
|
|
36
42
|
(function (AiAgentConversationState) {
|
|
37
43
|
AiAgentConversationState["EmAndamento"] = "EM_ANDAMENTO";
|
|
@@ -41,6 +47,13 @@ var AiAgentConversationState;
|
|
|
41
47
|
AiAgentConversationState["EncerradaPorTeto"] = "ENCERRADA_POR_TETO";
|
|
42
48
|
AiAgentConversationState["EncerradaPorTransbordo"] = "ENCERRADA_POR_TRANSBORDO";
|
|
43
49
|
})(AiAgentConversationState || (exports.AiAgentConversationState = AiAgentConversationState = {}));
|
|
50
|
+
var AiAgentConversationStatus;
|
|
51
|
+
(function (AiAgentConversationStatus) {
|
|
52
|
+
AiAgentConversationStatus["InProgress"] = "IN_PROGRESS";
|
|
53
|
+
AiAgentConversationStatus["NotEligible"] = "NOT_ELIGIBLE";
|
|
54
|
+
AiAgentConversationStatus["Resolved"] = "RESOLVED";
|
|
55
|
+
AiAgentConversationStatus["Unresolved"] = "UNRESOLVED";
|
|
56
|
+
})(AiAgentConversationStatus || (exports.AiAgentConversationStatus = AiAgentConversationStatus = {}));
|
|
44
57
|
var AiAgentConversationSubcategory;
|
|
45
58
|
(function (AiAgentConversationSubcategory) {
|
|
46
59
|
AiAgentConversationSubcategory["AbandonoAposEsclarecimento"] = "ABANDONO_APOS_ESCLARECIMENTO";
|
|
@@ -72,6 +85,11 @@ var AiAgentHandoffReason;
|
|
|
72
85
|
AiAgentHandoffReason["Undeclared"] = "undeclared";
|
|
73
86
|
AiAgentHandoffReason["Unresolved"] = "unresolved";
|
|
74
87
|
})(AiAgentHandoffReason || (exports.AiAgentHandoffReason = AiAgentHandoffReason = {}));
|
|
88
|
+
var AiAgentMetricsBucket;
|
|
89
|
+
(function (AiAgentMetricsBucket) {
|
|
90
|
+
AiAgentMetricsBucket["Day"] = "DAY";
|
|
91
|
+
AiAgentMetricsBucket["Week"] = "WEEK";
|
|
92
|
+
})(AiAgentMetricsBucket || (exports.AiAgentMetricsBucket = AiAgentMetricsBucket = {}));
|
|
75
93
|
var AiAgentRiskAlert;
|
|
76
94
|
(function (AiAgentRiskAlert) {
|
|
77
95
|
AiAgentRiskAlert["Cancelamento"] = "cancelamento";
|
|
@@ -92,6 +110,11 @@ var AiAgentSentiment;
|
|
|
92
110
|
AiAgentSentiment["Neutro"] = "neutro";
|
|
93
111
|
AiAgentSentiment["Positivo"] = "positivo";
|
|
94
112
|
})(AiAgentSentiment || (exports.AiAgentSentiment = AiAgentSentiment = {}));
|
|
113
|
+
var AiAgentSortDirection;
|
|
114
|
+
(function (AiAgentSortDirection) {
|
|
115
|
+
AiAgentSortDirection["Asc"] = "ASC";
|
|
116
|
+
AiAgentSortDirection["Desc"] = "DESC";
|
|
117
|
+
})(AiAgentSortDirection || (exports.AiAgentSortDirection = AiAgentSortDirection = {}));
|
|
95
118
|
var AiAgentTechnicalFailure;
|
|
96
119
|
(function (AiAgentTechnicalFailure) {
|
|
97
120
|
AiAgentTechnicalFailure["Erro_5Xx"] = "ERRO_5XX";
|
|
@@ -707,23 +730,49 @@ exports.AiAgentRetentionPolicyDocument = `
|
|
|
707
730
|
}
|
|
708
731
|
`;
|
|
709
732
|
exports.AiAgentConversationMetricsDocument = `
|
|
710
|
-
query aiAgentConversationMetrics($input:
|
|
733
|
+
query aiAgentConversationMetrics($input: AiAgentConversationMetricsInput!) {
|
|
711
734
|
aiAgentConversationMetrics(input: $input) {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
735
|
+
items {
|
|
736
|
+
sessionId
|
|
737
|
+
channel
|
|
738
|
+
turns
|
|
739
|
+
startedAt
|
|
740
|
+
lastTurnAt
|
|
741
|
+
totalTokens
|
|
742
|
+
costMicroUsd
|
|
743
|
+
durationMs
|
|
744
|
+
lastOutcome
|
|
745
|
+
state
|
|
746
|
+
status
|
|
747
|
+
subcategory
|
|
748
|
+
contactReason
|
|
749
|
+
contactReasonTag
|
|
750
|
+
channelType
|
|
751
|
+
}
|
|
752
|
+
total
|
|
753
|
+
limit
|
|
754
|
+
offset
|
|
755
|
+
truncated
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
`;
|
|
759
|
+
exports.AiAgentMetricsSeriesDocument = `
|
|
760
|
+
query aiAgentMetricsSeries($input: AiAgentMetricsSeriesInput!) {
|
|
761
|
+
aiAgentMetricsSeries(input: $input) {
|
|
762
|
+
points {
|
|
763
|
+
date
|
|
764
|
+
conversations
|
|
765
|
+
conversationsEligible
|
|
766
|
+
conversationsResolved
|
|
767
|
+
conversationsUnresolved
|
|
768
|
+
conversationsHandoffNeed
|
|
769
|
+
conversationsAbandoned
|
|
770
|
+
resolvedRate
|
|
771
|
+
unresolvedRate
|
|
772
|
+
handoffNeedRate
|
|
773
|
+
abandonmentRate
|
|
774
|
+
}
|
|
775
|
+
truncated
|
|
727
776
|
}
|
|
728
777
|
}
|
|
729
778
|
`;
|
|
@@ -1088,6 +1137,9 @@ function getSdk(requester) {
|
|
|
1088
1137
|
aiAgentConversationMetrics(variables, options) {
|
|
1089
1138
|
return requester(exports.AiAgentConversationMetricsDocument, variables, options);
|
|
1090
1139
|
},
|
|
1140
|
+
aiAgentMetricsSeries(variables, options) {
|
|
1141
|
+
return requester(exports.AiAgentMetricsSeriesDocument, variables, options);
|
|
1142
|
+
},
|
|
1091
1143
|
aiAgentConversationOutcome(variables, options) {
|
|
1092
1144
|
return requester(exports.AiAgentConversationOutcomeDocument, variables, options);
|
|
1093
1145
|
},
|
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";
|