mavenagi 1.2.60 → 1.2.62
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.d.ts +12 -0
- package/BaseClient.js +5 -3
- package/Client.d.ts +9 -0
- package/Client.js +43 -28
- package/api/resources/actions/client/Client.d.ts +26 -0
- package/api/resources/actions/client/Client.js +30 -3
- package/api/resources/agents/client/Client.d.ts +12 -0
- package/api/resources/agents/client/Client.js +16 -3
- package/api/resources/agents/client/requests/AgentPatchRequest.d.ts +3 -3
- package/api/resources/agents/types/AgentPrompting.d.ts +3 -3
- package/api/resources/analytics/client/Client.d.ts +14 -0
- package/api/resources/analytics/client/Client.js +22 -7
- package/api/resources/analytics/types/ConversationMedian.d.ts +4 -0
- package/api/resources/analytics/types/ConversationPercentile.d.ts +4 -0
- package/api/resources/analytics/types/RowBase.d.ts +5 -1
- package/api/resources/analytics/types/Series.d.ts +4 -1
- package/api/resources/analytics/types/TimeSeries.d.ts +5 -1
- package/api/resources/appDirectory/client/Client.d.ts +12 -0
- package/api/resources/appDirectory/client/Client.js +16 -3
- package/api/resources/appSettings/client/Client.d.ts +6 -0
- package/api/resources/appSettings/client/Client.js +8 -1
- package/api/resources/assets/client/Client.d.ts +4 -0
- package/api/resources/assets/client/Client.js +7 -2
- package/api/resources/capabilities/client/Client.d.ts +118 -0
- package/api/resources/capabilities/client/Client.js +521 -0
- package/api/resources/capabilities/client/index.d.ts +1 -0
- package/api/resources/capabilities/client/index.js +17 -0
- package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +36 -0
- package/api/resources/capabilities/client/requests/CapabilitiesSearchRequest.js +3 -0
- package/api/resources/capabilities/client/requests/DeleteCapabilityByTypeRequest.d.ts +18 -0
- package/api/resources/capabilities/client/requests/DeleteCapabilityByTypeRequest.js +3 -0
- package/api/resources/capabilities/client/requests/GetCapabilityByTypeRequest.d.ts +22 -0
- package/api/resources/capabilities/client/requests/GetCapabilityByTypeRequest.js +3 -0
- package/api/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.d.ts +24 -0
- package/api/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.js +3 -0
- package/api/resources/capabilities/client/requests/index.d.ts +4 -0
- package/api/resources/capabilities/client/requests/index.js +2 -0
- package/api/resources/capabilities/exports.d.ts +2 -0
- package/api/resources/capabilities/exports.js +21 -0
- package/api/resources/capabilities/index.d.ts +2 -0
- package/api/resources/capabilities/index.js +18 -0
- package/api/resources/capabilities/types/CapabilitiesSearchResponse.d.ts +43 -0
- package/api/resources/capabilities/types/CapabilitiesSearchResponse.js +3 -0
- package/api/resources/capabilities/types/CapabilityResponse.d.ts +23 -0
- package/api/resources/capabilities/types/CapabilityResponse.js +3 -0
- package/api/resources/capabilities/types/CapabilitySortField.d.ts +7 -0
- package/api/resources/capabilities/types/CapabilitySortField.js +10 -0
- package/api/resources/capabilities/types/CapabilitySummary.d.ts +28 -0
- package/api/resources/capabilities/types/CapabilitySummary.js +3 -0
- package/api/resources/capabilities/types/index.d.ts +4 -0
- package/api/resources/capabilities/types/index.js +20 -0
- package/api/resources/charters/client/Client.d.ts +245 -0
- package/api/resources/charters/client/Client.js +884 -0
- package/api/resources/charters/client/index.d.ts +1 -0
- package/api/resources/charters/client/index.js +17 -0
- package/api/resources/charters/client/requests/CharterDeleteRequest.d.ts +20 -0
- package/api/resources/charters/client/requests/CharterDeleteRequest.js +3 -0
- package/api/resources/charters/client/requests/CharterGetAncestorsRequest.d.ts +8 -0
- package/api/resources/charters/client/requests/CharterGetAncestorsRequest.js +3 -0
- package/api/resources/charters/client/requests/CharterGetRequest.d.ts +8 -0
- package/api/resources/charters/client/requests/CharterGetRequest.js +3 -0
- package/api/resources/charters/client/requests/CharterPatchRequest.d.ts +67 -0
- package/api/resources/charters/client/requests/CharterPatchRequest.js +3 -0
- package/api/resources/charters/client/requests/index.d.ts +4 -0
- package/api/resources/charters/client/requests/index.js +2 -0
- package/api/resources/charters/exports.d.ts +2 -0
- package/api/resources/charters/exports.js +21 -0
- package/api/resources/charters/index.d.ts +1 -0
- package/api/resources/charters/index.js +1 -0
- package/api/resources/charters/types/CharterAncestorsResponse.d.ts +8 -0
- package/api/resources/charters/types/CharterAncestorsResponse.js +3 -0
- package/api/resources/charters/types/CharterBase.d.ts +14 -0
- package/api/resources/charters/types/CharterBase.js +3 -0
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.d.ts +1 -1
- package/api/resources/charters/types/CharterChildrenExclusionPolicy.js +1 -1
- package/api/resources/charters/types/CharterChildrenGroup.d.ts +18 -0
- package/api/resources/charters/types/CharterChildrenGroup.js +3 -0
- package/api/resources/charters/types/CharterContent.d.ts +60 -0
- package/api/resources/charters/types/CharterContent.js +3 -0
- package/api/resources/charters/types/CharterKnowledgeBaseReference.d.ts +16 -0
- package/api/resources/charters/types/CharterKnowledgeBaseReference.js +3 -0
- package/api/resources/charters/types/CharterListChildrenRequest.d.ts +18 -0
- package/api/resources/charters/types/CharterListChildrenRequest.js +3 -0
- package/api/resources/charters/types/CharterListChildrenResponse.d.ts +55 -0
- package/api/resources/charters/types/CharterListChildrenResponse.js +3 -0
- package/api/resources/charters/types/CharterPatchReferences.d.ts +22 -0
- package/api/resources/charters/types/CharterPatchReferences.js +3 -0
- package/api/resources/charters/types/CharterReferences.d.ts +21 -0
- package/api/resources/charters/types/CharterReferences.js +3 -0
- package/api/resources/charters/types/CharterRequest.d.ts +36 -0
- package/api/resources/charters/types/CharterRequest.js +3 -0
- package/api/resources/charters/types/CharterResponse.d.ts +66 -0
- package/api/resources/charters/types/CharterResponse.js +3 -0
- package/api/resources/charters/types/CharterSearchField.d.ts +5 -0
- package/api/resources/charters/types/CharterSearchField.js +8 -0
- package/api/resources/charters/types/CharterSearchFilter.d.ts +18 -0
- package/api/resources/charters/types/CharterSearchFilter.js +3 -0
- package/api/resources/charters/types/CharterSearchRequest.d.ts +5 -0
- package/api/resources/charters/types/CharterSearchRequest.js +3 -0
- package/api/resources/charters/types/CharterSearchResponse.d.ts +36 -0
- package/api/resources/charters/types/CharterSearchResponse.js +3 -0
- package/api/resources/charters/types/CharterStatus.d.ts +2 -2
- package/api/resources/charters/types/CharterStatus.js +2 -2
- package/api/resources/charters/types/CharterSummary.d.ts +1 -9
- package/api/resources/charters/types/CharterType.d.ts +4 -4
- package/api/resources/charters/types/CharterType.js +4 -4
- package/api/resources/charters/types/index.d.ts +15 -0
- package/api/resources/charters/types/index.js +15 -0
- package/api/resources/commons/errors/BadRequestError.d.ts +1 -0
- package/api/resources/commons/errors/BadRequestError.js +1 -1
- package/api/resources/commons/errors/NotFoundError.d.ts +1 -0
- package/api/resources/commons/errors/NotFoundError.js +1 -1
- package/api/resources/commons/errors/PayloadTooLargeError.d.ts +1 -0
- package/api/resources/commons/errors/PayloadTooLargeError.js +1 -1
- package/api/resources/commons/errors/ServerError.d.ts +1 -0
- package/api/resources/commons/errors/ServerError.js +1 -1
- package/api/resources/commons/errors/TooManyRequestsError.d.ts +1 -0
- package/api/resources/commons/errors/TooManyRequestsError.js +1 -1
- package/api/resources/commons/types/ActionResponse.d.ts +11 -2
- package/api/resources/commons/types/AskType.d.ts +2 -2
- package/api/resources/commons/types/AskType.js +2 -2
- package/api/resources/commons/types/BaseConversationResponse.d.ts +6 -0
- package/api/resources/commons/types/BotObjectResponse.d.ts +1 -1
- package/api/resources/commons/types/CapabilityBase.d.ts +23 -0
- package/api/resources/commons/types/CapabilityBase.js +3 -0
- package/api/resources/commons/types/CapabilityStatus.d.ts +17 -0
- package/api/resources/commons/types/CapabilityStatus.js +20 -0
- package/api/resources/commons/types/CapabilityType.d.ts +8 -0
- package/api/resources/commons/types/CapabilityType.js +11 -0
- package/api/resources/commons/types/ConversationRound.d.ts +1 -1
- package/api/resources/commons/types/ConversationRound.js +1 -1
- package/api/resources/commons/types/EntityType.d.ts +5 -1
- package/api/resources/commons/types/EntityType.js +5 -1
- package/api/resources/commons/types/ErrorMessage.d.ts +3 -0
- package/api/resources/commons/types/ErrorReason.d.ts +31 -0
- package/api/resources/commons/types/ErrorReason.js +34 -0
- package/api/resources/commons/types/IntelligentFieldPrecondition.d.ts +0 -4
- package/api/resources/commons/types/LlmPersona.d.ts +1 -1
- package/api/resources/commons/types/LlmPersona.js +1 -1
- package/api/resources/commons/types/MetadataComparisonCondition.d.ts +10 -0
- package/api/resources/commons/types/MetadataComparisonCondition.js +3 -0
- package/api/resources/commons/types/MetadataComparisonOperator.d.ts +22 -0
- package/api/resources/commons/types/MetadataComparisonOperator.js +25 -0
- package/api/resources/commons/types/MetadataCondition.d.ts +21 -0
- package/api/resources/commons/types/MetadataCondition.js +3 -0
- package/api/resources/commons/types/MetadataEntryCondition.d.ts +10 -0
- package/api/resources/commons/types/MetadataEntryCondition.js +3 -0
- package/api/resources/commons/types/MetadataFilter.d.ts +41 -0
- package/api/resources/commons/types/MetadataFilter.js +3 -0
- package/api/resources/commons/types/MetadataFilterGroup.d.ts +14 -0
- package/api/resources/commons/types/MetadataFilterGroup.js +3 -0
- package/api/resources/commons/types/SimulationContext.d.ts +2 -2
- package/api/resources/commons/types/SystemEventName.d.ts +3 -0
- package/api/resources/commons/types/SystemEventName.js +3 -0
- package/api/resources/commons/types/index.d.ts +10 -0
- package/api/resources/commons/types/index.js +10 -0
- package/api/resources/conversation/client/Client.d.ts +33 -0
- package/api/resources/conversation/client/Client.js +49 -17
- package/api/resources/conversation/types/AskRequest.d.ts +10 -10
- package/api/resources/conversation/types/ConversationFilter.d.ts +6 -1
- package/api/resources/conversationKickoffs/client/Client.d.ts +45 -0
- package/api/resources/conversationKickoffs/client/Client.js +175 -0
- package/api/resources/conversationKickoffs/client/index.d.ts +1 -0
- package/api/resources/conversationKickoffs/client/index.js +17 -0
- package/api/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.d.ts +22 -0
- package/api/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.js +3 -0
- package/api/resources/conversationKickoffs/client/requests/index.d.ts +1 -0
- package/api/resources/conversationKickoffs/client/requests/index.js +2 -0
- package/api/resources/conversationKickoffs/exports.d.ts +2 -0
- package/api/resources/conversationKickoffs/exports.js +21 -0
- package/api/resources/conversationKickoffs/index.d.ts +2 -0
- package/api/resources/conversationKickoffs/index.js +18 -0
- package/api/resources/conversationKickoffs/types/ConversationKickoff.d.ts +27 -0
- package/api/resources/conversationKickoffs/types/ConversationKickoff.js +3 -0
- package/api/resources/conversationKickoffs/types/index.d.ts +1 -0
- package/api/resources/conversationKickoffs/types/index.js +17 -0
- package/api/resources/customers/client/Client.d.ts +8 -0
- package/api/resources/customers/client/Client.js +12 -3
- package/api/resources/events/client/Client.d.ts +8 -0
- package/api/resources/events/client/Client.js +12 -3
- package/api/resources/inbox/client/Client.d.ts +16 -0
- package/api/resources/inbox/client/Client.js +22 -5
- package/api/resources/index.d.ts +7 -0
- package/api/resources/index.js +8 -1
- package/api/resources/integrations/client/Client.d.ts +2 -0
- package/api/resources/integrations/client/Client.js +4 -1
- package/api/resources/intelligentFields/client/Client.d.ts +41 -4
- package/api/resources/intelligentFields/client/Client.js +49 -9
- package/api/resources/intelligentFields/client/requests/IntelligentFieldDeleteRequest.d.ts +1 -1
- package/api/resources/intelligentFields/client/requests/IntelligentFieldGetRequest.d.ts +4 -0
- package/api/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +14 -5
- package/api/resources/intelligentFields/types/EnumOption.d.ts +8 -1
- package/api/resources/intelligentFields/types/IntelligentFieldBase.d.ts +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldCore.d.ts +12 -15
- package/api/resources/intelligentFields/types/IntelligentFieldDetailResponse.d.ts +5 -2
- package/api/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +10 -2
- package/api/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +2 -8
- package/api/resources/intelligentFields/types/IntelligentFieldType.d.ts +10 -0
- package/api/resources/intelligentFields/types/IntelligentFieldType.js +10 -0
- package/api/resources/intelligentFields/types/index.d.ts +0 -1
- package/api/resources/intelligentFields/types/index.js +0 -1
- package/api/resources/knowledge/client/Client.d.ts +35 -0
- package/api/resources/knowledge/client/Client.js +50 -16
- package/api/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +13 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +4 -2
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +33 -9
- package/api/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +7 -1
- package/api/resources/organizations/client/Client.d.ts +12 -0
- package/api/resources/organizations/client/Client.js +17 -4
- package/api/resources/segments/client/Client.d.ts +10 -0
- package/api/resources/segments/client/Client.js +14 -3
- package/api/resources/translations/client/Client.d.ts +2 -0
- package/api/resources/translations/client/Client.js +4 -1
- package/api/resources/triggers/client/Client.d.ts +31 -0
- package/api/resources/triggers/client/Client.js +35 -3
- package/api/resources/triggers/types/EventTriggerBase.d.ts +0 -4
- package/api/resources/triggers/types/EventTriggerRequest.d.ts +4 -0
- package/api/resources/triggers/types/EventTriggerResponse.d.ts +11 -3
- package/api/resources/users/client/Client.d.ts +10 -0
- package/api/resources/users/client/Client.js +13 -2
- package/api/resources/voice/client/Client.d.ts +2 -0
- package/api/resources/voice/client/Client.js +4 -1
- package/api/resources/voiceConversations/client/Client.d.ts +4 -1
- package/api/resources/voiceConversations/client/Client.js +2 -1
- package/api/resources/voiceConversations/client/Socket.d.ts +11 -0
- package/api/resources/voiceConversations/client/Socket.js +15 -0
- package/core/fetcher/Fetcher.js +9 -92
- package/core/fetcher/getResponseBody.js +11 -0
- package/core/fetcher/makePassthroughRequest.js +26 -4
- package/core/fetcher/redactUrl.d.ts +2 -0
- package/core/fetcher/redactUrl.js +88 -0
- package/core/fetcher/signals.js +9 -1
- package/core/file/file.js +3 -0
- package/core/form-data-utils/FormDataWrapper.js +3 -0
- package/core/requestBody.d.ts +12 -0
- package/core/requestBody.js +26 -0
- package/core/runtime/index.d.ts +1 -1
- package/core/runtime/index.js +2 -1
- package/core/runtime/runtime.d.ts +19 -0
- package/core/runtime/runtime.js +74 -2
- package/core/schemas/builders/schema-utils/JsonError.js +2 -2
- package/core/schemas/builders/schema-utils/ParseError.js +2 -2
- package/core/stream/Stream.d.ts +45 -1
- package/core/stream/Stream.js +323 -84
- package/core/stream/index.d.ts +1 -0
- package/core/url/qs.js +2 -2
- package/core/websocket/ws.d.ts +6 -0
- package/core/websocket/ws.js +14 -1
- package/errors/MavenAGIError.d.ts +1 -0
- package/errors/MavenAGIError.js +5 -1
- package/errors/MavenAGITimeoutError.d.ts +2 -2
- package/errors/MavenAGITimeoutError.js +40 -6
- package/package.json +2 -2
- package/reference.md +1170 -126
- package/serialization/resources/capabilities/client/index.d.ts +1 -0
- package/serialization/resources/capabilities/client/index.js +17 -0
- package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.d.ts +21 -0
- package/serialization/resources/capabilities/client/requests/CapabilitiesSearchRequest.js +55 -0
- package/serialization/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.d.ts +10 -0
- package/serialization/resources/capabilities/client/requests/PatchCapabilityByTypeRequest.js +42 -0
- package/serialization/resources/capabilities/client/requests/index.d.ts +2 -0
- package/serialization/resources/capabilities/client/requests/index.js +7 -0
- package/serialization/resources/capabilities/index.d.ts +2 -0
- package/serialization/resources/capabilities/index.js +18 -0
- package/serialization/resources/capabilities/types/CapabilitiesSearchResponse.d.ts +11 -0
- package/serialization/resources/capabilities/types/CapabilitiesSearchResponse.js +45 -0
- package/serialization/resources/capabilities/types/CapabilityResponse.d.ts +23 -0
- package/serialization/resources/capabilities/types/CapabilityResponse.js +53 -0
- package/serialization/resources/capabilities/types/CapabilitySortField.d.ts +7 -0
- package/serialization/resources/{intelligentFields/types/IntelligentFieldStatus.js → capabilities/types/CapabilitySortField.js} +2 -2
- package/serialization/resources/capabilities/types/CapabilitySummary.d.ts +13 -0
- package/serialization/resources/capabilities/types/CapabilitySummary.js +47 -0
- package/serialization/resources/capabilities/types/index.d.ts +4 -0
- package/serialization/resources/capabilities/types/index.js +20 -0
- package/serialization/resources/charters/client/index.d.ts +1 -0
- package/serialization/resources/charters/client/index.js +17 -0
- package/serialization/resources/charters/client/requests/CharterPatchRequest.d.ts +24 -0
- package/serialization/resources/charters/client/requests/CharterPatchRequest.js +57 -0
- package/serialization/resources/charters/client/requests/index.d.ts +1 -0
- package/serialization/resources/charters/client/requests/index.js +5 -0
- package/serialization/resources/charters/index.d.ts +1 -0
- package/serialization/resources/charters/index.js +1 -0
- package/serialization/resources/charters/types/CharterAncestorsResponse.d.ts +10 -0
- package/serialization/resources/charters/types/CharterAncestorsResponse.js +42 -0
- package/serialization/resources/charters/types/CharterBase.d.ts +11 -0
- package/serialization/resources/charters/types/CharterBase.js +43 -0
- package/serialization/resources/charters/types/CharterChildrenGroup.d.ts +13 -0
- package/serialization/resources/charters/types/CharterChildrenGroup.js +45 -0
- package/serialization/resources/charters/types/CharterContent.d.ts +19 -0
- package/serialization/resources/charters/types/CharterContent.js +54 -0
- package/serialization/resources/charters/types/CharterKnowledgeBaseReference.d.ts +11 -0
- package/serialization/resources/charters/types/CharterKnowledgeBaseReference.js +44 -0
- package/serialization/resources/charters/types/CharterListChildrenRequest.d.ts +11 -0
- package/serialization/resources/charters/types/CharterListChildrenRequest.js +45 -0
- package/serialization/resources/charters/types/CharterListChildrenResponse.d.ts +11 -0
- package/serialization/resources/charters/types/CharterListChildrenResponse.js +45 -0
- package/serialization/resources/charters/types/CharterPatchReferences.d.ts +12 -0
- package/serialization/resources/charters/types/CharterPatchReferences.js +44 -0
- package/serialization/resources/charters/types/CharterReferences.d.ts +12 -0
- package/serialization/resources/charters/types/CharterReferences.js +44 -0
- package/serialization/resources/charters/types/CharterRequest.d.ts +13 -0
- package/serialization/resources/charters/types/CharterRequest.js +47 -0
- package/serialization/resources/charters/types/CharterResponse.d.ts +25 -0
- package/serialization/resources/charters/types/CharterResponse.js +60 -0
- package/serialization/resources/charters/types/CharterSearchField.d.ts +7 -0
- package/serialization/resources/charters/types/CharterSearchField.js +39 -0
- package/serialization/resources/charters/types/CharterSearchFilter.d.ts +12 -0
- package/serialization/resources/charters/types/CharterSearchFilter.js +44 -0
- package/serialization/resources/charters/types/CharterSearchRequest.d.ts +13 -0
- package/serialization/resources/charters/types/CharterSearchRequest.js +47 -0
- package/serialization/resources/charters/types/CharterSearchResponse.d.ts +11 -0
- package/serialization/resources/charters/types/CharterSearchResponse.js +45 -0
- package/serialization/resources/charters/types/CharterSummary.d.ts +0 -2
- package/serialization/resources/charters/types/CharterSummary.js +0 -2
- package/serialization/resources/charters/types/index.d.ts +15 -0
- package/serialization/resources/charters/types/index.js +15 -0
- package/serialization/resources/commons/types/ActionResponse.d.ts +3 -2
- package/serialization/resources/commons/types/ActionResponse.js +4 -2
- package/serialization/resources/commons/types/BaseConversationResponse.d.ts +1 -0
- package/serialization/resources/commons/types/BaseConversationResponse.js +1 -0
- package/serialization/resources/commons/types/CapabilityBase.d.ts +14 -0
- package/serialization/resources/commons/types/CapabilityBase.js +46 -0
- package/serialization/resources/{intelligentFields/types/IntelligentFieldStatus.d.ts → commons/types/CapabilityStatus.d.ts} +2 -2
- package/serialization/resources/commons/types/CapabilityStatus.js +39 -0
- package/serialization/resources/commons/types/CapabilityType.d.ts +7 -0
- package/serialization/resources/commons/types/CapabilityType.js +39 -0
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +1 -1
- package/serialization/resources/commons/types/ErrorMessage.d.ts +2 -0
- package/serialization/resources/commons/types/ErrorMessage.js +2 -0
- package/serialization/resources/commons/types/ErrorReason.d.ts +7 -0
- package/serialization/resources/commons/types/ErrorReason.js +49 -0
- package/serialization/resources/commons/types/MetadataComparisonCondition.d.ts +11 -0
- package/serialization/resources/commons/types/MetadataComparisonCondition.js +43 -0
- package/serialization/resources/commons/types/MetadataComparisonOperator.d.ts +7 -0
- package/serialization/resources/commons/types/MetadataComparisonOperator.js +39 -0
- package/serialization/resources/commons/types/MetadataCondition.d.ts +19 -0
- package/serialization/resources/commons/types/MetadataCondition.js +51 -0
- package/serialization/resources/commons/types/MetadataEntryCondition.d.ts +11 -0
- package/serialization/resources/commons/types/MetadataEntryCondition.js +43 -0
- package/serialization/resources/commons/types/MetadataFilter.d.ts +14 -0
- package/serialization/resources/commons/types/MetadataFilter.js +49 -0
- package/serialization/resources/commons/types/MetadataFilterGroup.d.ts +11 -0
- package/serialization/resources/commons/types/MetadataFilterGroup.js +44 -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 +10 -0
- package/serialization/resources/commons/types/index.js +10 -0
- package/serialization/resources/conversationKickoffs/client/index.d.ts +1 -0
- package/serialization/resources/conversationKickoffs/client/index.js +17 -0
- package/serialization/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.d.ts +12 -0
- package/serialization/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.js +44 -0
- package/serialization/resources/conversationKickoffs/client/requests/index.d.ts +1 -0
- package/serialization/resources/conversationKickoffs/client/requests/index.js +5 -0
- package/serialization/resources/conversationKickoffs/index.d.ts +2 -0
- package/serialization/resources/conversationKickoffs/index.js +18 -0
- package/serialization/resources/conversationKickoffs/types/ConversationKickoff.d.ts +11 -0
- package/serialization/resources/conversationKickoffs/types/ConversationKickoff.js +45 -0
- package/serialization/resources/conversationKickoffs/types/index.d.ts +1 -0
- package/serialization/resources/conversationKickoffs/types/index.js +17 -0
- package/serialization/resources/index.d.ts +7 -0
- package/serialization/resources/index.js +8 -1
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.d.ts +3 -2
- package/serialization/resources/intelligentFields/client/requests/IntelligentFieldPatchRequest.js +3 -2
- package/serialization/resources/intelligentFields/types/EnumOption.d.ts +1 -0
- package/serialization/resources/intelligentFields/types/EnumOption.js +1 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldCore.d.ts +0 -2
- package/serialization/resources/intelligentFields/types/IntelligentFieldCore.js +0 -2
- package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.d.ts +2 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldRequest.js +2 -0
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.d.ts +2 -5
- package/serialization/resources/intelligentFields/types/IntelligentFieldResponse.js +3 -5
- package/serialization/resources/intelligentFields/types/index.d.ts +0 -1
- package/serialization/resources/intelligentFields/types/index.js +0 -1
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentFilter.js +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +0 -2
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +0 -2
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.d.ts +2 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentSearchResponse.js +2 -0
- package/serialization/resources/triggers/types/EventTriggerBase.d.ts +0 -2
- package/serialization/resources/triggers/types/EventTriggerBase.js +0 -2
- package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +2 -0
- package/serialization/resources/triggers/types/EventTriggerRequest.js +2 -0
- package/serialization/resources/triggers/types/EventTriggerResponse.d.ts +2 -1
- package/serialization/resources/triggers/types/EventTriggerResponse.js +3 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/intelligentFields/types/IntelligentFieldStatus.d.ts +0 -7
- package/api/resources/intelligentFields/types/IntelligentFieldStatus.js +0 -10
|
@@ -48,6 +48,7 @@ const BaseClient_1 = require("../../../../BaseClient");
|
|
|
48
48
|
const core = __importStar(require("../../../../core"));
|
|
49
49
|
const headers_1 = require("../../../../core/headers");
|
|
50
50
|
const json_1 = require("../../../../core/json");
|
|
51
|
+
const requestBody_1 = require("../../../../core/requestBody");
|
|
51
52
|
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const handleNonStatusCodeError_1 = require("../../../../errors/handleNonStatusCodeError");
|
|
53
54
|
const errors = __importStar(require("../../../../errors/index"));
|
|
@@ -75,6 +76,8 @@ class ConversationClient {
|
|
|
75
76
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
76
77
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
77
78
|
* @throws {@link MavenAGI.ServerError}
|
|
79
|
+
* @throws {@link errors.MavenAGIError}
|
|
80
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
78
81
|
*
|
|
79
82
|
* @example
|
|
80
83
|
* await client.conversation.initialize({
|
|
@@ -120,7 +123,7 @@ class ConversationClient {
|
|
|
120
123
|
contentType: "application/json",
|
|
121
124
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
122
125
|
requestType: "json",
|
|
123
|
-
body: serializers.ConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
126
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.ConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
124
127
|
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,
|
|
125
128
|
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,
|
|
126
129
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -201,6 +204,8 @@ class ConversationClient {
|
|
|
201
204
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
202
205
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
203
206
|
* @throws {@link MavenAGI.ServerError}
|
|
207
|
+
* @throws {@link errors.MavenAGIError}
|
|
208
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
204
209
|
*
|
|
205
210
|
* @example
|
|
206
211
|
* await client.conversation.patch("conversation-0", {
|
|
@@ -225,7 +230,7 @@ class ConversationClient {
|
|
|
225
230
|
contentType: "application/json",
|
|
226
231
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
227
232
|
requestType: "json",
|
|
228
|
-
body: serializers.ConversationPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
233
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.ConversationPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
229
234
|
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,
|
|
230
235
|
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,
|
|
231
236
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -303,6 +308,8 @@ class ConversationClient {
|
|
|
303
308
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
304
309
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
305
310
|
* @throws {@link MavenAGI.ServerError}
|
|
311
|
+
* @throws {@link errors.MavenAGIError}
|
|
312
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
306
313
|
*
|
|
307
314
|
* @example
|
|
308
315
|
* await client.conversation.get("conversationId")
|
|
@@ -401,6 +408,7 @@ class ConversationClient {
|
|
|
401
408
|
* Wipes a conversation of all user data.
|
|
402
409
|
* The conversation ID will still exist and non-user specific data will still be retained.
|
|
403
410
|
* Attempts to modify or add messages to the conversation will throw an error.
|
|
411
|
+
* The conversation is sealed against further writes as soon as this call returns. A `202 Accepted` response means the wipe is still completing and will finish on its own.
|
|
404
412
|
*
|
|
405
413
|
* Simulation conversations will no longer be visible in search results nor metrics.
|
|
406
414
|
* Non-simulation conversations will remain visible - they can not be fully removed from the system.
|
|
@@ -418,6 +426,8 @@ class ConversationClient {
|
|
|
418
426
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
419
427
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
420
428
|
* @throws {@link MavenAGI.ServerError}
|
|
429
|
+
* @throws {@link errors.MavenAGIError}
|
|
430
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
421
431
|
*
|
|
422
432
|
* @example
|
|
423
433
|
* await client.conversation.delete("conversation-0", {
|
|
@@ -518,6 +528,8 @@ class ConversationClient {
|
|
|
518
528
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
519
529
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
520
530
|
* @throws {@link MavenAGI.ServerError}
|
|
531
|
+
* @throws {@link errors.MavenAGIError}
|
|
532
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
521
533
|
*
|
|
522
534
|
* @example
|
|
523
535
|
* await client.conversation.appendNewMessages("conversationId", [{
|
|
@@ -558,9 +570,9 @@ class ConversationClient {
|
|
|
558
570
|
contentType: "application/json",
|
|
559
571
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
560
572
|
requestType: "json",
|
|
561
|
-
body: serializers.conversation.appendNewMessages.Request.jsonOrThrow(request, {
|
|
573
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.conversation.appendNewMessages.Request.jsonOrThrow(request, {
|
|
562
574
|
unrecognizedObjectKeys: "strip",
|
|
563
|
-
}),
|
|
575
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
564
576
|
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,
|
|
565
577
|
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,
|
|
566
578
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -646,6 +658,8 @@ class ConversationClient {
|
|
|
646
658
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
647
659
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
648
660
|
* @throws {@link MavenAGI.ServerError}
|
|
661
|
+
* @throws {@link errors.MavenAGIError}
|
|
662
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
649
663
|
*
|
|
650
664
|
* @example
|
|
651
665
|
* await client.conversation.ask("conversation-0", {
|
|
@@ -685,7 +699,7 @@ class ConversationClient {
|
|
|
685
699
|
contentType: "application/json",
|
|
686
700
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
687
701
|
requestType: "json",
|
|
688
|
-
body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
702
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
689
703
|
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,
|
|
690
704
|
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,
|
|
691
705
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -784,7 +798,7 @@ class ConversationClient {
|
|
|
784
798
|
contentType: "application/json",
|
|
785
799
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
786
800
|
requestType: "json",
|
|
787
|
-
body: serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
801
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
788
802
|
responseType: "sse",
|
|
789
803
|
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,
|
|
790
804
|
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,
|
|
@@ -873,6 +887,8 @@ class ConversationClient {
|
|
|
873
887
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
874
888
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
875
889
|
* @throws {@link MavenAGI.ServerError}
|
|
890
|
+
* @throws {@link errors.MavenAGIError}
|
|
891
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
876
892
|
*
|
|
877
893
|
* @example
|
|
878
894
|
* await client.conversation.categorize("conversationId")
|
|
@@ -975,6 +991,8 @@ class ConversationClient {
|
|
|
975
991
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
976
992
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
977
993
|
* @throws {@link MavenAGI.ServerError}
|
|
994
|
+
* @throws {@link errors.MavenAGIError}
|
|
995
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
978
996
|
*
|
|
979
997
|
* @example
|
|
980
998
|
* await client.conversation.createFeedback({
|
|
@@ -1012,7 +1030,7 @@ class ConversationClient {
|
|
|
1012
1030
|
contentType: "application/json",
|
|
1013
1031
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1014
1032
|
requestType: "json",
|
|
1015
|
-
body: serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1033
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1016
1034
|
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,
|
|
1017
1035
|
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,
|
|
1018
1036
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1094,6 +1112,8 @@ class ConversationClient {
|
|
|
1094
1112
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1095
1113
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1096
1114
|
* @throws {@link MavenAGI.ServerError}
|
|
1115
|
+
* @throws {@link errors.MavenAGIError}
|
|
1116
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1097
1117
|
*
|
|
1098
1118
|
* @example
|
|
1099
1119
|
* await client.conversation.submitActionForm("conversationId", {
|
|
@@ -1123,7 +1143,7 @@ class ConversationClient {
|
|
|
1123
1143
|
contentType: "application/json",
|
|
1124
1144
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1125
1145
|
requestType: "json",
|
|
1126
|
-
body: serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1146
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1127
1147
|
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,
|
|
1128
1148
|
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,
|
|
1129
1149
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1205,6 +1225,8 @@ class ConversationClient {
|
|
|
1205
1225
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1206
1226
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1207
1227
|
* @throws {@link MavenAGI.ServerError}
|
|
1228
|
+
* @throws {@link errors.MavenAGIError}
|
|
1229
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1208
1230
|
*
|
|
1209
1231
|
* @example
|
|
1210
1232
|
* await client.conversation.addConversationMetadata("conversationId", {
|
|
@@ -1229,9 +1251,9 @@ class ConversationClient {
|
|
|
1229
1251
|
contentType: "application/json",
|
|
1230
1252
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1231
1253
|
requestType: "json",
|
|
1232
|
-
body: serializers.conversation.addConversationMetadata.Request.jsonOrThrow(request, {
|
|
1254
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.conversation.addConversationMetadata.Request.jsonOrThrow(request, {
|
|
1233
1255
|
unrecognizedObjectKeys: "strip",
|
|
1234
|
-
}),
|
|
1256
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1235
1257
|
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,
|
|
1236
1258
|
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,
|
|
1237
1259
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1315,6 +1337,8 @@ class ConversationClient {
|
|
|
1315
1337
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1316
1338
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1317
1339
|
* @throws {@link MavenAGI.ServerError}
|
|
1340
|
+
* @throws {@link errors.MavenAGIError}
|
|
1341
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1318
1342
|
*
|
|
1319
1343
|
* @example
|
|
1320
1344
|
* await client.conversation.updateConversationMetadata("conversation-0", {
|
|
@@ -1342,7 +1366,7 @@ class ConversationClient {
|
|
|
1342
1366
|
contentType: "application/json",
|
|
1343
1367
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1344
1368
|
requestType: "json",
|
|
1345
|
-
body: serializers.UpdateMetadataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1369
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.UpdateMetadataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1346
1370
|
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,
|
|
1347
1371
|
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,
|
|
1348
1372
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1419,6 +1443,8 @@ class ConversationClient {
|
|
|
1419
1443
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1420
1444
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1421
1445
|
* @throws {@link MavenAGI.ServerError}
|
|
1446
|
+
* @throws {@link errors.MavenAGIError}
|
|
1447
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1422
1448
|
*
|
|
1423
1449
|
* @example
|
|
1424
1450
|
* await client.conversation.search({})
|
|
@@ -1441,7 +1467,7 @@ class ConversationClient {
|
|
|
1441
1467
|
contentType: "application/json",
|
|
1442
1468
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1443
1469
|
requestType: "json",
|
|
1444
|
-
body: serializers.ConversationsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1470
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.ConversationsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1445
1471
|
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,
|
|
1446
1472
|
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,
|
|
1447
1473
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1528,6 +1554,8 @@ class ConversationClient {
|
|
|
1528
1554
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1529
1555
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1530
1556
|
* @throws {@link MavenAGI.ServerError}
|
|
1557
|
+
* @throws {@link errors.MavenAGIError}
|
|
1558
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1531
1559
|
*
|
|
1532
1560
|
* @example
|
|
1533
1561
|
* await client.conversation.searchCursor({})
|
|
@@ -1550,9 +1578,7 @@ class ConversationClient {
|
|
|
1550
1578
|
contentType: "application/json",
|
|
1551
1579
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1552
1580
|
requestType: "json",
|
|
1553
|
-
body: serializers.ConversationsCursorSearchRequest.jsonOrThrow(request, {
|
|
1554
|
-
unrecognizedObjectKeys: "strip",
|
|
1555
|
-
}),
|
|
1581
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.ConversationsCursorSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1556
1582
|
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,
|
|
1557
1583
|
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,
|
|
1558
1584
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1631,6 +1657,8 @@ class ConversationClient {
|
|
|
1631
1657
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1632
1658
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1633
1659
|
* @throws {@link MavenAGI.ServerError}
|
|
1660
|
+
* @throws {@link errors.MavenAGIError}
|
|
1661
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1634
1662
|
*/
|
|
1635
1663
|
export(request, requestOptions) {
|
|
1636
1664
|
return core.HttpResponsePromise.fromPromise(this.__export(request, requestOptions));
|
|
@@ -1650,7 +1678,7 @@ class ConversationClient {
|
|
|
1650
1678
|
contentType: "application/json",
|
|
1651
1679
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1652
1680
|
requestType: "json",
|
|
1653
|
-
body: serializers.ConversationsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1681
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.ConversationsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1654
1682
|
responseType: "binary-response",
|
|
1655
1683
|
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,
|
|
1656
1684
|
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,
|
|
@@ -1727,6 +1755,8 @@ class ConversationClient {
|
|
|
1727
1755
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1728
1756
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1729
1757
|
* @throws {@link MavenAGI.ServerError}
|
|
1758
|
+
* @throws {@link errors.MavenAGIError}
|
|
1759
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1730
1760
|
*/
|
|
1731
1761
|
importSimulations(file, request, requestOptions) {
|
|
1732
1762
|
return core.HttpResponsePromise.fromPromise(this.__importSimulations(file, request, requestOptions));
|
|
@@ -1825,6 +1855,8 @@ class ConversationClient {
|
|
|
1825
1855
|
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
1826
1856
|
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
1827
1857
|
* @throws {@link MavenAGI.ServerError}
|
|
1858
|
+
* @throws {@link errors.MavenAGIError}
|
|
1859
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
1828
1860
|
*
|
|
1829
1861
|
* @example
|
|
1830
1862
|
* await client.conversation.deliverMessage({
|
|
@@ -1864,7 +1896,7 @@ class ConversationClient {
|
|
|
1864
1896
|
contentType: "application/json",
|
|
1865
1897
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1866
1898
|
requestType: "json",
|
|
1867
|
-
body: serializers.DeliverMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1899
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.DeliverMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
1868
1900
|
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,
|
|
1869
1901
|
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,
|
|
1870
1902
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -81,7 +81,7 @@ export interface AskRequest {
|
|
|
81
81
|
/** Externally supplied ID to uniquely identify the user that created this message */
|
|
82
82
|
userId: MavenAGI.EntityIdBase;
|
|
83
83
|
/**
|
|
84
|
-
* What prompts this assistant
|
|
84
|
+
* What prompts this assistant response. Omit (or send USER_MESSAGE) for a normal user
|
|
85
85
|
* question — this is the backwards-compatible default. Use WELCOME for an agent-authored
|
|
86
86
|
* opener, or PROACTIVE for a message the user did not prompt.
|
|
87
87
|
*/
|
|
@@ -90,7 +90,7 @@ export interface AskRequest {
|
|
|
90
90
|
* For USER_MESSAGE (the default) this is the user's message, in the user's own words, and
|
|
91
91
|
* is required. For WELCOME and PROACTIVE it is optional and, when provided, steers the
|
|
92
92
|
* agent's response (a directive to the agent, not the user's own words). (Changed from
|
|
93
|
-
* required to optional to support the non-user
|
|
93
|
+
* required to optional to support the non-user ask types — existing USER_MESSAGE callers
|
|
94
94
|
* are unaffected.)
|
|
95
95
|
*/
|
|
96
96
|
text?: string;
|
|
@@ -99,26 +99,26 @@ export interface AskRequest {
|
|
|
99
99
|
* `BotObjectResponse` matching a schema you supply.
|
|
100
100
|
*
|
|
101
101
|
* Set per ask and independent of `type`, so one conversation can mix prose and structured
|
|
102
|
-
*
|
|
102
|
+
* rounds. Only the answer's form changes: knowledge, actions, charters and segments apply
|
|
103
103
|
* the same way either way.
|
|
104
104
|
*
|
|
105
|
-
* A structured answer accompanies the prose one rather than replacing it — the same
|
|
105
|
+
* A structured answer accompanies the prose one rather than replacing it — the same round
|
|
106
106
|
* produces both, so the conversation stays readable. On `ask_stream` the prose still streams
|
|
107
107
|
* on `text` events as it always has, and the object arrives whole on a single `object` event
|
|
108
108
|
* near the end.
|
|
109
109
|
*
|
|
110
|
-
* Every answering
|
|
110
|
+
* Every answering round carries an object, including one where the agent asks a clarifying
|
|
111
111
|
* question rather than answering. Shape the schema so it can say "not enough information"
|
|
112
112
|
* — a populated object is not on its own evidence of a confident answer.
|
|
113
113
|
*
|
|
114
|
-
* Two exceptions. A
|
|
115
|
-
* action rather than from an answer, so it carries no object; the
|
|
114
|
+
* Two exceptions. A round that asks the user to *act* produces an action form from the
|
|
115
|
+
* action rather than from an answer, so it carries no object; the round that answers after
|
|
116
116
|
* the form is submitted does carry one. Leave the `FORMS` capability off if you need an
|
|
117
|
-
* object on every
|
|
117
|
+
* object on every round.
|
|
118
118
|
*
|
|
119
|
-
* A
|
|
119
|
+
* A round answered verbatim by a `STRICT_RETURN` charter also carries no object. That
|
|
120
120
|
* charter's manual is returned exactly as written without consulting the agent, so there is
|
|
121
|
-
* nothing to shape into the requested schema — the
|
|
121
|
+
* nothing to shape into the requested schema — the round returns the manual as `text` alone.
|
|
122
122
|
*/
|
|
123
123
|
textFormat?: MavenAGI.TextFormat;
|
|
124
124
|
/**
|
|
@@ -86,7 +86,12 @@ export interface ConversationFilter {
|
|
|
86
86
|
userMessageCount?: MavenAGI.NumberRange;
|
|
87
87
|
/** Filter by whether any message in the conversation has an attachment */
|
|
88
88
|
hasAttachment?: boolean;
|
|
89
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Filter by the segments that any message on a conversation matched.
|
|
91
|
+
*
|
|
92
|
+
* Superseded by `matchedCharterIds`. Segments are being phased out in favour of
|
|
93
|
+
* charter preconditions.
|
|
94
|
+
*/
|
|
90
95
|
matchedSegmentIds?: MavenAGI.EntityIdFilter[];
|
|
91
96
|
/**
|
|
92
97
|
* Filter by the charters that any bot-response message on a conversation matched.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient";
|
|
3
|
+
import * as core from "../../../../core";
|
|
4
|
+
import * as MavenAGI from "../../../index";
|
|
5
|
+
export declare namespace ConversationKickoffsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ConversationKickoffsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ConversationKickoffsClient.Options>;
|
|
12
|
+
constructor(options: ConversationKickoffsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Register or update one of the calling app's Conversation Kickoffs for this agent. An app may
|
|
15
|
+
* hold multiple independent installs, and any number of an agent's kickoffs may run at once.
|
|
16
|
+
*
|
|
17
|
+
* A newly installed kickoff starts inactive, so installing one never changes an agent's
|
|
18
|
+
* behaviour on its own. Updating an existing one rewrites its name and description and leaves
|
|
19
|
+
* its status alone, so re-registering on every install refresh never deactivates a kickoff
|
|
20
|
+
* that is already live. Use the capability APIs to activate it, and to read, search or delete
|
|
21
|
+
* it afterwards.
|
|
22
|
+
*
|
|
23
|
+
* @param {MavenAGI.CreateConversationKickoffRequest} request
|
|
24
|
+
* @param {ConversationKickoffsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
|
+
*
|
|
26
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
27
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
28
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
29
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
30
|
+
* @throws {@link MavenAGI.ServerError}
|
|
31
|
+
* @throws {@link errors.MavenAGIError}
|
|
32
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.conversationKickoffs.createOrUpdate({
|
|
36
|
+
* kickoffId: {
|
|
37
|
+
* referenceId: "greet-returning-customer"
|
|
38
|
+
* },
|
|
39
|
+
* name: "Greet returning customer",
|
|
40
|
+
* description: "Looks up the customer's open orders before the agent's first reply"
|
|
41
|
+
* })
|
|
42
|
+
*/
|
|
43
|
+
createOrUpdate(request: MavenAGI.CreateConversationKickoffRequest, requestOptions?: ConversationKickoffsClient.RequestOptions): core.HttpResponsePromise<MavenAGI.ConversationKickoff>;
|
|
44
|
+
private __createOrUpdate;
|
|
45
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.ConversationKickoffsClient = void 0;
|
|
47
|
+
const BaseClient_1 = require("../../../../BaseClient");
|
|
48
|
+
const core = __importStar(require("../../../../core"));
|
|
49
|
+
const headers_1 = require("../../../../core/headers");
|
|
50
|
+
const requestBody_1 = require("../../../../core/requestBody");
|
|
51
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
|
+
const handleNonStatusCodeError_1 = require("../../../../errors/handleNonStatusCodeError");
|
|
53
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
54
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
55
|
+
const MavenAGI = __importStar(require("../../../index"));
|
|
56
|
+
class ConversationKickoffsClient {
|
|
57
|
+
constructor(options) {
|
|
58
|
+
this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Register or update one of the calling app's Conversation Kickoffs for this agent. An app may
|
|
62
|
+
* hold multiple independent installs, and any number of an agent's kickoffs may run at once.
|
|
63
|
+
*
|
|
64
|
+
* A newly installed kickoff starts inactive, so installing one never changes an agent's
|
|
65
|
+
* behaviour on its own. Updating an existing one rewrites its name and description and leaves
|
|
66
|
+
* its status alone, so re-registering on every install refresh never deactivates a kickoff
|
|
67
|
+
* that is already live. Use the capability APIs to activate it, and to read, search or delete
|
|
68
|
+
* it afterwards.
|
|
69
|
+
*
|
|
70
|
+
* @param {MavenAGI.CreateConversationKickoffRequest} request
|
|
71
|
+
* @param {ConversationKickoffsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
74
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
75
|
+
* @throws {@link MavenAGI.PayloadTooLargeError}
|
|
76
|
+
* @throws {@link MavenAGI.TooManyRequestsError}
|
|
77
|
+
* @throws {@link MavenAGI.ServerError}
|
|
78
|
+
* @throws {@link errors.MavenAGIError}
|
|
79
|
+
* @throws {@link errors.MavenAGITimeoutError}
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.conversationKickoffs.createOrUpdate({
|
|
83
|
+
* kickoffId: {
|
|
84
|
+
* referenceId: "greet-returning-customer"
|
|
85
|
+
* },
|
|
86
|
+
* name: "Greet returning customer",
|
|
87
|
+
* description: "Looks up the customer's open orders before the agent's first reply"
|
|
88
|
+
* })
|
|
89
|
+
*/
|
|
90
|
+
createOrUpdate(request, requestOptions) {
|
|
91
|
+
return core.HttpResponsePromise.fromPromise(this.__createOrUpdate(request, requestOptions));
|
|
92
|
+
}
|
|
93
|
+
__createOrUpdate(request, requestOptions) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
96
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
97
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
98
|
+
"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,
|
|
99
|
+
"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,
|
|
100
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
101
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
102
|
+
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/conversation-kickoffs"),
|
|
103
|
+
method: "PUT",
|
|
104
|
+
headers: _headers,
|
|
105
|
+
contentType: "application/json",
|
|
106
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
107
|
+
requestType: "json",
|
|
108
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(serializers.CreateConversationKickoffRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
109
|
+
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,
|
|
110
|
+
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,
|
|
111
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
112
|
+
fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
|
|
113
|
+
logging: this._options.logging,
|
|
114
|
+
});
|
|
115
|
+
if (_response.ok) {
|
|
116
|
+
return {
|
|
117
|
+
data: serializers.ConversationKickoff.parseOrThrow(_response.body, {
|
|
118
|
+
unrecognizedObjectKeys: "passthrough",
|
|
119
|
+
allowUnrecognizedUnionMembers: true,
|
|
120
|
+
allowUnrecognizedEnumValues: true,
|
|
121
|
+
breadcrumbsPrefix: ["response"],
|
|
122
|
+
}),
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
if (_response.error.reason === "status-code") {
|
|
127
|
+
switch (_response.error.statusCode) {
|
|
128
|
+
case 404:
|
|
129
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
130
|
+
unrecognizedObjectKeys: "passthrough",
|
|
131
|
+
allowUnrecognizedUnionMembers: true,
|
|
132
|
+
allowUnrecognizedEnumValues: true,
|
|
133
|
+
breadcrumbsPrefix: ["response"],
|
|
134
|
+
}), _response.rawResponse);
|
|
135
|
+
case 400:
|
|
136
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
137
|
+
unrecognizedObjectKeys: "passthrough",
|
|
138
|
+
allowUnrecognizedUnionMembers: true,
|
|
139
|
+
allowUnrecognizedEnumValues: true,
|
|
140
|
+
breadcrumbsPrefix: ["response"],
|
|
141
|
+
}), _response.rawResponse);
|
|
142
|
+
case 413:
|
|
143
|
+
throw new MavenAGI.PayloadTooLargeError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
144
|
+
unrecognizedObjectKeys: "passthrough",
|
|
145
|
+
allowUnrecognizedUnionMembers: true,
|
|
146
|
+
allowUnrecognizedEnumValues: true,
|
|
147
|
+
breadcrumbsPrefix: ["response"],
|
|
148
|
+
}), _response.rawResponse);
|
|
149
|
+
case 429:
|
|
150
|
+
throw new MavenAGI.TooManyRequestsError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
151
|
+
unrecognizedObjectKeys: "passthrough",
|
|
152
|
+
allowUnrecognizedUnionMembers: true,
|
|
153
|
+
allowUnrecognizedEnumValues: true,
|
|
154
|
+
breadcrumbsPrefix: ["response"],
|
|
155
|
+
}), _response.rawResponse);
|
|
156
|
+
case 500:
|
|
157
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
158
|
+
unrecognizedObjectKeys: "passthrough",
|
|
159
|
+
allowUnrecognizedUnionMembers: true,
|
|
160
|
+
allowUnrecognizedEnumValues: true,
|
|
161
|
+
breadcrumbsPrefix: ["response"],
|
|
162
|
+
}), _response.rawResponse);
|
|
163
|
+
default:
|
|
164
|
+
throw new errors.MavenAGIError({
|
|
165
|
+
statusCode: _response.error.statusCode,
|
|
166
|
+
body: _response.error.body,
|
|
167
|
+
rawResponse: _response.rawResponse,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/v1/conversation-kickoffs");
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
exports.ConversationKickoffsClient = ConversationKickoffsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./requests"), exports);
|
package/api/resources/conversationKickoffs/client/requests/CreateConversationKickoffRequest.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as MavenAGI from "../../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* kickoffId: {
|
|
6
|
+
* referenceId: "greet-returning-customer"
|
|
7
|
+
* },
|
|
8
|
+
* name: "Greet returning customer",
|
|
9
|
+
* description: "Looks up the customer's open orders before the agent's first reply"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface CreateConversationKickoffRequest {
|
|
13
|
+
/**
|
|
14
|
+
* ID that uniquely identifies this Conversation Kickoff. Must be unique within the
|
|
15
|
+
* calling app.
|
|
16
|
+
*/
|
|
17
|
+
kickoffId: MavenAGI.EntityIdBase;
|
|
18
|
+
/** The kickoff's display name, shown to whoever manages the agent. */
|
|
19
|
+
name: string;
|
|
20
|
+
/** What the kickoff does, shown to whoever manages the agent. */
|
|
21
|
+
description?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { CreateConversationKickoffRequest } from "./CreateConversationKickoffRequest";
|