mavenagi 1.2.63 → 1.2.65
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/BaseClient.js +2 -2
- package/api/resources/actions/client/Client.js +3 -3
- package/api/resources/agents/client/Client.js +5 -5
- package/api/resources/agents/client/requests/AgentPatchRequest.d.ts +23 -3
- package/api/resources/agents/types/Agent.d.ts +9 -1
- package/api/resources/agents/types/AgentPrompting.d.ts +14 -2
- package/api/resources/appDirectory/client/Client.js +5 -5
- package/api/resources/assets/client/Client.js +1 -1
- package/api/resources/capabilities/client/Client.d.ts +68 -0
- package/api/resources/capabilities/client/Client.js +243 -3
- package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +4 -1
- package/api/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +36 -0
- package/api/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.js +3 -0
- package/api/resources/capabilities/client/requests/GetCapabilityByTypeRequest.d.ts +4 -1
- package/api/resources/capabilities/client/requests/SimulateCapabilityByTypeRequest.d.ts +14 -0
- package/api/resources/capabilities/client/requests/SimulateCapabilityByTypeRequest.js +3 -0
- package/api/resources/capabilities/client/requests/index.d.ts +2 -0
- package/api/resources/capabilities/types/ActionSimulationInput.d.ts +5 -0
- package/api/resources/capabilities/types/ActionSimulationInput.js +3 -0
- package/api/resources/capabilities/types/CapabilityExecution.d.ts +14 -0
- package/api/resources/capabilities/types/CapabilityExecution.js +3 -0
- package/api/resources/capabilities/types/CapabilityExecutionBase.d.ts +32 -0
- package/api/resources/capabilities/types/CapabilityExecutionBase.js +3 -0
- package/api/resources/capabilities/types/CapabilityExecutionCompletionReason.d.ts +36 -0
- package/api/resources/capabilities/types/CapabilityExecutionCompletionReason.js +39 -0
- package/api/resources/capabilities/types/CapabilityExecutionRetryability.d.ts +17 -0
- package/api/resources/capabilities/types/CapabilityExecutionRetryability.js +20 -0
- package/api/resources/capabilities/types/CapabilityExecutionStatus.d.ts +10 -0
- package/api/resources/capabilities/types/CapabilityExecutionStatus.js +13 -0
- package/api/resources/capabilities/types/CapabilityExecutionsSearchResponse.d.ts +62 -0
- package/api/resources/capabilities/types/CapabilityExecutionsSearchResponse.js +3 -0
- package/api/resources/capabilities/types/CapabilitySimulationInput.d.ts +11 -0
- package/api/resources/capabilities/types/CapabilitySimulationInput.js +3 -0
- package/api/resources/capabilities/types/CapabilitySimulationResult.d.ts +10 -0
- package/api/resources/capabilities/types/CapabilitySimulationResult.js +3 -0
- package/api/resources/capabilities/types/ConversationContextSimulationInput.d.ts +14 -0
- package/api/resources/capabilities/types/ConversationContextSimulationInput.js +3 -0
- package/api/resources/capabilities/types/ConversationKickoffCapabilityExecution.d.ts +7 -0
- package/api/resources/capabilities/types/ConversationKickoffCapabilityExecution.js +3 -0
- package/api/resources/capabilities/types/SimulatedUser.d.ts +9 -0
- package/api/resources/capabilities/types/SimulatedUser.js +3 -0
- package/api/resources/capabilities/types/SimulatedUserData.d.ts +6 -0
- package/api/resources/capabilities/types/SimulatedUserData.js +3 -0
- package/api/resources/capabilities/types/TriggerCapabilityExecution.d.ts +19 -0
- package/api/resources/capabilities/types/TriggerCapabilityExecution.js +3 -0
- package/api/resources/capabilities/types/index.d.ts +14 -0
- package/api/resources/capabilities/types/index.js +14 -0
- package/api/resources/charters/client/Client.js +7 -5
- package/api/resources/charters/client/requests/CharterDeleteRequest.d.ts +6 -6
- package/api/resources/charters/client/requests/CharterGetAncestorsRequest.d.ts +12 -0
- package/api/resources/charters/client/requests/CharterGetRequest.d.ts +9 -1
- package/api/resources/charters/client/requests/CharterPatchRequest.d.ts +5 -6
- package/api/resources/charters/types/CharterBase.d.ts +9 -4
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.d.ts +2 -0
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.js +2 -0
- package/api/resources/charters/types/CharterContent.d.ts +2 -0
- package/api/resources/charters/types/CharterListChildrenRequest.d.ts +10 -0
- package/api/resources/charters/types/CharterPatchReferences.d.ts +2 -0
- package/api/resources/charters/types/CharterReferences.d.ts +2 -0
- package/api/resources/charters/types/CharterResponse.d.ts +5 -1
- package/api/resources/charters/types/CharterSearchFilter.d.ts +9 -1
- package/api/resources/charters/types/CharterStatus.d.ts +4 -0
- package/api/resources/charters/types/CharterStatus.js +4 -0
- package/api/resources/charters/types/CharterSummary.d.ts +5 -1
- package/api/resources/charters/types/index.d.ts +0 -1
- package/api/resources/charters/types/index.js +0 -1
- package/api/resources/commons/types/ActionExecutionStatus.d.ts +6 -0
- package/api/resources/commons/types/ActionExecutionStatus.js +9 -0
- package/api/resources/commons/types/ActionProperties.d.ts +1 -1
- package/api/resources/commons/types/AdditionalDataKey.d.ts +3 -0
- package/api/resources/commons/types/AdditionalDataKey.js +3 -0
- package/api/resources/commons/types/AppUserRequest.d.ts +11 -0
- package/api/resources/commons/types/BotLogicCharterDetail.d.ts +3 -1
- package/api/resources/commons/types/BotLogicSegmentsItem.d.ts +3 -0
- package/api/resources/commons/types/BotMessage.d.ts +5 -0
- package/api/resources/commons/types/BotMessageStatusReason.d.ts +13 -0
- package/api/resources/commons/types/BotMessageStatusReason.js +16 -0
- package/api/resources/commons/types/Capability.d.ts +4 -0
- package/api/resources/commons/types/Capability.js +4 -0
- package/api/resources/commons/types/CapabilityStatus.d.ts +2 -2
- package/api/resources/commons/types/CapabilityStatus.js +2 -2
- package/api/resources/commons/types/ConversationAnalysis.d.ts +2 -2
- package/api/resources/commons/types/ConversationMetadataValueSource.d.ts +7 -0
- package/api/resources/commons/types/ConversationMetadataValueSource.js +3 -0
- package/api/resources/commons/types/ConversationSummary.d.ts +5 -3
- package/api/resources/commons/types/ConversationValueSource.d.ts +10 -0
- package/api/resources/commons/types/ConversationValueSource.js +3 -0
- package/api/resources/commons/types/EntityType.d.ts +5 -0
- package/api/resources/commons/types/EntityType.js +5 -0
- package/api/resources/commons/types/ErrorReason.d.ts +6 -0
- package/api/resources/commons/types/ErrorReason.js +6 -0
- package/api/resources/commons/types/EventFilter.d.ts +1 -0
- package/api/resources/commons/types/ExecuteActionResponse.d.ts +14 -0
- package/api/resources/commons/types/ExecuteActionResponse.js +3 -0
- package/api/resources/commons/types/ExecutionMode.d.ts +10 -0
- package/api/resources/commons/types/ExecutionMode.js +13 -0
- package/api/resources/commons/types/FunctionVersionBinding.d.ts +11 -0
- package/api/resources/commons/types/FunctionVersionBinding.js +3 -0
- package/api/resources/commons/types/InboxItemDuplicateDocuments.d.ts +1 -1
- package/api/resources/commons/types/InboxItemStatus.d.ts +1 -1
- package/api/resources/commons/types/InboxItemStatus.js +1 -1
- package/api/resources/commons/types/LlmInclusionStatus.d.ts +3 -0
- package/api/resources/commons/types/LlmInclusionStatus.js +3 -0
- package/api/resources/commons/types/MetadataConversationValueFilter.d.ts +15 -0
- package/api/resources/commons/types/MetadataConversationValueFilter.js +3 -0
- package/api/resources/commons/types/MetadataFilter.d.ts +33 -6
- package/api/resources/commons/types/Quality.d.ts +2 -0
- package/api/resources/commons/types/Quality.js +2 -0
- package/api/resources/commons/types/QualityReason.d.ts +4 -0
- package/api/resources/commons/types/QualityReason.js +4 -0
- package/api/resources/commons/types/RelationshipType.d.ts +2 -2
- package/api/resources/commons/types/RelationshipType.js +2 -2
- package/api/resources/commons/types/ResolutionStatus.d.ts +2 -0
- package/api/resources/commons/types/ResolutionStatus.js +2 -0
- package/api/resources/commons/types/ResponseConfig.d.ts +2 -0
- package/api/resources/commons/types/SimulationActionBehavior.d.ts +18 -0
- package/api/resources/commons/types/SimulationActionBehavior.js +3 -0
- package/api/resources/commons/types/SimulationActionCallApp.d.ts +1 -0
- package/api/resources/commons/types/SimulationActionCallApp.js +3 -0
- package/api/resources/commons/types/SimulationActionMock.d.ts +6 -0
- package/api/resources/commons/types/SimulationActionMock.js +3 -0
- package/api/resources/commons/types/SimulationContext.d.ts +19 -0
- package/api/resources/commons/types/SystemEventName.d.ts +5 -2
- package/api/resources/commons/types/SystemEventName.js +5 -2
- package/api/resources/commons/types/UserEvent.d.ts +1 -1
- package/api/resources/commons/types/UserEventName.d.ts +1 -1
- package/api/resources/commons/types/UserEventName.js +1 -1
- package/api/resources/commons/types/index.d.ts +12 -0
- package/api/resources/commons/types/index.js +12 -0
- package/api/resources/conversation/client/Client.d.ts +17 -9
- package/api/resources/conversation/client/Client.js +27 -19
- package/api/resources/conversation/client/requests/ConversationDeleteRequest.d.ts +1 -1
- package/api/resources/conversation/types/BillableFilterField.d.ts +3 -3
- package/api/resources/conversation/types/BillableFilterField.js +3 -3
- package/api/resources/conversation/types/ConversationField.d.ts +8 -0
- package/api/resources/conversation/types/ConversationField.js +8 -0
- package/api/resources/conversation/types/ConversationFilter.d.ts +7 -1
- package/api/resources/conversation/types/ConversationPatchRequest.d.ts +1 -1
- package/api/resources/customers/client/Client.js +2 -2
- package/api/resources/customers/types/CustomerFilter.d.ts +16 -1
- package/api/resources/customers/types/CustomerResponse.d.ts +2 -2
- package/api/resources/events/client/Client.js +1 -1
- package/api/resources/inbox/client/Client.js +6 -6
- package/api/resources/integrations/client/Client.js +1 -1
- package/api/resources/intelligentFields/client/Client.d.ts +4 -3
- package/api/resources/intelligentFields/client/Client.js +7 -6
- package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.d.ts +9 -1
- package/api/resources/intelligentFields/types/EnumOption.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldBase.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldCore.d.ts +5 -1
- package/api/resources/intelligentFields/types/IntelligentFieldType.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldType.js +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldValueSearchRequest.d.ts +5 -4
- package/api/resources/knowledge/client/Client.js +13 -13
- package/api/resources/knowledge/types/KnowledgeBaseIndexingStatus.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseIndexingStatus.js +1 -1
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +3 -1
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.js +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionStatus.d.ts +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionStatus.js +4 -0
- package/api/resources/organizations/client/Client.js +4 -4
- package/api/resources/segments/client/Client.d.ts +1 -1
- package/api/resources/segments/client/Client.js +4 -4
- package/api/resources/segments/types/SegmentStatus.d.ts +4 -0
- package/api/resources/segments/types/SegmentStatus.js +4 -0
- package/api/resources/triggers/client/Client.js +3 -3
- package/api/resources/triggers/types/EventTriggerBase.d.ts +2 -0
- package/api/resources/users/client/Client.d.ts +42 -1
- package/api/resources/users/client/Client.js +116 -4
- package/api/resources/users/types/AgentUser.d.ts +3 -0
- package/api/resources/users/types/AgentUserFilter.d.ts +4 -0
- package/api/resources/voiceConversations/client/Client.d.ts +1 -1
- package/api/resources/voiceConversations/client/Socket.d.ts +2 -2
- package/api/resources/voiceConversations/client/Socket.js +16 -17
- package/core/fetcher/Fetcher.js +33 -3
- package/core/fetcher/getErrorResponseBody.js +20 -7
- package/core/fetcher/getResponseBody.d.ts +16 -0
- package/core/fetcher/getResponseBody.js +27 -22
- package/core/fetcher/makePassthroughRequest.js +20 -4
- package/core/fetcher/makeRequest.d.ts +6 -1
- package/core/fetcher/makeRequest.js +38 -5
- package/core/fetcher/requestWithRetries.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +23 -2
- package/core/fetcher/signals.d.ts +1 -0
- package/core/fetcher/signals.js +3 -2
- package/core/stream/Stream.d.ts +3 -0
- package/core/stream/Stream.js +5 -0
- package/core/url/encodePathParam.d.ts +3 -1
- package/core/url/encodePathParam.js +8 -2
- package/core/websocket/ws.d.ts +16 -2
- package/core/websocket/ws.js +110 -20
- package/errors/MavenAGIError.js +16 -2
- package/package.json +1 -1
- package/reference.md +273 -13
- package/serialization/resources/agents/client/requests/AgentPatchRequest.d.ts +2 -0
- package/serialization/resources/agents/client/requests/AgentPatchRequest.js +2 -0
- package/serialization/resources/agents/types/Agent.d.ts +2 -0
- package/serialization/resources/agents/types/Agent.js +2 -0
- package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.d.ts +16 -0
- package/serialization/resources/capabilities/client/requests/CapabilityExecutionsSearchRequest.js +50 -0
- package/serialization/resources/capabilities/client/requests/index.d.ts +1 -0
- package/serialization/resources/capabilities/client/requests/index.js +3 -1
- package/serialization/resources/capabilities/types/ActionSimulationInput.d.ts +10 -0
- package/serialization/resources/capabilities/types/ActionSimulationInput.js +44 -0
- package/serialization/resources/capabilities/types/CapabilityExecution.d.ts +15 -0
- package/serialization/resources/capabilities/types/CapabilityExecution.js +49 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionBase.d.ts +20 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionBase.js +52 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionCompletionReason.d.ts +7 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionCompletionReason.js +50 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionRetryability.d.ts +7 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionRetryability.js +39 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionStatus.d.ts +7 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionStatus.js +39 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionsSearchResponse.d.ts +11 -0
- package/serialization/resources/capabilities/types/CapabilityExecutionsSearchResponse.js +45 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationInput.d.ts +11 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationInput.js +47 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationResult.d.ts +11 -0
- package/serialization/resources/capabilities/types/CapabilitySimulationResult.js +47 -0
- package/serialization/resources/capabilities/types/ConversationContextSimulationInput.d.ts +12 -0
- package/serialization/resources/capabilities/types/ConversationContextSimulationInput.js +46 -0
- package/serialization/resources/capabilities/types/ConversationKickoffCapabilityExecution.d.ts +9 -0
- package/serialization/resources/capabilities/types/ConversationKickoffCapabilityExecution.js +40 -0
- package/serialization/resources/capabilities/types/SimulatedUser.d.ts +10 -0
- package/serialization/resources/capabilities/types/SimulatedUser.js +44 -0
- package/serialization/resources/capabilities/types/SimulatedUserData.d.ts +10 -0
- package/serialization/resources/capabilities/types/SimulatedUserData.js +42 -0
- package/serialization/resources/capabilities/types/TriggerCapabilityExecution.d.ts +15 -0
- package/serialization/resources/capabilities/types/TriggerCapabilityExecution.js +49 -0
- package/serialization/resources/capabilities/types/index.d.ts +14 -0
- package/serialization/resources/capabilities/types/index.js +14 -0
- package/serialization/resources/charters/types/CharterContent.d.ts +1 -1
- package/serialization/resources/charters/types/CharterContent.js +1 -1
- package/serialization/resources/charters/types/CharterListChildrenRequest.d.ts +2 -0
- package/serialization/resources/charters/types/CharterListChildrenRequest.js +2 -0
- package/serialization/resources/charters/types/CharterResponse.d.ts +1 -1
- package/serialization/resources/charters/types/CharterResponse.js +1 -1
- package/serialization/resources/charters/types/CharterSummary.d.ts +1 -1
- package/serialization/resources/charters/types/CharterSummary.js +1 -1
- package/serialization/resources/charters/types/index.d.ts +0 -1
- package/serialization/resources/charters/types/index.js +0 -1
- package/serialization/resources/commons/types/ActionExecutionStatus.d.ts +7 -0
- package/serialization/resources/commons/types/ActionExecutionStatus.js +39 -0
- package/serialization/resources/commons/types/AdditionalDataKey.d.ts +1 -1
- package/serialization/resources/commons/types/AdditionalDataKey.js +1 -0
- package/serialization/resources/commons/types/AppUserRequest.d.ts +2 -0
- package/serialization/resources/commons/types/AppUserRequest.js +2 -0
- package/serialization/resources/commons/types/BotLogicCharterDetail.d.ts +2 -0
- package/serialization/resources/commons/types/BotLogicCharterDetail.js +2 -0
- package/serialization/resources/commons/types/BotMessage.d.ts +2 -0
- package/serialization/resources/commons/types/BotMessage.js +2 -0
- package/serialization/resources/commons/types/BotMessageStatusReason.d.ts +7 -0
- package/serialization/resources/commons/types/BotMessageStatusReason.js +43 -0
- package/serialization/resources/commons/types/ConversationMetadataValueSource.d.ts +9 -0
- package/serialization/resources/commons/types/ConversationMetadataValueSource.js +41 -0
- package/serialization/resources/commons/types/ConversationValueSource.d.ts +11 -0
- package/serialization/resources/commons/types/ConversationValueSource.js +47 -0
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +5 -0
- package/serialization/resources/commons/types/ErrorReason.d.ts +1 -1
- package/serialization/resources/commons/types/ErrorReason.js +2 -0
- package/serialization/resources/commons/types/ExecuteActionResponse.d.ts +13 -0
- package/serialization/resources/commons/types/ExecuteActionResponse.js +45 -0
- package/serialization/resources/commons/types/ExecutionMode.d.ts +7 -0
- package/serialization/resources/commons/types/ExecutionMode.js +39 -0
- package/serialization/resources/commons/types/FunctionVersionBinding.d.ts +11 -0
- package/serialization/resources/commons/types/FunctionVersionBinding.js +43 -0
- package/serialization/resources/commons/types/MetadataConversationValueFilter.d.ts +11 -0
- package/serialization/resources/commons/types/MetadataConversationValueFilter.js +43 -0
- package/serialization/resources/commons/types/MetadataFilter.d.ts +5 -1
- package/serialization/resources/commons/types/MetadataFilter.js +2 -0
- package/serialization/resources/commons/types/SimulationActionBehavior.d.ts +15 -0
- package/serialization/resources/commons/types/SimulationActionBehavior.js +49 -0
- package/serialization/resources/commons/types/SimulationActionCallApp.d.ts +7 -0
- package/serialization/resources/commons/types/SimulationActionCallApp.js +39 -0
- package/serialization/resources/commons/types/SimulationActionMock.d.ts +12 -0
- package/serialization/resources/commons/types/SimulationActionMock.js +44 -0
- package/serialization/resources/commons/types/SimulationContext.d.ts +4 -0
- package/serialization/resources/commons/types/SimulationContext.js +4 -0
- package/serialization/resources/commons/types/SystemEventName.d.ts +1 -1
- package/serialization/resources/commons/types/SystemEventName.js +1 -0
- package/serialization/resources/commons/types/index.d.ts +12 -0
- package/serialization/resources/commons/types/index.js +12 -0
- package/serialization/resources/users/types/AgentUser.d.ts +2 -0
- package/serialization/resources/users/types/AgentUser.js +2 -0
- package/serialization/resources/users/types/AgentUserFilter.d.ts +2 -0
- package/serialization/resources/users/types/AgentUserFilter.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/api/resources/{charters → commons}/types/CharterType.d.ts +0 -0
- /package/api/resources/{charters → commons}/types/CharterType.js +0 -0
- /package/serialization/resources/{charters → commons}/types/CharterType.d.ts +0 -0
- /package/serialization/resources/{charters → commons}/types/CharterType.js +0 -0
package/BaseClient.js
CHANGED
|
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
|
|
|
44
44
|
const headers = (0, headers_1.mergeHeaders)({
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "mavenagi",
|
|
47
|
-
"X-Fern-SDK-Version": "1.2.
|
|
48
|
-
"User-Agent": "mavenagi/1.2.
|
|
47
|
+
"X-Fern-SDK-Version": "1.2.65",
|
|
48
|
+
"User-Agent": "mavenagi/1.2.65",
|
|
49
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
51
|
"X-Organization-Id": options === null || options === void 0 ? void 0 : options.organizationId,
|
|
@@ -322,7 +322,7 @@ class ActionsClient {
|
|
|
322
322
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
323
323
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
324
324
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
325
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/actions/${core.url.encodePathParam(actionReferenceId)}`),
|
|
325
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/actions/${core.url.encodePathParam(actionReferenceId, errors.MavenAGIError)}`),
|
|
326
326
|
method: "GET",
|
|
327
327
|
headers: _headers,
|
|
328
328
|
queryString: core.url
|
|
@@ -438,7 +438,7 @@ class ActionsClient {
|
|
|
438
438
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
439
439
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
440
440
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
441
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/actions/${core.url.encodePathParam(actionReferenceId)}`),
|
|
441
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/actions/${core.url.encodePathParam(actionReferenceId, errors.MavenAGIError)}`),
|
|
442
442
|
method: "PATCH",
|
|
443
443
|
headers: _headers,
|
|
444
444
|
contentType: "application/merge-patch+json",
|
|
@@ -544,7 +544,7 @@ class ActionsClient {
|
|
|
544
544
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
545
545
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
546
546
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
547
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/actions/${core.url.encodePathParam(actionReferenceId)}`),
|
|
547
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/actions/${core.url.encodePathParam(actionReferenceId, errors.MavenAGIError)}`),
|
|
548
548
|
method: "DELETE",
|
|
549
549
|
headers: _headers,
|
|
550
550
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -191,7 +191,7 @@ class AgentsClient {
|
|
|
191
191
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
192
192
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
193
193
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
194
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId)}/agents`),
|
|
194
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId, errors.MavenAGIError)}/agents`),
|
|
195
195
|
method: "GET",
|
|
196
196
|
headers: _headers,
|
|
197
197
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -298,7 +298,7 @@ class AgentsClient {
|
|
|
298
298
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
299
299
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
300
300
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
301
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId)}/agents/${core.url.encodePathParam(agentReferenceId)}`),
|
|
301
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId, errors.MavenAGIError)}/agents/${core.url.encodePathParam(agentReferenceId, errors.MavenAGIError)}`),
|
|
302
302
|
method: "POST",
|
|
303
303
|
headers: _headers,
|
|
304
304
|
contentType: "application/json",
|
|
@@ -400,7 +400,7 @@ class AgentsClient {
|
|
|
400
400
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
401
401
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
402
402
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
403
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId)}/agents/${core.url.encodePathParam(agentReferenceId)}`),
|
|
403
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId, errors.MavenAGIError)}/agents/${core.url.encodePathParam(agentReferenceId, errors.MavenAGIError)}`),
|
|
404
404
|
method: "GET",
|
|
405
405
|
headers: _headers,
|
|
406
406
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -505,7 +505,7 @@ class AgentsClient {
|
|
|
505
505
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
506
506
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
507
507
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
508
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId)}/agents/${core.url.encodePathParam(agentReferenceId)}`),
|
|
508
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId, errors.MavenAGIError)}/agents/${core.url.encodePathParam(agentReferenceId, errors.MavenAGIError)}`),
|
|
509
509
|
method: "PATCH",
|
|
510
510
|
headers: _headers,
|
|
511
511
|
contentType: "application/merge-patch+json",
|
|
@@ -611,7 +611,7 @@ class AgentsClient {
|
|
|
611
611
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
612
612
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
613
613
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
614
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId)}/agents/${core.url.encodePathParam(agentReferenceId)}`),
|
|
614
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/organizations/${core.url.encodePathParam(organizationReferenceId, errors.MavenAGIError)}/agents/${core.url.encodePathParam(agentReferenceId, errors.MavenAGIError)}`),
|
|
615
615
|
method: "DELETE",
|
|
616
616
|
headers: _headers,
|
|
617
617
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -12,15 +12,35 @@ export interface AgentPatchRequest {
|
|
|
12
12
|
defaultTimezone?: string;
|
|
13
13
|
/** The PII categories that are enabled for the agent. */
|
|
14
14
|
enabledPiiCategories?: Set<MavenAGI.PiiCategory>;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The system fallback message.
|
|
17
|
+
*
|
|
18
|
+
* Rejected with reason `VARIANT_REQUIRED` while `SYSTEM_FALLBACK_MESSAGE` is in `getVersionedEntityTypes`; set it through `patchVersionedSettings`.
|
|
19
|
+
*/
|
|
16
20
|
systemFallbackMessage?: string | null;
|
|
17
21
|
/** Deprecated. Superseded by charters, which determine agent behavior per round. Has no effect for agents using charters. */
|
|
18
22
|
persona?: MavenAGI.LlmPersona;
|
|
19
23
|
/** Deprecated. Superseded by charters, which determine agent behavior per round. Has no effect for agents using charters. */
|
|
20
24
|
additionalPromptText?: string | null;
|
|
21
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Deprecated. Use `categoryIntelligentFieldId` instead. Not supported on new agents, and ignored while `categoryIntelligentFieldId` is set.
|
|
27
|
+
*
|
|
28
|
+
* LLM prompt for category generation.
|
|
29
|
+
*/
|
|
22
30
|
categoryGenerationPromptText?: string | null;
|
|
23
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* The intelligent field whose value becomes each conversation's category. Send null to clear it.
|
|
33
|
+
*
|
|
34
|
+
* Must be a `STRING` conversation field on this agent. Giving the field `enumOptions` is highly recommended, so the category comes from a fixed list.
|
|
35
|
+
*
|
|
36
|
+
* The field must be `ACTIVE` to produce values. While it is inactive, conversations get no category. With agent variants, a conversation gets a category only if the field is active in its variant. Categories are capped at 280 characters.
|
|
37
|
+
*/
|
|
38
|
+
categoryIntelligentFieldId?: MavenAGI.EntityIdWithoutAgent | null;
|
|
39
|
+
/**
|
|
40
|
+
* LLM prompt for generating a response when the user's question has been detected as unsafe.
|
|
41
|
+
*
|
|
42
|
+
* Rejected with reason `VARIANT_REQUIRED` while `CONTENT_SAFETY_VIOLATION_RESPONSE_PROMPT_TEXT` is in `getVersionedEntityTypes`; set it through `patchVersionedSettings`.
|
|
43
|
+
*/
|
|
24
44
|
contentSafetyViolationResponsePromptText?: string | null;
|
|
25
45
|
/**
|
|
26
46
|
* Deprecated. Superseded by charters, which determine agent behavior per round. Has no effect for agents using charters.
|
|
@@ -18,14 +18,22 @@ export interface Agent {
|
|
|
18
18
|
* Defaults to `AbaRoutingNumber`, `CreditCardNumber`, `IpAddress`, `PhoneNumber`, `SwiftCode`,
|
|
19
19
|
* `UsBankAccountNumber`, `UsDriversLicenseNumber`, `UsIndividualTaxpayerIdentification`,
|
|
20
20
|
* `UsUkPassportNumber`, `UsSocialSecurityNumber`.
|
|
21
|
+
*
|
|
22
|
+
* Shown in Agent Designer as "PII Redaction".
|
|
21
23
|
*/
|
|
22
24
|
enabledPiiCategories: Set<MavenAGI.PiiCategory>;
|
|
23
25
|
/**
|
|
24
26
|
* Text shown to end users when the system encounters an error while generating a bot response message.
|
|
25
27
|
*
|
|
26
|
-
*
|
|
28
|
+
* Omitted while `SYSTEM_FALLBACK_MESSAGE` is in `getVersionedEntityTypes`; read it through `getVersionedSettings`.
|
|
27
29
|
*/
|
|
28
30
|
systemFallbackMessage?: string;
|
|
29
31
|
/** Agent prompting settings. */
|
|
30
32
|
prompting: MavenAGI.AgentPrompting;
|
|
33
|
+
/**
|
|
34
|
+
* The intelligent field whose value becomes each conversation's category.
|
|
35
|
+
* When set, its value replaces the category generated from `prompting.categoryGenerationPromptText`.
|
|
36
|
+
* An inactive field produces no values, so conversations get no category until it is activated.
|
|
37
|
+
*/
|
|
38
|
+
categoryIntelligentFieldId?: MavenAGI.EntityIdWithoutAgent;
|
|
31
39
|
}
|
|
@@ -2,26 +2,38 @@ import type * as MavenAGI from "../../../index";
|
|
|
2
2
|
export interface AgentPrompting {
|
|
3
3
|
/** Deprecated. Superseded by charters, which determine agent behavior per round. Has no effect for agents using charters. */
|
|
4
4
|
persona: MavenAGI.LlmPersona;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Deprecated. Superseded by charters, which determine agent behavior per round. Has no effect for agents using charters.
|
|
7
|
+
*
|
|
8
|
+
* Shown in Agent Designer as "Additional persona instructions".
|
|
9
|
+
*/
|
|
6
10
|
additionalPromptText?: string;
|
|
7
11
|
/**
|
|
12
|
+
* Deprecated. Use `categoryIntelligentFieldId` instead. Not supported on new agents, and ignored while `categoryIntelligentFieldId` is set.
|
|
13
|
+
*
|
|
8
14
|
* LLM prompt for category generation.
|
|
9
15
|
*
|
|
10
16
|
* Use this to specify a fixed set of categories that an LLM should choose from when analyzing a conversation.
|
|
11
17
|
* When not set uses a default prompt which gives the LLM flexibility to determine appropriate categories on its own.
|
|
18
|
+
*
|
|
19
|
+
* Shown in Agent Designer as "Category prompt override".
|
|
12
20
|
*/
|
|
13
21
|
categoryGenerationPromptText?: string;
|
|
14
22
|
/**
|
|
15
23
|
* LLM prompt for generating a response when the user's question has been detected as unsafe.
|
|
16
24
|
*
|
|
17
25
|
* Use this to provide custom LLM generated replies when dealing with content safety violations.
|
|
18
|
-
* When not set,
|
|
26
|
+
* When not set, a default response is sent and replies will not be personalized by the LLM as it will not be involved.
|
|
27
|
+
*
|
|
28
|
+
* Omitted while `CONTENT_SAFETY_VIOLATION_RESPONSE_PROMPT_TEXT` is in `getVersionedEntityTypes`; read it through `getVersionedSettings`.
|
|
19
29
|
*/
|
|
20
30
|
contentSafetyViolationResponsePromptText?: string;
|
|
21
31
|
/**
|
|
22
32
|
* Deprecated. Superseded by charters, which determine agent behavior per round. Has no effect for agents using charters.
|
|
23
33
|
*
|
|
24
34
|
* Return the system fallback message on all questions that have no relevant knowledge bases or actions.
|
|
35
|
+
*
|
|
36
|
+
* Shown in Agent Designer as "Only return answers for existing knowledge".
|
|
25
37
|
*/
|
|
26
38
|
rejectQuestionsWithoutKnowledge: boolean;
|
|
27
39
|
}
|
|
@@ -187,7 +187,7 @@ class AppDirectoryClient {
|
|
|
187
187
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
188
188
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
189
189
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
190
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId)}`),
|
|
190
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId, errors.MavenAGIError)}`),
|
|
191
191
|
method: "GET",
|
|
192
192
|
headers: _headers,
|
|
193
193
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -290,7 +290,7 @@ class AppDirectoryClient {
|
|
|
290
290
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
291
291
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
292
292
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
293
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId)}/install`),
|
|
293
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId, errors.MavenAGIError)}/install`),
|
|
294
294
|
method: "POST",
|
|
295
295
|
headers: _headers,
|
|
296
296
|
contentType: "application/json",
|
|
@@ -383,7 +383,7 @@ class AppDirectoryClient {
|
|
|
383
383
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
384
384
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
385
385
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
386
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId)}/install`),
|
|
386
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId, errors.MavenAGIError)}/install`),
|
|
387
387
|
method: "DELETE",
|
|
388
388
|
headers: _headers,
|
|
389
389
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -474,7 +474,7 @@ class AppDirectoryClient {
|
|
|
474
474
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
475
475
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
476
476
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
477
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId)}/settings/${core.url.encodePathParam(settingsKey)}`),
|
|
477
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId, errors.MavenAGIError)}/settings/${core.url.encodePathParam(settingsKey, errors.MavenAGIError)}`),
|
|
478
478
|
method: "GET",
|
|
479
479
|
headers: _headers,
|
|
480
480
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -577,7 +577,7 @@ class AppDirectoryClient {
|
|
|
577
577
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
578
578
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
579
579
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
580
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId)}/settings/${core.url.encodePathParam(settingsKey)}/upload-url`),
|
|
580
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `v1/directory/${core.url.encodePathParam(appId, errors.MavenAGIError)}/settings/${core.url.encodePathParam(settingsKey, errors.MavenAGIError)}/upload-url`),
|
|
581
581
|
method: "POST",
|
|
582
582
|
headers: _headers,
|
|
583
583
|
contentType: "application/json",
|
|
@@ -192,7 +192,7 @@ class AssetsClient {
|
|
|
192
192
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
193
193
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
194
194
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
195
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/assets/${core.url.encodePathParam(assetReferenceId)}/commit`),
|
|
195
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/assets/${core.url.encodePathParam(assetReferenceId, errors.MavenAGIError)}/commit`),
|
|
196
196
|
method: "POST",
|
|
197
197
|
headers: _headers,
|
|
198
198
|
contentType: "application/json",
|
|
@@ -88,6 +88,39 @@ export declare class CapabilitiesClient {
|
|
|
88
88
|
*/
|
|
89
89
|
deleteCapability(capabilityType: MavenAGI.CapabilityType, referenceId: string, request?: MavenAGI.DeleteCapabilityByTypeRequest, requestOptions?: CapabilitiesClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
90
90
|
private __deleteCapability;
|
|
91
|
+
/**
|
|
92
|
+
* Run one of an agent's capabilities once, as a simulation, and return what it produced.
|
|
93
|
+
*
|
|
94
|
+
* The caller supplies everything the capability reads, so it runs in isolation: no
|
|
95
|
+
* conversation or agent user has to exist first. The capability is told its mode is
|
|
96
|
+
* `SIMULATION`, the same as in a test suite run, so an app that honours it can avoid side
|
|
97
|
+
* effects in real systems. Nothing here runs a capability live.
|
|
98
|
+
*
|
|
99
|
+
* Only actions can be simulated today. Triggers and conversation kickoffs are rejected with a
|
|
100
|
+
* 400 until they can run as simulations. Intelligent fields cannot be simulated.
|
|
101
|
+
*
|
|
102
|
+
* @param {MavenAGI.CapabilityType} capabilityType - Which kind of capability to simulate. Must match the body's `capabilityType`.
|
|
103
|
+
* @param {string} referenceId - The capability's reference ID, unique within its type and app.
|
|
104
|
+
* @param {MavenAGI.SimulateCapabilityByTypeRequest} request
|
|
105
|
+
* @param {CapabilitiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
108
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
109
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
110
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
111
|
+
* @throws {@link MavenAGI.ServerError}
|
|
112
|
+
* @throws {@link errors.MavenAGIError}
|
|
113
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* await client.capabilities.simulateCapability("ACTION", "referenceId", {
|
|
117
|
+
* body: {
|
|
118
|
+
* capabilityType: "ACTION"
|
|
119
|
+
* }
|
|
120
|
+
* })
|
|
121
|
+
*/
|
|
122
|
+
simulateCapability(capabilityType: MavenAGI.CapabilityType, referenceId: string, request: MavenAGI.SimulateCapabilityByTypeRequest, requestOptions?: CapabilitiesClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CapabilitySimulationResult>;
|
|
123
|
+
private __simulateCapability;
|
|
91
124
|
/**
|
|
92
125
|
* Search an agent's capabilities of every kind at once, newest first by default.
|
|
93
126
|
*
|
|
@@ -115,4 +148,39 @@ export declare class CapabilitiesClient {
|
|
|
115
148
|
*/
|
|
116
149
|
searchCapabilities(request?: MavenAGI.CapabilitiesSearchRequest, requestOptions?: CapabilitiesClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CapabilitiesSearchResponse>;
|
|
117
150
|
private __searchCapabilities;
|
|
151
|
+
/**
|
|
152
|
+
* Search the recorded runs of an agent's capabilities, newest first by default. An execution
|
|
153
|
+
* is one run of one capability for one subject, with its outcome and timing: an Event
|
|
154
|
+
* Trigger notifying its app, or a Conversation Kickoff running when a conversation started.
|
|
155
|
+
*
|
|
156
|
+
* Pass a conversation in `subjectIds` to get the executions recorded against it. An
|
|
157
|
+
* `EVENT_CREATED` trigger records the event as its subject, so pass the event's ID to find
|
|
158
|
+
* those.
|
|
159
|
+
*
|
|
160
|
+
* Results can trail a run by a few seconds. Executions are searchable for 90 days.
|
|
161
|
+
*
|
|
162
|
+
* @param {MavenAGI.CapabilityExecutionsSearchRequest} request
|
|
163
|
+
* @param {CapabilitiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
164
|
+
*
|
|
165
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
166
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
167
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
168
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
169
|
+
* @throws {@link MavenAGI.ServerError}
|
|
170
|
+
* @throws {@link errors.MavenAGIError}
|
|
171
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* await client.capabilities.searchCapabilityExecutions({
|
|
175
|
+
* subjectIds: [{
|
|
176
|
+
* referenceId: "conversation-123",
|
|
177
|
+
* appId: "zendesk",
|
|
178
|
+
* organizationId: "acme",
|
|
179
|
+
* agentId: "support",
|
|
180
|
+
* type: "CONVERSATION"
|
|
181
|
+
* }]
|
|
182
|
+
* })
|
|
183
|
+
*/
|
|
184
|
+
searchCapabilityExecutions(request?: MavenAGI.CapabilityExecutionsSearchRequest, requestOptions?: CapabilitiesClient.RequestOptions): core.HttpResponsePromise<MavenAGI.CapabilityExecutionsSearchResponse>;
|
|
185
|
+
private __searchCapabilityExecutions;
|
|
118
186
|
}
|
|
@@ -110,7 +110,7 @@ class CapabilitiesClient {
|
|
|
110
110
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
111
111
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
112
112
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
113
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/capabilities/${core.url.encodePathParam(serializers.CapabilityType.jsonOrThrow(capabilityType))}/${core.url.encodePathParam(referenceId)}`),
|
|
113
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/capabilities/${core.url.encodePathParam(serializers.CapabilityType.jsonOrThrow(capabilityType), errors.MavenAGIError)}/${core.url.encodePathParam(referenceId, errors.MavenAGIError)}`),
|
|
114
114
|
method: "GET",
|
|
115
115
|
headers: _headers,
|
|
116
116
|
queryString: core.url
|
|
@@ -224,7 +224,7 @@ class CapabilitiesClient {
|
|
|
224
224
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
225
225
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
226
226
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
227
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/capabilities/${core.url.encodePathParam(serializers.CapabilityType.jsonOrThrow(capabilityType))}/${core.url.encodePathParam(referenceId)}`),
|
|
227
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/capabilities/${core.url.encodePathParam(serializers.CapabilityType.jsonOrThrow(capabilityType), errors.MavenAGIError)}/${core.url.encodePathParam(referenceId, errors.MavenAGIError)}`),
|
|
228
228
|
method: "PATCH",
|
|
229
229
|
headers: _headers,
|
|
230
230
|
contentType: "application/merge-patch+json",
|
|
@@ -343,7 +343,7 @@ class CapabilitiesClient {
|
|
|
343
343
|
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
344
344
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
345
345
|
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
346
|
-
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/capabilities/${core.url.encodePathParam(serializers.CapabilityType.jsonOrThrow(capabilityType))}/${core.url.encodePathParam(referenceId)}`),
|
|
346
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/capabilities/${core.url.encodePathParam(serializers.CapabilityType.jsonOrThrow(capabilityType), errors.MavenAGIError)}/${core.url.encodePathParam(referenceId, errors.MavenAGIError)}`),
|
|
347
347
|
method: "DELETE",
|
|
348
348
|
headers: _headers,
|
|
349
349
|
queryString: core.url
|
|
@@ -408,6 +408,129 @@ class CapabilitiesClient {
|
|
|
408
408
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v1/capabilities/{capabilityType}/{referenceId}");
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
|
+
/**
|
|
412
|
+
* Run one of an agent's capabilities once, as a simulation, and return what it produced.
|
|
413
|
+
*
|
|
414
|
+
* The caller supplies everything the capability reads, so it runs in isolation: no
|
|
415
|
+
* conversation or agent user has to exist first. The capability is told its mode is
|
|
416
|
+
* `SIMULATION`, the same as in a test suite run, so an app that honours it can avoid side
|
|
417
|
+
* effects in real systems. Nothing here runs a capability live.
|
|
418
|
+
*
|
|
419
|
+
* Only actions can be simulated today. Triggers and conversation kickoffs are rejected with a
|
|
420
|
+
* 400 until they can run as simulations. Intelligent fields cannot be simulated.
|
|
421
|
+
*
|
|
422
|
+
* @param {MavenAGI.CapabilityType} capabilityType - Which kind of capability to simulate. Must match the body's `capabilityType`.
|
|
423
|
+
* @param {string} referenceId - The capability's reference ID, unique within its type and app.
|
|
424
|
+
* @param {MavenAGI.SimulateCapabilityByTypeRequest} request
|
|
425
|
+
* @param {CapabilitiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
426
|
+
*
|
|
427
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
428
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
429
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
430
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
431
|
+
* @throws {@link MavenAGI.ServerError}
|
|
432
|
+
* @throws {@link errors.MavenAGIError}
|
|
433
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
434
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
* await client.capabilities.simulateCapability("ACTION", "referenceId", {
|
|
437
|
+
* body: {
|
|
438
|
+
* capabilityType: "ACTION"
|
|
439
|
+
* }
|
|
440
|
+
* })
|
|
441
|
+
*/
|
|
442
|
+
simulateCapability(capabilityType, referenceId, request, requestOptions) {
|
|
443
|
+
return core.HttpResponsePromise.fromPromise(this.__simulateCapability(capabilityType, referenceId, request, requestOptions));
|
|
444
|
+
}
|
|
445
|
+
__simulateCapability(capabilityType, referenceId, request, requestOptions) {
|
|
446
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
447
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
448
|
+
const { appId, body: _body } = request;
|
|
449
|
+
const _queryParams = {
|
|
450
|
+
appId,
|
|
451
|
+
};
|
|
452
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
453
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
454
|
+
"X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
|
|
455
|
+
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
456
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
457
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
458
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, `/v1/capabilities/${core.url.encodePathParam(serializers.CapabilityType.jsonOrThrow(capabilityType), errors.MavenAGIError)}/${core.url.encodePathParam(referenceId, errors.MavenAGIError)}/simulate`),
|
|
459
|
+
method: "POST",
|
|
460
|
+
headers: _headers,
|
|
461
|
+
contentType: "application/json",
|
|
462
|
+
queryString: core.url
|
|
463
|
+
.queryBuilder()
|
|
464
|
+
.addMany(_queryParams)
|
|
465
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
466
|
+
.build(),
|
|
467
|
+
requestType: "json",
|
|
468
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.CapabilitySimulationInput.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
469
|
+
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
470
|
+
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
471
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
472
|
+
fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
|
|
473
|
+
logging: this._options.logging,
|
|
474
|
+
});
|
|
475
|
+
if (_response.ok) {
|
|
476
|
+
return {
|
|
477
|
+
data: serializers.CapabilitySimulationResult.parseOrThrow(_response.body, {
|
|
478
|
+
unrecognizedObjectKeys: "passthrough",
|
|
479
|
+
allowUnrecognizedUnionMembers: true,
|
|
480
|
+
allowUnrecognizedEnumValues: true,
|
|
481
|
+
breadcrumbsPrefix: ["response"],
|
|
482
|
+
}),
|
|
483
|
+
rawResponse: _response.rawResponse,
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
if (_response.error.reason === "status-code") {
|
|
487
|
+
switch (_response.error.statusCode) {
|
|
488
|
+
case 404:
|
|
489
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
490
|
+
unrecognizedObjectKeys: "passthrough",
|
|
491
|
+
allowUnrecognizedUnionMembers: true,
|
|
492
|
+
allowUnrecognizedEnumValues: true,
|
|
493
|
+
breadcrumbsPrefix: ["response"],
|
|
494
|
+
}), _response.rawResponse);
|
|
495
|
+
case 400:
|
|
496
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
497
|
+
unrecognizedObjectKeys: "passthrough",
|
|
498
|
+
allowUnrecognizedUnionMembers: true,
|
|
499
|
+
allowUnrecognizedEnumValues: true,
|
|
500
|
+
breadcrumbsPrefix: ["response"],
|
|
501
|
+
}), _response.rawResponse);
|
|
502
|
+
case 413:
|
|
503
|
+
throw new MavenAGI.PayloadTooLargeError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
504
|
+
unrecognizedObjectKeys: "passthrough",
|
|
505
|
+
allowUnrecognizedUnionMembers: true,
|
|
506
|
+
allowUnrecognizedEnumValues: true,
|
|
507
|
+
breadcrumbsPrefix: ["response"],
|
|
508
|
+
}), _response.rawResponse);
|
|
509
|
+
case 429:
|
|
510
|
+
throw new MavenAGI.TooManyRequestsError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
511
|
+
unrecognizedObjectKeys: "passthrough",
|
|
512
|
+
allowUnrecognizedUnionMembers: true,
|
|
513
|
+
allowUnrecognizedEnumValues: true,
|
|
514
|
+
breadcrumbsPrefix: ["response"],
|
|
515
|
+
}), _response.rawResponse);
|
|
516
|
+
case 500:
|
|
517
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
518
|
+
unrecognizedObjectKeys: "passthrough",
|
|
519
|
+
allowUnrecognizedUnionMembers: true,
|
|
520
|
+
allowUnrecognizedEnumValues: true,
|
|
521
|
+
breadcrumbsPrefix: ["response"],
|
|
522
|
+
}), _response.rawResponse);
|
|
523
|
+
default:
|
|
524
|
+
throw new errors.MavenAGIError({
|
|
525
|
+
statusCode: _response.error.statusCode,
|
|
526
|
+
body: _response.error.body,
|
|
527
|
+
rawResponse: _response.rawResponse,
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/capabilities/{capabilityType}/{referenceId}/simulate");
|
|
532
|
+
});
|
|
533
|
+
}
|
|
411
534
|
/**
|
|
412
535
|
* Search an agent's capabilities of every kind at once, newest first by default.
|
|
413
536
|
*
|
|
@@ -517,5 +640,122 @@ class CapabilitiesClient {
|
|
|
517
640
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/capabilities/search");
|
|
518
641
|
});
|
|
519
642
|
}
|
|
643
|
+
/**
|
|
644
|
+
* Search the recorded runs of an agent's capabilities, newest first by default. An execution
|
|
645
|
+
* is one run of one capability for one subject, with its outcome and timing: an Event
|
|
646
|
+
* Trigger notifying its app, or a Conversation Kickoff running when a conversation started.
|
|
647
|
+
*
|
|
648
|
+
* Pass a conversation in `subjectIds` to get the executions recorded against it. An
|
|
649
|
+
* `EVENT_CREATED` trigger records the event as its subject, so pass the event's ID to find
|
|
650
|
+
* those.
|
|
651
|
+
*
|
|
652
|
+
* Results can trail a run by a few seconds. Executions are searchable for 90 days.
|
|
653
|
+
*
|
|
654
|
+
* @param {MavenAGI.CapabilityExecutionsSearchRequest} request
|
|
655
|
+
* @param {CapabilitiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
656
|
+
*
|
|
657
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
658
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
659
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
660
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
661
|
+
* @throws {@link MavenAGI.ServerError}
|
|
662
|
+
* @throws {@link errors.MavenAGIError}
|
|
663
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
664
|
+
*
|
|
665
|
+
* @example
|
|
666
|
+
* await client.capabilities.searchCapabilityExecutions({
|
|
667
|
+
* subjectIds: [{
|
|
668
|
+
* referenceId: "conversation-123",
|
|
669
|
+
* appId: "zendesk",
|
|
670
|
+
* organizationId: "acme",
|
|
671
|
+
* agentId: "support",
|
|
672
|
+
* type: "CONVERSATION"
|
|
673
|
+
* }]
|
|
674
|
+
* })
|
|
675
|
+
*/
|
|
676
|
+
searchCapabilityExecutions(request = {}, requestOptions) {
|
|
677
|
+
return core.HttpResponsePromise.fromPromise(this.__searchCapabilityExecutions(request, requestOptions));
|
|
678
|
+
}
|
|
679
|
+
__searchCapabilityExecutions() {
|
|
680
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
681
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
682
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
683
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
684
|
+
"X-Organization-Id": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationId,
|
|
685
|
+
"X-Agent-Id": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.agentId,
|
|
686
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
687
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
688
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.MavenAGIEnvironment.Production, "/v1/capabilities/executions/search"),
|
|
689
|
+
method: "POST",
|
|
690
|
+
headers: _headers,
|
|
691
|
+
contentType: "application/json",
|
|
692
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
693
|
+
requestType: "json",
|
|
694
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.CapabilityExecutionsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
695
|
+
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
696
|
+
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
697
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
698
|
+
fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
|
|
699
|
+
logging: this._options.logging,
|
|
700
|
+
});
|
|
701
|
+
if (_response.ok) {
|
|
702
|
+
return {
|
|
703
|
+
data: serializers.CapabilityExecutionsSearchResponse.parseOrThrow(_response.body, {
|
|
704
|
+
unrecognizedObjectKeys: "passthrough",
|
|
705
|
+
allowUnrecognizedUnionMembers: true,
|
|
706
|
+
allowUnrecognizedEnumValues: true,
|
|
707
|
+
breadcrumbsPrefix: ["response"],
|
|
708
|
+
}),
|
|
709
|
+
rawResponse: _response.rawResponse,
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
if (_response.error.reason === "status-code") {
|
|
713
|
+
switch (_response.error.statusCode) {
|
|
714
|
+
case 404:
|
|
715
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
716
|
+
unrecognizedObjectKeys: "passthrough",
|
|
717
|
+
allowUnrecognizedUnionMembers: true,
|
|
718
|
+
allowUnrecognizedEnumValues: true,
|
|
719
|
+
breadcrumbsPrefix: ["response"],
|
|
720
|
+
}), _response.rawResponse);
|
|
721
|
+
case 400:
|
|
722
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
723
|
+
unrecognizedObjectKeys: "passthrough",
|
|
724
|
+
allowUnrecognizedUnionMembers: true,
|
|
725
|
+
allowUnrecognizedEnumValues: true,
|
|
726
|
+
breadcrumbsPrefix: ["response"],
|
|
727
|
+
}), _response.rawResponse);
|
|
728
|
+
case 413:
|
|
729
|
+
throw new MavenAGI.PayloadTooLargeError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
730
|
+
unrecognizedObjectKeys: "passthrough",
|
|
731
|
+
allowUnrecognizedUnionMembers: true,
|
|
732
|
+
allowUnrecognizedEnumValues: true,
|
|
733
|
+
breadcrumbsPrefix: ["response"],
|
|
734
|
+
}), _response.rawResponse);
|
|
735
|
+
case 429:
|
|
736
|
+
throw new MavenAGI.TooManyRequestsError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
737
|
+
unrecognizedObjectKeys: "passthrough",
|
|
738
|
+
allowUnrecognizedUnionMembers: true,
|
|
739
|
+
allowUnrecognizedEnumValues: true,
|
|
740
|
+
breadcrumbsPrefix: ["response"],
|
|
741
|
+
}), _response.rawResponse);
|
|
742
|
+
case 500:
|
|
743
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
744
|
+
unrecognizedObjectKeys: "passthrough",
|
|
745
|
+
allowUnrecognizedUnionMembers: true,
|
|
746
|
+
allowUnrecognizedEnumValues: true,
|
|
747
|
+
breadcrumbsPrefix: ["response"],
|
|
748
|
+
}), _response.rawResponse);
|
|
749
|
+
default:
|
|
750
|
+
throw new errors.MavenAGIError({
|
|
751
|
+
statusCode: _response.error.statusCode,
|
|
752
|
+
body: _response.error.body,
|
|
753
|
+
rawResponse: _response.rawResponse,
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/capabilities/executions/search");
|
|
758
|
+
});
|
|
759
|
+
}
|
|
520
760
|
}
|
|
521
761
|
exports.CapabilitiesClient = CapabilitiesClient;
|