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
|
@@ -0,0 +1,20 @@
|
|
|
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("./FieldValue"), exports);
|
|
18
|
+
__exportStar(require("./TimeInterval"), exports);
|
|
19
|
+
__exportStar(require("./Range"), exports);
|
|
20
|
+
__exportStar(require("./CellData"), exports);
|
|
@@ -67,7 +67,7 @@ class AppSettings {
|
|
|
67
67
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
68
68
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "v1/app-settings"),
|
|
69
69
|
method: "GET",
|
|
70
|
-
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.
|
|
70
|
+
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),
|
|
71
71
|
contentType: "application/json",
|
|
72
72
|
requestType: "json",
|
|
73
73
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
|
-
export declare type ConversationPrecondition = MavenAGI.ConversationPrecondition.Tags | MavenAGI.ConversationPrecondition.Metadata | MavenAGI.ConversationPrecondition.ActionExecuted;
|
|
5
|
+
export declare type ConversationPrecondition = MavenAGI.ConversationPrecondition.Tags | MavenAGI.ConversationPrecondition.Metadata | MavenAGI.ConversationPrecondition.ActionExecuted | MavenAGI.ConversationPrecondition.ResponseConfig;
|
|
6
6
|
export declare namespace ConversationPrecondition {
|
|
7
7
|
interface Tags extends MavenAGI.TagsPrecondition {
|
|
8
8
|
conversationPreconditionType: "tags";
|
|
@@ -13,4 +13,7 @@ export declare namespace ConversationPrecondition {
|
|
|
13
13
|
interface ActionExecuted extends MavenAGI.ConversationExecutedActionPrecondition {
|
|
14
14
|
conversationPreconditionType: "actionExecuted";
|
|
15
15
|
}
|
|
16
|
+
interface ResponseConfig extends MavenAGI.ResponseConfigPrecondition {
|
|
17
|
+
conversationPreconditionType: "responseConfig";
|
|
18
|
+
}
|
|
16
19
|
}
|
|
@@ -12,10 +12,15 @@ import * as MavenAGI from "../../../index";
|
|
|
12
12
|
* agentId: "support",
|
|
13
13
|
* type: MavenAGI.EntityType.Conversation
|
|
14
14
|
* },
|
|
15
|
+
* deleted: false,
|
|
15
16
|
* analysis: {
|
|
16
17
|
* resolutionStatus: "Resolved",
|
|
17
18
|
* sentiment: MavenAGI.Sentiment.Positive
|
|
18
19
|
* },
|
|
20
|
+
* summary: {
|
|
21
|
+
* actionIds: [],
|
|
22
|
+
* incompleteActionIds: []
|
|
23
|
+
* },
|
|
19
24
|
* messages: [{
|
|
20
25
|
* type: "user",
|
|
21
26
|
* userMessageType: MavenAGI.UserConversationMessageType.User,
|
|
@@ -59,6 +64,10 @@ export interface ConversationResponse extends MavenAGI.ConversationBase {
|
|
|
59
64
|
conversationId: MavenAGI.EntityId;
|
|
60
65
|
/** The messages in the conversation */
|
|
61
66
|
messages: MavenAGI.ConversationMessageResponse[];
|
|
62
|
-
/** An analysis of the conversation. */
|
|
67
|
+
/** An analysis of the conversation. Fields are generated by Maven via an analysis of user messages. This object is calculated on a delay. Fields will not be up to date on ask requests. */
|
|
63
68
|
analysis: MavenAGI.ConversationAnalysis;
|
|
69
|
+
/** A summary of the conversation. Fields are calculated from conversation data. Unlike analysis, all fields can be derived from other data available in the API. This object is provided as a convenience and is calculated on a delay. Fields will not be up to date on ask requests. */
|
|
70
|
+
summary: MavenAGI.ConversationSummary;
|
|
71
|
+
/** Whether the conversation user-specific data has been deleted. See `deleteConversation` for details. */
|
|
72
|
+
deleted: boolean;
|
|
64
73
|
}
|
|
@@ -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 ConversationSummary {
|
|
6
|
+
/** The IDs of the actions that were taken by Maven in the conversation */
|
|
7
|
+
actionIds: MavenAGI.EntityIdWithoutAgent[];
|
|
8
|
+
/** The IDs of the actions that were taken by Maven but not completed in the conversation. Occurs when the user is shown an action form but does not submit it. */
|
|
9
|
+
incompleteActionIds: MavenAGI.EntityIdWithoutAgent[];
|
|
10
|
+
}
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as MavenAGI from "../../../index";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** The ID of the organization that this object belongs too */
|
|
5
|
+
/**
|
|
6
|
+
* A fully specified object ID, unique across the entire system.
|
|
7
|
+
*/
|
|
8
|
+
export interface EntityId extends MavenAGI.EntityIdWithoutAgent {
|
|
9
|
+
/** The ID of the organization that this object belongs to */
|
|
11
10
|
organizationId: string;
|
|
12
|
-
/** The ID of the agent that this object belongs
|
|
11
|
+
/** The ID of the agent that this object belongs to */
|
|
13
12
|
agentId: string;
|
|
14
13
|
}
|
|
@@ -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
|
+
/**
|
|
6
|
+
* The organizationId and agentId are inferred from the context.
|
|
7
|
+
*/
|
|
8
|
+
export interface EntityIdWithoutAgent extends MavenAGI.EntityIdBase {
|
|
9
|
+
/** The object type */
|
|
10
|
+
type: MavenAGI.EntityType;
|
|
11
|
+
/** The ID of the application that created this object */
|
|
12
|
+
appId: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export interface ResponseConfigPrecondition extends MavenAGI.PreconditionBase {
|
|
6
|
+
useMarkdown?: boolean;
|
|
7
|
+
useForms?: boolean;
|
|
8
|
+
useImages?: boolean;
|
|
9
|
+
isCopilot?: boolean;
|
|
10
|
+
responseLength?: MavenAGI.ResponseLength;
|
|
11
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "./ErrorMessage";
|
|
2
2
|
export * from "./EntityType";
|
|
3
3
|
export * from "./EntityIdBase";
|
|
4
|
+
export * from "./EntityIdWithoutAgent";
|
|
5
|
+
export * from "./EntityIdFilter";
|
|
4
6
|
export * from "./EntityId";
|
|
5
7
|
export * from "./FeedbackBase";
|
|
6
8
|
export * from "./FeedbackType";
|
|
@@ -18,6 +20,7 @@ export * from "./EventTriggerType";
|
|
|
18
20
|
export * from "./ActionParameterType";
|
|
19
21
|
export * from "./ActionEnumOption";
|
|
20
22
|
export * from "./Sentiment";
|
|
23
|
+
export * from "./ConversationSummary";
|
|
21
24
|
export * from "./ConversationAnalysis";
|
|
22
25
|
export * from "./ResponseLength";
|
|
23
26
|
export * from "./Capability";
|
|
@@ -48,6 +51,7 @@ export * from "./PreconditionOperator";
|
|
|
48
51
|
export * from "./PreconditionBase";
|
|
49
52
|
export * from "./MetadataPrecondition";
|
|
50
53
|
export * from "./ConversationPrecondition";
|
|
54
|
+
export * from "./ResponseConfigPrecondition";
|
|
51
55
|
export * from "./PreconditionGroupOperator";
|
|
52
56
|
export * from "./PreconditionGroup";
|
|
53
57
|
export * from "./TagsPrecondition";
|
|
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ErrorMessage"), exports);
|
|
18
18
|
__exportStar(require("./EntityType"), exports);
|
|
19
19
|
__exportStar(require("./EntityIdBase"), exports);
|
|
20
|
+
__exportStar(require("./EntityIdWithoutAgent"), exports);
|
|
21
|
+
__exportStar(require("./EntityIdFilter"), exports);
|
|
20
22
|
__exportStar(require("./EntityId"), exports);
|
|
21
23
|
__exportStar(require("./FeedbackBase"), exports);
|
|
22
24
|
__exportStar(require("./FeedbackType"), exports);
|
|
@@ -34,6 +36,7 @@ __exportStar(require("./EventTriggerType"), exports);
|
|
|
34
36
|
__exportStar(require("./ActionParameterType"), exports);
|
|
35
37
|
__exportStar(require("./ActionEnumOption"), exports);
|
|
36
38
|
__exportStar(require("./Sentiment"), exports);
|
|
39
|
+
__exportStar(require("./ConversationSummary"), exports);
|
|
37
40
|
__exportStar(require("./ConversationAnalysis"), exports);
|
|
38
41
|
__exportStar(require("./ResponseLength"), exports);
|
|
39
42
|
__exportStar(require("./Capability"), exports);
|
|
@@ -64,6 +67,7 @@ __exportStar(require("./PreconditionOperator"), exports);
|
|
|
64
67
|
__exportStar(require("./PreconditionBase"), exports);
|
|
65
68
|
__exportStar(require("./MetadataPrecondition"), exports);
|
|
66
69
|
__exportStar(require("./ConversationPrecondition"), exports);
|
|
70
|
+
__exportStar(require("./ResponseConfigPrecondition"), exports);
|
|
67
71
|
__exportStar(require("./PreconditionGroupOperator"), exports);
|
|
68
72
|
__exportStar(require("./PreconditionGroup"), exports);
|
|
69
73
|
__exportStar(require("./TagsPrecondition"), exports);
|
|
@@ -76,7 +76,30 @@ export declare class Conversation {
|
|
|
76
76
|
*/
|
|
77
77
|
get(conversationId: string, request?: MavenAGI.ConversationGetRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Wipes a conversation of all user data.
|
|
80
|
+
* The conversation ID will still exist and non-user specific data will still be retained.
|
|
81
|
+
* Attempts to modify or add messages to the conversation will throw an error.
|
|
82
|
+
*
|
|
83
|
+
* <Warning>This is a destructive operation and cannot be undone. <br/><br/>
|
|
84
|
+
* The exact fields cleared include: the conversation subject, userRequest, agentResponse.
|
|
85
|
+
* As well as the text response, followup questions, and backend LLM prompt of all messages.</Warning>
|
|
86
|
+
*
|
|
87
|
+
* @param {string} conversationId - The ID of the conversation to delete
|
|
88
|
+
* @param {MavenAGI.ConversationDeleteRequest} request
|
|
89
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
|
+
*
|
|
91
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
92
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
93
|
+
* @throws {@link MavenAGI.ServerError}
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* await client.conversation.delete("conversation-0", {
|
|
97
|
+
* reason: "GDPR deletion request 1234."
|
|
98
|
+
* })
|
|
99
|
+
*/
|
|
100
|
+
delete(conversationId: string, request: MavenAGI.ConversationDeleteRequest, requestOptions?: Conversation.RequestOptions): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Append messages to an existing conversation. The conversation must be initialized first. If a message with the same ID already exists, it will be ignored. Messages do not allow modification.
|
|
80
103
|
*
|
|
81
104
|
* @param {string} conversationId - The ID of the conversation to append messages to
|
|
82
105
|
* @param {MavenAGI.ConversationMessageRequest[]} request
|
|
@@ -99,7 +122,15 @@ export declare class Conversation {
|
|
|
99
122
|
*/
|
|
100
123
|
appendNewMessages(conversationId: string, request: MavenAGI.ConversationMessageRequest[], requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
101
124
|
/**
|
|
102
|
-
*
|
|
125
|
+
* Get an answer from Maven for a given user question. If the user question or its answer already exists,
|
|
126
|
+
* they will be reused and will not be updated. Messages do not allow modification once generated.
|
|
127
|
+
*
|
|
128
|
+
* Concurrency Behavior:
|
|
129
|
+
* - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
130
|
+
* - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
|
|
131
|
+
*
|
|
132
|
+
* Known Limitation:
|
|
133
|
+
* - The API does not currently expose metadata indicating whether a response or message is incomplete. This will be addressed in a future update.
|
|
103
134
|
*
|
|
104
135
|
* @param {string} conversationId - The ID of a new or existing conversation to use as context for the question
|
|
105
136
|
* @param {MavenAGI.AskRequest} request
|
|
@@ -130,11 +161,23 @@ export declare class Conversation {
|
|
|
130
161
|
*/
|
|
131
162
|
ask(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: Conversation.RequestOptions): Promise<MavenAGI.ConversationResponse>;
|
|
132
163
|
/**
|
|
133
|
-
*
|
|
164
|
+
* Get an answer from Maven for a given user question with a streaming response. The response will be sent as a stream of events.
|
|
165
|
+
* The text portions of stream responses should be concatenated to form the full response text.
|
|
166
|
+
* Action and metadata events should overwrite past data and do not need concatenation.
|
|
167
|
+
*
|
|
168
|
+
* If the user question or its answer already exists, they will be reused and will not be updated.
|
|
169
|
+
* Messages do not allow modification once generated.
|
|
170
|
+
*
|
|
171
|
+
* Concurrency Behavior:
|
|
172
|
+
* - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
173
|
+
* - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
|
|
174
|
+
*
|
|
175
|
+
* Known Limitation:
|
|
176
|
+
* - The API does not currently expose metadata indicating whether a response or message is incomplete. This will be addressed in a future update.
|
|
134
177
|
*/
|
|
135
178
|
askStream(conversationId: string, request: MavenAGI.AskRequest, requestOptions?: Conversation.RequestOptions): Promise<core.Stream<MavenAGI.StreamResponse>>;
|
|
136
179
|
/**
|
|
137
|
-
*
|
|
180
|
+
* This method is deprecated and will be removed in a future release. Use either `ask` or `askStream` instead.
|
|
138
181
|
*
|
|
139
182
|
* @param {string} conversationId - The ID of a conversation the messages belong to
|
|
140
183
|
* @param {MavenAGI.GenerateMavenSuggestionsRequest} request
|
|
@@ -81,7 +81,7 @@ class Conversation {
|
|
|
81
81
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
82
82
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/conversations"),
|
|
83
83
|
method: "POST",
|
|
84
|
-
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.
|
|
84
|
+
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),
|
|
85
85
|
contentType: "application/json",
|
|
86
86
|
requestType: "json",
|
|
87
87
|
body: serializers.ConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -167,7 +167,7 @@ class Conversation {
|
|
|
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/conversations/${encodeURIComponent(conversationId)}`),
|
|
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
|
queryParameters: _queryParams,
|
|
173
173
|
requestType: "json",
|
|
@@ -229,7 +229,97 @@ class Conversation {
|
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
232
|
-
*
|
|
232
|
+
* Wipes a conversation of all user data.
|
|
233
|
+
* The conversation ID will still exist and non-user specific data will still be retained.
|
|
234
|
+
* Attempts to modify or add messages to the conversation will throw an error.
|
|
235
|
+
*
|
|
236
|
+
* <Warning>This is a destructive operation and cannot be undone. <br/><br/>
|
|
237
|
+
* The exact fields cleared include: the conversation subject, userRequest, agentResponse.
|
|
238
|
+
* As well as the text response, followup questions, and backend LLM prompt of all messages.</Warning>
|
|
239
|
+
*
|
|
240
|
+
* @param {string} conversationId - The ID of the conversation to delete
|
|
241
|
+
* @param {MavenAGI.ConversationDeleteRequest} request
|
|
242
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
243
|
+
*
|
|
244
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
245
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
246
|
+
* @throws {@link MavenAGI.ServerError}
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* await client.conversation.delete("conversation-0", {
|
|
250
|
+
* reason: "GDPR deletion request 1234."
|
|
251
|
+
* })
|
|
252
|
+
*/
|
|
253
|
+
delete(conversationId, request, requestOptions) {
|
|
254
|
+
var _a, _b;
|
|
255
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
256
|
+
const { appId, reason } = request;
|
|
257
|
+
const _queryParams = {};
|
|
258
|
+
if (appId != null) {
|
|
259
|
+
_queryParams["appId"] = appId;
|
|
260
|
+
}
|
|
261
|
+
_queryParams["reason"] = reason;
|
|
262
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
263
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}`),
|
|
264
|
+
method: "DELETE",
|
|
265
|
+
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),
|
|
266
|
+
contentType: "application/json",
|
|
267
|
+
queryParameters: _queryParams,
|
|
268
|
+
requestType: "json",
|
|
269
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
270
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
271
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
272
|
+
});
|
|
273
|
+
if (_response.ok) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (_response.error.reason === "status-code") {
|
|
277
|
+
switch (_response.error.statusCode) {
|
|
278
|
+
case 404:
|
|
279
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
280
|
+
unrecognizedObjectKeys: "passthrough",
|
|
281
|
+
allowUnrecognizedUnionMembers: true,
|
|
282
|
+
allowUnrecognizedEnumValues: true,
|
|
283
|
+
breadcrumbsPrefix: ["response"],
|
|
284
|
+
}));
|
|
285
|
+
case 400:
|
|
286
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
287
|
+
unrecognizedObjectKeys: "passthrough",
|
|
288
|
+
allowUnrecognizedUnionMembers: true,
|
|
289
|
+
allowUnrecognizedEnumValues: true,
|
|
290
|
+
breadcrumbsPrefix: ["response"],
|
|
291
|
+
}));
|
|
292
|
+
case 500:
|
|
293
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
294
|
+
unrecognizedObjectKeys: "passthrough",
|
|
295
|
+
allowUnrecognizedUnionMembers: true,
|
|
296
|
+
allowUnrecognizedEnumValues: true,
|
|
297
|
+
breadcrumbsPrefix: ["response"],
|
|
298
|
+
}));
|
|
299
|
+
default:
|
|
300
|
+
throw new errors.MavenAGIError({
|
|
301
|
+
statusCode: _response.error.statusCode,
|
|
302
|
+
body: _response.error.body,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
switch (_response.error.reason) {
|
|
307
|
+
case "non-json":
|
|
308
|
+
throw new errors.MavenAGIError({
|
|
309
|
+
statusCode: _response.error.statusCode,
|
|
310
|
+
body: _response.error.rawBody,
|
|
311
|
+
});
|
|
312
|
+
case "timeout":
|
|
313
|
+
throw new errors.MavenAGITimeoutError("Timeout exceeded when calling DELETE /v1/conversations/{conversationId}.");
|
|
314
|
+
case "unknown":
|
|
315
|
+
throw new errors.MavenAGIError({
|
|
316
|
+
message: _response.error.errorMessage,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Append messages to an existing conversation. The conversation must be initialized first. If a message with the same ID already exists, it will be ignored. Messages do not allow modification.
|
|
233
323
|
*
|
|
234
324
|
* @param {string} conversationId - The ID of the conversation to append messages to
|
|
235
325
|
* @param {MavenAGI.ConversationMessageRequest[]} request
|
|
@@ -256,7 +346,7 @@ class Conversation {
|
|
|
256
346
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
257
347
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/messages`),
|
|
258
348
|
method: "POST",
|
|
259
|
-
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.
|
|
349
|
+
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),
|
|
260
350
|
contentType: "application/json",
|
|
261
351
|
requestType: "json",
|
|
262
352
|
body: serializers.conversation.appendNewMessages.Request.jsonOrThrow(request, {
|
|
@@ -320,7 +410,15 @@ class Conversation {
|
|
|
320
410
|
});
|
|
321
411
|
}
|
|
322
412
|
/**
|
|
323
|
-
*
|
|
413
|
+
* Get an answer from Maven for a given user question. If the user question or its answer already exists,
|
|
414
|
+
* they will be reused and will not be updated. Messages do not allow modification once generated.
|
|
415
|
+
*
|
|
416
|
+
* Concurrency Behavior:
|
|
417
|
+
* - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
418
|
+
* - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
|
|
419
|
+
*
|
|
420
|
+
* Known Limitation:
|
|
421
|
+
* - The API does not currently expose metadata indicating whether a response or message is incomplete. This will be addressed in a future update.
|
|
324
422
|
*
|
|
325
423
|
* @param {string} conversationId - The ID of a new or existing conversation to use as context for the question
|
|
326
424
|
* @param {MavenAGI.AskRequest} request
|
|
@@ -355,7 +453,7 @@ class Conversation {
|
|
|
355
453
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
356
454
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask`),
|
|
357
455
|
method: "POST",
|
|
358
|
-
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.
|
|
456
|
+
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),
|
|
359
457
|
contentType: "application/json",
|
|
360
458
|
requestType: "json",
|
|
361
459
|
body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -417,7 +515,19 @@ class Conversation {
|
|
|
417
515
|
});
|
|
418
516
|
}
|
|
419
517
|
/**
|
|
420
|
-
*
|
|
518
|
+
* Get an answer from Maven for a given user question with a streaming response. The response will be sent as a stream of events.
|
|
519
|
+
* The text portions of stream responses should be concatenated to form the full response text.
|
|
520
|
+
* Action and metadata events should overwrite past data and do not need concatenation.
|
|
521
|
+
*
|
|
522
|
+
* If the user question or its answer already exists, they will be reused and will not be updated.
|
|
523
|
+
* Messages do not allow modification once generated.
|
|
524
|
+
*
|
|
525
|
+
* Concurrency Behavior:
|
|
526
|
+
* - If another API call is made for the same user question while a response is mid-stream, partial answers may be returned.
|
|
527
|
+
* - The second caller will receive a truncated or partial response depending on where the first stream is in its processing. The first caller's stream will remain unaffected and continue delivering the full response.
|
|
528
|
+
*
|
|
529
|
+
* Known Limitation:
|
|
530
|
+
* - The API does not currently expose metadata indicating whether a response or message is incomplete. This will be addressed in a future update.
|
|
421
531
|
*/
|
|
422
532
|
askStream(conversationId, request, requestOptions) {
|
|
423
533
|
var _a, _b;
|
|
@@ -425,7 +535,7 @@ class Conversation {
|
|
|
425
535
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
426
536
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask_stream`),
|
|
427
537
|
method: "POST",
|
|
428
|
-
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.
|
|
538
|
+
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),
|
|
429
539
|
contentType: "application/json",
|
|
430
540
|
requestType: "json",
|
|
431
541
|
body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -498,7 +608,7 @@ class Conversation {
|
|
|
498
608
|
});
|
|
499
609
|
}
|
|
500
610
|
/**
|
|
501
|
-
*
|
|
611
|
+
* This method is deprecated and will be removed in a future release. Use either `ask` or `askStream` instead.
|
|
502
612
|
*
|
|
503
613
|
* @param {string} conversationId - The ID of a conversation the messages belong to
|
|
504
614
|
* @param {MavenAGI.GenerateMavenSuggestionsRequest} request
|
|
@@ -523,7 +633,7 @@ class Conversation {
|
|
|
523
633
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
524
634
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/generate_maven_suggestions`),
|
|
525
635
|
method: "POST",
|
|
526
|
-
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.
|
|
636
|
+
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),
|
|
527
637
|
contentType: "application/json",
|
|
528
638
|
requestType: "json",
|
|
529
639
|
body: serializers.GenerateMavenSuggestionsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -603,7 +713,7 @@ class Conversation {
|
|
|
603
713
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
604
714
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/categorize`),
|
|
605
715
|
method: "POST",
|
|
606
|
-
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.
|
|
716
|
+
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),
|
|
607
717
|
contentType: "application/json",
|
|
608
718
|
requestType: "json",
|
|
609
719
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -697,7 +807,7 @@ class Conversation {
|
|
|
697
807
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
698
808
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/conversations/feedback"),
|
|
699
809
|
method: "POST",
|
|
700
|
-
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.
|
|
810
|
+
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),
|
|
701
811
|
contentType: "application/json",
|
|
702
812
|
requestType: "json",
|
|
703
813
|
body: serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -785,7 +895,7 @@ class Conversation {
|
|
|
785
895
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
786
896
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/submit-form`),
|
|
787
897
|
method: "POST",
|
|
788
|
-
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.
|
|
898
|
+
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),
|
|
789
899
|
contentType: "application/json",
|
|
790
900
|
requestType: "json",
|
|
791
901
|
body: serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -868,7 +978,7 @@ class Conversation {
|
|
|
868
978
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
869
979
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/metadata`),
|
|
870
980
|
method: "POST",
|
|
871
|
-
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.
|
|
981
|
+
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),
|
|
872
982
|
contentType: "application/json",
|
|
873
983
|
requestType: "json",
|
|
874
984
|
body: serializers.conversation.addConversationMetadata.Request.jsonOrThrow(request, {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* reason: "GDPR deletion request 1234."
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface ConversationDeleteRequest {
|
|
11
|
+
/**
|
|
12
|
+
* The App ID of the conversation to delete. If not provided the ID of the calling app will be used.
|
|
13
|
+
*/
|
|
14
|
+
appId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The reason for deleting the conversation. This message will replace all user messages in the conversation.
|
|
17
|
+
*/
|
|
18
|
+
reason: string;
|
|
19
|
+
}
|
|
@@ -23,7 +23,7 @@ import * as MavenAGI from "../../../index";
|
|
|
23
23
|
* }
|
|
24
24
|
*/
|
|
25
25
|
export interface AskRequest {
|
|
26
|
-
/** Externally supplied ID to uniquely identify this message within the conversation */
|
|
26
|
+
/** Externally supplied ID to uniquely identify this message within the conversation. If a message with this ID already exists it will be reused and will not be updated. */
|
|
27
27
|
conversationMessageId: MavenAGI.EntityIdBase;
|
|
28
28
|
/** Externally supplied ID to uniquely identify the user that created this message */
|
|
29
29
|
userId: MavenAGI.EntityIdBase;
|