mavenagi 1.0.5 → 1.0.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/Client.d.ts +3 -0
- package/Client.js +17 -12
- package/README.md +30 -13
- package/api/resources/actions/client/Client.js +3 -3
- package/api/resources/analytics/client/Client.d.ts +78 -0
- package/api/resources/analytics/client/Client.js +174 -0
- package/api/resources/analytics/client/index.d.ts +1 -0
- package/api/resources/analytics/client/index.js +2 -0
- package/api/resources/analytics/index.d.ts +2 -0
- package/api/resources/analytics/index.js +18 -0
- package/api/resources/analytics/types/Average.d.ts +9 -0
- package/api/resources/analytics/types/Average.js +5 -0
- package/api/resources/analytics/types/BasicMetric.d.ts +8 -0
- package/api/resources/analytics/types/BasicMetric.js +5 -0
- package/api/resources/analytics/types/ColumnDefinition.d.ts +10 -0
- package/api/resources/analytics/types/ColumnDefinition.js +5 -0
- package/api/resources/analytics/types/ConversationAnalyticsRequest.d.ts +8 -0
- package/api/resources/analytics/types/ConversationAnalyticsRequest.js +5 -0
- package/api/resources/analytics/types/ConversationRow.d.ts +13 -0
- package/api/resources/analytics/types/ConversationRow.js +5 -0
- package/api/resources/analytics/types/ConversationTableRequest.d.ts +50 -0
- package/api/resources/analytics/types/ConversationTableRequest.js +5 -0
- package/api/resources/analytics/types/ConversationTableResponse.d.ts +129 -0
- package/api/resources/analytics/types/ConversationTableResponse.js +5 -0
- package/api/resources/analytics/types/Count.d.ts +8 -0
- package/api/resources/analytics/types/Count.js +5 -0
- package/api/resources/analytics/types/DistinctCount.d.ts +10 -0
- package/api/resources/analytics/types/DistinctCount.js +5 -0
- package/api/resources/analytics/types/GroupBy.d.ts +12 -0
- package/api/resources/analytics/types/GroupBy.js +5 -0
- package/api/resources/analytics/types/Max.d.ts +9 -0
- package/api/resources/analytics/types/Max.js +5 -0
- package/api/resources/analytics/types/Median.d.ts +9 -0
- package/api/resources/analytics/types/Median.js +5 -0
- package/api/resources/analytics/types/Metric.d.ts +35 -0
- package/api/resources/analytics/types/Metric.js +5 -0
- package/api/resources/analytics/types/Min.d.ts +9 -0
- package/api/resources/analytics/types/Min.js +5 -0
- package/api/resources/analytics/types/Percentile.d.ts +11 -0
- package/api/resources/analytics/types/Percentile.js +5 -0
- package/api/resources/analytics/types/Sum.d.ts +9 -0
- package/api/resources/analytics/types/Sum.js +5 -0
- package/api/resources/analytics/types/index.d.ts +16 -0
- package/api/resources/analytics/types/index.js +32 -0
- package/api/resources/analyticsCommons/index.d.ts +1 -0
- package/api/resources/analyticsCommons/index.js +17 -0
- package/api/resources/analyticsCommons/types/CellData.d.ts +32 -0
- package/api/resources/analyticsCommons/types/CellData.js +5 -0
- package/api/resources/analyticsCommons/types/FieldValue.d.ts +33 -0
- package/api/resources/analyticsCommons/types/FieldValue.js +5 -0
- package/api/resources/analyticsCommons/types/Range.d.ts +9 -0
- package/api/resources/analyticsCommons/types/Range.js +5 -0
- package/api/resources/analyticsCommons/types/TimeInterval.d.ts +11 -0
- package/api/resources/analyticsCommons/types/TimeInterval.js +13 -0
- package/api/resources/analyticsCommons/types/index.d.ts +4 -0
- package/api/resources/analyticsCommons/types/index.js +20 -0
- package/api/resources/appSettings/client/Client.js +1 -1
- package/api/resources/commons/types/ConversationPrecondition.d.ts +4 -1
- package/api/resources/commons/types/ConversationResponse.d.ts +10 -1
- package/api/resources/commons/types/ConversationSummary.d.ts +10 -0
- package/api/resources/commons/types/ConversationSummary.js +5 -0
- package/api/resources/commons/types/EntityId.d.ts +6 -7
- package/api/resources/commons/types/EntityIdFilter.d.ts +7 -0
- package/api/resources/commons/types/EntityIdFilter.js +5 -0
- package/api/resources/commons/types/EntityIdWithoutAgent.d.ts +13 -0
- package/api/resources/commons/types/EntityIdWithoutAgent.js +5 -0
- package/api/resources/commons/types/ResponseConfigPrecondition.d.ts +11 -0
- package/api/resources/commons/types/ResponseConfigPrecondition.js +5 -0
- package/api/resources/commons/types/index.d.ts +4 -0
- package/api/resources/commons/types/index.js +4 -0
- package/api/resources/conversation/client/Client.d.ts +47 -4
- package/api/resources/conversation/client/Client.js +124 -14
- package/api/resources/conversation/client/requests/ConversationDeleteRequest.d.ts +19 -0
- package/api/resources/conversation/client/requests/ConversationDeleteRequest.js +5 -0
- package/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/api/resources/conversation/types/AskRequest.d.ts +1 -1
- package/api/resources/conversation/types/ConversationField.d.ts +26 -0
- package/api/resources/conversation/types/ConversationField.js +28 -0
- package/api/resources/conversation/types/ConversationFilter.d.ts +21 -0
- package/api/resources/conversation/types/ConversationFilter.js +5 -0
- package/api/resources/conversation/types/Quality.d.ts +9 -0
- package/api/resources/conversation/types/Quality.js +11 -0
- package/api/resources/conversation/types/QualityReason.d.ts +15 -0
- package/api/resources/conversation/types/QualityReason.js +17 -0
- package/api/resources/conversation/types/index.d.ts +4 -0
- package/api/resources/conversation/types/index.js +4 -0
- package/api/resources/index.d.ts +4 -0
- package/api/resources/index.js +5 -1
- package/api/resources/knowledge/client/Client.js +7 -7
- package/api/resources/translations/client/Client.js +1 -1
- package/api/resources/triggers/client/Client.js +3 -3
- package/api/resources/users/client/Client.js +2 -2
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +17 -12
- package/dist/api/resources/actions/client/Client.js +3 -3
- package/dist/api/resources/analytics/client/Client.d.ts +78 -0
- package/dist/api/resources/analytics/client/Client.js +174 -0
- package/dist/api/resources/analytics/client/index.d.ts +1 -0
- package/dist/api/resources/analytics/client/index.js +2 -0
- package/dist/api/resources/analytics/index.d.ts +2 -0
- package/dist/api/resources/analytics/index.js +18 -0
- package/dist/api/resources/analytics/types/Average.d.ts +9 -0
- package/dist/api/resources/analytics/types/Average.js +5 -0
- package/dist/api/resources/analytics/types/BasicMetric.d.ts +8 -0
- package/dist/api/resources/analytics/types/BasicMetric.js +5 -0
- package/dist/api/resources/analytics/types/ColumnDefinition.d.ts +10 -0
- package/dist/api/resources/analytics/types/ColumnDefinition.js +5 -0
- package/dist/api/resources/analytics/types/ConversationAnalyticsRequest.d.ts +8 -0
- package/dist/api/resources/analytics/types/ConversationAnalyticsRequest.js +5 -0
- package/dist/api/resources/analytics/types/ConversationRow.d.ts +13 -0
- package/dist/api/resources/analytics/types/ConversationRow.js +5 -0
- package/dist/api/resources/analytics/types/ConversationTableRequest.d.ts +50 -0
- package/dist/api/resources/analytics/types/ConversationTableRequest.js +5 -0
- package/dist/api/resources/analytics/types/ConversationTableResponse.d.ts +129 -0
- package/dist/api/resources/analytics/types/ConversationTableResponse.js +5 -0
- package/dist/api/resources/analytics/types/Count.d.ts +8 -0
- package/dist/api/resources/analytics/types/Count.js +5 -0
- package/dist/api/resources/analytics/types/DistinctCount.d.ts +10 -0
- package/dist/api/resources/analytics/types/DistinctCount.js +5 -0
- package/dist/api/resources/analytics/types/GroupBy.d.ts +12 -0
- package/dist/api/resources/analytics/types/GroupBy.js +5 -0
- package/dist/api/resources/analytics/types/Max.d.ts +9 -0
- package/dist/api/resources/analytics/types/Max.js +5 -0
- package/dist/api/resources/analytics/types/Median.d.ts +9 -0
- package/dist/api/resources/analytics/types/Median.js +5 -0
- package/dist/api/resources/analytics/types/Metric.d.ts +35 -0
- package/dist/api/resources/analytics/types/Metric.js +5 -0
- package/dist/api/resources/analytics/types/Min.d.ts +9 -0
- package/dist/api/resources/analytics/types/Min.js +5 -0
- package/dist/api/resources/analytics/types/Percentile.d.ts +11 -0
- package/dist/api/resources/analytics/types/Percentile.js +5 -0
- package/dist/api/resources/analytics/types/Sum.d.ts +9 -0
- package/dist/api/resources/analytics/types/Sum.js +5 -0
- package/dist/api/resources/analytics/types/index.d.ts +16 -0
- package/dist/api/resources/analytics/types/index.js +32 -0
- package/dist/api/resources/analyticsCommons/index.d.ts +1 -0
- package/dist/api/resources/analyticsCommons/index.js +17 -0
- package/dist/api/resources/analyticsCommons/types/CellData.d.ts +32 -0
- package/dist/api/resources/analyticsCommons/types/CellData.js +5 -0
- package/dist/api/resources/analyticsCommons/types/FieldValue.d.ts +33 -0
- package/dist/api/resources/analyticsCommons/types/FieldValue.js +5 -0
- package/dist/api/resources/analyticsCommons/types/Range.d.ts +9 -0
- package/dist/api/resources/analyticsCommons/types/Range.js +5 -0
- package/dist/api/resources/analyticsCommons/types/TimeInterval.d.ts +11 -0
- package/dist/api/resources/analyticsCommons/types/TimeInterval.js +13 -0
- package/dist/api/resources/analyticsCommons/types/index.d.ts +4 -0
- package/dist/api/resources/analyticsCommons/types/index.js +20 -0
- package/dist/api/resources/appSettings/client/Client.js +1 -1
- package/dist/api/resources/commons/types/ConversationPrecondition.d.ts +4 -1
- package/dist/api/resources/commons/types/ConversationResponse.d.ts +10 -1
- package/dist/api/resources/commons/types/ConversationSummary.d.ts +10 -0
- package/dist/api/resources/commons/types/ConversationSummary.js +5 -0
- package/dist/api/resources/commons/types/EntityId.d.ts +6 -7
- package/dist/api/resources/commons/types/EntityIdFilter.d.ts +7 -0
- package/dist/api/resources/commons/types/EntityIdFilter.js +5 -0
- package/dist/api/resources/commons/types/EntityIdWithoutAgent.d.ts +13 -0
- package/dist/api/resources/commons/types/EntityIdWithoutAgent.js +5 -0
- package/dist/api/resources/commons/types/ResponseConfigPrecondition.d.ts +11 -0
- package/dist/api/resources/commons/types/ResponseConfigPrecondition.js +5 -0
- package/dist/api/resources/commons/types/index.d.ts +4 -0
- package/dist/api/resources/commons/types/index.js +4 -0
- package/dist/api/resources/conversation/client/Client.d.ts +47 -4
- package/dist/api/resources/conversation/client/Client.js +124 -14
- package/dist/api/resources/conversation/client/requests/ConversationDeleteRequest.d.ts +19 -0
- package/dist/api/resources/conversation/client/requests/ConversationDeleteRequest.js +5 -0
- package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/dist/api/resources/conversation/types/AskRequest.d.ts +1 -1
- package/dist/api/resources/conversation/types/ConversationField.d.ts +26 -0
- package/dist/api/resources/conversation/types/ConversationField.js +28 -0
- package/dist/api/resources/conversation/types/ConversationFilter.d.ts +21 -0
- package/dist/api/resources/conversation/types/ConversationFilter.js +5 -0
- package/dist/api/resources/conversation/types/Quality.d.ts +9 -0
- package/dist/api/resources/conversation/types/Quality.js +11 -0
- package/dist/api/resources/conversation/types/QualityReason.d.ts +15 -0
- package/dist/api/resources/conversation/types/QualityReason.js +17 -0
- package/dist/api/resources/conversation/types/index.d.ts +4 -0
- package/dist/api/resources/conversation/types/index.js +4 -0
- package/dist/api/resources/index.d.ts +4 -0
- package/dist/api/resources/index.js +5 -1
- package/dist/api/resources/knowledge/client/Client.js +7 -7
- package/dist/api/resources/translations/client/Client.js +1 -1
- package/dist/api/resources/triggers/client/Client.js +3 -3
- package/dist/api/resources/users/client/Client.js +2 -2
- package/dist/serialization/resources/analytics/index.d.ts +1 -0
- package/dist/serialization/resources/analytics/index.js +17 -0
- package/dist/serialization/resources/analytics/types/Average.d.ts +12 -0
- package/dist/serialization/resources/analytics/types/Average.js +34 -0
- package/dist/serialization/resources/analytics/types/BasicMetric.d.ts +13 -0
- package/dist/serialization/resources/analytics/types/BasicMetric.js +34 -0
- package/dist/serialization/resources/analytics/types/ColumnDefinition.d.ts +14 -0
- package/dist/serialization/resources/analytics/types/ColumnDefinition.js +35 -0
- package/dist/serialization/resources/analytics/types/ConversationAnalyticsRequest.d.ts +13 -0
- package/dist/serialization/resources/analytics/types/ConversationAnalyticsRequest.js +34 -0
- package/dist/serialization/resources/analytics/types/ConversationRow.d.ts +16 -0
- package/dist/serialization/resources/analytics/types/ConversationRow.js +37 -0
- package/dist/serialization/resources/analytics/types/ConversationTableRequest.d.ts +18 -0
- package/dist/serialization/resources/analytics/types/ConversationTableRequest.js +41 -0
- package/dist/serialization/resources/analytics/types/ConversationTableResponse.d.ts +14 -0
- package/dist/serialization/resources/analytics/types/ConversationTableResponse.js +35 -0
- package/dist/serialization/resources/analytics/types/Count.d.ts +11 -0
- package/dist/serialization/resources/analytics/types/Count.js +31 -0
- package/dist/serialization/resources/analytics/types/DistinctCount.d.ts +12 -0
- package/dist/serialization/resources/analytics/types/DistinctCount.js +32 -0
- package/dist/serialization/resources/analytics/types/GroupBy.d.ts +16 -0
- package/dist/serialization/resources/analytics/types/GroupBy.js +37 -0
- package/dist/serialization/resources/analytics/types/Max.d.ts +12 -0
- package/dist/serialization/resources/analytics/types/Max.js +34 -0
- package/dist/serialization/resources/analytics/types/Median.d.ts +12 -0
- package/dist/serialization/resources/analytics/types/Median.js +34 -0
- package/dist/serialization/resources/analytics/types/Metric.d.ts +42 -0
- package/dist/serialization/resources/analytics/types/Metric.js +53 -0
- package/dist/serialization/resources/analytics/types/Min.d.ts +12 -0
- package/dist/serialization/resources/analytics/types/Min.js +34 -0
- package/dist/serialization/resources/analytics/types/Percentile.d.ts +13 -0
- package/dist/serialization/resources/analytics/types/Percentile.js +36 -0
- package/dist/serialization/resources/analytics/types/Sum.d.ts +12 -0
- package/dist/serialization/resources/analytics/types/Sum.js +34 -0
- package/dist/serialization/resources/analytics/types/index.d.ts +16 -0
- package/dist/serialization/resources/analytics/types/index.js +32 -0
- package/dist/serialization/resources/analyticsCommons/index.d.ts +1 -0
- package/dist/serialization/resources/analyticsCommons/index.js +17 -0
- package/dist/serialization/resources/analyticsCommons/types/CellData.d.ts +30 -0
- package/dist/serialization/resources/analyticsCommons/types/CellData.js +52 -0
- package/dist/serialization/resources/analyticsCommons/types/FieldValue.d.ts +38 -0
- package/dist/serialization/resources/analyticsCommons/types/FieldValue.js +56 -0
- package/dist/serialization/resources/analyticsCommons/types/Range.d.ts +13 -0
- package/dist/serialization/resources/analyticsCommons/types/Range.js +34 -0
- package/dist/serialization/resources/analyticsCommons/types/TimeInterval.d.ts +10 -0
- package/dist/serialization/resources/analyticsCommons/types/TimeInterval.js +31 -0
- package/dist/serialization/resources/analyticsCommons/types/index.d.ts +4 -0
- package/dist/serialization/resources/analyticsCommons/types/index.js +20 -0
- package/dist/serialization/resources/commons/types/ConversationPrecondition.d.ts +5 -1
- package/dist/serialization/resources/commons/types/ConversationPrecondition.js +2 -0
- package/dist/serialization/resources/commons/types/ConversationResponse.d.ts +3 -0
- package/dist/serialization/resources/commons/types/ConversationResponse.js +3 -0
- package/dist/serialization/resources/commons/types/ConversationSummary.d.ts +14 -0
- package/dist/serialization/resources/commons/types/ConversationSummary.js +35 -0
- package/dist/serialization/resources/commons/types/EntityId.d.ts +2 -5
- package/dist/serialization/resources/commons/types/EntityId.js +2 -5
- package/dist/serialization/resources/commons/types/EntityIdFilter.d.ts +13 -0
- package/dist/serialization/resources/commons/types/EntityIdFilter.js +34 -0
- package/dist/serialization/resources/commons/types/EntityIdWithoutAgent.d.ts +15 -0
- package/dist/serialization/resources/commons/types/EntityIdWithoutAgent.js +38 -0
- package/dist/serialization/resources/commons/types/ResponseConfigPrecondition.d.ts +18 -0
- package/dist/serialization/resources/commons/types/ResponseConfigPrecondition.js +41 -0
- package/dist/serialization/resources/commons/types/index.d.ts +4 -0
- package/dist/serialization/resources/commons/types/index.js +4 -0
- package/dist/serialization/resources/conversation/types/ConversationField.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/ConversationField.js +52 -0
- package/dist/serialization/resources/conversation/types/ConversationFilter.d.ts +32 -0
- package/dist/serialization/resources/conversation/types/ConversationFilter.js +53 -0
- package/dist/serialization/resources/conversation/types/Quality.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/Quality.js +35 -0
- package/dist/serialization/resources/conversation/types/QualityReason.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/QualityReason.js +41 -0
- package/dist/serialization/resources/conversation/types/index.d.ts +4 -0
- package/dist/serialization/resources/conversation/types/index.js +4 -0
- package/dist/serialization/resources/index.d.ts +4 -0
- package/dist/serialization/resources/index.js +5 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +203 -4
- package/serialization/resources/analytics/index.d.ts +1 -0
- package/serialization/resources/analytics/index.js +17 -0
- package/serialization/resources/analytics/types/Average.d.ts +12 -0
- package/serialization/resources/analytics/types/Average.js +34 -0
- package/serialization/resources/analytics/types/BasicMetric.d.ts +13 -0
- package/serialization/resources/analytics/types/BasicMetric.js +34 -0
- package/serialization/resources/analytics/types/ColumnDefinition.d.ts +14 -0
- package/serialization/resources/analytics/types/ColumnDefinition.js +35 -0
- package/serialization/resources/analytics/types/ConversationAnalyticsRequest.d.ts +13 -0
- package/serialization/resources/analytics/types/ConversationAnalyticsRequest.js +34 -0
- package/serialization/resources/analytics/types/ConversationRow.d.ts +16 -0
- package/serialization/resources/analytics/types/ConversationRow.js +37 -0
- package/serialization/resources/analytics/types/ConversationTableRequest.d.ts +18 -0
- package/serialization/resources/analytics/types/ConversationTableRequest.js +41 -0
- package/serialization/resources/analytics/types/ConversationTableResponse.d.ts +14 -0
- package/serialization/resources/analytics/types/ConversationTableResponse.js +35 -0
- package/serialization/resources/analytics/types/Count.d.ts +11 -0
- package/serialization/resources/analytics/types/Count.js +31 -0
- package/serialization/resources/analytics/types/DistinctCount.d.ts +12 -0
- package/serialization/resources/analytics/types/DistinctCount.js +32 -0
- package/serialization/resources/analytics/types/GroupBy.d.ts +16 -0
- package/serialization/resources/analytics/types/GroupBy.js +37 -0
- package/serialization/resources/analytics/types/Max.d.ts +12 -0
- package/serialization/resources/analytics/types/Max.js +34 -0
- package/serialization/resources/analytics/types/Median.d.ts +12 -0
- package/serialization/resources/analytics/types/Median.js +34 -0
- package/serialization/resources/analytics/types/Metric.d.ts +42 -0
- package/serialization/resources/analytics/types/Metric.js +53 -0
- package/serialization/resources/analytics/types/Min.d.ts +12 -0
- package/serialization/resources/analytics/types/Min.js +34 -0
- package/serialization/resources/analytics/types/Percentile.d.ts +13 -0
- package/serialization/resources/analytics/types/Percentile.js +36 -0
- package/serialization/resources/analytics/types/Sum.d.ts +12 -0
- package/serialization/resources/analytics/types/Sum.js +34 -0
- package/serialization/resources/analytics/types/index.d.ts +16 -0
- package/serialization/resources/analytics/types/index.js +32 -0
- package/serialization/resources/analyticsCommons/index.d.ts +1 -0
- package/serialization/resources/analyticsCommons/index.js +17 -0
- package/serialization/resources/analyticsCommons/types/CellData.d.ts +30 -0
- package/serialization/resources/analyticsCommons/types/CellData.js +52 -0
- package/serialization/resources/analyticsCommons/types/FieldValue.d.ts +38 -0
- package/serialization/resources/analyticsCommons/types/FieldValue.js +56 -0
- package/serialization/resources/analyticsCommons/types/Range.d.ts +13 -0
- package/serialization/resources/analyticsCommons/types/Range.js +34 -0
- package/serialization/resources/analyticsCommons/types/TimeInterval.d.ts +10 -0
- package/serialization/resources/analyticsCommons/types/TimeInterval.js +31 -0
- package/serialization/resources/analyticsCommons/types/index.d.ts +4 -0
- package/serialization/resources/analyticsCommons/types/index.js +20 -0
- package/serialization/resources/commons/types/ConversationPrecondition.d.ts +5 -1
- package/serialization/resources/commons/types/ConversationPrecondition.js +2 -0
- package/serialization/resources/commons/types/ConversationResponse.d.ts +3 -0
- package/serialization/resources/commons/types/ConversationResponse.js +3 -0
- package/serialization/resources/commons/types/ConversationSummary.d.ts +14 -0
- package/serialization/resources/commons/types/ConversationSummary.js +35 -0
- package/serialization/resources/commons/types/EntityId.d.ts +2 -5
- package/serialization/resources/commons/types/EntityId.js +2 -5
- package/serialization/resources/commons/types/EntityIdFilter.d.ts +13 -0
- package/serialization/resources/commons/types/EntityIdFilter.js +34 -0
- package/serialization/resources/commons/types/EntityIdWithoutAgent.d.ts +15 -0
- package/serialization/resources/commons/types/EntityIdWithoutAgent.js +38 -0
- package/serialization/resources/commons/types/ResponseConfigPrecondition.d.ts +18 -0
- package/serialization/resources/commons/types/ResponseConfigPrecondition.js +41 -0
- package/serialization/resources/commons/types/index.d.ts +4 -0
- package/serialization/resources/commons/types/index.js +4 -0
- package/serialization/resources/conversation/types/ConversationField.d.ts +10 -0
- package/serialization/resources/conversation/types/ConversationField.js +52 -0
- package/serialization/resources/conversation/types/ConversationFilter.d.ts +32 -0
- package/serialization/resources/conversation/types/ConversationFilter.js +53 -0
- package/serialization/resources/conversation/types/Quality.d.ts +10 -0
- package/serialization/resources/conversation/types/Quality.js +35 -0
- package/serialization/resources/conversation/types/QualityReason.d.ts +10 -0
- package/serialization/resources/conversation/types/QualityReason.js +41 -0
- package/serialization/resources/conversation/types/index.d.ts +4 -0
- package/serialization/resources/conversation/types/index.js +4 -0
- package/serialization/resources/index.d.ts +4 -0
- package/serialization/resources/index.js +5 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/Client.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as environments from "./environments";
|
|
5
5
|
import * as core from "./core";
|
|
6
6
|
import { Actions } from "./api/resources/actions/client/Client";
|
|
7
|
+
import { Analytics } from "./api/resources/analytics/client/Client";
|
|
7
8
|
import { AppSettings } from "./api/resources/appSettings/client/Client";
|
|
8
9
|
import { Conversation } from "./api/resources/conversation/client/Client";
|
|
9
10
|
import { Knowledge } from "./api/resources/knowledge/client/Client";
|
|
@@ -39,6 +40,7 @@ export declare namespace MavenAGIClient {
|
|
|
39
40
|
export declare class MavenAGIClient {
|
|
40
41
|
protected readonly _options: MavenAGIClient.Options;
|
|
41
42
|
protected _actions: Actions | undefined;
|
|
43
|
+
protected _analytics: Analytics | undefined;
|
|
42
44
|
protected _appSettings: AppSettings | undefined;
|
|
43
45
|
protected _conversation: Conversation | undefined;
|
|
44
46
|
protected _knowledge: Knowledge | undefined;
|
|
@@ -47,6 +49,7 @@ export declare class MavenAGIClient {
|
|
|
47
49
|
protected _users: Users | undefined;
|
|
48
50
|
constructor(_options: MavenAGIClient.Options);
|
|
49
51
|
get actions(): Actions;
|
|
52
|
+
get analytics(): Analytics;
|
|
50
53
|
get appSettings(): AppSettings;
|
|
51
54
|
get conversation(): Conversation;
|
|
52
55
|
get knowledge(): Knowledge;
|
package/Client.js
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.MavenAGIClient = void 0;
|
|
7
7
|
const Client_1 = require("./api/resources/actions/client/Client");
|
|
8
|
-
const Client_2 = require("./api/resources/
|
|
9
|
-
const Client_3 = require("./api/resources/
|
|
10
|
-
const Client_4 = require("./api/resources/
|
|
11
|
-
const Client_5 = require("./api/resources/
|
|
12
|
-
const Client_6 = require("./api/resources/
|
|
13
|
-
const Client_7 = require("./api/resources/
|
|
8
|
+
const Client_2 = require("./api/resources/analytics/client/Client");
|
|
9
|
+
const Client_3 = require("./api/resources/appSettings/client/Client");
|
|
10
|
+
const Client_4 = require("./api/resources/conversation/client/Client");
|
|
11
|
+
const Client_5 = require("./api/resources/knowledge/client/Client");
|
|
12
|
+
const Client_6 = require("./api/resources/translations/client/Client");
|
|
13
|
+
const Client_7 = require("./api/resources/triggers/client/Client");
|
|
14
|
+
const Client_8 = require("./api/resources/users/client/Client");
|
|
14
15
|
class MavenAGIClient {
|
|
15
16
|
constructor(_options) {
|
|
16
17
|
this._options = _options;
|
|
@@ -19,29 +20,33 @@ class MavenAGIClient {
|
|
|
19
20
|
var _a;
|
|
20
21
|
return ((_a = this._actions) !== null && _a !== void 0 ? _a : (this._actions = new Client_1.Actions(this._options)));
|
|
21
22
|
}
|
|
23
|
+
get analytics() {
|
|
24
|
+
var _a;
|
|
25
|
+
return ((_a = this._analytics) !== null && _a !== void 0 ? _a : (this._analytics = new Client_2.Analytics(this._options)));
|
|
26
|
+
}
|
|
22
27
|
get appSettings() {
|
|
23
28
|
var _a;
|
|
24
|
-
return ((_a = this._appSettings) !== null && _a !== void 0 ? _a : (this._appSettings = new
|
|
29
|
+
return ((_a = this._appSettings) !== null && _a !== void 0 ? _a : (this._appSettings = new Client_3.AppSettings(this._options)));
|
|
25
30
|
}
|
|
26
31
|
get conversation() {
|
|
27
32
|
var _a;
|
|
28
|
-
return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new
|
|
33
|
+
return ((_a = this._conversation) !== null && _a !== void 0 ? _a : (this._conversation = new Client_4.Conversation(this._options)));
|
|
29
34
|
}
|
|
30
35
|
get knowledge() {
|
|
31
36
|
var _a;
|
|
32
|
-
return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new
|
|
37
|
+
return ((_a = this._knowledge) !== null && _a !== void 0 ? _a : (this._knowledge = new Client_5.Knowledge(this._options)));
|
|
33
38
|
}
|
|
34
39
|
get translations() {
|
|
35
40
|
var _a;
|
|
36
|
-
return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new
|
|
41
|
+
return ((_a = this._translations) !== null && _a !== void 0 ? _a : (this._translations = new Client_6.Translations(this._options)));
|
|
37
42
|
}
|
|
38
43
|
get triggers() {
|
|
39
44
|
var _a;
|
|
40
|
-
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new
|
|
45
|
+
return ((_a = this._triggers) !== null && _a !== void 0 ? _a : (this._triggers = new Client_7.Triggers(this._options)));
|
|
41
46
|
}
|
|
42
47
|
get users() {
|
|
43
48
|
var _a;
|
|
44
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
49
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_8.Users(this._options)));
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
exports.MavenAGIClient = MavenAGIClient;
|
package/README.md
CHANGED
|
@@ -28,19 +28,36 @@ const client = new MavenAGIClient({
|
|
|
28
28
|
organizationId: "YOUR_ORGANIZATION_ID",
|
|
29
29
|
agentId: "YOUR_AGENT_ID",
|
|
30
30
|
});
|
|
31
|
-
await client.
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
await client.analytics.getConversationTable({
|
|
32
|
+
conversationFilter: {
|
|
33
|
+
languages: ["en", "es"],
|
|
34
34
|
},
|
|
35
|
-
|
|
35
|
+
timeGrouping: "DAY",
|
|
36
|
+
fieldGroupings: [
|
|
36
37
|
{
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
field: "Category",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
columnDefinitions: [
|
|
42
|
+
{
|
|
43
|
+
header: "count",
|
|
44
|
+
metric: {
|
|
45
|
+
type: "count",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
header: "avg_first_response_time",
|
|
50
|
+
metric: {
|
|
51
|
+
type: "average",
|
|
52
|
+
targetField: "FirstResponseTime",
|
|
39
53
|
},
|
|
40
54
|
},
|
|
41
55
|
{
|
|
42
|
-
|
|
43
|
-
|
|
56
|
+
header: "percentile_handle_time",
|
|
57
|
+
metric: {
|
|
58
|
+
type: "percentile",
|
|
59
|
+
targetField: "HandleTime",
|
|
60
|
+
percentiles: [25, 75],
|
|
44
61
|
},
|
|
45
62
|
},
|
|
46
63
|
],
|
|
@@ -107,7 +124,7 @@ will be thrown.
|
|
|
107
124
|
import { MavenAGIError } from "mavenagi";
|
|
108
125
|
|
|
109
126
|
try {
|
|
110
|
-
await client.
|
|
127
|
+
await client.analytics.getConversationTable(...);
|
|
111
128
|
} catch (err) {
|
|
112
129
|
if (err instanceof MavenAGIError) {
|
|
113
130
|
console.log(err.statusCode);
|
|
@@ -124,7 +141,7 @@ try {
|
|
|
124
141
|
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
125
142
|
|
|
126
143
|
```typescript
|
|
127
|
-
const response = await client.
|
|
144
|
+
const response = await client.analytics.getConversationTable(..., {
|
|
128
145
|
headers: {
|
|
129
146
|
'X-Custom-Header': 'custom value'
|
|
130
147
|
}
|
|
@@ -146,7 +163,7 @@ A request is deemed retriable when any of the following HTTP status codes is ret
|
|
|
146
163
|
Use the `maxRetries` request option to configure this behavior.
|
|
147
164
|
|
|
148
165
|
```typescript
|
|
149
|
-
const response = await client.
|
|
166
|
+
const response = await client.analytics.getConversationTable(..., {
|
|
150
167
|
maxRetries: 0 // override maxRetries at the request level
|
|
151
168
|
});
|
|
152
169
|
```
|
|
@@ -156,7 +173,7 @@ const response = await client.conversation.initialize(..., {
|
|
|
156
173
|
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
157
174
|
|
|
158
175
|
```typescript
|
|
159
|
-
const response = await client.
|
|
176
|
+
const response = await client.analytics.getConversationTable(..., {
|
|
160
177
|
timeoutInSeconds: 30 // override timeout to 30s
|
|
161
178
|
});
|
|
162
179
|
```
|
|
@@ -167,7 +184,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
|
|
|
167
184
|
|
|
168
185
|
```typescript
|
|
169
186
|
const controller = new AbortController();
|
|
170
|
-
const response = await client.
|
|
187
|
+
const response = await client.analytics.getConversationTable(..., {
|
|
171
188
|
abortSignal: controller.signal
|
|
172
189
|
});
|
|
173
190
|
controller.abort(); // aborts the request
|
|
@@ -87,7 +87,7 @@ class Actions {
|
|
|
87
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
88
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/actions"),
|
|
89
89
|
method: "PUT",
|
|
90
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
90
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.6", "User-Agent": "mavenagi/1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
91
91
|
contentType: "application/json",
|
|
92
92
|
requestType: "json",
|
|
93
93
|
body: serializers.ActionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -167,7 +167,7 @@ class Actions {
|
|
|
167
167
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
168
168
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(actionReferenceId)}`),
|
|
169
169
|
method: "GET",
|
|
170
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
170
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.6", "User-Agent": "mavenagi/1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
171
171
|
contentType: "application/json",
|
|
172
172
|
requestType: "json",
|
|
173
173
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -246,7 +246,7 @@ class Actions {
|
|
|
246
246
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
247
247
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/actions/${encodeURIComponent(actionReferenceId)}`),
|
|
248
248
|
method: "DELETE",
|
|
249
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.
|
|
249
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.6", "User-Agent": "mavenagi/1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
250
250
|
contentType: "application/json",
|
|
251
251
|
requestType: "json",
|
|
252
252
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as MavenAGI from "../../../index";
|
|
7
|
+
export declare namespace Analytics {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
10
|
+
appId?: core.Supplier<string | undefined>;
|
|
11
|
+
appSecret?: core.Supplier<string | undefined>;
|
|
12
|
+
/** Override the X-Organization-Id header */
|
|
13
|
+
organizationId: core.Supplier<string>;
|
|
14
|
+
/** Override the X-Agent-Id header */
|
|
15
|
+
agentId: core.Supplier<string>;
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
17
|
+
}
|
|
18
|
+
interface RequestOptions {
|
|
19
|
+
/** The maximum time to wait for a response in seconds. */
|
|
20
|
+
timeoutInSeconds?: number;
|
|
21
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** A hook to abort the request. */
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the X-Organization-Id header */
|
|
26
|
+
organizationId?: string;
|
|
27
|
+
/** Override the X-Agent-Id header */
|
|
28
|
+
agentId?: string;
|
|
29
|
+
/** Additional headers to include in the request. */
|
|
30
|
+
headers?: Record<string, string>;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export declare class Analytics {
|
|
34
|
+
protected readonly _options: Analytics.Options;
|
|
35
|
+
constructor(_options: Analytics.Options);
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves structured conversation data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
|
|
38
|
+
*
|
|
39
|
+
* @param {MavenAGI.ConversationTableRequest} request
|
|
40
|
+
* @param {Analytics.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
43
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
44
|
+
* @throws {@link MavenAGI.ServerError}
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* await client.analytics.getConversationTable({
|
|
48
|
+
* conversationFilter: {
|
|
49
|
+
* languages: ["en", "es"]
|
|
50
|
+
* },
|
|
51
|
+
* timeGrouping: "DAY",
|
|
52
|
+
* fieldGroupings: [{
|
|
53
|
+
* field: "Category"
|
|
54
|
+
* }],
|
|
55
|
+
* columnDefinitions: [{
|
|
56
|
+
* header: "count",
|
|
57
|
+
* metric: {
|
|
58
|
+
* type: "count"
|
|
59
|
+
* }
|
|
60
|
+
* }, {
|
|
61
|
+
* header: "avg_first_response_time",
|
|
62
|
+
* metric: {
|
|
63
|
+
* type: "average",
|
|
64
|
+
* targetField: "FirstResponseTime"
|
|
65
|
+
* }
|
|
66
|
+
* }, {
|
|
67
|
+
* header: "percentile_handle_time",
|
|
68
|
+
* metric: {
|
|
69
|
+
* type: "percentile",
|
|
70
|
+
* targetField: "HandleTime",
|
|
71
|
+
* percentiles: [25, 75]
|
|
72
|
+
* }
|
|
73
|
+
* }]
|
|
74
|
+
* })
|
|
75
|
+
*/
|
|
76
|
+
getConversationTable(request: MavenAGI.ConversationTableRequest, requestOptions?: Analytics.RequestOptions): Promise<MavenAGI.ConversationTableResponse>;
|
|
77
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
78
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Analytics = void 0;
|
|
42
|
+
const environments = __importStar(require("../../../../environments"));
|
|
43
|
+
const core = __importStar(require("../../../../core"));
|
|
44
|
+
const MavenAGI = __importStar(require("../../../index"));
|
|
45
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
46
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
47
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
48
|
+
class Analytics {
|
|
49
|
+
constructor(_options) {
|
|
50
|
+
this._options = _options;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves structured conversation data formatted as a table, allowing users to group, filter, and define specific metrics to display as columns.
|
|
54
|
+
*
|
|
55
|
+
* @param {MavenAGI.ConversationTableRequest} request
|
|
56
|
+
* @param {Analytics.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
59
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
60
|
+
* @throws {@link MavenAGI.ServerError}
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.analytics.getConversationTable({
|
|
64
|
+
* conversationFilter: {
|
|
65
|
+
* languages: ["en", "es"]
|
|
66
|
+
* },
|
|
67
|
+
* timeGrouping: "DAY",
|
|
68
|
+
* fieldGroupings: [{
|
|
69
|
+
* field: "Category"
|
|
70
|
+
* }],
|
|
71
|
+
* columnDefinitions: [{
|
|
72
|
+
* header: "count",
|
|
73
|
+
* metric: {
|
|
74
|
+
* type: "count"
|
|
75
|
+
* }
|
|
76
|
+
* }, {
|
|
77
|
+
* header: "avg_first_response_time",
|
|
78
|
+
* metric: {
|
|
79
|
+
* type: "average",
|
|
80
|
+
* targetField: "FirstResponseTime"
|
|
81
|
+
* }
|
|
82
|
+
* }, {
|
|
83
|
+
* header: "percentile_handle_time",
|
|
84
|
+
* metric: {
|
|
85
|
+
* type: "percentile",
|
|
86
|
+
* targetField: "HandleTime",
|
|
87
|
+
* percentiles: [25, 75]
|
|
88
|
+
* }
|
|
89
|
+
* }]
|
|
90
|
+
* })
|
|
91
|
+
*/
|
|
92
|
+
getConversationTable(request, requestOptions) {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
96
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/tables/conversations"),
|
|
97
|
+
method: "POST",
|
|
98
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Organization-Id": yield core.Supplier.get(this._options.organizationId), "X-Agent-Id": yield core.Supplier.get(this._options.agentId), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "mavenagi", "X-Fern-SDK-Version": "1.0.6", "User-Agent": "mavenagi/1.0.6", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
99
|
+
contentType: "application/json",
|
|
100
|
+
requestType: "json",
|
|
101
|
+
body: serializers.ConversationTableRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
102
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
103
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
104
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
105
|
+
});
|
|
106
|
+
if (_response.ok) {
|
|
107
|
+
return serializers.ConversationTableResponse.parseOrThrow(_response.body, {
|
|
108
|
+
unrecognizedObjectKeys: "passthrough",
|
|
109
|
+
allowUnrecognizedUnionMembers: true,
|
|
110
|
+
allowUnrecognizedEnumValues: true,
|
|
111
|
+
breadcrumbsPrefix: ["response"],
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
if (_response.error.reason === "status-code") {
|
|
115
|
+
switch (_response.error.statusCode) {
|
|
116
|
+
case 404:
|
|
117
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
118
|
+
unrecognizedObjectKeys: "passthrough",
|
|
119
|
+
allowUnrecognizedUnionMembers: true,
|
|
120
|
+
allowUnrecognizedEnumValues: true,
|
|
121
|
+
breadcrumbsPrefix: ["response"],
|
|
122
|
+
}));
|
|
123
|
+
case 400:
|
|
124
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
125
|
+
unrecognizedObjectKeys: "passthrough",
|
|
126
|
+
allowUnrecognizedUnionMembers: true,
|
|
127
|
+
allowUnrecognizedEnumValues: true,
|
|
128
|
+
breadcrumbsPrefix: ["response"],
|
|
129
|
+
}));
|
|
130
|
+
case 500:
|
|
131
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
132
|
+
unrecognizedObjectKeys: "passthrough",
|
|
133
|
+
allowUnrecognizedUnionMembers: true,
|
|
134
|
+
allowUnrecognizedEnumValues: true,
|
|
135
|
+
breadcrumbsPrefix: ["response"],
|
|
136
|
+
}));
|
|
137
|
+
default:
|
|
138
|
+
throw new errors.MavenAGIError({
|
|
139
|
+
statusCode: _response.error.statusCode,
|
|
140
|
+
body: _response.error.body,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
switch (_response.error.reason) {
|
|
145
|
+
case "non-json":
|
|
146
|
+
throw new errors.MavenAGIError({
|
|
147
|
+
statusCode: _response.error.statusCode,
|
|
148
|
+
body: _response.error.rawBody,
|
|
149
|
+
});
|
|
150
|
+
case "timeout":
|
|
151
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling POST /v1/tables/conversations.");
|
|
152
|
+
case "unknown":
|
|
153
|
+
throw new errors.MavenAGIError({
|
|
154
|
+
message: _response.error.errorMessage,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
_getAuthorizationHeader() {
|
|
160
|
+
var _a, _b;
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
const appId = (_a = (yield core.Supplier.get(this._options.appId))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_ID"];
|
|
163
|
+
const appSecret = (_b = (yield core.Supplier.get(this._options.appSecret))) !== null && _b !== void 0 ? _b : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_SECRET"];
|
|
164
|
+
if (appId != null && appSecret != null) {
|
|
165
|
+
return core.BasicAuth.toAuthorizationHeader({
|
|
166
|
+
username: appId,
|
|
167
|
+
password: appSecret,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
return undefined;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.Analytics = Analytics;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface BasicMetric {
|
|
6
|
+
/** Field to apply the metric to. The field should be numeric for all metrics except for Count (no field) and DistinctCount. */
|
|
7
|
+
targetField: MavenAGI.ConversationField;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface ColumnDefinition {
|
|
6
|
+
/** Unique column header, serving as the key for corresponding metric values. */
|
|
7
|
+
header: string;
|
|
8
|
+
/** The metric calculated for this column, stored in the row data under the specified header. */
|
|
9
|
+
metric: MavenAGI.Metric;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface ConversationAnalyticsRequest {
|
|
6
|
+
/** Optional filter applied to refine the conversation data before processing. */
|
|
7
|
+
conversationFilter?: MavenAGI.ConversationFilter;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface ConversationRow {
|
|
6
|
+
/**
|
|
7
|
+
* A unique identifier for each row, consisting of field names mapped to their respective values.
|
|
8
|
+
* This includes time groupings and any specified field groupings.
|
|
9
|
+
*/
|
|
10
|
+
identifier: Record<MavenAGI.ConversationField, MavenAGI.FieldValue | undefined>;
|
|
11
|
+
/** The actual row data, where keys represent column headers and values contain the respective metric results. */
|
|
12
|
+
data: Record<string, MavenAGI.CellData>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* conversationFilter: {
|
|
9
|
+
* languages: ["en", "es"]
|
|
10
|
+
* },
|
|
11
|
+
* timeGrouping: MavenAGI.TimeInterval.Day,
|
|
12
|
+
* fieldGroupings: [{
|
|
13
|
+
* field: MavenAGI.ConversationField.Category
|
|
14
|
+
* }],
|
|
15
|
+
* columnDefinitions: [{
|
|
16
|
+
* header: "count",
|
|
17
|
+
* metric: {
|
|
18
|
+
* type: "count"
|
|
19
|
+
* }
|
|
20
|
+
* }, {
|
|
21
|
+
* header: "avg_first_response_time",
|
|
22
|
+
* metric: {
|
|
23
|
+
* type: "average",
|
|
24
|
+
* targetField: MavenAGI.ConversationField.FirstResponseTime
|
|
25
|
+
* }
|
|
26
|
+
* }, {
|
|
27
|
+
* header: "percentile_handle_time",
|
|
28
|
+
* metric: {
|
|
29
|
+
* type: "percentile",
|
|
30
|
+
* targetField: MavenAGI.ConversationField.HandleTime,
|
|
31
|
+
* percentiles: [25, 75]
|
|
32
|
+
* }
|
|
33
|
+
* }]
|
|
34
|
+
* }
|
|
35
|
+
*/
|
|
36
|
+
export interface ConversationTableRequest extends MavenAGI.ConversationAnalyticsRequest {
|
|
37
|
+
/**
|
|
38
|
+
* Defines the time interval for grouping data. If specified, data is grouped accordingly based on the time they were created.
|
|
39
|
+
* Example: If set to "DAY," data will be aggregated by day.
|
|
40
|
+
*/
|
|
41
|
+
timeGrouping?: MavenAGI.TimeInterval;
|
|
42
|
+
/**
|
|
43
|
+
* Specifies the fields by which data should be grouped. Each unique combination forms a row.
|
|
44
|
+
* If multiple fields are provided, the result is grouped by their unique value combinations.
|
|
45
|
+
* If empty, all data is aggregated into a single row.
|
|
46
|
+
*/
|
|
47
|
+
fieldGroupings: MavenAGI.GroupBy[];
|
|
48
|
+
/** Specifies the metrics to be displayed as columns. Column headers act as keys, with computed metric values as their mapped values. There needs to be at least one column definition in the table request. */
|
|
49
|
+
columnDefinitions: MavenAGI.ColumnDefinition[];
|
|
50
|
+
}
|