@droz-js/sdk 0.24.2 → 0.24.4
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/sdks/ai.d.ts +39 -3
- package/src/sdks/ai.js +20 -0
package/package.json
CHANGED
package/src/sdks/ai.d.ts
CHANGED
|
@@ -323,6 +323,14 @@ export type AiAgentConversationClassification = {
|
|
|
323
323
|
subcategory?: Maybe<AiAgentConversationSubcategory>;
|
|
324
324
|
technicalFailure?: Maybe<AiAgentTechnicalFailure>;
|
|
325
325
|
};
|
|
326
|
+
export type AiAgentConversationFacet = {
|
|
327
|
+
name: Scalars['String']['output'];
|
|
328
|
+
values: Array<AiAgentConversationFacetValue>;
|
|
329
|
+
};
|
|
330
|
+
export type AiAgentConversationFacetValue = {
|
|
331
|
+
count: Scalars['Number']['output'];
|
|
332
|
+
value: Scalars['String']['output'];
|
|
333
|
+
};
|
|
326
334
|
export type AiAgentConversationMetrics = {
|
|
327
335
|
channel?: Maybe<Scalars['String']['output']>;
|
|
328
336
|
channelType?: Maybe<AiAgentChannelType>;
|
|
@@ -341,18 +349,27 @@ export type AiAgentConversationMetrics = {
|
|
|
341
349
|
turns: Scalars['Number']['output'];
|
|
342
350
|
};
|
|
343
351
|
export type AiAgentConversationMetricsInput = {
|
|
352
|
+
activeDispatch?: InputMaybe<Scalars['Boolean']['input']>;
|
|
344
353
|
agentId: Scalars['ID']['input'];
|
|
345
354
|
channel?: InputMaybe<Scalars['String']['input']>;
|
|
346
355
|
from: Scalars['Number']['input'];
|
|
356
|
+
hasRiskAlert?: InputMaybe<Scalars['Boolean']['input']>;
|
|
347
357
|
limit?: InputMaybe<Scalars['Number']['input']>;
|
|
348
358
|
offset?: InputMaybe<Scalars['Number']['input']>;
|
|
359
|
+
scoreBand?: InputMaybe<Array<AiAgentScoreBand>>;
|
|
349
360
|
search?: InputMaybe<Scalars['String']['input']>;
|
|
361
|
+
sentimentEnd?: InputMaybe<Array<AiAgentSentiment>>;
|
|
362
|
+
sentimentStart?: InputMaybe<Array<AiAgentSentiment>>;
|
|
350
363
|
sortBy?: InputMaybe<AiAgentConversationSortField>;
|
|
351
364
|
sortDirection?: InputMaybe<AiAgentSortDirection>;
|
|
352
365
|
status?: InputMaybe<Array<AiAgentConversationStatus>>;
|
|
366
|
+
subcategory?: InputMaybe<Array<AiAgentConversationSubcategory>>;
|
|
353
367
|
to: Scalars['Number']['input'];
|
|
368
|
+
useCaseId?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
354
369
|
};
|
|
355
370
|
export type AiAgentConversationMetricsPage = {
|
|
371
|
+
/** Cada faceta conta sobre o conjunto filtrado pelos outros filtros, sem o seu próprio. */
|
|
372
|
+
facets: Array<AiAgentConversationFacet>;
|
|
356
373
|
items: Array<AiAgentConversationMetrics>;
|
|
357
374
|
limit: Scalars['Number']['output'];
|
|
358
375
|
offset: Scalars['Number']['output'];
|
|
@@ -425,6 +442,8 @@ export declare enum AiAgentConversationSubcategory {
|
|
|
425
442
|
}
|
|
426
443
|
export type AiAgentDashboard = {
|
|
427
444
|
abandonment: AiAgentDashboardIndicator;
|
|
445
|
+
/** Absent when no dispatch was sent in the window. Absent is not zero. */
|
|
446
|
+
activeDispatches?: Maybe<AiAgentDashboardActiveDispatches>;
|
|
428
447
|
agentId: Scalars['ID']['output'];
|
|
429
448
|
/** Absent when no conversation was analyzed in the window. Absent is not zero. */
|
|
430
449
|
agentScoreAvg?: Maybe<Scalars['Float']['output']>;
|
|
@@ -436,6 +455,8 @@ export type AiAgentDashboard = {
|
|
|
436
455
|
conversations: AiAgentDashboardIndicator;
|
|
437
456
|
handoffNeed: AiAgentDashboardIndicator;
|
|
438
457
|
handoffProcedure: AiAgentDashboardIndicator;
|
|
458
|
+
/** Do agente, não da janela. Vira true na primeira conversa aberta pela resposta a um disparo ativo. */
|
|
459
|
+
hasActiveDispatches: Scalars['Boolean']['output'];
|
|
439
460
|
knowledgeGaps: Array<AiAgentDashboardKnowledgeGap>;
|
|
440
461
|
period: AiAgentDashboardPeriod;
|
|
441
462
|
previousWindow: AiAgentDashboardWindow;
|
|
@@ -451,6 +472,12 @@ export type AiAgentDashboard = {
|
|
|
451
472
|
unresolved: AiAgentDashboardIndicator;
|
|
452
473
|
window: AiAgentDashboardWindow;
|
|
453
474
|
};
|
|
475
|
+
/** `answered` and `unanswered` are the share of the dispatches whose window is closed, one decimal. Absent while none is closed. */
|
|
476
|
+
export type AiAgentDashboardActiveDispatches = {
|
|
477
|
+
answered: AiAgentDashboardIndicator;
|
|
478
|
+
sent: AiAgentDashboardIndicator;
|
|
479
|
+
unanswered: AiAgentDashboardIndicator;
|
|
480
|
+
};
|
|
454
481
|
/** Sorted by count, highest first. */
|
|
455
482
|
export type AiAgentDashboardContactReason = {
|
|
456
483
|
count: Scalars['Number']['output'];
|
|
@@ -1670,6 +1697,7 @@ export declare enum Typenames {
|
|
|
1670
1697
|
AiAgentConversation = "AiAgentConversation",
|
|
1671
1698
|
AiAgentConversationAnalysis = "AiAgentConversationAnalysis",
|
|
1672
1699
|
AiAgentConversationPointer = "AiAgentConversationPointer",
|
|
1700
|
+
AiAgentDispatchingAgent = "AiAgentDispatchingAgent",
|
|
1673
1701
|
AiAgentEvalReport = "AiAgentEvalReport",
|
|
1674
1702
|
AiAgentExternalTermination = "AiAgentExternalTermination",
|
|
1675
1703
|
AiAgentOpenConversation = "AiAgentOpenConversation",
|
|
@@ -1843,6 +1871,9 @@ export type AiAgentConversationMetricsQueryVariables = Exact<{
|
|
|
1843
1871
|
export type AiAgentConversationMetricsQuery = {
|
|
1844
1872
|
aiAgentConversationMetrics: (Pick<AiAgentConversationMetricsPage, 'total' | 'limit' | 'offset' | 'truncated'> & {
|
|
1845
1873
|
items: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
|
|
1874
|
+
facets: Array<(Pick<AiAgentConversationFacet, 'name'> & {
|
|
1875
|
+
values: Array<Pick<AiAgentConversationFacetValue, 'value' | 'count'>>;
|
|
1876
|
+
})>;
|
|
1846
1877
|
});
|
|
1847
1878
|
};
|
|
1848
1879
|
export type AiAgentMetricsSeriesQueryVariables = Exact<{
|
|
@@ -1857,7 +1888,7 @@ export type AiAgentDashboardQueryVariables = Exact<{
|
|
|
1857
1888
|
input: AiAgentDashboardInput;
|
|
1858
1889
|
}>;
|
|
1859
1890
|
export type AiAgentDashboardQuery = {
|
|
1860
|
-
aiAgentDashboard: (Pick<AiAgentDashboard, 'agentId' | 'period' | 'timezone' | 'bucket' | 'agentScoreAvg' | 'agentScoreAvgBand' | 'analyzedConversations' | 'truncated' | 'analysesTruncated'> & {
|
|
1891
|
+
aiAgentDashboard: (Pick<AiAgentDashboard, 'agentId' | 'period' | 'timezone' | 'bucket' | 'agentScoreAvg' | 'agentScoreAvgBand' | 'analyzedConversations' | 'hasActiveDispatches' | 'truncated' | 'analysesTruncated'> & {
|
|
1861
1892
|
window: Pick<AiAgentDashboardWindow, 'from' | 'to'>;
|
|
1862
1893
|
previousWindow: Pick<AiAgentDashboardWindow, 'from' | 'to'>;
|
|
1863
1894
|
conversations: AiAgentDashboardIndicatorFragment;
|
|
@@ -1869,6 +1900,11 @@ export type AiAgentDashboardQuery = {
|
|
|
1869
1900
|
scoreBands: Array<(Pick<AiAgentDashboardScoreBand, 'band' | 'count' | 'percent' | 'polarity'> & {
|
|
1870
1901
|
variation: Pick<AiAgentVariation, 'unit' | 'value'>;
|
|
1871
1902
|
})>;
|
|
1903
|
+
activeDispatches?: Maybe<{
|
|
1904
|
+
sent: AiAgentDashboardIndicatorFragment;
|
|
1905
|
+
answered: AiAgentDashboardIndicatorFragment;
|
|
1906
|
+
unanswered: AiAgentDashboardIndicatorFragment;
|
|
1907
|
+
}>;
|
|
1872
1908
|
sentimentAtStart: Array<AiAgentDashboardSentimentFragment>;
|
|
1873
1909
|
sentimentAtEnd: Array<AiAgentDashboardSentimentFragment>;
|
|
1874
1910
|
contactReasons: {
|
|
@@ -2160,9 +2196,9 @@ export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId
|
|
|
2160
2196
|
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 ";
|
|
2161
2197
|
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 ";
|
|
2162
2198
|
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 ";
|
|
2163
|
-
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 ";
|
|
2199
|
+
export declare const AiAgentConversationMetricsDocument = "\n query aiAgentConversationMetrics($input: AiAgentConversationMetricsInput!) {\n aiAgentConversationMetrics(input: $input) {\n items {\n sessionId\n channel\n turns\n startedAt\n lastTurnAt\n totalTokens\n costMicroUsd\n durationMs\n lastOutcome\n state\n status\n subcategory\n contactReason\n contactReasonTag\n channelType\n }\n total\n limit\n offset\n facets {\n name\n values {\n value\n count\n }\n }\n truncated\n }\n}\n ";
|
|
2164
2200
|
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 ";
|
|
2165
|
-
export declare const AiAgentDashboardDocument = "\n query aiAgentDashboard($input: AiAgentDashboardInput!) {\n aiAgentDashboard(input: $input) {\n agentId\n period\n timezone\n window {\n from\n to\n }\n previousWindow {\n from\n to\n }\n bucket\n conversations {\n ...aiAgentDashboardIndicator\n }\n resolved {\n ...aiAgentDashboardIndicator\n }\n unresolved {\n ...aiAgentDashboardIndicator\n }\n handoffProcedure {\n ...aiAgentDashboardIndicator\n }\n handoffNeed {\n ...aiAgentDashboardIndicator\n }\n abandonment {\n ...aiAgentDashboardIndicator\n }\n scoreBands {\n band\n count\n percent\n polarity\n variation {\n unit\n value\n }\n }\n agentScoreAvg\n agentScoreAvgBand\n analyzedConversations\n sentimentAtStart {\n ...aiAgentDashboardSentiment\n }\n sentimentAtEnd {\n ...aiAgentDashboardSentiment\n }\n contactReasons {\n all {\n ...aiAgentDashboardContactReason\n }\n handoff {\n ...aiAgentDashboardContactReason\n }\n abandonment {\n ...aiAgentDashboardContactReason\n }\n }\n procedures {\n key\n name\n count\n level\n }\n knowledgeGaps {\n key\n count\n level\n }\n series {\n date\n endDate\n conversations\n conversationsEligible\n conversationsResolved\n conversationsUnresolved\n conversationsHandoffNeed\n conversationsAbandoned\n resolvedRate\n unresolvedRate\n handoffNeedRate\n abandonmentRate\n }\n truncated\n analysesTruncated\n }\n}\n \n fragment aiAgentDashboardIndicator on AiAgentDashboardIndicator {\n value\n polarity\n variation {\n unit\n value\n }\n}\n \n\n fragment aiAgentDashboardSentiment on AiAgentDashboardSentiment {\n sentiment\n count\n percent\n polarity\n variation {\n unit\n value\n }\n}\n \n\n fragment aiAgentDashboardContactReason on AiAgentDashboardContactReason {\n key\n count\n percent\n}\n ";
|
|
2201
|
+
export declare const AiAgentDashboardDocument = "\n query aiAgentDashboard($input: AiAgentDashboardInput!) {\n aiAgentDashboard(input: $input) {\n agentId\n period\n timezone\n window {\n from\n to\n }\n previousWindow {\n from\n to\n }\n bucket\n conversations {\n ...aiAgentDashboardIndicator\n }\n resolved {\n ...aiAgentDashboardIndicator\n }\n unresolved {\n ...aiAgentDashboardIndicator\n }\n handoffProcedure {\n ...aiAgentDashboardIndicator\n }\n handoffNeed {\n ...aiAgentDashboardIndicator\n }\n abandonment {\n ...aiAgentDashboardIndicator\n }\n scoreBands {\n band\n count\n percent\n polarity\n variation {\n unit\n value\n }\n }\n agentScoreAvg\n agentScoreAvgBand\n analyzedConversations\n hasActiveDispatches\n activeDispatches {\n sent {\n ...aiAgentDashboardIndicator\n }\n answered {\n ...aiAgentDashboardIndicator\n }\n unanswered {\n ...aiAgentDashboardIndicator\n }\n }\n sentimentAtStart {\n ...aiAgentDashboardSentiment\n }\n sentimentAtEnd {\n ...aiAgentDashboardSentiment\n }\n contactReasons {\n all {\n ...aiAgentDashboardContactReason\n }\n handoff {\n ...aiAgentDashboardContactReason\n }\n abandonment {\n ...aiAgentDashboardContactReason\n }\n }\n procedures {\n key\n name\n count\n level\n }\n knowledgeGaps {\n key\n count\n level\n }\n series {\n date\n endDate\n conversations\n conversationsEligible\n conversationsResolved\n conversationsUnresolved\n conversationsHandoffNeed\n conversationsAbandoned\n resolvedRate\n unresolvedRate\n handoffNeedRate\n abandonmentRate\n }\n truncated\n analysesTruncated\n }\n}\n \n fragment aiAgentDashboardIndicator on AiAgentDashboardIndicator {\n value\n polarity\n variation {\n unit\n value\n }\n}\n \n\n fragment aiAgentDashboardSentiment on AiAgentDashboardSentiment {\n sentiment\n count\n percent\n polarity\n variation {\n unit\n value\n }\n}\n \n\n fragment aiAgentDashboardContactReason on AiAgentDashboardContactReason {\n key\n count\n percent\n}\n ";
|
|
2166
2202
|
export declare const AiAgentConversationOutcomeDocument = "\n query aiAgentConversationOutcome($sessionId: ID!) {\n aiAgentConversationOutcome(sessionId: $sessionId) {\n sessionId\n agentId\n agentVersion\n resolution\n resolutionDefinition\n collectedData\n collectedDataAvailable\n turns\n startedAt\n lastTurnAt\n haltReason\n handoffReason\n agentSummary\n promisedNextStep\n classification {\n state\n status\n classification\n subcategory\n technicalFailure\n eligibleForResolution\n consumesAllowance\n inactivityWindowMs\n definitionVersion\n }\n channelType\n 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 ";
|
|
2167
2203
|
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 ";
|
|
2168
2204
|
export declare const SaveAiAgentProcedureDocument = "\n mutation saveAiAgentProcedure($input: SaveAiAgentProcedureInput!) {\n saveAiAgentProcedure(input: $input) {\n ...aiAgentProcedure\n }\n}\n \n fragment aiAgentProcedure on AiAgentProcedure {\n id\n name\n guidanceSteps\n toolIds\n contingency\n executionAutonomy\n endsConversationAfterInforming\n continuesAfterApproval\n approvedReplyTemplate\n deniedReplyTemplate\n expiredReplyTemplate\n replyEmailSubject\n status\n updatedAt\n}\n ";
|
package/src/sdks/ai.js
CHANGED
|
@@ -214,6 +214,7 @@ var Typenames;
|
|
|
214
214
|
Typenames["AiAgentConversation"] = "AiAgentConversation";
|
|
215
215
|
Typenames["AiAgentConversationAnalysis"] = "AiAgentConversationAnalysis";
|
|
216
216
|
Typenames["AiAgentConversationPointer"] = "AiAgentConversationPointer";
|
|
217
|
+
Typenames["AiAgentDispatchingAgent"] = "AiAgentDispatchingAgent";
|
|
217
218
|
Typenames["AiAgentEvalReport"] = "AiAgentEvalReport";
|
|
218
219
|
Typenames["AiAgentExternalTermination"] = "AiAgentExternalTermination";
|
|
219
220
|
Typenames["AiAgentOpenConversation"] = "AiAgentOpenConversation";
|
|
@@ -834,6 +835,13 @@ exports.AiAgentConversationMetricsDocument = `
|
|
|
834
835
|
total
|
|
835
836
|
limit
|
|
836
837
|
offset
|
|
838
|
+
facets {
|
|
839
|
+
name
|
|
840
|
+
values {
|
|
841
|
+
value
|
|
842
|
+
count
|
|
843
|
+
}
|
|
844
|
+
}
|
|
837
845
|
truncated
|
|
838
846
|
}
|
|
839
847
|
}
|
|
@@ -904,6 +912,18 @@ exports.AiAgentDashboardDocument = `
|
|
|
904
912
|
agentScoreAvg
|
|
905
913
|
agentScoreAvgBand
|
|
906
914
|
analyzedConversations
|
|
915
|
+
hasActiveDispatches
|
|
916
|
+
activeDispatches {
|
|
917
|
+
sent {
|
|
918
|
+
...aiAgentDashboardIndicator
|
|
919
|
+
}
|
|
920
|
+
answered {
|
|
921
|
+
...aiAgentDashboardIndicator
|
|
922
|
+
}
|
|
923
|
+
unanswered {
|
|
924
|
+
...aiAgentDashboardIndicator
|
|
925
|
+
}
|
|
926
|
+
}
|
|
907
927
|
sentimentAtStart {
|
|
908
928
|
...aiAgentDashboardSentiment
|
|
909
929
|
}
|