@droz-js/sdk 0.25.7 → 0.25.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@droz-js/sdk",
3
3
  "description": "Droz SDK",
4
- "version": "0.25.7",
4
+ "version": "0.25.9",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
package/src/drozai.d.ts CHANGED
@@ -47,6 +47,7 @@ declare const DrozAi_base: new (options?: import("./client/http").HttpClientOpti
47
47
  }>, options?: unknown): Promise<import("./sdks/ai").AiAgentUseCaseOverlapQuery>;
48
48
  aiAgentTrace(variables: import("./sdks/ai").Exact<{
49
49
  sessionId: import("./sdks/ai").Scalars["ID"]["input"];
50
+ conversationId?: import("./sdks/ai").InputMaybe<import("./sdks/ai").Scalars["ID"]["input"]>;
50
51
  }>, options?: unknown): Promise<import("./sdks/ai").AiAgentTraceQuery>;
51
52
  listAiAgentScenarios(variables: import("./sdks/ai").Exact<{
52
53
  agentId: import("./sdks/ai").Scalars["ID"]["input"];
@@ -68,6 +69,7 @@ declare const DrozAi_base: new (options?: import("./client/http").HttpClientOpti
68
69
  }>, options?: unknown): Promise<import("./sdks/ai").AiAgentDashboardQuery>;
69
70
  aiAgentConversationOutcome(variables: import("./sdks/ai").Exact<{
70
71
  sessionId: import("./sdks/ai").Scalars["ID"]["input"];
72
+ conversationId?: import("./sdks/ai").InputMaybe<import("./sdks/ai").Scalars["ID"]["input"]>;
71
73
  }>, options?: unknown): Promise<import("./sdks/ai").AiAgentConversationOutcomeQuery>;
72
74
  saveAiAgentUseCase(variables: import("./sdks/ai").Exact<{
73
75
  input: import("./sdks/ai").SaveAiAgentUseCaseInput;
package/src/sdks/ai.d.ts CHANGED
@@ -340,6 +340,8 @@ export type AiAgentConversationMetrics = {
340
340
  channelType?: Maybe<AiAgentChannelType>;
341
341
  contactReason?: Maybe<Scalars['String']['output']>;
342
342
  contactReasonTag?: Maybe<Scalars['String']['output']>;
343
+ /** Ausente quando a sessão não tem conversa registrada: a linha cobre a sessão inteira. */
344
+ conversationId?: Maybe<Scalars['ID']['output']>;
343
345
  costMicroUsd: Scalars['Number']['output'];
344
346
  durationMs: Scalars['Number']['output'];
345
347
  lastOutcome: Scalars['String']['output'];
@@ -402,6 +404,11 @@ export type AiAgentConversationOutcome = {
402
404
  /** false quando a retencao ja apagou a sessao. */
403
405
  collectedDataAvailable: Scalars['Boolean']['output'];
404
406
  contactReason?: Maybe<AiAgentContactReason>;
407
+ /**
408
+ * Presente quando a ficha foi pedida por conversa: turnos, classificação e resolução só dela. A análise é
409
+ * gravada por sessão e só vem na última conversa da sessão.
410
+ */
411
+ conversationId?: Maybe<Scalars['ID']['output']>;
405
412
  /** Motivo da parada do ultimo turno, quando houve. */
406
413
  haltReason?: Maybe<Scalars['String']['output']>;
407
414
  /** Motivo do ultimo pedido de pessoa, com os mesmos valores de `handoffsByReason`. */
@@ -423,12 +430,18 @@ export declare enum AiAgentConversationSortField {
423
430
  Subcategory = "SUBCATEGORY"
424
431
  }
425
432
  export declare enum AiAgentConversationState {
433
+ AwaitingApproval = "AWAITING_APPROVAL",
434
+ ClosedByAllowanceCap = "CLOSED_BY_ALLOWANCE_CAP",
435
+ ClosedByApprovalExpired = "CLOSED_BY_APPROVAL_EXPIRED",
426
436
  ClosedByCap = "CLOSED_BY_CAP",
427
437
  ClosedByConclusion = "CLOSED_BY_CONCLUSION",
428
438
  ClosedByHandoff = "CLOSED_BY_HANDOFF",
429
439
  ClosedByInactivity = "CLOSED_BY_INACTIVITY",
430
440
  ClosedByTechnicalFailure = "CLOSED_BY_TECHNICAL_FAILURE",
431
- InProgress = "IN_PROGRESS"
441
+ ClosedWithIndeterminateWrite = "CLOSED_WITH_INDETERMINATE_WRITE",
442
+ InProgress = "IN_PROGRESS",
443
+ NotStarted = "NOT_STARTED",
444
+ NotStartedExpired = "NOT_STARTED_EXPIRED"
432
445
  }
433
446
  export declare enum AiAgentConversationStatus {
434
447
  InProgress = "IN_PROGRESS",
@@ -438,18 +451,31 @@ export declare enum AiAgentConversationStatus {
438
451
  }
439
452
  export declare enum AiAgentConversationSubcategory {
440
453
  AbandonedAfterClarification = "ABANDONED_AFTER_CLARIFICATION",
454
+ AbandonedAfterNegativeFeedback = "ABANDONED_AFTER_NEGATIVE_FEEDBACK",
455
+ ApprovalDenied = "APPROVAL_DENIED",
456
+ ApprovalExpired = "APPROVAL_EXPIRED",
441
457
  AutomatedInterlocutor = "AUTOMATED_INTERLOCUTOR",
442
458
  CapReached = "CAP_REACHED",
459
+ ClosedWithoutResolution = "CLOSED_WITHOUT_RESOLUTION",
443
460
  ConfirmedResolution = "CONFIRMED_RESOLUTION",
461
+ DispatchWithoutReply = "DISPATCH_WITHOUT_REPLY",
444
462
  GreetingWithoutDemand = "GREETING_WITHOUT_DEMAND",
463
+ HandoffByAllowanceCap = "HANDOFF_BY_ALLOWANCE_CAP",
445
464
  HandoffByCustomerNeed = "HANDOFF_BY_CUSTOMER_NEED",
446
465
  HandoffByProcedure = "HANDOFF_BY_PROCEDURE",
466
+ HandoffByRule = "HANDOFF_BY_RULE",
447
467
  HandoffBySelfDiagnosis = "HANDOFF_BY_SELF_DIAGNOSIS",
468
+ IndeterminateWrite = "INDETERMINATE_WRITE",
448
469
  NoCoverage = "NO_COVERAGE",
449
470
  NoKnowledge = "NO_KNOWLEDGE",
471
+ OrphanBoard = "ORPHAN_BOARD",
472
+ PartialAnswer = "PARTIAL_ANSWER",
450
473
  PresumedResolution = "PRESUMED_RESOLUTION",
451
474
  PromptInjection = "PROMPT_INJECTION",
475
+ RevertedByRecontact = "REVERTED_BY_RECONTACT",
476
+ Spam = "SPAM",
452
477
  TechnicalFailure = "TECHNICAL_FAILURE",
478
+ TriageCompleted = "TRIAGE_COMPLETED",
453
479
  Undefined = "UNDEFINED"
454
480
  }
455
481
  export type AiAgentDashboard = {
@@ -1471,6 +1497,7 @@ export type QueryAiAgentConversationMetricsArgs = {
1471
1497
  input: AiAgentConversationMetricsInput;
1472
1498
  };
1473
1499
  export type QueryAiAgentConversationOutcomeArgs = {
1500
+ conversationId?: InputMaybe<Scalars['ID']['input']>;
1474
1501
  sessionId: Scalars['ID']['input'];
1475
1502
  };
1476
1503
  export type QueryAiAgentDashboardArgs = {
@@ -1489,6 +1516,7 @@ export type QueryAiAgentRoutingPreviewArgs = {
1489
1516
  input: AiAgentRoutingPreviewInput;
1490
1517
  };
1491
1518
  export type QueryAiAgentTraceArgs = {
1519
+ conversationId?: InputMaybe<Scalars['ID']['input']>;
1492
1520
  sessionId: Scalars['ID']['input'];
1493
1521
  };
1494
1522
  export type QueryAiAgentUseCaseOverlapArgs = {
@@ -1848,6 +1876,7 @@ export type AiAgentUseCaseOverlapQuery = {
1848
1876
  };
1849
1877
  export type AiAgentTraceQueryVariables = Exact<{
1850
1878
  sessionId: Scalars['ID']['input'];
1879
+ conversationId?: InputMaybe<Scalars['ID']['input']>;
1851
1880
  }>;
1852
1881
  export type AiAgentTraceQuery = {
1853
1882
  aiAgentTrace: Array<AiAgentTraceFragment>;
@@ -1879,7 +1908,7 @@ export type AiAgentConversationMetricsQueryVariables = Exact<{
1879
1908
  }>;
1880
1909
  export type AiAgentConversationMetricsQuery = {
1881
1910
  aiAgentConversationMetrics: (Pick<AiAgentConversationMetricsPage, 'total' | 'limit' | 'offset' | 'hasRiskAlerts' | 'truncated'> & {
1882
- items: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
1911
+ items: Array<Pick<AiAgentConversationMetrics, 'conversationId' | 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
1883
1912
  facets: Array<(Pick<AiAgentConversationFacet, 'name'> & {
1884
1913
  values: Array<Pick<AiAgentConversationFacetValue, 'value' | 'count'>>;
1885
1914
  })>;
@@ -1936,9 +1965,10 @@ export type AiAgentDashboardSentimentFragment = (Pick<AiAgentDashboardSentiment,
1936
1965
  export type AiAgentDashboardContactReasonFragment = Pick<AiAgentDashboardContactReason, 'key' | 'count' | 'percent'>;
1937
1966
  export type AiAgentConversationOutcomeQueryVariables = Exact<{
1938
1967
  sessionId: Scalars['ID']['input'];
1968
+ conversationId?: InputMaybe<Scalars['ID']['input']>;
1939
1969
  }>;
1940
1970
  export type AiAgentConversationOutcomeQuery = {
1941
- aiAgentConversationOutcome?: Maybe<(Pick<AiAgentConversationOutcome, 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason' | 'handoffReason' | 'agentSummary' | 'promisedNextStep' | 'channelType' | 'reversibleUntil'> & {
1971
+ aiAgentConversationOutcome?: Maybe<(Pick<AiAgentConversationOutcome, 'conversationId' | 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason' | 'handoffReason' | 'agentSummary' | 'promisedNextStep' | 'channelType' | 'reversibleUntil'> & {
1942
1972
  classification: Pick<AiAgentConversationClassification, 'state' | 'status' | 'classification' | 'subcategory' | 'technicalFailure' | 'eligibleForResolution' | 'consumesAllowance' | 'inactivityWindowMs' | 'definitionVersion'>;
1943
1973
  actions: Array<Pick<AiAgentConversationAction, 'toolId' | 'name' | 'ok' | 'result' | 'at'>>;
1944
1974
  contactReason?: Maybe<Pick<AiAgentContactReason, 'name' | 'useCaseId' | 'tag' | 'other' | 'source'>>;
@@ -2202,14 +2232,14 @@ export declare const ListAiAgentUseCasesDocument = "\n query listAiAgentUseCa
2202
2232
  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 endsConversationAfterInforming\n continuesAfterApproval\n approvedReplyTemplate\n deniedReplyTemplate\n expiredReplyTemplate\n replyEmailSubject\n status\n updatedAt\n}\n ";
2203
2233
  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 ";
2204
2234
  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 ";
2205
- export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId: ID!) {\n aiAgentTrace(sessionId: $sessionId) {\n ...aiAgentTrace\n }\n}\n \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 \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
2235
+ export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId: ID!, $conversationId: ID) {\n aiAgentTrace(sessionId: $sessionId, conversationId: $conversationId) {\n ...aiAgentTrace\n }\n}\n \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 \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
2206
2236
  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 ";
2207
2237
  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 ";
2208
2238
  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 ";
2209
- export declare const AiAgentConversationMetricsDocument = "\n query aiAgentConversationMetrics($input: AiAgentConversationMetricsInput!) {\n aiAgentConversationMetrics(input: $input) {\n items {\n sessionId\n channel\n turns\n startedAt\n lastTurnAt\n totalTokens\n costMicroUsd\n durationMs\n lastOutcome\n state\n status\n subcategory\n contactReason\n contactReasonTag\n channelType\n }\n total\n limit\n offset\n facets {\n name\n values {\n value\n count\n }\n }\n hasRiskAlerts\n dateRange {\n min\n max\n }\n truncated\n }\n}\n ";
2239
+ export declare const AiAgentConversationMetricsDocument = "\n query aiAgentConversationMetrics($input: AiAgentConversationMetricsInput!) {\n aiAgentConversationMetrics(input: $input) {\n items {\n conversationId\n sessionId\n channel\n turns\n startedAt\n lastTurnAt\n totalTokens\n costMicroUsd\n durationMs\n lastOutcome\n state\n status\n subcategory\n contactReason\n contactReasonTag\n channelType\n }\n total\n limit\n offset\n facets {\n name\n values {\n value\n count\n }\n }\n hasRiskAlerts\n dateRange {\n min\n max\n }\n truncated\n }\n}\n ";
2210
2240
  export declare const AiAgentMetricsSeriesDocument = "\n query aiAgentMetricsSeries($input: AiAgentMetricsSeriesInput!) {\n aiAgentMetricsSeries(input: $input) {\n points {\n date\n conversations\n conversationsEligible\n conversationsResolved\n conversationsUnresolved\n conversationsHandoffNeed\n conversationsAbandoned\n resolvedRate\n unresolvedRate\n handoffNeedRate\n abandonmentRate\n }\n truncated\n }\n}\n ";
2211
2241
  export declare const AiAgentDashboardDocument = "\n query aiAgentDashboard($input: AiAgentDashboardInput!) {\n aiAgentDashboard(input: $input) {\n agentId\n timezone\n window {\n from\n to\n }\n previousWindow {\n from\n to\n }\n bucket\n conversations {\n ...aiAgentDashboardIndicator\n }\n resolved {\n ...aiAgentDashboardIndicator\n }\n unresolved {\n ...aiAgentDashboardIndicator\n }\n handoffProcedure {\n ...aiAgentDashboardIndicator\n }\n handoffNeed {\n ...aiAgentDashboardIndicator\n }\n abandonment {\n ...aiAgentDashboardIndicator\n }\n scoreBands {\n band\n count\n percent\n polarity\n variation {\n unit\n value\n }\n }\n agentScoreAvg\n agentScoreAvgBand\n analyzedConversations\n hasActiveDispatches\n activeDispatches {\n sent {\n ...aiAgentDashboardIndicator\n }\n answered {\n ...aiAgentDashboardIndicator\n }\n unanswered {\n ...aiAgentDashboardIndicator\n }\n }\n sentimentAtStart {\n ...aiAgentDashboardSentiment\n }\n sentimentAtEnd {\n ...aiAgentDashboardSentiment\n }\n contactReasons {\n all {\n ...aiAgentDashboardContactReason\n }\n handoff {\n ...aiAgentDashboardContactReason\n }\n abandonment {\n ...aiAgentDashboardContactReason\n }\n }\n procedures {\n key\n name\n count\n level\n }\n knowledgeGaps {\n key\n count\n level\n }\n series {\n date\n endDate\n conversations\n conversationsEligible\n conversationsResolved\n conversationsUnresolved\n conversationsHandoffNeed\n conversationsAbandoned\n resolvedRate\n unresolvedRate\n handoffNeedRate\n abandonmentRate\n }\n truncated\n analysesTruncated\n }\n}\n \n fragment aiAgentDashboardIndicator on AiAgentDashboardIndicator {\n value\n polarity\n variation {\n unit\n value\n }\n}\n \n\n fragment aiAgentDashboardSentiment on AiAgentDashboardSentiment {\n sentiment\n count\n percent\n polarity\n variation {\n unit\n value\n }\n}\n \n\n fragment aiAgentDashboardContactReason on AiAgentDashboardContactReason {\n key\n count\n percent\n}\n ";
2212
- export declare const AiAgentConversationOutcomeDocument = "\n query aiAgentConversationOutcome($sessionId: ID!) {\n aiAgentConversationOutcome(sessionId: $sessionId) {\n sessionId\n agentId\n agentVersion\n resolution\n resolutionDefinition\n collectedData\n collectedDataAvailable\n turns\n startedAt\n lastTurnAt\n haltReason\n handoffReason\n agentSummary\n promisedNextStep\n classification {\n state\n status\n classification\n subcategory\n technicalFailure\n eligibleForResolution\n consumesAllowance\n inactivityWindowMs\n definitionVersion\n }\n channelType\n reversibleUntil\n actions {\n toolId\n name\n ok\n result\n at\n }\n contactReason {\n name\n useCaseId\n tag\n other\n source\n }\n analysis {\n analysisVersion\n failed\n failureReason\n sentimentStart\n sentimentEnd\n estimatedSatisfaction\n riskAlerts\n knowledgeGaps\n repeatedInformation\n humanRequests\n contactReason\n contactReasonId\n contactReasonTag\n contactReasonOther\n contactReasonSource\n summary\n agentScore\n agentScoreBand\n agentClarity\n customerEffortScore\n model\n costMicroUsd\n analyzedAt\n }\n }\n}\n ";
2242
+ export declare const AiAgentConversationOutcomeDocument = "\n query aiAgentConversationOutcome($sessionId: ID!, $conversationId: ID) {\n aiAgentConversationOutcome(\n sessionId: $sessionId\n conversationId: $conversationId\n ) {\n conversationId\n sessionId\n agentId\n agentVersion\n resolution\n resolutionDefinition\n collectedData\n collectedDataAvailable\n turns\n startedAt\n lastTurnAt\n haltReason\n handoffReason\n agentSummary\n promisedNextStep\n classification {\n state\n status\n classification\n subcategory\n technicalFailure\n eligibleForResolution\n consumesAllowance\n inactivityWindowMs\n definitionVersion\n }\n channelType\n reversibleUntil\n actions {\n toolId\n name\n ok\n result\n at\n }\n contactReason {\n name\n useCaseId\n tag\n other\n source\n }\n analysis {\n analysisVersion\n failed\n failureReason\n sentimentStart\n sentimentEnd\n estimatedSatisfaction\n riskAlerts\n knowledgeGaps\n repeatedInformation\n humanRequests\n contactReason\n contactReasonId\n contactReasonTag\n contactReasonOther\n contactReasonSource\n summary\n agentScore\n agentScoreBand\n agentClarity\n customerEffortScore\n model\n costMicroUsd\n analyzedAt\n }\n }\n}\n ";
2213
2243
  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 ";
2214
2244
  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 ";
2215
2245
  export declare const RemoveAiAgentUseCaseDocument = "\n mutation removeAiAgentUseCase($input: AiAgentAuthoringRefInput!) {\n removeAiAgentUseCase(input: $input)\n}\n ";
package/src/sdks/ai.js CHANGED
@@ -42,12 +42,18 @@ var AiAgentConversationSortField;
42
42
  })(AiAgentConversationSortField || (exports.AiAgentConversationSortField = AiAgentConversationSortField = {}));
43
43
  var AiAgentConversationState;
44
44
  (function (AiAgentConversationState) {
45
+ AiAgentConversationState["AwaitingApproval"] = "AWAITING_APPROVAL";
46
+ AiAgentConversationState["ClosedByAllowanceCap"] = "CLOSED_BY_ALLOWANCE_CAP";
47
+ AiAgentConversationState["ClosedByApprovalExpired"] = "CLOSED_BY_APPROVAL_EXPIRED";
45
48
  AiAgentConversationState["ClosedByCap"] = "CLOSED_BY_CAP";
46
49
  AiAgentConversationState["ClosedByConclusion"] = "CLOSED_BY_CONCLUSION";
47
50
  AiAgentConversationState["ClosedByHandoff"] = "CLOSED_BY_HANDOFF";
48
51
  AiAgentConversationState["ClosedByInactivity"] = "CLOSED_BY_INACTIVITY";
49
52
  AiAgentConversationState["ClosedByTechnicalFailure"] = "CLOSED_BY_TECHNICAL_FAILURE";
53
+ AiAgentConversationState["ClosedWithIndeterminateWrite"] = "CLOSED_WITH_INDETERMINATE_WRITE";
50
54
  AiAgentConversationState["InProgress"] = "IN_PROGRESS";
55
+ AiAgentConversationState["NotStarted"] = "NOT_STARTED";
56
+ AiAgentConversationState["NotStartedExpired"] = "NOT_STARTED_EXPIRED";
51
57
  })(AiAgentConversationState || (exports.AiAgentConversationState = AiAgentConversationState = {}));
52
58
  var AiAgentConversationStatus;
53
59
  (function (AiAgentConversationStatus) {
@@ -59,18 +65,31 @@ var AiAgentConversationStatus;
59
65
  var AiAgentConversationSubcategory;
60
66
  (function (AiAgentConversationSubcategory) {
61
67
  AiAgentConversationSubcategory["AbandonedAfterClarification"] = "ABANDONED_AFTER_CLARIFICATION";
68
+ AiAgentConversationSubcategory["AbandonedAfterNegativeFeedback"] = "ABANDONED_AFTER_NEGATIVE_FEEDBACK";
69
+ AiAgentConversationSubcategory["ApprovalDenied"] = "APPROVAL_DENIED";
70
+ AiAgentConversationSubcategory["ApprovalExpired"] = "APPROVAL_EXPIRED";
62
71
  AiAgentConversationSubcategory["AutomatedInterlocutor"] = "AUTOMATED_INTERLOCUTOR";
63
72
  AiAgentConversationSubcategory["CapReached"] = "CAP_REACHED";
73
+ AiAgentConversationSubcategory["ClosedWithoutResolution"] = "CLOSED_WITHOUT_RESOLUTION";
64
74
  AiAgentConversationSubcategory["ConfirmedResolution"] = "CONFIRMED_RESOLUTION";
75
+ AiAgentConversationSubcategory["DispatchWithoutReply"] = "DISPATCH_WITHOUT_REPLY";
65
76
  AiAgentConversationSubcategory["GreetingWithoutDemand"] = "GREETING_WITHOUT_DEMAND";
77
+ AiAgentConversationSubcategory["HandoffByAllowanceCap"] = "HANDOFF_BY_ALLOWANCE_CAP";
66
78
  AiAgentConversationSubcategory["HandoffByCustomerNeed"] = "HANDOFF_BY_CUSTOMER_NEED";
67
79
  AiAgentConversationSubcategory["HandoffByProcedure"] = "HANDOFF_BY_PROCEDURE";
80
+ AiAgentConversationSubcategory["HandoffByRule"] = "HANDOFF_BY_RULE";
68
81
  AiAgentConversationSubcategory["HandoffBySelfDiagnosis"] = "HANDOFF_BY_SELF_DIAGNOSIS";
82
+ AiAgentConversationSubcategory["IndeterminateWrite"] = "INDETERMINATE_WRITE";
69
83
  AiAgentConversationSubcategory["NoCoverage"] = "NO_COVERAGE";
70
84
  AiAgentConversationSubcategory["NoKnowledge"] = "NO_KNOWLEDGE";
85
+ AiAgentConversationSubcategory["OrphanBoard"] = "ORPHAN_BOARD";
86
+ AiAgentConversationSubcategory["PartialAnswer"] = "PARTIAL_ANSWER";
71
87
  AiAgentConversationSubcategory["PresumedResolution"] = "PRESUMED_RESOLUTION";
72
88
  AiAgentConversationSubcategory["PromptInjection"] = "PROMPT_INJECTION";
89
+ AiAgentConversationSubcategory["RevertedByRecontact"] = "REVERTED_BY_RECONTACT";
90
+ AiAgentConversationSubcategory["Spam"] = "SPAM";
73
91
  AiAgentConversationSubcategory["TechnicalFailure"] = "TECHNICAL_FAILURE";
92
+ AiAgentConversationSubcategory["TriageCompleted"] = "TRIAGE_COMPLETED";
74
93
  AiAgentConversationSubcategory["Undefined"] = "UNDEFINED";
75
94
  })(AiAgentConversationSubcategory || (exports.AiAgentConversationSubcategory = AiAgentConversationSubcategory = {}));
76
95
  var AiAgentExecutionAutonomy;
@@ -773,8 +792,8 @@ exports.AiAgentUseCaseOverlapDocument = `
773
792
  }
774
793
  `;
775
794
  exports.AiAgentTraceDocument = `
776
- query aiAgentTrace($sessionId: ID!) {
777
- aiAgentTrace(sessionId: $sessionId) {
795
+ query aiAgentTrace($sessionId: ID!, $conversationId: ID) {
796
+ aiAgentTrace(sessionId: $sessionId, conversationId: $conversationId) {
778
797
  ...aiAgentTrace
779
798
  }
780
799
  }
@@ -815,6 +834,7 @@ exports.AiAgentConversationMetricsDocument = `
815
834
  query aiAgentConversationMetrics($input: AiAgentConversationMetricsInput!) {
816
835
  aiAgentConversationMetrics(input: $input) {
817
836
  items {
837
+ conversationId
818
838
  sessionId
819
839
  channel
820
840
  turns
@@ -977,8 +997,12 @@ exports.AiAgentDashboardDocument = `
977
997
  ${exports.AiAgentDashboardSentimentFragmentDoc}
978
998
  ${exports.AiAgentDashboardContactReasonFragmentDoc}`;
979
999
  exports.AiAgentConversationOutcomeDocument = `
980
- query aiAgentConversationOutcome($sessionId: ID!) {
981
- aiAgentConversationOutcome(sessionId: $sessionId) {
1000
+ query aiAgentConversationOutcome($sessionId: ID!, $conversationId: ID) {
1001
+ aiAgentConversationOutcome(
1002
+ sessionId: $sessionId
1003
+ conversationId: $conversationId
1004
+ ) {
1005
+ conversationId
982
1006
  sessionId
983
1007
  agentId
984
1008
  agentVersion