@droz-js/sdk 0.24.2 → 0.24.6

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.24.2",
4
+ "version": "0.24.6",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
package/src/sdks/ai.d.ts CHANGED
@@ -323,6 +323,18 @@ export type AiAgentConversationClassification = {
323
323
  subcategory?: Maybe<AiAgentConversationSubcategory>;
324
324
  technicalFailure?: Maybe<AiAgentTechnicalFailure>;
325
325
  };
326
+ export type AiAgentConversationDateRange = {
327
+ max: Scalars['Number']['output'];
328
+ min: Scalars['Number']['output'];
329
+ };
330
+ export type AiAgentConversationFacet = {
331
+ name: Scalars['String']['output'];
332
+ values: Array<AiAgentConversationFacetValue>;
333
+ };
334
+ export type AiAgentConversationFacetValue = {
335
+ count: Scalars['Number']['output'];
336
+ value: Scalars['String']['output'];
337
+ };
326
338
  export type AiAgentConversationMetrics = {
327
339
  channel?: Maybe<Scalars['String']['output']>;
328
340
  channelType?: Maybe<AiAgentChannelType>;
@@ -341,18 +353,31 @@ export type AiAgentConversationMetrics = {
341
353
  turns: Scalars['Number']['output'];
342
354
  };
343
355
  export type AiAgentConversationMetricsInput = {
356
+ activeDispatch?: InputMaybe<Scalars['Boolean']['input']>;
344
357
  agentId: Scalars['ID']['input'];
345
358
  channel?: InputMaybe<Scalars['String']['input']>;
359
+ dateFrom?: InputMaybe<Scalars['Number']['input']>;
360
+ dateTo?: InputMaybe<Scalars['Number']['input']>;
346
361
  from: Scalars['Number']['input'];
362
+ hasRiskAlert?: InputMaybe<Scalars['Boolean']['input']>;
347
363
  limit?: InputMaybe<Scalars['Number']['input']>;
348
364
  offset?: InputMaybe<Scalars['Number']['input']>;
365
+ scoreBand?: InputMaybe<Array<AiAgentScoreBand>>;
349
366
  search?: InputMaybe<Scalars['String']['input']>;
367
+ sentimentEnd?: InputMaybe<Array<AiAgentSentiment>>;
368
+ sentimentStart?: InputMaybe<Array<AiAgentSentiment>>;
350
369
  sortBy?: InputMaybe<AiAgentConversationSortField>;
351
370
  sortDirection?: InputMaybe<AiAgentSortDirection>;
352
371
  status?: InputMaybe<Array<AiAgentConversationStatus>>;
372
+ subcategory?: InputMaybe<Array<AiAgentConversationSubcategory>>;
353
373
  to: Scalars['Number']['input'];
374
+ useCaseId?: InputMaybe<Array<Scalars['ID']['input']>>;
354
375
  };
355
376
  export type AiAgentConversationMetricsPage = {
377
+ /** Intervalo de `lastTurnAt` do conjunto filtrado pelos outros filtros, sem `dateFrom` e `dateTo`. Ausente quando o conjunto é vazio. */
378
+ dateRange?: Maybe<AiAgentConversationDateRange>;
379
+ /** Cada faceta conta sobre o conjunto filtrado pelos outros filtros, sem o seu próprio. */
380
+ facets: Array<AiAgentConversationFacet>;
356
381
  items: Array<AiAgentConversationMetrics>;
357
382
  limit: Scalars['Number']['output'];
358
383
  offset: Scalars['Number']['output'];
@@ -425,6 +450,8 @@ export declare enum AiAgentConversationSubcategory {
425
450
  }
426
451
  export type AiAgentDashboard = {
427
452
  abandonment: AiAgentDashboardIndicator;
453
+ /** Absent when no dispatch was sent in the window. Absent is not zero. */
454
+ activeDispatches?: Maybe<AiAgentDashboardActiveDispatches>;
428
455
  agentId: Scalars['ID']['output'];
429
456
  /** Absent when no conversation was analyzed in the window. Absent is not zero. */
430
457
  agentScoreAvg?: Maybe<Scalars['Float']['output']>;
@@ -436,6 +463,8 @@ export type AiAgentDashboard = {
436
463
  conversations: AiAgentDashboardIndicator;
437
464
  handoffNeed: AiAgentDashboardIndicator;
438
465
  handoffProcedure: AiAgentDashboardIndicator;
466
+ /** Do agente, não da janela. Vira true na primeira conversa aberta pela resposta a um disparo ativo. */
467
+ hasActiveDispatches: Scalars['Boolean']['output'];
439
468
  knowledgeGaps: Array<AiAgentDashboardKnowledgeGap>;
440
469
  period: AiAgentDashboardPeriod;
441
470
  previousWindow: AiAgentDashboardWindow;
@@ -451,6 +480,12 @@ export type AiAgentDashboard = {
451
480
  unresolved: AiAgentDashboardIndicator;
452
481
  window: AiAgentDashboardWindow;
453
482
  };
483
+ /** `answered` and `unanswered` are the share of the dispatches whose window is closed, one decimal. Absent while none is closed. */
484
+ export type AiAgentDashboardActiveDispatches = {
485
+ answered: AiAgentDashboardIndicator;
486
+ sent: AiAgentDashboardIndicator;
487
+ unanswered: AiAgentDashboardIndicator;
488
+ };
454
489
  /** Sorted by count, highest first. */
455
490
  export type AiAgentDashboardContactReason = {
456
491
  count: Scalars['Number']['output'];
@@ -1670,6 +1705,7 @@ export declare enum Typenames {
1670
1705
  AiAgentConversation = "AiAgentConversation",
1671
1706
  AiAgentConversationAnalysis = "AiAgentConversationAnalysis",
1672
1707
  AiAgentConversationPointer = "AiAgentConversationPointer",
1708
+ AiAgentDispatchingAgent = "AiAgentDispatchingAgent",
1673
1709
  AiAgentEvalReport = "AiAgentEvalReport",
1674
1710
  AiAgentExternalTermination = "AiAgentExternalTermination",
1675
1711
  AiAgentOpenConversation = "AiAgentOpenConversation",
@@ -1843,6 +1879,10 @@ export type AiAgentConversationMetricsQueryVariables = Exact<{
1843
1879
  export type AiAgentConversationMetricsQuery = {
1844
1880
  aiAgentConversationMetrics: (Pick<AiAgentConversationMetricsPage, 'total' | 'limit' | 'offset' | 'truncated'> & {
1845
1881
  items: Array<Pick<AiAgentConversationMetrics, 'sessionId' | 'channel' | 'turns' | 'startedAt' | 'lastTurnAt' | 'totalTokens' | 'costMicroUsd' | 'durationMs' | 'lastOutcome' | 'state' | 'status' | 'subcategory' | 'contactReason' | 'contactReasonTag' | 'channelType'>>;
1882
+ facets: Array<(Pick<AiAgentConversationFacet, 'name'> & {
1883
+ values: Array<Pick<AiAgentConversationFacetValue, 'value' | 'count'>>;
1884
+ })>;
1885
+ dateRange?: Maybe<Pick<AiAgentConversationDateRange, 'min' | 'max'>>;
1846
1886
  });
1847
1887
  };
1848
1888
  export type AiAgentMetricsSeriesQueryVariables = Exact<{
@@ -1857,7 +1897,7 @@ export type AiAgentDashboardQueryVariables = Exact<{
1857
1897
  input: AiAgentDashboardInput;
1858
1898
  }>;
1859
1899
  export type AiAgentDashboardQuery = {
1860
- aiAgentDashboard: (Pick<AiAgentDashboard, 'agentId' | 'period' | 'timezone' | 'bucket' | 'agentScoreAvg' | 'agentScoreAvgBand' | 'analyzedConversations' | 'truncated' | 'analysesTruncated'> & {
1900
+ aiAgentDashboard: (Pick<AiAgentDashboard, 'agentId' | 'period' | 'timezone' | 'bucket' | 'agentScoreAvg' | 'agentScoreAvgBand' | 'analyzedConversations' | 'hasActiveDispatches' | 'truncated' | 'analysesTruncated'> & {
1861
1901
  window: Pick<AiAgentDashboardWindow, 'from' | 'to'>;
1862
1902
  previousWindow: Pick<AiAgentDashboardWindow, 'from' | 'to'>;
1863
1903
  conversations: AiAgentDashboardIndicatorFragment;
@@ -1869,6 +1909,11 @@ export type AiAgentDashboardQuery = {
1869
1909
  scoreBands: Array<(Pick<AiAgentDashboardScoreBand, 'band' | 'count' | 'percent' | 'polarity'> & {
1870
1910
  variation: Pick<AiAgentVariation, 'unit' | 'value'>;
1871
1911
  })>;
1912
+ activeDispatches?: Maybe<{
1913
+ sent: AiAgentDashboardIndicatorFragment;
1914
+ answered: AiAgentDashboardIndicatorFragment;
1915
+ unanswered: AiAgentDashboardIndicatorFragment;
1916
+ }>;
1872
1917
  sentimentAtStart: Array<AiAgentDashboardSentimentFragment>;
1873
1918
  sentimentAtEnd: Array<AiAgentDashboardSentimentFragment>;
1874
1919
  contactReasons: {
@@ -2160,9 +2205,9 @@ export declare const AiAgentTraceDocument = "\n query aiAgentTrace($sessionId
2160
2205
  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
2206
  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
2207
  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 ";
2208
+ 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 dateRange {\n min\n max\n }\n truncated\n }\n}\n ";
2164
2209
  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 ";
2210
+ 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
2211
  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
2212
  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
2213
  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,17 @@ exports.AiAgentConversationMetricsDocument = `
834
835
  total
835
836
  limit
836
837
  offset
838
+ facets {
839
+ name
840
+ values {
841
+ value
842
+ count
843
+ }
844
+ }
845
+ dateRange {
846
+ min
847
+ max
848
+ }
837
849
  truncated
838
850
  }
839
851
  }
@@ -904,6 +916,18 @@ exports.AiAgentDashboardDocument = `
904
916
  agentScoreAvg
905
917
  agentScoreAvgBand
906
918
  analyzedConversations
919
+ hasActiveDispatches
920
+ activeDispatches {
921
+ sent {
922
+ ...aiAgentDashboardIndicator
923
+ }
924
+ answered {
925
+ ...aiAgentDashboardIndicator
926
+ }
927
+ unanswered {
928
+ ...aiAgentDashboardIndicator
929
+ }
930
+ }
907
931
  sentimentAtStart {
908
932
  ...aiAgentDashboardSentiment
909
933
  }