@droz-js/sdk 0.22.0 → 0.22.2

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.22.0",
4
+ "version": "0.22.2",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
package/src/sdks/ai.d.ts CHANGED
@@ -178,6 +178,22 @@ export type AiAgentBudgetInput = {
178
178
  maxToolCalls: Scalars['Int']['input'];
179
179
  onExceeded: BudgetExceededAction;
180
180
  };
181
+ export type AiAgentChannelTiming = {
182
+ abandonAfterMs?: Maybe<Scalars['Number']['output']>;
183
+ channel: Scalars['String']['output'];
184
+ metaWindowMs?: Maybe<Scalars['Number']['output']>;
185
+ remindAfterMs?: Maybe<Scalars['Number']['output']>;
186
+ reminderMessage?: Maybe<Scalars['String']['output']>;
187
+ renewalMessage?: Maybe<Scalars['String']['output']>;
188
+ };
189
+ export type AiAgentChannelTimingInput = {
190
+ abandonAfterMs?: InputMaybe<Scalars['Number']['input']>;
191
+ channel: Scalars['String']['input'];
192
+ metaWindowMs?: InputMaybe<Scalars['Number']['input']>;
193
+ remindAfterMs?: InputMaybe<Scalars['Number']['input']>;
194
+ reminderMessage?: InputMaybe<Scalars['String']['input']>;
195
+ renewalMessage?: InputMaybe<Scalars['String']['input']>;
196
+ };
181
197
  export declare enum AiAgentChannelType {
182
198
  Email = "email",
183
199
  Web = "web",
@@ -303,6 +319,7 @@ export type AiAgentConversationClassification = {
303
319
  eligibleForResolution: Scalars['Boolean']['output'];
304
320
  inactivityWindowMs: Scalars['Number']['output'];
305
321
  state: AiAgentConversationState;
322
+ status: AiAgentConversationStatus;
306
323
  subcategory?: Maybe<AiAgentConversationSubcategory>;
307
324
  technicalFailure?: Maybe<AiAgentTechnicalFailure>;
308
325
  };
@@ -409,7 +426,11 @@ export declare enum AiAgentConversationSubcategory {
409
426
  export type AiAgentDashboard = {
410
427
  abandonment: AiAgentDashboardIndicator;
411
428
  agentId: Scalars['ID']['output'];
429
+ /** Absent when no conversation was analyzed in the window. Absent is not zero. */
430
+ agentScoreAvg?: Maybe<Scalars['Float']['output']>;
431
+ agentScoreAvgBand?: Maybe<AiAgentScoreBand>;
412
432
  analysesTruncated: Scalars['Boolean']['output'];
433
+ analyzedConversations: Scalars['Number']['output'];
413
434
  bucket: AiAgentMetricsBucket;
414
435
  contactReasons: AiAgentDashboardContactReasons;
415
436
  conversations: AiAgentDashboardIndicator;
@@ -763,14 +784,19 @@ export type AiAgentMetricsWindowInput = {
763
784
  to: Scalars['Number']['input'];
764
785
  };
765
786
  export type AiAgentProcedure = {
787
+ approvedReplyTemplate?: Maybe<Scalars['String']['output']>;
766
788
  contingency: Scalars['String']['output'];
789
+ continuesAfterApproval: Scalars['Boolean']['output'];
790
+ deniedReplyTemplate?: Maybe<Scalars['String']['output']>;
767
791
  endsConversationAfterInforming: Scalars['Boolean']['output'];
768
792
  /** `autonomous` ou `needsApproval`. Ferramenta irreversivel exige `needsApproval`. */
769
793
  executionAutonomy: Scalars['String']['output'];
794
+ expiredReplyTemplate?: Maybe<Scalars['String']['output']>;
770
795
  /** As etapas como o autor instruiria uma pessoa. O texto e a fonte da verdade (§6.2). */
771
796
  guidanceSteps: Array<Scalars['String']['output']>;
772
797
  id: Scalars['ID']['output'];
773
798
  name: Scalars['String']['output'];
799
+ replyEmailSubject?: Maybe<Scalars['String']['output']>;
774
800
  status: Scalars['String']['output'];
775
801
  /** Ferramentas que as etapas usam. Declaradas: e o que da para validar sem interpretar o texto. */
776
802
  toolIds: Array<Scalars['ID']['output']>;
@@ -914,6 +940,7 @@ export type AiAgentSpec = {
914
940
  cannot: Array<Scalars['String']['output']>;
915
941
  /** Canais em que o agente atende. Ausente = ainda nao vinculado; declarado vazio e erro. */
916
942
  channels?: Maybe<Array<Scalars['String']['output']>>;
943
+ conversationTiming?: Maybe<Array<AiAgentChannelTiming>>;
917
944
  handoff?: Maybe<AiAgentHandoff>;
918
945
  identity: AiAgentIdentity;
919
946
  /**
@@ -933,6 +960,7 @@ export type AiAgentSpecInput = {
933
960
  can: Array<Scalars['String']['input']>;
934
961
  cannot: Array<Scalars['String']['input']>;
935
962
  channels?: InputMaybe<Array<Scalars['String']['input']>>;
963
+ conversationTiming?: InputMaybe<Array<AiAgentChannelTimingInput>>;
936
964
  handoff?: InputMaybe<AiAgentHandoffInput>;
937
965
  identity: AiAgentIdentityInput;
938
966
  /**
@@ -1497,12 +1525,17 @@ export type ResolveAiAgentApprovalInput = {
1497
1525
  };
1498
1526
  export type SaveAiAgentProcedureInput = {
1499
1527
  agentId: Scalars['ID']['input'];
1528
+ approvedReplyTemplate?: InputMaybe<Scalars['String']['input']>;
1500
1529
  contingency: Scalars['String']['input'];
1530
+ continuesAfterApproval?: InputMaybe<Scalars['Boolean']['input']>;
1531
+ deniedReplyTemplate?: InputMaybe<Scalars['String']['input']>;
1501
1532
  endsConversationAfterInforming?: InputMaybe<Scalars['Boolean']['input']>;
1502
1533
  executionAutonomy: Scalars['String']['input'];
1534
+ expiredReplyTemplate?: InputMaybe<Scalars['String']['input']>;
1503
1535
  guidanceSteps: Array<Scalars['String']['input']>;
1504
1536
  id: Scalars['ID']['input'];
1505
1537
  name: Scalars['String']['input'];
1538
+ replyEmailSubject?: InputMaybe<Scalars['String']['input']>;
1506
1539
  status: Scalars['String']['input'];
1507
1540
  toolIds: Array<Scalars['ID']['input']>;
1508
1541
  };
@@ -1631,6 +1664,8 @@ export declare enum Typenames {
1631
1664
  AiAgentAnswerCache = "AiAgentAnswerCache",
1632
1665
  AiAgentApproval = "AiAgentApproval",
1633
1666
  AiAgentCheckRun = "AiAgentCheckRun",
1667
+ AiAgentConsumption = "AiAgentConsumption",
1668
+ AiAgentConsumptionMark = "AiAgentConsumptionMark",
1634
1669
  AiAgentConversation = "AiAgentConversation",
1635
1670
  AiAgentConversationAnalysis = "AiAgentConversationAnalysis",
1636
1671
  AiAgentConversationPointer = "AiAgentConversationPointer",
@@ -1672,6 +1707,7 @@ export type AiAgentSpecFragment = (Pick<AiAgentSpec, 'can' | 'cannot' | 'knowled
1672
1707
  identity: Pick<AiAgentIdentity, 'displayName' | 'role' | 'tone' | 'toneNotes' | 'openingMessage' | 'outOfScopeBehaviour'>;
1673
1708
  budget: Pick<AiAgentBudget, 'maxSteps' | 'maxToolCalls' | 'maxTokens' | 'maxCostMicroUsd' | 'maxPeriodCostMicroUsd' | 'onExceeded'>;
1674
1709
  handoff?: Maybe<Pick<AiAgentHandoff, 'transition' | 'target'>>;
1710
+ conversationTiming?: Maybe<Array<Pick<AiAgentChannelTiming, 'channel' | 'abandonAfterMs' | 'remindAfterMs' | 'metaWindowMs' | 'reminderMessage' | 'renewalMessage'>>>;
1675
1711
  });
1676
1712
  export type AiAgentToolExclusionFragment = Pick<AiAgentToolExclusion, 'toolId' | 'reason'>;
1677
1713
  export type AiAgentVersionWithSpecFragment = (Pick<AiAgentVersion, 'agentId' | 'version' | 'status' | 'createdAt'> & {
@@ -1736,7 +1772,7 @@ export type RemoveAiAgentMutationVariables = Exact<{
1736
1772
  }>;
1737
1773
  export type RemoveAiAgentMutation = Pick<Mutation, 'removeAiAgent'>;
1738
1774
  export type AiAgentUseCaseFragment = Pick<AiAgentUseCase, 'id' | 'name' | 'subjectDescription' | 'procedureId' | 'tag' | 'status' | 'updatedAt'>;
1739
- export type AiAgentProcedureFragment = Pick<AiAgentProcedure, 'id' | 'name' | 'guidanceSteps' | 'toolIds' | 'contingency' | 'executionAutonomy' | 'endsConversationAfterInforming' | 'status' | 'updatedAt'>;
1775
+ export type AiAgentProcedureFragment = Pick<AiAgentProcedure, 'id' | 'name' | 'guidanceSteps' | 'toolIds' | 'contingency' | 'executionAutonomy' | 'endsConversationAfterInforming' | 'continuesAfterApproval' | 'approvedReplyTemplate' | 'deniedReplyTemplate' | 'expiredReplyTemplate' | 'replyEmailSubject' | 'status' | 'updatedAt'>;
1740
1776
  export type AiAgentToolFragment = (Pick<AiAgentTool, 'toolId' | 'name' | 'description' | 'effect' | 'availability' | 'requiresAuthenticatedCustomer' | 'onFailure' | 'customerScope' | 'returns' | 'approval'> & {
1741
1777
  parameters: Array<Pick<AiAgentToolParameter, 'name' | 'type' | 'required' | 'description' | 'grounding'>>;
1742
1778
  });
@@ -1819,7 +1855,7 @@ export type AiAgentDashboardQueryVariables = Exact<{
1819
1855
  input: AiAgentDashboardInput;
1820
1856
  }>;
1821
1857
  export type AiAgentDashboardQuery = {
1822
- aiAgentDashboard: (Pick<AiAgentDashboard, 'agentId' | 'period' | 'timezone' | 'bucket' | 'truncated' | 'analysesTruncated'> & {
1858
+ aiAgentDashboard: (Pick<AiAgentDashboard, 'agentId' | 'period' | 'timezone' | 'bucket' | 'agentScoreAvg' | 'agentScoreAvgBand' | 'analyzedConversations' | 'truncated' | 'analysesTruncated'> & {
1823
1859
  window: Pick<AiAgentDashboardWindow, 'from' | 'to'>;
1824
1860
  previousWindow: Pick<AiAgentDashboardWindow, 'from' | 'to'>;
1825
1861
  conversations: AiAgentDashboardIndicatorFragment;
@@ -1855,7 +1891,7 @@ export type AiAgentConversationOutcomeQueryVariables = Exact<{
1855
1891
  }>;
1856
1892
  export type AiAgentConversationOutcomeQuery = {
1857
1893
  aiAgentConversationOutcome?: Maybe<(Pick<AiAgentConversationOutcome, 'sessionId' | 'agentId' | 'agentVersion' | 'resolution' | 'resolutionDefinition' | 'collectedData' | 'collectedDataAvailable' | 'turns' | 'startedAt' | 'lastTurnAt' | 'haltReason' | 'handoffReason' | 'agentSummary' | 'promisedNextStep' | 'channelType'> & {
1858
- classification: Pick<AiAgentConversationClassification, 'state' | 'classification' | 'subcategory' | 'technicalFailure' | 'eligibleForResolution' | 'consumesAllowance' | 'inactivityWindowMs' | 'definitionVersion'>;
1894
+ classification: Pick<AiAgentConversationClassification, 'state' | 'status' | 'classification' | 'subcategory' | 'technicalFailure' | 'eligibleForResolution' | 'consumesAllowance' | 'inactivityWindowMs' | 'definitionVersion'>;
1859
1895
  actions: Array<Pick<AiAgentConversationAction, 'toolId' | 'name' | 'ok' | 'result' | 'at'>>;
1860
1896
  contactReason?: Maybe<Pick<AiAgentContactReason, 'name' | 'useCaseId' | 'tag' | 'other' | 'source'>>;
1861
1897
  analysis?: Maybe<Pick<AiAgentConversationAnalysis, 'analysisVersion' | 'failed' | 'failureReason' | 'sentimentStart' | 'sentimentEnd' | 'estimatedSatisfaction' | 'riskAlerts' | 'knowledgeGaps' | 'repeatedInformation' | 'humanRequests' | 'contactReason' | 'contactReasonId' | 'contactReasonTag' | 'contactReasonOther' | 'contactReasonSource' | 'summary' | 'agentScore' | 'agentScoreBand' | 'agentClarity' | 'customerEffortScore' | 'model' | 'costMicroUsd' | 'analyzedAt'>>;
@@ -2088,12 +2124,12 @@ export type RemoveQnAInstanceMutation = {
2088
2124
  };
2089
2125
  export declare const AiAgentSummaryFragmentDoc = "\n fragment aiAgentSummary on AiAgentSummary {\n agentId\n name\n liveVersion\n channels\n updatedAt\n queuedApprovals\n status\n}\n ";
2090
2126
  export declare const AiAgentVersionFragmentDoc = "\n fragment aiAgentVersion on AiAgentVersion {\n agentId\n version\n status\n createdAt\n}\n ";
2091
- export declare const AiAgentSpecFragmentDoc = "\n fragment aiAgentSpec on AiAgentSpec {\n identity {\n displayName\n role\n tone\n toneNotes\n openingMessage\n outOfScopeBehaviour\n }\n can\n cannot\n knowledgeBaseIds\n knowledgeFallback\n toolIds\n budget {\n maxSteps\n maxToolCalls\n maxTokens\n maxCostMicroUsd\n maxPeriodCostMicroUsd\n onExceeded\n }\n handoff {\n transition\n target\n }\n channels\n}\n ";
2127
+ export declare const AiAgentSpecFragmentDoc = "\n fragment aiAgentSpec on AiAgentSpec {\n identity {\n displayName\n role\n tone\n toneNotes\n openingMessage\n outOfScopeBehaviour\n }\n can\n cannot\n knowledgeBaseIds\n knowledgeFallback\n toolIds\n budget {\n maxSteps\n maxToolCalls\n maxTokens\n maxCostMicroUsd\n maxPeriodCostMicroUsd\n onExceeded\n }\n handoff {\n transition\n target\n }\n channels\n conversationTiming {\n channel\n abandonAfterMs\n remindAfterMs\n metaWindowMs\n reminderMessage\n renewalMessage\n }\n}\n ";
2092
2128
  export declare const AiAgentToolExclusionFragmentDoc = "\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
2093
2129
  export declare const AiAgentVersionWithSpecFragmentDoc = "\n fragment aiAgentVersionWithSpec on AiAgentVersion {\n agentId\n version\n status\n createdAt\n spec {\n ...aiAgentSpec\n }\n excludedTools {\n ...aiAgentToolExclusion\n }\n}\n ";
2094
2130
  export declare const AiAgentListingMetricsFragmentDoc = "\n fragment aiAgentListingMetrics on AiAgentMetrics {\n agentId\n conversations\n conversationsResolved\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n costMicroUsd\n}\n ";
2095
2131
  export declare const AiAgentUseCaseFragmentDoc = "\n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n tag\n status\n updatedAt\n}\n ";
2096
- export declare const AiAgentProcedureFragmentDoc = "\n fragment aiAgentProcedure on AiAgentProcedure {\n id\n name\n guidanceSteps\n toolIds\n contingency\n executionAutonomy\n endsConversationAfterInforming\n status\n updatedAt\n}\n ";
2132
+ export declare const AiAgentProcedureFragmentDoc = "\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 ";
2097
2133
  export declare const AiAgentToolFragmentDoc = "\n fragment aiAgentTool on AiAgentTool {\n toolId\n name\n description\n effect\n availability\n requiresAuthenticatedCustomer\n onFailure\n customerScope\n returns\n approval\n parameters {\n name\n type\n required\n description\n grounding\n }\n}\n ";
2098
2134
  export declare const AiAgentTraceFragmentDoc = "\n fragment aiAgentTrace on AiAgentTrace {\n sessionId\n turn\n agentId\n agentVersion\n input\n promptBuilderVersion\n masterRuleVersion\n identificationRequired\n promptFingerprint\n knowledgeOrigins\n outcome\n haltReason\n steps\n answer\n startedAt\n excludedTools {\n ...aiAgentToolExclusion\n }\n toolCalls {\n toolId\n name\n result\n ok\n connection\n errorClass\n }\n}\n ";
2099
2135
  export declare const AiAgentScenarioFragmentDoc = "\n fragment aiAgentScenario on AiAgentScenario {\n scenarioId\n description\n customerId\n turns\n expectations\n}\n ";
@@ -2115,7 +2151,7 @@ export declare const RollbackAiAgentVersionDocument = "\n mutation rollbackAi
2115
2151
  export declare const RemoveAiAgentVersionDocument = "\n mutation removeAiAgentVersion($input: AiAgentVersionRefInput!) {\n removeAiAgentVersion(input: $input) {\n ...aiAgentVersion\n }\n}\n \n fragment aiAgentVersion on AiAgentVersion {\n agentId\n version\n status\n createdAt\n}\n ";
2116
2152
  export declare const RemoveAiAgentDocument = "\n mutation removeAiAgent($input: AiAgentRefInput!) {\n removeAiAgent(input: $input)\n}\n ";
2117
2153
  export declare const ListAiAgentUseCasesDocument = "\n query listAiAgentUseCases($agentId: ID!) {\n listAiAgentUseCases(agentId: $agentId) {\n ...aiAgentUseCase\n }\n}\n \n fragment aiAgentUseCase on AiAgentUseCase {\n id\n name\n subjectDescription\n procedureId\n tag\n status\n updatedAt\n}\n ";
2118
- 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 status\n updatedAt\n}\n ";
2154
+ 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 ";
2119
2155
  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 ";
2120
2156
  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 ";
2121
2157
  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 ";
@@ -2124,10 +2160,10 @@ export declare const SetAiAgentRetentionPolicyDocument = "\n mutation setAiAg
2124
2160
  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 ";
2125
2161
  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 ";
2126
2162
  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 ";
2127
- 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 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 ";
2128
- 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 ";
2163
+ 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 ";
2164
+ 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 ";
2129
2165
  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 ";
2130
- 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 status\n updatedAt\n}\n ";
2166
+ 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 ";
2131
2167
  export declare const RemoveAiAgentUseCaseDocument = "\n mutation removeAiAgentUseCase($input: AiAgentAuthoringRefInput!) {\n removeAiAgentUseCase(input: $input)\n}\n ";
2132
2168
  export declare const RemoveAiAgentProcedureDocument = "\n mutation removeAiAgentProcedure($input: AiAgentAuthoringRefInput!) {\n removeAiAgentProcedure(input: $input)\n}\n ";
2133
2169
  export declare const RememberAiAgentSessionFactsDocument = "\n mutation rememberAiAgentSessionFacts($input: RememberAiAgentSessionFactsInput!) {\n rememberAiAgentSessionFacts(input: $input)\n}\n ";
@@ -2141,7 +2177,7 @@ export declare const CheckAiAgentVersionDocument = "\n mutation checkAiAgentV
2141
2177
  export declare const GetAiAgentCheckRunDocument = "\n query getAiAgentCheckRun($agentId: ID!, $runId: ID!) {\n getAiAgentCheckRun(agentId: $agentId, runId: $runId) {\n ...aiAgentCheckRun\n }\n}\n \n fragment aiAgentCheckRun on AiAgentCheckRun {\n runId\n agentId\n version\n status\n requestedAt\n startedAt\n finishedAt\n totalRuns\n completedRuns\n error\n excludedTools {\n ...aiAgentToolExclusion\n }\n result {\n safeToPublish\n reports {\n scenarioId\n runs\n cut\n measured\n passed\n rate\n handoffReasons {\n key\n count\n }\n turns {\n turn\n runs\n answered\n grounded\n blocked\n identificationRequired\n toolNames {\n key\n count\n }\n blockCategories {\n key\n count\n }\n }\n }\n regressions {\n scenarioId\n before\n after\n }\n }\n}\n \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
2142
2178
  export declare const AiAgentCheckLimitsDocument = "\n query aiAgentCheckLimits($agentId: ID!) {\n aiAgentCheckLimits(agentId: $agentId) {\n minRunsPerScenario\n maxRunsPerScenario\n maxSuiteRuns\n scenarioCount\n }\n}\n ";
2143
2179
  export declare const AiAgentMetricsDocument = "\n query aiAgentMetrics($input: AiAgentMetricsInput!) {\n aiAgentMetrics(input: $input) {\n ...aiAgentMetricsReport\n }\n}\n \n fragment aiAgentMetricsReport on AiAgentMetrics {\n agentId\n from\n to\n truncated\n conversations\n conversationsResolved\n conversationsInconclusive\n conversationsHandoffRequested\n resolutionRate\n resolutionDefinition\n conversationsByClassification {\n key\n count\n }\n classificationBreakdown {\n state\n subcategory\n technicalFailure\n count\n }\n conversationsEligible\n conversationsResolvedByDefinition\n resolvedRate\n unresolvedRate\n handoffProcedureRate\n handoffNeedRate\n abandonmentRate\n classificationDefinitionVersion\n analyzedConversations\n estimatedSatisfactionAvg\n sentimentAtStart {\n key\n count\n }\n sentimentAtEnd {\n key\n count\n }\n riskAlerts {\n key\n count\n }\n topKnowledgeGaps {\n key\n count\n }\n analysisCostMicroUsd\n failedAnalyses\n analysesTruncated\n agentScoreAvg\n agentScoreAvgBand\n agentScoreBands {\n key\n count\n }\n agentClarityAvg\n customerEffortScoreAvg\n contactReasons {\n all {\n key\n count\n }\n handoff {\n key\n count\n }\n abandonment {\n key\n count\n }\n }\n escalatedToHuman\n escalatedToFlow\n escalatedTargetUndeclared\n handoffsByReason {\n key\n count\n }\n humanRequestedTurns\n costMicroUsd\n costMicroUsdPerResolvedConversation\n unpricedTurns\n inputTokens\n outputTokens\n totalTokens\n cachedInputTokens\n cachedTurns\n llmCalls\n turnsByModel {\n key\n count\n }\n avgTurnDurationMs\n p95TurnDurationMs\n avgLlmLatencyMs\n turns\n answeredTurns\n answeredWithFailedConnectionTurns\n unansweredTurns\n unansweredDefinition\n topTopics {\n key\n count\n }\n topUnansweredQuestions {\n key\n count\n }\n blockedTurns\n blocksByCategory {\n key\n count\n }\n haltedTurns\n haltReasons {\n key\n count\n }\n budgetExceededTurns\n identificationRequiredTurns\n toolCalls\n toolCallsFailed\n toolErrorsByConnection {\n key\n count\n }\n toolErrorsByClass {\n key\n count\n }\n knowledgeRetrieved\n knowledgeEmpty\n knowledgeUnavailable\n knowledgeSkipped\n}\n ";
2144
- export declare const AiAgentVersionSpecDocument = "\n query aiAgentVersionSpec($agentId: ID!) {\n listAiAgentVersions(agentId: $agentId) {\n ...aiAgentVersionWithSpec\n }\n}\n \n fragment aiAgentVersionWithSpec on AiAgentVersion {\n agentId\n version\n status\n createdAt\n spec {\n ...aiAgentSpec\n }\n excludedTools {\n ...aiAgentToolExclusion\n }\n}\n \n\n fragment aiAgentSpec on AiAgentSpec {\n identity {\n displayName\n role\n tone\n toneNotes\n openingMessage\n outOfScopeBehaviour\n }\n can\n cannot\n knowledgeBaseIds\n knowledgeFallback\n toolIds\n budget {\n maxSteps\n maxToolCalls\n maxTokens\n maxCostMicroUsd\n maxPeriodCostMicroUsd\n onExceeded\n }\n handoff {\n transition\n target\n }\n channels\n}\n \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
2180
+ export declare const AiAgentVersionSpecDocument = "\n query aiAgentVersionSpec($agentId: ID!) {\n listAiAgentVersions(agentId: $agentId) {\n ...aiAgentVersionWithSpec\n }\n}\n \n fragment aiAgentVersionWithSpec on AiAgentVersion {\n agentId\n version\n status\n createdAt\n spec {\n ...aiAgentSpec\n }\n excludedTools {\n ...aiAgentToolExclusion\n }\n}\n \n\n fragment aiAgentSpec on AiAgentSpec {\n identity {\n displayName\n role\n tone\n toneNotes\n openingMessage\n outOfScopeBehaviour\n }\n can\n cannot\n knowledgeBaseIds\n knowledgeFallback\n toolIds\n budget {\n maxSteps\n maxToolCalls\n maxTokens\n maxCostMicroUsd\n maxPeriodCostMicroUsd\n onExceeded\n }\n handoff {\n transition\n target\n }\n channels\n conversationTiming {\n channel\n abandonAfterMs\n remindAfterMs\n metaWindowMs\n reminderMessage\n renewalMessage\n }\n}\n \n\n fragment aiAgentToolExclusion on AiAgentToolExclusion {\n toolId\n reason\n}\n ";
2145
2181
  export declare const AiAgentRoutingPreviewDocument = "\n query aiAgentRoutingPreview($input: AiAgentRoutingPreviewInput!) {\n aiAgentRoutingPreview(input: $input) {\n high\n medium\n examples {\n message\n useCaseId\n score\n confidence\n }\n }\n}\n ";
2146
2182
  export declare const AiAgentKnowledgeBasesDocument = "\n query aiAgentKnowledgeBases {\n aiAgentKnowledgeBases {\n id\n title\n isPublic\n }\n}\n ";
2147
2183
  export declare const ExtractImageMetadataDocument = "\n mutation extractImageMetadata($input: ExtractImageMetadataInput!) {\n extractImageMetadata(input: $input) {\n success\n model\n extractedMetadata\n tokenUsage {\n prompt\n completion\n total\n }\n }\n}\n ";
package/src/sdks/ai.js CHANGED
@@ -208,6 +208,8 @@ var Typenames;
208
208
  Typenames["AiAgentAnswerCache"] = "AiAgentAnswerCache";
209
209
  Typenames["AiAgentApproval"] = "AiAgentApproval";
210
210
  Typenames["AiAgentCheckRun"] = "AiAgentCheckRun";
211
+ Typenames["AiAgentConsumption"] = "AiAgentConsumption";
212
+ Typenames["AiAgentConsumptionMark"] = "AiAgentConsumptionMark";
211
213
  Typenames["AiAgentConversation"] = "AiAgentConversation";
212
214
  Typenames["AiAgentConversationAnalysis"] = "AiAgentConversationAnalysis";
213
215
  Typenames["AiAgentConversationPointer"] = "AiAgentConversationPointer";
@@ -276,6 +278,14 @@ exports.AiAgentSpecFragmentDoc = `
276
278
  target
277
279
  }
278
280
  channels
281
+ conversationTiming {
282
+ channel
283
+ abandonAfterMs
284
+ remindAfterMs
285
+ metaWindowMs
286
+ reminderMessage
287
+ renewalMessage
288
+ }
279
289
  }
280
290
  `;
281
291
  exports.AiAgentToolExclusionFragmentDoc = `
@@ -329,6 +339,11 @@ exports.AiAgentProcedureFragmentDoc = `
329
339
  contingency
330
340
  executionAutonomy
331
341
  endsConversationAfterInforming
342
+ continuesAfterApproval
343
+ approvedReplyTemplate
344
+ deniedReplyTemplate
345
+ expiredReplyTemplate
346
+ replyEmailSubject
332
347
  status
333
348
  updatedAt
334
349
  }
@@ -884,6 +899,9 @@ exports.AiAgentDashboardDocument = `
884
899
  value
885
900
  }
886
901
  }
902
+ agentScoreAvg
903
+ agentScoreAvgBand
904
+ analyzedConversations
887
905
  sentimentAtStart {
888
906
  ...aiAgentDashboardSentiment
889
907
  }
@@ -952,6 +970,7 @@ exports.AiAgentConversationOutcomeDocument = `
952
970
  promisedNextStep
953
971
  classification {
954
972
  state
973
+ status
955
974
  classification
956
975
  subcategory
957
976
  technicalFailure