mavenagi 0.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +39 -0
- package/Client.js +33 -0
- package/README.md +139 -0
- package/api/index.d.ts +1 -0
- package/api/index.js +1 -0
- package/api/resources/actions/client/Client.d.ts +79 -0
- package/api/resources/actions/client/Client.js +305 -0
- package/api/resources/actions/client/index.d.ts +1 -0
- package/api/resources/actions/client/index.js +1 -0
- package/api/resources/actions/index.d.ts +2 -0
- package/api/resources/actions/index.js +2 -0
- package/api/resources/actions/types/ActionBase.d.ts +18 -0
- package/api/resources/actions/types/ActionBase.js +4 -0
- package/api/resources/actions/types/ActionParameter.d.ts +9 -0
- package/api/resources/actions/types/ActionParameter.js +4 -0
- package/api/resources/actions/types/ActionRequest.d.ts +23 -0
- package/api/resources/actions/types/ActionRequest.js +4 -0
- package/api/resources/actions/types/ActionResponse.d.ts +27 -0
- package/api/resources/actions/types/ActionResponse.js +4 -0
- package/api/resources/actions/types/Preconditions.d.ts +7 -0
- package/api/resources/actions/types/Preconditions.js +4 -0
- package/api/resources/actions/types/index.d.ts +5 -0
- package/api/resources/actions/types/index.js +5 -0
- package/api/resources/commons/errors/BadRequestError.d.ts +8 -0
- package/api/resources/commons/errors/BadRequestError.js +14 -0
- package/api/resources/commons/errors/NotFoundError.d.ts +8 -0
- package/api/resources/commons/errors/NotFoundError.js +14 -0
- package/api/resources/commons/errors/ServerError.d.ts +8 -0
- package/api/resources/commons/errors/ServerError.js +14 -0
- package/api/resources/commons/errors/index.d.ts +3 -0
- package/api/resources/commons/errors/index.js +3 -0
- package/api/resources/commons/index.d.ts +2 -0
- package/api/resources/commons/index.js +2 -0
- package/api/resources/commons/types/AppUser.d.ts +8 -0
- package/api/resources/commons/types/AppUser.js +4 -0
- package/api/resources/commons/types/AppUserIdentification.d.ts +8 -0
- package/api/resources/commons/types/AppUserIdentification.js +4 -0
- package/api/resources/commons/types/AppUserIdentifier.d.ts +9 -0
- package/api/resources/commons/types/AppUserIdentifier.js +4 -0
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +8 -0
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.js +7 -0
- package/api/resources/commons/types/AppUserRequest.d.ts +8 -0
- package/api/resources/commons/types/AppUserRequest.js +4 -0
- package/api/resources/commons/types/AppUserResponse.d.ts +8 -0
- package/api/resources/commons/types/AppUserResponse.js +4 -0
- package/api/resources/commons/types/EntityId.d.ts +14 -0
- package/api/resources/commons/types/EntityId.js +4 -0
- package/api/resources/commons/types/EntityIdBase.d.ts +10 -0
- package/api/resources/commons/types/EntityIdBase.js +4 -0
- package/api/resources/commons/types/EntityType.d.ts +15 -0
- package/api/resources/commons/types/EntityType.js +14 -0
- package/api/resources/commons/types/ErrorMessage.d.ts +6 -0
- package/api/resources/commons/types/ErrorMessage.js +4 -0
- package/api/resources/commons/types/Feedback.d.ts +16 -0
- package/api/resources/commons/types/Feedback.js +4 -0
- package/api/resources/commons/types/FeedbackType.d.ts +13 -0
- package/api/resources/commons/types/FeedbackType.js +9 -0
- package/api/resources/commons/types/User.d.ts +10 -0
- package/api/resources/commons/types/User.js +4 -0
- package/api/resources/commons/types/UserData.d.ts +10 -0
- package/api/resources/commons/types/UserData.js +4 -0
- package/api/resources/commons/types/VisibilityType.d.ts +9 -0
- package/api/resources/commons/types/VisibilityType.js +8 -0
- package/api/resources/commons/types/index.d.ts +15 -0
- package/api/resources/commons/types/index.js +15 -0
- package/api/resources/conversation/client/Client.d.ts +201 -0
- package/api/resources/conversation/client/Client.js +889 -0
- package/api/resources/conversation/client/index.d.ts +1 -0
- package/api/resources/conversation/client/index.js +1 -0
- package/api/resources/conversation/index.d.ts +2 -0
- package/api/resources/conversation/index.js +2 -0
- package/api/resources/conversation/types/ActionFormField.d.ts +10 -0
- package/api/resources/conversation/types/ActionFormField.js +4 -0
- package/api/resources/conversation/types/AskRequest.d.ts +14 -0
- package/api/resources/conversation/types/AskRequest.js +4 -0
- package/api/resources/conversation/types/AskStreamEndEvent.d.ts +7 -0
- package/api/resources/conversation/types/AskStreamEndEvent.js +4 -0
- package/api/resources/conversation/types/AskStreamMetadataEvent.d.ts +6 -0
- package/api/resources/conversation/types/AskStreamMetadataEvent.js +4 -0
- package/api/resources/conversation/types/AskStreamStartEvent.d.ts +7 -0
- package/api/resources/conversation/types/AskStreamStartEvent.js +4 -0
- package/api/resources/conversation/types/AskStreamTextEvent.d.ts +6 -0
- package/api/resources/conversation/types/AskStreamTextEvent.js +4 -0
- package/api/resources/conversation/types/BotActionFormResponse.d.ts +10 -0
- package/api/resources/conversation/types/BotActionFormResponse.js +4 -0
- package/api/resources/conversation/types/BotConversationMessageType.d.ts +9 -0
- package/api/resources/conversation/types/BotConversationMessageType.js +8 -0
- package/api/resources/conversation/types/BotMessage.d.ts +11 -0
- package/api/resources/conversation/types/BotMessage.js +4 -0
- package/api/resources/conversation/types/BotResponse.d.ts +13 -0
- package/api/resources/conversation/types/BotResponse.js +4 -0
- package/api/resources/conversation/types/BotResponseMetadata.d.ts +8 -0
- package/api/resources/conversation/types/BotResponseMetadata.js +4 -0
- package/api/resources/conversation/types/BotTextResponse.d.ts +6 -0
- package/api/resources/conversation/types/BotTextResponse.js +4 -0
- package/api/resources/conversation/types/Capability.d.ts +8 -0
- package/api/resources/conversation/types/Capability.js +7 -0
- package/api/resources/conversation/types/ConversationBase.d.ts +8 -0
- package/api/resources/conversation/types/ConversationBase.js +4 -0
- package/api/resources/conversation/types/ConversationContext.d.ts +20 -0
- package/api/resources/conversation/types/ConversationContext.js +4 -0
- package/api/resources/conversation/types/ConversationMessageBase.d.ts +8 -0
- package/api/resources/conversation/types/ConversationMessageBase.js +4 -0
- package/api/resources/conversation/types/ConversationMessageContext.d.ts +12 -0
- package/api/resources/conversation/types/ConversationMessageContext.js +4 -0
- package/api/resources/conversation/types/ConversationMessageRequest.d.ts +8 -0
- package/api/resources/conversation/types/ConversationMessageRequest.js +4 -0
- package/api/resources/conversation/types/ConversationMessageResponse.d.ts +13 -0
- package/api/resources/conversation/types/ConversationMessageResponse.js +4 -0
- package/api/resources/conversation/types/ConversationRequest.d.ts +12 -0
- package/api/resources/conversation/types/ConversationRequest.js +4 -0
- package/api/resources/conversation/types/ConversationResponse.d.ts +12 -0
- package/api/resources/conversation/types/ConversationResponse.js +4 -0
- package/api/resources/conversation/types/FeedbackRequest.d.ts +5 -0
- package/api/resources/conversation/types/FeedbackRequest.js +4 -0
- package/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +8 -0
- package/api/resources/conversation/types/GenerateMavenSuggestionsRequest.js +4 -0
- package/api/resources/conversation/types/ResponseConfig.d.ts +12 -0
- package/api/resources/conversation/types/ResponseConfig.js +4 -0
- package/api/resources/conversation/types/ResponseLength.d.ts +9 -0
- package/api/resources/conversation/types/ResponseLength.js +8 -0
- package/api/resources/conversation/types/Source.d.ts +7 -0
- package/api/resources/conversation/types/Source.js +4 -0
- package/api/resources/conversation/types/StreamResponse.d.ts +19 -0
- package/api/resources/conversation/types/StreamResponse.js +4 -0
- package/api/resources/conversation/types/SubmitActionFormRequest.d.ts +10 -0
- package/api/resources/conversation/types/SubmitActionFormRequest.js +4 -0
- package/api/resources/conversation/types/UserConversationMessageType.d.ts +12 -0
- package/api/resources/conversation/types/UserConversationMessageType.js +8 -0
- package/api/resources/conversation/types/UserMessage.d.ts +8 -0
- package/api/resources/conversation/types/UserMessage.js +4 -0
- package/api/resources/conversation/types/UserMessageBase.d.ts +9 -0
- package/api/resources/conversation/types/UserMessageBase.js +4 -0
- package/api/resources/conversation/types/index.d.ts +31 -0
- package/api/resources/conversation/types/index.js +31 -0
- package/api/resources/index.d.ts +12 -0
- package/api/resources/index.js +12 -0
- package/api/resources/knowledge/client/Client.d.ts +150 -0
- package/api/resources/knowledge/client/Client.js +666 -0
- package/api/resources/knowledge/client/index.d.ts +1 -0
- package/api/resources/knowledge/client/index.js +1 -0
- package/api/resources/knowledge/index.d.ts +2 -0
- package/api/resources/knowledge/index.js +2 -0
- package/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +17 -0
- package/api/resources/knowledge/types/BaseKnowledgeDocument.js +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts +12 -0
- package/api/resources/knowledge/types/KnowledgeBaseProperties.js +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
- package/api/resources/knowledge/types/KnowledgeBaseRequest.js +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
- package/api/resources/knowledge/types/KnowledgeBaseResponse.js +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +12 -0
- package/api/resources/knowledge/types/KnowledgeBaseType.js +8 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +14 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersion.js +4 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionType.d.ts +11 -0
- package/api/resources/knowledge/types/KnowledgeBaseVersionType.js +7 -0
- package/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +11 -0
- package/api/resources/knowledge/types/KnowledgeDocumentContentType.js +7 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +22 -0
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +24 -0
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/api/resources/knowledge/types/index.d.ts +10 -0
- package/api/resources/knowledge/types/index.js +10 -0
- package/api/resources/triggers/client/Client.d.ts +74 -0
- package/api/resources/triggers/client/Client.js +300 -0
- package/api/resources/triggers/client/index.d.ts +1 -0
- package/api/resources/triggers/client/index.js +1 -0
- package/api/resources/triggers/index.d.ts +2 -0
- package/api/resources/triggers/index.js +2 -0
- package/api/resources/triggers/types/EventTriggerBase.d.ts +10 -0
- package/api/resources/triggers/types/EventTriggerBase.js +4 -0
- package/api/resources/triggers/types/EventTriggerRequest.d.ts +18 -0
- package/api/resources/triggers/types/EventTriggerRequest.js +4 -0
- package/api/resources/triggers/types/EventTriggerResponse.d.ts +22 -0
- package/api/resources/triggers/types/EventTriggerResponse.js +4 -0
- package/api/resources/triggers/types/EventTriggerType.d.ts +8 -0
- package/api/resources/triggers/types/EventTriggerType.js +7 -0
- package/api/resources/triggers/types/index.d.ts +4 -0
- package/api/resources/triggers/types/index.js +4 -0
- package/api/resources/users/client/Client.d.ts +64 -0
- package/api/resources/users/client/Client.js +222 -0
- package/api/resources/users/client/index.d.ts +1 -0
- package/api/resources/users/client/index.js +1 -0
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +1 -0
- package/core/auth/BasicAuth.d.ts +8 -0
- package/core/auth/BasicAuth.js +23 -0
- package/core/auth/BearerToken.d.ts +5 -0
- package/core/auth/BearerToken.js +12 -0
- package/core/auth/index.d.ts +2 -0
- package/core/auth/index.js +2 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/APIResponse.js +1 -0
- package/core/fetcher/Fetcher.d.ts +36 -0
- package/core/fetcher/Fetcher.js +236 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +19 -0
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/fetcher/getHeader.js +8 -0
- package/core/fetcher/index.d.ts +5 -0
- package/core/fetcher/index.js +3 -0
- package/core/index.d.ts +5 -0
- package/core/index.js +5 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +1 -0
- package/core/runtime/runtime.d.ts +8 -0
- package/core/runtime/runtime.js +89 -0
- package/core/schemas/Schema.d.ts +81 -0
- package/core/schemas/Schema.js +18 -0
- package/core/schemas/builders/date/date.d.ts +2 -0
- package/core/schemas/builders/date/date.js +59 -0
- package/core/schemas/builders/date/index.d.ts +1 -0
- package/core/schemas/builders/date/index.js +1 -0
- package/core/schemas/builders/enum/enum.d.ts +2 -0
- package/core/schemas/builders/enum/enum.js +35 -0
- package/core/schemas/builders/enum/index.d.ts +1 -0
- package/core/schemas/builders/enum/index.js +1 -0
- package/core/schemas/builders/index.d.ts +13 -0
- package/core/schemas/builders/index.js +13 -0
- package/core/schemas/builders/lazy/index.d.ts +3 -0
- package/core/schemas/builders/lazy/index.js +2 -0
- package/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/core/schemas/builders/lazy/lazy.js +30 -0
- package/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/core/schemas/builders/lazy/lazyObject.js +17 -0
- package/core/schemas/builders/list/index.d.ts +1 -0
- package/core/schemas/builders/list/index.js +1 -0
- package/core/schemas/builders/list/list.d.ts +2 -0
- package/core/schemas/builders/list/list.js +64 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/booleanLiteral.js +25 -0
- package/core/schemas/builders/literals/index.d.ts +2 -0
- package/core/schemas/builders/literals/index.js +2 -0
- package/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/stringLiteral.js +25 -0
- package/core/schemas/builders/object/index.d.ts +6 -0
- package/core/schemas/builders/object/index.js +3 -0
- package/core/schemas/builders/object/object.d.ts +3 -0
- package/core/schemas/builders/object/object.js +249 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +4 -0
- package/core/schemas/builders/object/property.d.ts +8 -0
- package/core/schemas/builders/object/property.js +11 -0
- package/core/schemas/builders/object/types.d.ts +26 -0
- package/core/schemas/builders/object/types.js +1 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +58 -0
- package/core/schemas/builders/object-like/index.d.ts +2 -0
- package/core/schemas/builders/object-like/index.js +1 -0
- package/core/schemas/builders/object-like/types.d.ts +7 -0
- package/core/schemas/builders/object-like/types.js +1 -0
- package/core/schemas/builders/primitives/any.d.ts +1 -0
- package/core/schemas/builders/primitives/any.js +3 -0
- package/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/core/schemas/builders/primitives/boolean.js +22 -0
- package/core/schemas/builders/primitives/index.d.ts +5 -0
- package/core/schemas/builders/primitives/index.js +5 -0
- package/core/schemas/builders/primitives/number.d.ts +1 -0
- package/core/schemas/builders/primitives/number.js +22 -0
- package/core/schemas/builders/primitives/string.d.ts +1 -0
- package/core/schemas/builders/primitives/string.js +22 -0
- package/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/core/schemas/builders/primitives/unknown.js +3 -0
- package/core/schemas/builders/record/index.d.ts +2 -0
- package/core/schemas/builders/record/index.js +1 -0
- package/core/schemas/builders/record/record.d.ts +3 -0
- package/core/schemas/builders/record/record.js +102 -0
- package/core/schemas/builders/record/types.d.ts +4 -0
- package/core/schemas/builders/record/types.js +1 -0
- package/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/JsonError.js +8 -0
- package/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/ParseError.js +8 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +79 -0
- package/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/core/schemas/builders/schema-utils/index.js +3 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +6 -0
- package/core/schemas/builders/set/index.d.ts +1 -0
- package/core/schemas/builders/set/index.js +1 -0
- package/core/schemas/builders/set/set.d.ts +2 -0
- package/core/schemas/builders/set/set.js +49 -0
- package/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/core/schemas/builders/undiscriminated-union/index.js +1 -0
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/core/schemas/builders/undiscriminated-union/types.js +1 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +47 -0
- package/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/core/schemas/builders/union/discriminant.js +6 -0
- package/core/schemas/builders/union/index.d.ts +4 -0
- package/core/schemas/builders/union/index.js +2 -0
- package/core/schemas/builders/union/types.d.ts +13 -0
- package/core/schemas/builders/union/types.js +1 -0
- package/core/schemas/builders/union/union.d.ts +4 -0
- package/core/schemas/builders/union/union.js +137 -0
- package/core/schemas/index.d.ts +2 -0
- package/core/schemas/index.js +1 -0
- package/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/core/schemas/utils/MaybePromise.js +1 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +1 -0
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.js +12 -0
- package/core/schemas/utils/entries.d.ts +1 -0
- package/core/schemas/utils/entries.js +3 -0
- package/core/schemas/utils/filterObject.d.ts +1 -0
- package/core/schemas/utils/filterObject.js +10 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +20 -0
- package/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/core/schemas/utils/isPlainObject.js +14 -0
- package/core/schemas/utils/keys.d.ts +1 -0
- package/core/schemas/utils/keys.js +3 -0
- package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/core/schemas/utils/maybeSkipValidation.js +33 -0
- package/core/schemas/utils/partition.d.ts +1 -0
- package/core/schemas/utils/partition.js +12 -0
- package/core/streaming-fetcher/Stream.d.ts +48 -0
- package/core/streaming-fetcher/Stream.js +165 -0
- package/core/streaming-fetcher/index.d.ts +1 -0
- package/core/streaming-fetcher/index.js +1 -0
- package/dist/Client.d.ts +39 -0
- package/dist/Client.js +33 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/resources/actions/client/Client.d.ts +79 -0
- package/dist/api/resources/actions/client/Client.js +305 -0
- package/dist/api/resources/actions/client/index.d.ts +1 -0
- package/dist/api/resources/actions/client/index.js +1 -0
- package/dist/api/resources/actions/index.d.ts +2 -0
- package/dist/api/resources/actions/index.js +2 -0
- package/dist/api/resources/actions/types/ActionBase.d.ts +18 -0
- package/dist/api/resources/actions/types/ActionBase.js +4 -0
- package/dist/api/resources/actions/types/ActionParameter.d.ts +9 -0
- package/dist/api/resources/actions/types/ActionParameter.js +4 -0
- package/dist/api/resources/actions/types/ActionRequest.d.ts +23 -0
- package/dist/api/resources/actions/types/ActionRequest.js +4 -0
- package/dist/api/resources/actions/types/ActionResponse.d.ts +27 -0
- package/dist/api/resources/actions/types/ActionResponse.js +4 -0
- package/dist/api/resources/actions/types/Preconditions.d.ts +7 -0
- package/dist/api/resources/actions/types/Preconditions.js +4 -0
- package/dist/api/resources/actions/types/index.d.ts +5 -0
- package/dist/api/resources/actions/types/index.js +5 -0
- package/dist/api/resources/commons/errors/BadRequestError.d.ts +8 -0
- package/dist/api/resources/commons/errors/BadRequestError.js +14 -0
- package/dist/api/resources/commons/errors/NotFoundError.d.ts +8 -0
- package/dist/api/resources/commons/errors/NotFoundError.js +14 -0
- package/dist/api/resources/commons/errors/ServerError.d.ts +8 -0
- package/dist/api/resources/commons/errors/ServerError.js +14 -0
- package/dist/api/resources/commons/errors/index.d.ts +3 -0
- package/dist/api/resources/commons/errors/index.js +3 -0
- package/dist/api/resources/commons/index.d.ts +2 -0
- package/dist/api/resources/commons/index.js +2 -0
- package/dist/api/resources/commons/types/AppUser.d.ts +8 -0
- package/dist/api/resources/commons/types/AppUser.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentification.d.ts +8 -0
- package/dist/api/resources/commons/types/AppUserIdentification.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentifier.d.ts +9 -0
- package/dist/api/resources/commons/types/AppUserIdentifier.js +4 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +8 -0
- package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.js +7 -0
- package/dist/api/resources/commons/types/AppUserRequest.d.ts +8 -0
- package/dist/api/resources/commons/types/AppUserRequest.js +4 -0
- package/dist/api/resources/commons/types/AppUserResponse.d.ts +8 -0
- package/dist/api/resources/commons/types/AppUserResponse.js +4 -0
- package/dist/api/resources/commons/types/EntityId.d.ts +14 -0
- package/dist/api/resources/commons/types/EntityId.js +4 -0
- package/dist/api/resources/commons/types/EntityIdBase.d.ts +10 -0
- package/dist/api/resources/commons/types/EntityIdBase.js +4 -0
- package/dist/api/resources/commons/types/EntityType.d.ts +15 -0
- package/dist/api/resources/commons/types/EntityType.js +14 -0
- package/dist/api/resources/commons/types/ErrorMessage.d.ts +6 -0
- package/dist/api/resources/commons/types/ErrorMessage.js +4 -0
- package/dist/api/resources/commons/types/Feedback.d.ts +16 -0
- package/dist/api/resources/commons/types/Feedback.js +4 -0
- package/dist/api/resources/commons/types/FeedbackType.d.ts +13 -0
- package/dist/api/resources/commons/types/FeedbackType.js +9 -0
- package/dist/api/resources/commons/types/User.d.ts +10 -0
- package/dist/api/resources/commons/types/User.js +4 -0
- package/dist/api/resources/commons/types/UserData.d.ts +10 -0
- package/dist/api/resources/commons/types/UserData.js +4 -0
- package/dist/api/resources/commons/types/VisibilityType.d.ts +9 -0
- package/dist/api/resources/commons/types/VisibilityType.js +8 -0
- package/dist/api/resources/commons/types/index.d.ts +15 -0
- package/dist/api/resources/commons/types/index.js +15 -0
- package/dist/api/resources/conversation/client/Client.d.ts +201 -0
- package/dist/api/resources/conversation/client/Client.js +889 -0
- package/dist/api/resources/conversation/client/index.d.ts +1 -0
- package/dist/api/resources/conversation/client/index.js +1 -0
- package/dist/api/resources/conversation/index.d.ts +2 -0
- package/dist/api/resources/conversation/index.js +2 -0
- package/dist/api/resources/conversation/types/ActionFormField.d.ts +10 -0
- package/dist/api/resources/conversation/types/ActionFormField.js +4 -0
- package/dist/api/resources/conversation/types/AskRequest.d.ts +14 -0
- package/dist/api/resources/conversation/types/AskRequest.js +4 -0
- package/dist/api/resources/conversation/types/AskStreamEndEvent.d.ts +7 -0
- package/dist/api/resources/conversation/types/AskStreamEndEvent.js +4 -0
- package/dist/api/resources/conversation/types/AskStreamMetadataEvent.d.ts +6 -0
- package/dist/api/resources/conversation/types/AskStreamMetadataEvent.js +4 -0
- package/dist/api/resources/conversation/types/AskStreamStartEvent.d.ts +7 -0
- package/dist/api/resources/conversation/types/AskStreamStartEvent.js +4 -0
- package/dist/api/resources/conversation/types/AskStreamTextEvent.d.ts +6 -0
- package/dist/api/resources/conversation/types/AskStreamTextEvent.js +4 -0
- package/dist/api/resources/conversation/types/BotActionFormResponse.d.ts +10 -0
- package/dist/api/resources/conversation/types/BotActionFormResponse.js +4 -0
- package/dist/api/resources/conversation/types/BotConversationMessageType.d.ts +9 -0
- package/dist/api/resources/conversation/types/BotConversationMessageType.js +8 -0
- package/dist/api/resources/conversation/types/BotMessage.d.ts +11 -0
- package/dist/api/resources/conversation/types/BotMessage.js +4 -0
- package/dist/api/resources/conversation/types/BotResponse.d.ts +13 -0
- package/dist/api/resources/conversation/types/BotResponse.js +4 -0
- package/dist/api/resources/conversation/types/BotResponseMetadata.d.ts +8 -0
- package/dist/api/resources/conversation/types/BotResponseMetadata.js +4 -0
- package/dist/api/resources/conversation/types/BotTextResponse.d.ts +6 -0
- package/dist/api/resources/conversation/types/BotTextResponse.js +4 -0
- package/dist/api/resources/conversation/types/Capability.d.ts +8 -0
- package/dist/api/resources/conversation/types/Capability.js +7 -0
- package/dist/api/resources/conversation/types/ConversationBase.d.ts +8 -0
- package/dist/api/resources/conversation/types/ConversationBase.js +4 -0
- package/dist/api/resources/conversation/types/ConversationContext.d.ts +20 -0
- package/dist/api/resources/conversation/types/ConversationContext.js +4 -0
- package/dist/api/resources/conversation/types/ConversationMessageBase.d.ts +8 -0
- package/dist/api/resources/conversation/types/ConversationMessageBase.js +4 -0
- package/dist/api/resources/conversation/types/ConversationMessageContext.d.ts +12 -0
- package/dist/api/resources/conversation/types/ConversationMessageContext.js +4 -0
- package/dist/api/resources/conversation/types/ConversationMessageRequest.d.ts +8 -0
- package/dist/api/resources/conversation/types/ConversationMessageRequest.js +4 -0
- package/dist/api/resources/conversation/types/ConversationMessageResponse.d.ts +13 -0
- package/dist/api/resources/conversation/types/ConversationMessageResponse.js +4 -0
- package/dist/api/resources/conversation/types/ConversationRequest.d.ts +12 -0
- package/dist/api/resources/conversation/types/ConversationRequest.js +4 -0
- package/dist/api/resources/conversation/types/ConversationResponse.d.ts +12 -0
- package/dist/api/resources/conversation/types/ConversationResponse.js +4 -0
- package/dist/api/resources/conversation/types/FeedbackRequest.d.ts +5 -0
- package/dist/api/resources/conversation/types/FeedbackRequest.js +4 -0
- package/dist/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +8 -0
- package/dist/api/resources/conversation/types/GenerateMavenSuggestionsRequest.js +4 -0
- package/dist/api/resources/conversation/types/ResponseConfig.d.ts +12 -0
- package/dist/api/resources/conversation/types/ResponseConfig.js +4 -0
- package/dist/api/resources/conversation/types/ResponseLength.d.ts +9 -0
- package/dist/api/resources/conversation/types/ResponseLength.js +8 -0
- package/dist/api/resources/conversation/types/Source.d.ts +7 -0
- package/dist/api/resources/conversation/types/Source.js +4 -0
- package/dist/api/resources/conversation/types/StreamResponse.d.ts +19 -0
- package/dist/api/resources/conversation/types/StreamResponse.js +4 -0
- package/dist/api/resources/conversation/types/SubmitActionFormRequest.d.ts +10 -0
- package/dist/api/resources/conversation/types/SubmitActionFormRequest.js +4 -0
- package/dist/api/resources/conversation/types/UserConversationMessageType.d.ts +12 -0
- package/dist/api/resources/conversation/types/UserConversationMessageType.js +8 -0
- package/dist/api/resources/conversation/types/UserMessage.d.ts +8 -0
- package/dist/api/resources/conversation/types/UserMessage.js +4 -0
- package/dist/api/resources/conversation/types/UserMessageBase.d.ts +9 -0
- package/dist/api/resources/conversation/types/UserMessageBase.js +4 -0
- package/dist/api/resources/conversation/types/index.d.ts +31 -0
- package/dist/api/resources/conversation/types/index.js +31 -0
- package/dist/api/resources/index.d.ts +12 -0
- package/dist/api/resources/index.js +12 -0
- package/dist/api/resources/knowledge/client/Client.d.ts +150 -0
- package/dist/api/resources/knowledge/client/Client.js +666 -0
- package/dist/api/resources/knowledge/client/index.d.ts +1 -0
- package/dist/api/resources/knowledge/client/index.js +1 -0
- package/dist/api/resources/knowledge/index.d.ts +2 -0
- package/dist/api/resources/knowledge/index.js +2 -0
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.d.ts +17 -0
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts +12 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +18 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +22 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.d.ts +12 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.js +8 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.d.ts +14 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersionType.d.ts +11 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersionType.js +7 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +11 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.js +7 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +22 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.js +4 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +24 -0
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.js +4 -0
- package/dist/api/resources/knowledge/types/index.d.ts +10 -0
- package/dist/api/resources/knowledge/types/index.js +10 -0
- package/dist/api/resources/triggers/client/Client.d.ts +74 -0
- package/dist/api/resources/triggers/client/Client.js +300 -0
- package/dist/api/resources/triggers/client/index.d.ts +1 -0
- package/dist/api/resources/triggers/client/index.js +1 -0
- package/dist/api/resources/triggers/index.d.ts +2 -0
- package/dist/api/resources/triggers/index.js +2 -0
- package/dist/api/resources/triggers/types/EventTriggerBase.d.ts +10 -0
- package/dist/api/resources/triggers/types/EventTriggerBase.js +4 -0
- package/dist/api/resources/triggers/types/EventTriggerRequest.d.ts +18 -0
- package/dist/api/resources/triggers/types/EventTriggerRequest.js +4 -0
- package/dist/api/resources/triggers/types/EventTriggerResponse.d.ts +22 -0
- package/dist/api/resources/triggers/types/EventTriggerResponse.js +4 -0
- package/dist/api/resources/triggers/types/EventTriggerType.d.ts +8 -0
- package/dist/api/resources/triggers/types/EventTriggerType.js +7 -0
- package/dist/api/resources/triggers/types/index.d.ts +4 -0
- package/dist/api/resources/triggers/types/index.js +4 -0
- package/dist/api/resources/users/client/Client.d.ts +64 -0
- package/dist/api/resources/users/client/Client.js +222 -0
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +1 -0
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +1 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +23 -0
- package/dist/core/auth/BearerToken.d.ts +5 -0
- package/dist/core/auth/BearerToken.js +12 -0
- package/dist/core/auth/index.d.ts +2 -0
- package/dist/core/auth/index.js +2 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/APIResponse.js +1 -0
- package/dist/core/fetcher/Fetcher.d.ts +36 -0
- package/dist/core/fetcher/Fetcher.js +236 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +19 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +8 -0
- package/dist/core/fetcher/index.d.ts +5 -0
- package/dist/core/fetcher/index.js +3 -0
- package/dist/core/index.d.ts +5 -0
- package/dist/core/index.js +5 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +1 -0
- package/dist/core/runtime/runtime.d.ts +8 -0
- package/dist/core/runtime/runtime.js +89 -0
- package/dist/core/schemas/Schema.d.ts +81 -0
- package/dist/core/schemas/Schema.js +18 -0
- package/dist/core/schemas/builders/date/date.d.ts +2 -0
- package/dist/core/schemas/builders/date/date.js +59 -0
- package/dist/core/schemas/builders/date/index.d.ts +1 -0
- package/dist/core/schemas/builders/date/index.js +1 -0
- package/dist/core/schemas/builders/enum/enum.d.ts +2 -0
- package/dist/core/schemas/builders/enum/enum.js +35 -0
- package/dist/core/schemas/builders/enum/index.d.ts +1 -0
- package/dist/core/schemas/builders/enum/index.js +1 -0
- package/dist/core/schemas/builders/index.d.ts +13 -0
- package/dist/core/schemas/builders/index.js +13 -0
- package/dist/core/schemas/builders/lazy/index.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/index.js +2 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/dist/core/schemas/builders/lazy/lazy.js +30 -0
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/lazyObject.js +17 -0
- package/dist/core/schemas/builders/list/index.d.ts +1 -0
- package/dist/core/schemas/builders/list/index.js +1 -0
- package/dist/core/schemas/builders/list/list.d.ts +2 -0
- package/dist/core/schemas/builders/list/list.js +64 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +25 -0
- package/dist/core/schemas/builders/literals/index.d.ts +2 -0
- package/dist/core/schemas/builders/literals/index.js +2 -0
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/stringLiteral.js +25 -0
- package/dist/core/schemas/builders/object/index.d.ts +6 -0
- package/dist/core/schemas/builders/object/index.js +3 -0
- package/dist/core/schemas/builders/object/object.d.ts +3 -0
- package/dist/core/schemas/builders/object/object.js +249 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +4 -0
- package/dist/core/schemas/builders/object/property.d.ts +8 -0
- package/dist/core/schemas/builders/object/property.js +11 -0
- package/dist/core/schemas/builders/object/types.d.ts +26 -0
- package/dist/core/schemas/builders/object/types.js +1 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +58 -0
- package/dist/core/schemas/builders/object-like/index.d.ts +2 -0
- package/dist/core/schemas/builders/object-like/index.js +1 -0
- package/dist/core/schemas/builders/object-like/types.d.ts +7 -0
- package/dist/core/schemas/builders/object-like/types.js +1 -0
- package/dist/core/schemas/builders/primitives/any.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/any.js +3 -0
- package/dist/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/boolean.js +22 -0
- package/dist/core/schemas/builders/primitives/index.d.ts +5 -0
- package/dist/core/schemas/builders/primitives/index.js +5 -0
- package/dist/core/schemas/builders/primitives/number.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/number.js +22 -0
- package/dist/core/schemas/builders/primitives/string.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/string.js +22 -0
- package/dist/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/unknown.js +3 -0
- package/dist/core/schemas/builders/record/index.d.ts +2 -0
- package/dist/core/schemas/builders/record/index.js +1 -0
- package/dist/core/schemas/builders/record/record.d.ts +3 -0
- package/dist/core/schemas/builders/record/record.js +102 -0
- package/dist/core/schemas/builders/record/types.d.ts +4 -0
- package/dist/core/schemas/builders/record/types.js +1 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.js +8 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.js +8 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +79 -0
- package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/index.js +3 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +6 -0
- package/dist/core/schemas/builders/set/index.d.ts +1 -0
- package/dist/core/schemas/builders/set/index.js +1 -0
- package/dist/core/schemas/builders/set/set.d.ts +2 -0
- package/dist/core/schemas/builders/set/set.js +49 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.js +1 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.js +1 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +47 -0
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/core/schemas/builders/union/discriminant.js +6 -0
- package/dist/core/schemas/builders/union/index.d.ts +4 -0
- package/dist/core/schemas/builders/union/index.js +2 -0
- package/dist/core/schemas/builders/union/types.d.ts +13 -0
- package/dist/core/schemas/builders/union/types.js +1 -0
- package/dist/core/schemas/builders/union/union.d.ts +4 -0
- package/dist/core/schemas/builders/union/union.js +137 -0
- package/dist/core/schemas/index.d.ts +2 -0
- package/dist/core/schemas/index.js +1 -0
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/dist/core/schemas/utils/MaybePromise.js +1 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +1 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +12 -0
- package/dist/core/schemas/utils/entries.d.ts +1 -0
- package/dist/core/schemas/utils/entries.js +3 -0
- package/dist/core/schemas/utils/filterObject.d.ts +1 -0
- package/dist/core/schemas/utils/filterObject.js +10 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +20 -0
- package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/dist/core/schemas/utils/isPlainObject.js +14 -0
- package/dist/core/schemas/utils/keys.d.ts +1 -0
- package/dist/core/schemas/utils/keys.js +3 -0
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +33 -0
- package/dist/core/schemas/utils/partition.d.ts +1 -0
- package/dist/core/schemas/utils/partition.js +12 -0
- package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
- package/dist/core/streaming-fetcher/Stream.js +165 -0
- package/dist/core/streaming-fetcher/index.d.ts +1 -0
- package/dist/core/streaming-fetcher/index.js +1 -0
- package/dist/environments.d.ts +8 -0
- package/dist/environments.js +7 -0
- package/dist/errors/MavenAGIError.d.ts +12 -0
- package/dist/errors/MavenAGIError.js +28 -0
- package/dist/errors/MavenAGITimeoutError.d.ts +6 -0
- package/dist/errors/MavenAGITimeoutError.js +9 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/serialization/index.d.ts +1 -0
- package/dist/serialization/index.js +1 -0
- package/dist/serialization/resources/actions/index.d.ts +1 -0
- package/dist/serialization/resources/actions/index.js +1 -0
- package/dist/serialization/resources/actions/types/ActionBase.d.ts +19 -0
- package/dist/serialization/resources/actions/types/ActionBase.js +14 -0
- package/dist/serialization/resources/actions/types/ActionParameter.d.ts +15 -0
- package/dist/serialization/resources/actions/types/ActionParameter.js +10 -0
- package/dist/serialization/resources/actions/types/ActionRequest.d.ts +14 -0
- package/dist/serialization/resources/actions/types/ActionRequest.js +11 -0
- package/dist/serialization/resources/actions/types/ActionResponse.d.ts +14 -0
- package/dist/serialization/resources/actions/types/ActionResponse.js +11 -0
- package/dist/serialization/resources/actions/types/Preconditions.d.ts +12 -0
- package/dist/serialization/resources/actions/types/Preconditions.js +7 -0
- package/dist/serialization/resources/actions/types/index.d.ts +5 -0
- package/dist/serialization/resources/actions/types/index.js +5 -0
- package/dist/serialization/resources/commons/index.d.ts +1 -0
- package/dist/serialization/resources/commons/index.js +1 -0
- package/dist/serialization/resources/commons/types/AppUser.d.ts +15 -0
- package/dist/serialization/resources/commons/types/AppUser.js +10 -0
- package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +13 -0
- package/dist/serialization/resources/commons/types/AppUserIdentification.js +8 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifier.d.ts +14 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifier.js +9 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +5 -0
- package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +14 -0
- package/dist/serialization/resources/commons/types/AppUserRequest.js +11 -0
- package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +14 -0
- package/dist/serialization/resources/commons/types/AppUserResponse.js +11 -0
- package/dist/serialization/resources/commons/types/EntityId.d.ts +17 -0
- package/dist/serialization/resources/commons/types/EntityId.js +14 -0
- package/dist/serialization/resources/commons/types/EntityIdBase.d.ts +12 -0
- package/dist/serialization/resources/commons/types/EntityIdBase.js +7 -0
- package/dist/serialization/resources/commons/types/EntityType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/EntityType.js +15 -0
- package/dist/serialization/resources/commons/types/ErrorMessage.d.ts +12 -0
- package/dist/serialization/resources/commons/types/ErrorMessage.js +7 -0
- package/dist/serialization/resources/commons/types/Feedback.d.ts +17 -0
- package/dist/serialization/resources/commons/types/Feedback.js +12 -0
- package/dist/serialization/resources/commons/types/FeedbackType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/FeedbackType.js +5 -0
- package/dist/serialization/resources/commons/types/User.d.ts +15 -0
- package/dist/serialization/resources/commons/types/User.js +10 -0
- package/dist/serialization/resources/commons/types/UserData.d.ts +14 -0
- package/dist/serialization/resources/commons/types/UserData.js +9 -0
- package/dist/serialization/resources/commons/types/VisibilityType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/VisibilityType.js +5 -0
- package/dist/serialization/resources/commons/types/index.d.ts +15 -0
- package/dist/serialization/resources/commons/types/index.js +15 -0
- package/dist/serialization/resources/conversation/client/addConversationMetadata.d.ts +13 -0
- package/dist/serialization/resources/conversation/client/addConversationMetadata.js +6 -0
- package/dist/serialization/resources/conversation/client/appendNewMessages.d.ts +11 -0
- package/dist/serialization/resources/conversation/client/appendNewMessages.js +6 -0
- package/dist/serialization/resources/conversation/client/index.d.ts +2 -0
- package/dist/serialization/resources/conversation/client/index.js +2 -0
- package/dist/serialization/resources/conversation/index.d.ts +2 -0
- package/dist/serialization/resources/conversation/index.js +2 -0
- package/dist/serialization/resources/conversation/types/ActionFormField.d.ts +16 -0
- package/dist/serialization/resources/conversation/types/ActionFormField.js +11 -0
- package/dist/serialization/resources/conversation/types/AskRequest.d.ts +18 -0
- package/dist/serialization/resources/conversation/types/AskRequest.js +13 -0
- package/dist/serialization/resources/conversation/types/AskStreamEndEvent.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/AskStreamEndEvent.js +8 -0
- package/dist/serialization/resources/conversation/types/AskStreamMetadataEvent.d.ts +12 -0
- package/dist/serialization/resources/conversation/types/AskStreamMetadataEvent.js +6 -0
- package/dist/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/AskStreamStartEvent.js +8 -0
- package/dist/serialization/resources/conversation/types/AskStreamTextEvent.d.ts +12 -0
- package/dist/serialization/resources/conversation/types/AskStreamTextEvent.js +7 -0
- package/dist/serialization/resources/conversation/types/BotActionFormResponse.d.ts +16 -0
- package/dist/serialization/resources/conversation/types/BotActionFormResponse.js +11 -0
- package/dist/serialization/resources/conversation/types/BotConversationMessageType.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/BotConversationMessageType.js +5 -0
- package/dist/serialization/resources/conversation/types/BotMessage.d.ts +20 -0
- package/dist/serialization/resources/conversation/types/BotMessage.js +17 -0
- package/dist/serialization/resources/conversation/types/BotResponse.d.ts +18 -0
- package/dist/serialization/resources/conversation/types/BotResponse.js +15 -0
- package/dist/serialization/resources/conversation/types/BotResponseMetadata.d.ts +14 -0
- package/dist/serialization/resources/conversation/types/BotResponseMetadata.js +9 -0
- package/dist/serialization/resources/conversation/types/BotTextResponse.d.ts +12 -0
- package/dist/serialization/resources/conversation/types/BotTextResponse.js +7 -0
- package/dist/serialization/resources/conversation/types/Capability.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/Capability.js +5 -0
- package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/ConversationBase.js +8 -0
- package/dist/serialization/resources/conversation/types/ConversationContext.d.ts +20 -0
- package/dist/serialization/resources/conversation/types/ConversationContext.js +15 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageBase.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageBase.js +8 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageContext.d.ts +16 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageContext.js +11 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +14 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.js +11 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageResponse.d.ts +18 -0
- package/dist/serialization/resources/conversation/types/ConversationMessageResponse.js +15 -0
- package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +18 -0
- package/dist/serialization/resources/conversation/types/ConversationRequest.js +15 -0
- package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +18 -0
- package/dist/serialization/resources/conversation/types/ConversationResponse.js +15 -0
- package/dist/serialization/resources/conversation/types/FeedbackRequest.d.ts +11 -0
- package/dist/serialization/resources/conversation/types/FeedbackRequest.js +5 -0
- package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +8 -0
- package/dist/serialization/resources/conversation/types/ResponseConfig.d.ts +16 -0
- package/dist/serialization/resources/conversation/types/ResponseConfig.js +11 -0
- package/dist/serialization/resources/conversation/types/ResponseLength.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/ResponseLength.js +5 -0
- package/dist/serialization/resources/conversation/types/Source.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/Source.js +8 -0
- package/dist/serialization/resources/conversation/types/StreamResponse.d.ts +26 -0
- package/dist/serialization/resources/conversation/types/StreamResponse.js +19 -0
- package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +15 -0
- package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.js +10 -0
- package/dist/serialization/resources/conversation/types/UserConversationMessageType.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/UserConversationMessageType.js +5 -0
- package/dist/serialization/resources/conversation/types/UserMessage.d.ts +14 -0
- package/dist/serialization/resources/conversation/types/UserMessage.js +11 -0
- package/dist/serialization/resources/conversation/types/UserMessageBase.d.ts +15 -0
- package/dist/serialization/resources/conversation/types/UserMessageBase.js +12 -0
- package/dist/serialization/resources/conversation/types/index.d.ts +31 -0
- package/dist/serialization/resources/conversation/types/index.js +31 -0
- package/dist/serialization/resources/index.d.ts +10 -0
- package/dist/serialization/resources/index.js +10 -0
- package/dist/serialization/resources/knowledge/index.d.ts +1 -0
- package/dist/serialization/resources/knowledge/index.js +1 -0
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +17 -0
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +12 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts +15 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.js +10 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.js +5 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +13 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +8 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersionType.d.ts +10 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersionType.js +5 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +10 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +5 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +17 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +14 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +15 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +12 -0
- package/dist/serialization/resources/knowledge/types/index.d.ts +10 -0
- package/dist/serialization/resources/knowledge/types/index.js +10 -0
- package/dist/serialization/resources/triggers/index.d.ts +1 -0
- package/dist/serialization/resources/triggers/index.js +1 -0
- package/dist/serialization/resources/triggers/types/EventTriggerBase.d.ts +14 -0
- package/dist/serialization/resources/triggers/types/EventTriggerBase.js +9 -0
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +14 -0
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +11 -0
- package/dist/serialization/resources/triggers/types/EventTriggerResponse.d.ts +14 -0
- package/dist/serialization/resources/triggers/types/EventTriggerResponse.js +11 -0
- package/dist/serialization/resources/triggers/types/EventTriggerType.d.ts +10 -0
- package/dist/serialization/resources/triggers/types/EventTriggerType.js +5 -0
- package/dist/serialization/resources/triggers/types/index.d.ts +4 -0
- package/dist/serialization/resources/triggers/types/index.js +4 -0
- package/environments.d.ts +8 -0
- package/environments.js +7 -0
- package/errors/MavenAGIError.d.ts +12 -0
- package/errors/MavenAGIError.js +28 -0
- package/errors/MavenAGITimeoutError.d.ts +6 -0
- package/errors/MavenAGITimeoutError.js +9 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +2 -0
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/jest.config.js +5 -0
- package/package.json +34 -0
- package/serialization/index.d.ts +1 -0
- package/serialization/index.js +1 -0
- package/serialization/resources/actions/index.d.ts +1 -0
- package/serialization/resources/actions/index.js +1 -0
- package/serialization/resources/actions/types/ActionBase.d.ts +19 -0
- package/serialization/resources/actions/types/ActionBase.js +14 -0
- package/serialization/resources/actions/types/ActionParameter.d.ts +15 -0
- package/serialization/resources/actions/types/ActionParameter.js +10 -0
- package/serialization/resources/actions/types/ActionRequest.d.ts +14 -0
- package/serialization/resources/actions/types/ActionRequest.js +11 -0
- package/serialization/resources/actions/types/ActionResponse.d.ts +14 -0
- package/serialization/resources/actions/types/ActionResponse.js +11 -0
- package/serialization/resources/actions/types/Preconditions.d.ts +12 -0
- package/serialization/resources/actions/types/Preconditions.js +7 -0
- package/serialization/resources/actions/types/index.d.ts +5 -0
- package/serialization/resources/actions/types/index.js +5 -0
- package/serialization/resources/commons/index.d.ts +1 -0
- package/serialization/resources/commons/index.js +1 -0
- package/serialization/resources/commons/types/AppUser.d.ts +15 -0
- package/serialization/resources/commons/types/AppUser.js +10 -0
- package/serialization/resources/commons/types/AppUserIdentification.d.ts +13 -0
- package/serialization/resources/commons/types/AppUserIdentification.js +8 -0
- package/serialization/resources/commons/types/AppUserIdentifier.d.ts +14 -0
- package/serialization/resources/commons/types/AppUserIdentifier.js +9 -0
- package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +10 -0
- package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +5 -0
- package/serialization/resources/commons/types/AppUserRequest.d.ts +14 -0
- package/serialization/resources/commons/types/AppUserRequest.js +11 -0
- package/serialization/resources/commons/types/AppUserResponse.d.ts +14 -0
- package/serialization/resources/commons/types/AppUserResponse.js +11 -0
- package/serialization/resources/commons/types/EntityId.d.ts +17 -0
- package/serialization/resources/commons/types/EntityId.js +14 -0
- package/serialization/resources/commons/types/EntityIdBase.d.ts +12 -0
- package/serialization/resources/commons/types/EntityIdBase.js +7 -0
- package/serialization/resources/commons/types/EntityType.d.ts +10 -0
- package/serialization/resources/commons/types/EntityType.js +15 -0
- package/serialization/resources/commons/types/ErrorMessage.d.ts +12 -0
- package/serialization/resources/commons/types/ErrorMessage.js +7 -0
- package/serialization/resources/commons/types/Feedback.d.ts +17 -0
- package/serialization/resources/commons/types/Feedback.js +12 -0
- package/serialization/resources/commons/types/FeedbackType.d.ts +10 -0
- package/serialization/resources/commons/types/FeedbackType.js +5 -0
- package/serialization/resources/commons/types/User.d.ts +15 -0
- package/serialization/resources/commons/types/User.js +10 -0
- package/serialization/resources/commons/types/UserData.d.ts +14 -0
- package/serialization/resources/commons/types/UserData.js +9 -0
- package/serialization/resources/commons/types/VisibilityType.d.ts +10 -0
- package/serialization/resources/commons/types/VisibilityType.js +5 -0
- package/serialization/resources/commons/types/index.d.ts +15 -0
- package/serialization/resources/commons/types/index.js +15 -0
- package/serialization/resources/conversation/client/addConversationMetadata.d.ts +13 -0
- package/serialization/resources/conversation/client/addConversationMetadata.js +6 -0
- package/serialization/resources/conversation/client/appendNewMessages.d.ts +11 -0
- package/serialization/resources/conversation/client/appendNewMessages.js +6 -0
- package/serialization/resources/conversation/client/index.d.ts +2 -0
- package/serialization/resources/conversation/client/index.js +2 -0
- package/serialization/resources/conversation/index.d.ts +2 -0
- package/serialization/resources/conversation/index.js +2 -0
- package/serialization/resources/conversation/types/ActionFormField.d.ts +16 -0
- package/serialization/resources/conversation/types/ActionFormField.js +11 -0
- package/serialization/resources/conversation/types/AskRequest.d.ts +18 -0
- package/serialization/resources/conversation/types/AskRequest.js +13 -0
- package/serialization/resources/conversation/types/AskStreamEndEvent.d.ts +13 -0
- package/serialization/resources/conversation/types/AskStreamEndEvent.js +8 -0
- package/serialization/resources/conversation/types/AskStreamMetadataEvent.d.ts +12 -0
- package/serialization/resources/conversation/types/AskStreamMetadataEvent.js +6 -0
- package/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +13 -0
- package/serialization/resources/conversation/types/AskStreamStartEvent.js +8 -0
- package/serialization/resources/conversation/types/AskStreamTextEvent.d.ts +12 -0
- package/serialization/resources/conversation/types/AskStreamTextEvent.js +7 -0
- package/serialization/resources/conversation/types/BotActionFormResponse.d.ts +16 -0
- package/serialization/resources/conversation/types/BotActionFormResponse.js +11 -0
- package/serialization/resources/conversation/types/BotConversationMessageType.d.ts +10 -0
- package/serialization/resources/conversation/types/BotConversationMessageType.js +5 -0
- package/serialization/resources/conversation/types/BotMessage.d.ts +20 -0
- package/serialization/resources/conversation/types/BotMessage.js +17 -0
- package/serialization/resources/conversation/types/BotResponse.d.ts +18 -0
- package/serialization/resources/conversation/types/BotResponse.js +15 -0
- package/serialization/resources/conversation/types/BotResponseMetadata.d.ts +14 -0
- package/serialization/resources/conversation/types/BotResponseMetadata.js +9 -0
- package/serialization/resources/conversation/types/BotTextResponse.d.ts +12 -0
- package/serialization/resources/conversation/types/BotTextResponse.js +7 -0
- package/serialization/resources/conversation/types/Capability.d.ts +10 -0
- package/serialization/resources/conversation/types/Capability.js +5 -0
- package/serialization/resources/conversation/types/ConversationBase.d.ts +13 -0
- package/serialization/resources/conversation/types/ConversationBase.js +8 -0
- package/serialization/resources/conversation/types/ConversationContext.d.ts +20 -0
- package/serialization/resources/conversation/types/ConversationContext.js +15 -0
- package/serialization/resources/conversation/types/ConversationMessageBase.d.ts +13 -0
- package/serialization/resources/conversation/types/ConversationMessageBase.js +8 -0
- package/serialization/resources/conversation/types/ConversationMessageContext.d.ts +16 -0
- package/serialization/resources/conversation/types/ConversationMessageContext.js +11 -0
- package/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +14 -0
- package/serialization/resources/conversation/types/ConversationMessageRequest.js +11 -0
- package/serialization/resources/conversation/types/ConversationMessageResponse.d.ts +18 -0
- package/serialization/resources/conversation/types/ConversationMessageResponse.js +15 -0
- package/serialization/resources/conversation/types/ConversationRequest.d.ts +18 -0
- package/serialization/resources/conversation/types/ConversationRequest.js +15 -0
- package/serialization/resources/conversation/types/ConversationResponse.d.ts +18 -0
- package/serialization/resources/conversation/types/ConversationResponse.js +15 -0
- package/serialization/resources/conversation/types/FeedbackRequest.d.ts +11 -0
- package/serialization/resources/conversation/types/FeedbackRequest.js +5 -0
- package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +13 -0
- package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +8 -0
- package/serialization/resources/conversation/types/ResponseConfig.d.ts +16 -0
- package/serialization/resources/conversation/types/ResponseConfig.js +11 -0
- package/serialization/resources/conversation/types/ResponseLength.d.ts +10 -0
- package/serialization/resources/conversation/types/ResponseLength.js +5 -0
- package/serialization/resources/conversation/types/Source.d.ts +13 -0
- package/serialization/resources/conversation/types/Source.js +8 -0
- package/serialization/resources/conversation/types/StreamResponse.d.ts +26 -0
- package/serialization/resources/conversation/types/StreamResponse.js +19 -0
- package/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +15 -0
- package/serialization/resources/conversation/types/SubmitActionFormRequest.js +10 -0
- package/serialization/resources/conversation/types/UserConversationMessageType.d.ts +10 -0
- package/serialization/resources/conversation/types/UserConversationMessageType.js +5 -0
- package/serialization/resources/conversation/types/UserMessage.d.ts +14 -0
- package/serialization/resources/conversation/types/UserMessage.js +11 -0
- package/serialization/resources/conversation/types/UserMessageBase.d.ts +15 -0
- package/serialization/resources/conversation/types/UserMessageBase.js +12 -0
- package/serialization/resources/conversation/types/index.d.ts +31 -0
- package/serialization/resources/conversation/types/index.js +31 -0
- package/serialization/resources/index.d.ts +10 -0
- package/serialization/resources/index.js +10 -0
- package/serialization/resources/knowledge/index.d.ts +1 -0
- package/serialization/resources/knowledge/index.js +1 -0
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.d.ts +17 -0
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +12 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts +15 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseProperties.js +10 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseRequest.d.ts +14 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +11 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.d.ts +14 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +11 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +10 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseType.js +5 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.d.ts +13 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +8 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionType.d.ts +10 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionType.js +5 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +10 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +5 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.d.ts +17 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +14 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.d.ts +15 -0
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +12 -0
- package/serialization/resources/knowledge/types/index.d.ts +10 -0
- package/serialization/resources/knowledge/types/index.js +10 -0
- package/serialization/resources/triggers/index.d.ts +1 -0
- package/serialization/resources/triggers/index.js +1 -0
- package/serialization/resources/triggers/types/EventTriggerBase.d.ts +14 -0
- package/serialization/resources/triggers/types/EventTriggerBase.js +9 -0
- package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +14 -0
- package/serialization/resources/triggers/types/EventTriggerRequest.js +11 -0
- package/serialization/resources/triggers/types/EventTriggerResponse.d.ts +14 -0
- package/serialization/resources/triggers/types/EventTriggerResponse.js +11 -0
- package/serialization/resources/triggers/types/EventTriggerType.d.ts +10 -0
- package/serialization/resources/triggers/types/EventTriggerType.js +5 -0
- package/serialization/resources/triggers/types/index.d.ts +4 -0
- package/serialization/resources/triggers/types/index.js +4 -0
|
@@ -0,0 +1,889 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../environments";
|
|
14
|
+
import * as core from "../../../../core";
|
|
15
|
+
import * as MavenAGI from "../../../index";
|
|
16
|
+
import * as serializers from "../../../../serialization/index";
|
|
17
|
+
import urlJoin from "url-join";
|
|
18
|
+
import * as errors from "../../../../errors/index";
|
|
19
|
+
export class Conversation {
|
|
20
|
+
constructor(_options) {
|
|
21
|
+
this._options = _options;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Pre-populate a new conversation with messages
|
|
25
|
+
*
|
|
26
|
+
* @param {MavenAGI.ConversationRequest} request
|
|
27
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
30
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
31
|
+
* @throws {@link MavenAGI.ServerError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.conversation.initialize({
|
|
35
|
+
* conversationId: {
|
|
36
|
+
* referenceId: "string"
|
|
37
|
+
* },
|
|
38
|
+
* messages: [{}],
|
|
39
|
+
* context: {},
|
|
40
|
+
* responseConfig: {
|
|
41
|
+
* capabilities: [MavenAGI.Capability.Markdown],
|
|
42
|
+
* isCopilot: true,
|
|
43
|
+
* responseLength: MavenAGI.ResponseLength.Short
|
|
44
|
+
* }
|
|
45
|
+
* })
|
|
46
|
+
*/
|
|
47
|
+
initialize(request, requestOptions) {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
51
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/conversations"),
|
|
52
|
+
method: "POST",
|
|
53
|
+
headers: {
|
|
54
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
55
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
56
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
57
|
+
"X-Fern-Language": "JavaScript",
|
|
58
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
59
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.11",
|
|
60
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
61
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
62
|
+
},
|
|
63
|
+
contentType: "application/json",
|
|
64
|
+
body: yield serializers.ConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
65
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
66
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
67
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
68
|
+
});
|
|
69
|
+
if (_response.ok) {
|
|
70
|
+
return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
|
|
71
|
+
unrecognizedObjectKeys: "passthrough",
|
|
72
|
+
allowUnrecognizedUnionMembers: true,
|
|
73
|
+
allowUnrecognizedEnumValues: true,
|
|
74
|
+
breadcrumbsPrefix: ["response"],
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (_response.error.reason === "status-code") {
|
|
78
|
+
switch (_response.error.statusCode) {
|
|
79
|
+
case 404:
|
|
80
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
81
|
+
unrecognizedObjectKeys: "passthrough",
|
|
82
|
+
allowUnrecognizedUnionMembers: true,
|
|
83
|
+
allowUnrecognizedEnumValues: true,
|
|
84
|
+
breadcrumbsPrefix: ["response"],
|
|
85
|
+
}));
|
|
86
|
+
case 400:
|
|
87
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
88
|
+
unrecognizedObjectKeys: "passthrough",
|
|
89
|
+
allowUnrecognizedUnionMembers: true,
|
|
90
|
+
allowUnrecognizedEnumValues: true,
|
|
91
|
+
breadcrumbsPrefix: ["response"],
|
|
92
|
+
}));
|
|
93
|
+
case 500:
|
|
94
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
95
|
+
unrecognizedObjectKeys: "passthrough",
|
|
96
|
+
allowUnrecognizedUnionMembers: true,
|
|
97
|
+
allowUnrecognizedEnumValues: true,
|
|
98
|
+
breadcrumbsPrefix: ["response"],
|
|
99
|
+
}));
|
|
100
|
+
default:
|
|
101
|
+
throw new errors.MavenAGIError({
|
|
102
|
+
statusCode: _response.error.statusCode,
|
|
103
|
+
body: _response.error.body,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
switch (_response.error.reason) {
|
|
108
|
+
case "non-json":
|
|
109
|
+
throw new errors.MavenAGIError({
|
|
110
|
+
statusCode: _response.error.statusCode,
|
|
111
|
+
body: _response.error.rawBody,
|
|
112
|
+
});
|
|
113
|
+
case "timeout":
|
|
114
|
+
throw new errors.MavenAGITimeoutError();
|
|
115
|
+
case "unknown":
|
|
116
|
+
throw new errors.MavenAGIError({
|
|
117
|
+
message: _response.error.errorMessage,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Get a conversation
|
|
124
|
+
*
|
|
125
|
+
* @param {string} conversationId - The ID of the conversation to get
|
|
126
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
|
+
*
|
|
128
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
129
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
130
|
+
* @throws {@link MavenAGI.ServerError}
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* await client.conversation.get("string")
|
|
134
|
+
*/
|
|
135
|
+
get(conversationId, requestOptions) {
|
|
136
|
+
var _a, _b;
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
139
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}`),
|
|
140
|
+
method: "GET",
|
|
141
|
+
headers: {
|
|
142
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
143
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
144
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
145
|
+
"X-Fern-Language": "JavaScript",
|
|
146
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
147
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.11",
|
|
148
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
149
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
150
|
+
},
|
|
151
|
+
contentType: "application/json",
|
|
152
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
153
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
154
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
155
|
+
});
|
|
156
|
+
if (_response.ok) {
|
|
157
|
+
return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
|
|
158
|
+
unrecognizedObjectKeys: "passthrough",
|
|
159
|
+
allowUnrecognizedUnionMembers: true,
|
|
160
|
+
allowUnrecognizedEnumValues: true,
|
|
161
|
+
breadcrumbsPrefix: ["response"],
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
if (_response.error.reason === "status-code") {
|
|
165
|
+
switch (_response.error.statusCode) {
|
|
166
|
+
case 404:
|
|
167
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
168
|
+
unrecognizedObjectKeys: "passthrough",
|
|
169
|
+
allowUnrecognizedUnionMembers: true,
|
|
170
|
+
allowUnrecognizedEnumValues: true,
|
|
171
|
+
breadcrumbsPrefix: ["response"],
|
|
172
|
+
}));
|
|
173
|
+
case 400:
|
|
174
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
175
|
+
unrecognizedObjectKeys: "passthrough",
|
|
176
|
+
allowUnrecognizedUnionMembers: true,
|
|
177
|
+
allowUnrecognizedEnumValues: true,
|
|
178
|
+
breadcrumbsPrefix: ["response"],
|
|
179
|
+
}));
|
|
180
|
+
case 500:
|
|
181
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
182
|
+
unrecognizedObjectKeys: "passthrough",
|
|
183
|
+
allowUnrecognizedUnionMembers: true,
|
|
184
|
+
allowUnrecognizedEnumValues: true,
|
|
185
|
+
breadcrumbsPrefix: ["response"],
|
|
186
|
+
}));
|
|
187
|
+
default:
|
|
188
|
+
throw new errors.MavenAGIError({
|
|
189
|
+
statusCode: _response.error.statusCode,
|
|
190
|
+
body: _response.error.body,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
switch (_response.error.reason) {
|
|
195
|
+
case "non-json":
|
|
196
|
+
throw new errors.MavenAGIError({
|
|
197
|
+
statusCode: _response.error.statusCode,
|
|
198
|
+
body: _response.error.rawBody,
|
|
199
|
+
});
|
|
200
|
+
case "timeout":
|
|
201
|
+
throw new errors.MavenAGITimeoutError();
|
|
202
|
+
case "unknown":
|
|
203
|
+
throw new errors.MavenAGIError({
|
|
204
|
+
message: _response.error.errorMessage,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Append messages to an existing conversation. The conversation must be initialized first. If a message with the same id already exists, it will be ignored.
|
|
211
|
+
*
|
|
212
|
+
* @param {string} conversationId - The ID of the conversation to append messages to
|
|
213
|
+
* @param {MavenAGI.ConversationMessageRequest[]} request
|
|
214
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
215
|
+
*
|
|
216
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
217
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
218
|
+
* @throws {@link MavenAGI.ServerError}
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* await client.conversation.appendNewMessages("string", [{
|
|
222
|
+
* conversationMessageId: {
|
|
223
|
+
* referenceId: "string"
|
|
224
|
+
* },
|
|
225
|
+
* text: "string",
|
|
226
|
+
* userMessageType: MavenAGI.UserConversationMessageType.User,
|
|
227
|
+
* context: {}
|
|
228
|
+
* }])
|
|
229
|
+
*/
|
|
230
|
+
appendNewMessages(conversationId, request, requestOptions) {
|
|
231
|
+
var _a, _b;
|
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
234
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/messages`),
|
|
235
|
+
method: "POST",
|
|
236
|
+
headers: {
|
|
237
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
238
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
239
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
240
|
+
"X-Fern-Language": "JavaScript",
|
|
241
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
242
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.11",
|
|
243
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
244
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
245
|
+
},
|
|
246
|
+
contentType: "application/json",
|
|
247
|
+
body: yield serializers.conversation.appendNewMessages.Request.jsonOrThrow(request, {
|
|
248
|
+
unrecognizedObjectKeys: "strip",
|
|
249
|
+
}),
|
|
250
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
251
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
252
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
253
|
+
});
|
|
254
|
+
if (_response.ok) {
|
|
255
|
+
return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
|
|
256
|
+
unrecognizedObjectKeys: "passthrough",
|
|
257
|
+
allowUnrecognizedUnionMembers: true,
|
|
258
|
+
allowUnrecognizedEnumValues: true,
|
|
259
|
+
breadcrumbsPrefix: ["response"],
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (_response.error.reason === "status-code") {
|
|
263
|
+
switch (_response.error.statusCode) {
|
|
264
|
+
case 404:
|
|
265
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
266
|
+
unrecognizedObjectKeys: "passthrough",
|
|
267
|
+
allowUnrecognizedUnionMembers: true,
|
|
268
|
+
allowUnrecognizedEnumValues: true,
|
|
269
|
+
breadcrumbsPrefix: ["response"],
|
|
270
|
+
}));
|
|
271
|
+
case 400:
|
|
272
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
273
|
+
unrecognizedObjectKeys: "passthrough",
|
|
274
|
+
allowUnrecognizedUnionMembers: true,
|
|
275
|
+
allowUnrecognizedEnumValues: true,
|
|
276
|
+
breadcrumbsPrefix: ["response"],
|
|
277
|
+
}));
|
|
278
|
+
case 500:
|
|
279
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
280
|
+
unrecognizedObjectKeys: "passthrough",
|
|
281
|
+
allowUnrecognizedUnionMembers: true,
|
|
282
|
+
allowUnrecognizedEnumValues: true,
|
|
283
|
+
breadcrumbsPrefix: ["response"],
|
|
284
|
+
}));
|
|
285
|
+
default:
|
|
286
|
+
throw new errors.MavenAGIError({
|
|
287
|
+
statusCode: _response.error.statusCode,
|
|
288
|
+
body: _response.error.body,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
switch (_response.error.reason) {
|
|
293
|
+
case "non-json":
|
|
294
|
+
throw new errors.MavenAGIError({
|
|
295
|
+
statusCode: _response.error.statusCode,
|
|
296
|
+
body: _response.error.rawBody,
|
|
297
|
+
});
|
|
298
|
+
case "timeout":
|
|
299
|
+
throw new errors.MavenAGITimeoutError();
|
|
300
|
+
case "unknown":
|
|
301
|
+
throw new errors.MavenAGIError({
|
|
302
|
+
message: _response.error.errorMessage,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Ask a question in a conversation
|
|
309
|
+
*
|
|
310
|
+
* @param {string} conversationId - The ID of a new or existing conversation to use as context for the question
|
|
311
|
+
* @param {MavenAGI.AskRequest} request
|
|
312
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
313
|
+
*
|
|
314
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
315
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
316
|
+
* @throws {@link MavenAGI.ServerError}
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* await client.conversation.ask("string", {
|
|
320
|
+
* conversationMessageId: {
|
|
321
|
+
* referenceId: "string"
|
|
322
|
+
* },
|
|
323
|
+
* text: "string",
|
|
324
|
+
* context: {},
|
|
325
|
+
* responseConfig: {}
|
|
326
|
+
* })
|
|
327
|
+
*/
|
|
328
|
+
ask(conversationId, request, requestOptions) {
|
|
329
|
+
var _a, _b;
|
|
330
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
332
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask`),
|
|
333
|
+
method: "POST",
|
|
334
|
+
headers: {
|
|
335
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
336
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
337
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
338
|
+
"X-Fern-Language": "JavaScript",
|
|
339
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
340
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.11",
|
|
341
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
342
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
343
|
+
},
|
|
344
|
+
contentType: "application/json",
|
|
345
|
+
body: yield serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
346
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
347
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
348
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
349
|
+
});
|
|
350
|
+
if (_response.ok) {
|
|
351
|
+
return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
|
|
352
|
+
unrecognizedObjectKeys: "passthrough",
|
|
353
|
+
allowUnrecognizedUnionMembers: true,
|
|
354
|
+
allowUnrecognizedEnumValues: true,
|
|
355
|
+
breadcrumbsPrefix: ["response"],
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
if (_response.error.reason === "status-code") {
|
|
359
|
+
switch (_response.error.statusCode) {
|
|
360
|
+
case 404:
|
|
361
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
362
|
+
unrecognizedObjectKeys: "passthrough",
|
|
363
|
+
allowUnrecognizedUnionMembers: true,
|
|
364
|
+
allowUnrecognizedEnumValues: true,
|
|
365
|
+
breadcrumbsPrefix: ["response"],
|
|
366
|
+
}));
|
|
367
|
+
case 400:
|
|
368
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
369
|
+
unrecognizedObjectKeys: "passthrough",
|
|
370
|
+
allowUnrecognizedUnionMembers: true,
|
|
371
|
+
allowUnrecognizedEnumValues: true,
|
|
372
|
+
breadcrumbsPrefix: ["response"],
|
|
373
|
+
}));
|
|
374
|
+
case 500:
|
|
375
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
376
|
+
unrecognizedObjectKeys: "passthrough",
|
|
377
|
+
allowUnrecognizedUnionMembers: true,
|
|
378
|
+
allowUnrecognizedEnumValues: true,
|
|
379
|
+
breadcrumbsPrefix: ["response"],
|
|
380
|
+
}));
|
|
381
|
+
default:
|
|
382
|
+
throw new errors.MavenAGIError({
|
|
383
|
+
statusCode: _response.error.statusCode,
|
|
384
|
+
body: _response.error.body,
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
switch (_response.error.reason) {
|
|
389
|
+
case "non-json":
|
|
390
|
+
throw new errors.MavenAGIError({
|
|
391
|
+
statusCode: _response.error.statusCode,
|
|
392
|
+
body: _response.error.rawBody,
|
|
393
|
+
});
|
|
394
|
+
case "timeout":
|
|
395
|
+
throw new errors.MavenAGITimeoutError();
|
|
396
|
+
case "unknown":
|
|
397
|
+
throw new errors.MavenAGIError({
|
|
398
|
+
message: _response.error.errorMessage,
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Ask a question
|
|
405
|
+
*/
|
|
406
|
+
askStream(conversationId, request, requestOptions) {
|
|
407
|
+
var _a, _b;
|
|
408
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
409
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
410
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/ask_stream`),
|
|
411
|
+
method: "POST",
|
|
412
|
+
headers: {
|
|
413
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
414
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
415
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
416
|
+
"X-Fern-Language": "JavaScript",
|
|
417
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
418
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.11",
|
|
419
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
420
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
421
|
+
},
|
|
422
|
+
contentType: "application/json",
|
|
423
|
+
body: yield serializers.AskRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
424
|
+
responseType: "streaming",
|
|
425
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
426
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
427
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
428
|
+
});
|
|
429
|
+
if (_response.ok) {
|
|
430
|
+
return new core.Stream({
|
|
431
|
+
stream: _response.body,
|
|
432
|
+
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
433
|
+
return yield serializers.StreamResponse.parseOrThrow(data, {
|
|
434
|
+
unrecognizedObjectKeys: "passthrough",
|
|
435
|
+
allowUnrecognizedUnionMembers: true,
|
|
436
|
+
allowUnrecognizedEnumValues: true,
|
|
437
|
+
breadcrumbsPrefix: ["response"],
|
|
438
|
+
});
|
|
439
|
+
}),
|
|
440
|
+
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
441
|
+
eventShape: {
|
|
442
|
+
type: "sse",
|
|
443
|
+
streamTerminator: "[DONE]",
|
|
444
|
+
},
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
if (_response.error.reason === "status-code") {
|
|
448
|
+
switch (_response.error.statusCode) {
|
|
449
|
+
case 404:
|
|
450
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
451
|
+
unrecognizedObjectKeys: "passthrough",
|
|
452
|
+
allowUnrecognizedUnionMembers: true,
|
|
453
|
+
allowUnrecognizedEnumValues: true,
|
|
454
|
+
breadcrumbsPrefix: ["response"],
|
|
455
|
+
}));
|
|
456
|
+
case 400:
|
|
457
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
458
|
+
unrecognizedObjectKeys: "passthrough",
|
|
459
|
+
allowUnrecognizedUnionMembers: true,
|
|
460
|
+
allowUnrecognizedEnumValues: true,
|
|
461
|
+
breadcrumbsPrefix: ["response"],
|
|
462
|
+
}));
|
|
463
|
+
case 500:
|
|
464
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
465
|
+
unrecognizedObjectKeys: "passthrough",
|
|
466
|
+
allowUnrecognizedUnionMembers: true,
|
|
467
|
+
allowUnrecognizedEnumValues: true,
|
|
468
|
+
breadcrumbsPrefix: ["response"],
|
|
469
|
+
}));
|
|
470
|
+
default:
|
|
471
|
+
throw new errors.MavenAGIError({
|
|
472
|
+
statusCode: _response.error.statusCode,
|
|
473
|
+
body: _response.error.body,
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
switch (_response.error.reason) {
|
|
478
|
+
case "non-json":
|
|
479
|
+
throw new errors.MavenAGIError({
|
|
480
|
+
statusCode: _response.error.statusCode,
|
|
481
|
+
body: _response.error.rawBody,
|
|
482
|
+
});
|
|
483
|
+
case "timeout":
|
|
484
|
+
throw new errors.MavenAGITimeoutError();
|
|
485
|
+
case "unknown":
|
|
486
|
+
throw new errors.MavenAGIError({
|
|
487
|
+
message: _response.error.errorMessage,
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Generate a response suggestion for each requested message id in a conversation
|
|
494
|
+
*
|
|
495
|
+
* @param {string} conversationId - The ID of a conversation the messages belong to
|
|
496
|
+
* @param {MavenAGI.GenerateMavenSuggestionsRequest} request
|
|
497
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
498
|
+
*
|
|
499
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
500
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
501
|
+
* @throws {@link MavenAGI.ServerError}
|
|
502
|
+
*
|
|
503
|
+
* @example
|
|
504
|
+
* await client.conversation.generateMavenSuggestions("string", {
|
|
505
|
+
* conversationMessageIds: [{
|
|
506
|
+
* referenceId: "string"
|
|
507
|
+
* }]
|
|
508
|
+
* })
|
|
509
|
+
*/
|
|
510
|
+
generateMavenSuggestions(conversationId, request, requestOptions) {
|
|
511
|
+
var _a, _b;
|
|
512
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
513
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
514
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/generate_maven_suggestions`),
|
|
515
|
+
method: "POST",
|
|
516
|
+
headers: {
|
|
517
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
518
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
519
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
520
|
+
"X-Fern-Language": "JavaScript",
|
|
521
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
522
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.11",
|
|
523
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
524
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
525
|
+
},
|
|
526
|
+
contentType: "application/json",
|
|
527
|
+
body: yield serializers.GenerateMavenSuggestionsRequest.jsonOrThrow(request, {
|
|
528
|
+
unrecognizedObjectKeys: "strip",
|
|
529
|
+
}),
|
|
530
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
531
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
532
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
533
|
+
});
|
|
534
|
+
if (_response.ok) {
|
|
535
|
+
return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
|
|
536
|
+
unrecognizedObjectKeys: "passthrough",
|
|
537
|
+
allowUnrecognizedUnionMembers: true,
|
|
538
|
+
allowUnrecognizedEnumValues: true,
|
|
539
|
+
breadcrumbsPrefix: ["response"],
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
if (_response.error.reason === "status-code") {
|
|
543
|
+
switch (_response.error.statusCode) {
|
|
544
|
+
case 404:
|
|
545
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
546
|
+
unrecognizedObjectKeys: "passthrough",
|
|
547
|
+
allowUnrecognizedUnionMembers: true,
|
|
548
|
+
allowUnrecognizedEnumValues: true,
|
|
549
|
+
breadcrumbsPrefix: ["response"],
|
|
550
|
+
}));
|
|
551
|
+
case 400:
|
|
552
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
553
|
+
unrecognizedObjectKeys: "passthrough",
|
|
554
|
+
allowUnrecognizedUnionMembers: true,
|
|
555
|
+
allowUnrecognizedEnumValues: true,
|
|
556
|
+
breadcrumbsPrefix: ["response"],
|
|
557
|
+
}));
|
|
558
|
+
case 500:
|
|
559
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
560
|
+
unrecognizedObjectKeys: "passthrough",
|
|
561
|
+
allowUnrecognizedUnionMembers: true,
|
|
562
|
+
allowUnrecognizedEnumValues: true,
|
|
563
|
+
breadcrumbsPrefix: ["response"],
|
|
564
|
+
}));
|
|
565
|
+
default:
|
|
566
|
+
throw new errors.MavenAGIError({
|
|
567
|
+
statusCode: _response.error.statusCode,
|
|
568
|
+
body: _response.error.body,
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
switch (_response.error.reason) {
|
|
573
|
+
case "non-json":
|
|
574
|
+
throw new errors.MavenAGIError({
|
|
575
|
+
statusCode: _response.error.statusCode,
|
|
576
|
+
body: _response.error.rawBody,
|
|
577
|
+
});
|
|
578
|
+
case "timeout":
|
|
579
|
+
throw new errors.MavenAGITimeoutError();
|
|
580
|
+
case "unknown":
|
|
581
|
+
throw new errors.MavenAGIError({
|
|
582
|
+
message: _response.error.errorMessage,
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Create feedback
|
|
589
|
+
*
|
|
590
|
+
* @param {MavenAGI.FeedbackRequest} request
|
|
591
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
592
|
+
*
|
|
593
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
594
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
595
|
+
* @throws {@link MavenAGI.ServerError}
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* await client.conversation.createFeedback({
|
|
599
|
+
* id: "string",
|
|
600
|
+
* conversationId: "string",
|
|
601
|
+
* conversationMessageId: "string",
|
|
602
|
+
* type: MavenAGI.FeedbackType.ThumbsUp,
|
|
603
|
+
* text: "string"
|
|
604
|
+
* })
|
|
605
|
+
*/
|
|
606
|
+
createFeedback(request, requestOptions) {
|
|
607
|
+
var _a, _b;
|
|
608
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
609
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
610
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/conversations/feedback"),
|
|
611
|
+
method: "POST",
|
|
612
|
+
headers: {
|
|
613
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
614
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
615
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
616
|
+
"X-Fern-Language": "JavaScript",
|
|
617
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
618
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.11",
|
|
619
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
620
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
621
|
+
},
|
|
622
|
+
contentType: "application/json",
|
|
623
|
+
body: yield serializers.FeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
624
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
625
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
626
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
627
|
+
});
|
|
628
|
+
if (_response.ok) {
|
|
629
|
+
return;
|
|
630
|
+
}
|
|
631
|
+
if (_response.error.reason === "status-code") {
|
|
632
|
+
switch (_response.error.statusCode) {
|
|
633
|
+
case 404:
|
|
634
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
635
|
+
unrecognizedObjectKeys: "passthrough",
|
|
636
|
+
allowUnrecognizedUnionMembers: true,
|
|
637
|
+
allowUnrecognizedEnumValues: true,
|
|
638
|
+
breadcrumbsPrefix: ["response"],
|
|
639
|
+
}));
|
|
640
|
+
case 400:
|
|
641
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
642
|
+
unrecognizedObjectKeys: "passthrough",
|
|
643
|
+
allowUnrecognizedUnionMembers: true,
|
|
644
|
+
allowUnrecognizedEnumValues: true,
|
|
645
|
+
breadcrumbsPrefix: ["response"],
|
|
646
|
+
}));
|
|
647
|
+
case 500:
|
|
648
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
649
|
+
unrecognizedObjectKeys: "passthrough",
|
|
650
|
+
allowUnrecognizedUnionMembers: true,
|
|
651
|
+
allowUnrecognizedEnumValues: true,
|
|
652
|
+
breadcrumbsPrefix: ["response"],
|
|
653
|
+
}));
|
|
654
|
+
default:
|
|
655
|
+
throw new errors.MavenAGIError({
|
|
656
|
+
statusCode: _response.error.statusCode,
|
|
657
|
+
body: _response.error.body,
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
switch (_response.error.reason) {
|
|
662
|
+
case "non-json":
|
|
663
|
+
throw new errors.MavenAGIError({
|
|
664
|
+
statusCode: _response.error.statusCode,
|
|
665
|
+
body: _response.error.rawBody,
|
|
666
|
+
});
|
|
667
|
+
case "timeout":
|
|
668
|
+
throw new errors.MavenAGITimeoutError();
|
|
669
|
+
case "unknown":
|
|
670
|
+
throw new errors.MavenAGIError({
|
|
671
|
+
message: _response.error.errorMessage,
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Submit a filled out action form
|
|
678
|
+
*
|
|
679
|
+
* @param {string} conversationId - The ID of a conversation the form being submitted belongs to
|
|
680
|
+
* @param {MavenAGI.SubmitActionFormRequest} request
|
|
681
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
682
|
+
*
|
|
683
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
684
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
685
|
+
* @throws {@link MavenAGI.ServerError}
|
|
686
|
+
*
|
|
687
|
+
* @example
|
|
688
|
+
* await client.conversation.submitActionForm("string", {
|
|
689
|
+
* actionFormId: "string",
|
|
690
|
+
* userContext: {
|
|
691
|
+
* name: "string",
|
|
692
|
+
* id: {
|
|
693
|
+
* "string": "string"
|
|
694
|
+
* },
|
|
695
|
+
* email: "string",
|
|
696
|
+
* context: {
|
|
697
|
+
* "string": "string"
|
|
698
|
+
* }
|
|
699
|
+
* },
|
|
700
|
+
* parameters: {
|
|
701
|
+
* "string": {
|
|
702
|
+
* "key": "value"
|
|
703
|
+
* }
|
|
704
|
+
* }
|
|
705
|
+
* })
|
|
706
|
+
*/
|
|
707
|
+
submitActionForm(conversationId, request, requestOptions) {
|
|
708
|
+
var _a, _b;
|
|
709
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
710
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
711
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/submit-form`),
|
|
712
|
+
method: "POST",
|
|
713
|
+
headers: {
|
|
714
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
715
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
716
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
717
|
+
"X-Fern-Language": "JavaScript",
|
|
718
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
719
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.11",
|
|
720
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
721
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
722
|
+
},
|
|
723
|
+
contentType: "application/json",
|
|
724
|
+
body: yield serializers.SubmitActionFormRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
725
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
726
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
727
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
728
|
+
});
|
|
729
|
+
if (_response.ok) {
|
|
730
|
+
return yield serializers.ConversationResponse.parseOrThrow(_response.body, {
|
|
731
|
+
unrecognizedObjectKeys: "passthrough",
|
|
732
|
+
allowUnrecognizedUnionMembers: true,
|
|
733
|
+
allowUnrecognizedEnumValues: true,
|
|
734
|
+
breadcrumbsPrefix: ["response"],
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
if (_response.error.reason === "status-code") {
|
|
738
|
+
switch (_response.error.statusCode) {
|
|
739
|
+
case 404:
|
|
740
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
741
|
+
unrecognizedObjectKeys: "passthrough",
|
|
742
|
+
allowUnrecognizedUnionMembers: true,
|
|
743
|
+
allowUnrecognizedEnumValues: true,
|
|
744
|
+
breadcrumbsPrefix: ["response"],
|
|
745
|
+
}));
|
|
746
|
+
case 400:
|
|
747
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
748
|
+
unrecognizedObjectKeys: "passthrough",
|
|
749
|
+
allowUnrecognizedUnionMembers: true,
|
|
750
|
+
allowUnrecognizedEnumValues: true,
|
|
751
|
+
breadcrumbsPrefix: ["response"],
|
|
752
|
+
}));
|
|
753
|
+
case 500:
|
|
754
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
755
|
+
unrecognizedObjectKeys: "passthrough",
|
|
756
|
+
allowUnrecognizedUnionMembers: true,
|
|
757
|
+
allowUnrecognizedEnumValues: true,
|
|
758
|
+
breadcrumbsPrefix: ["response"],
|
|
759
|
+
}));
|
|
760
|
+
default:
|
|
761
|
+
throw new errors.MavenAGIError({
|
|
762
|
+
statusCode: _response.error.statusCode,
|
|
763
|
+
body: _response.error.body,
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
switch (_response.error.reason) {
|
|
768
|
+
case "non-json":
|
|
769
|
+
throw new errors.MavenAGIError({
|
|
770
|
+
statusCode: _response.error.statusCode,
|
|
771
|
+
body: _response.error.rawBody,
|
|
772
|
+
});
|
|
773
|
+
case "timeout":
|
|
774
|
+
throw new errors.MavenAGITimeoutError();
|
|
775
|
+
case "unknown":
|
|
776
|
+
throw new errors.MavenAGIError({
|
|
777
|
+
message: _response.error.errorMessage,
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Add metadata to an existing conversation's Context. If a metadata field already exists, it will be overwritten.
|
|
784
|
+
*
|
|
785
|
+
* @param {string} conversationId - The ID of a conversation the metadata being added belongs to
|
|
786
|
+
* @param {Record<string, string>} request
|
|
787
|
+
* @param {Conversation.RequestOptions} requestOptions - Request-specific configuration.
|
|
788
|
+
*
|
|
789
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
790
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
791
|
+
* @throws {@link MavenAGI.ServerError}
|
|
792
|
+
*
|
|
793
|
+
* @example
|
|
794
|
+
* await client.conversation.addConversationMetadata("string", {
|
|
795
|
+
* "string": "string"
|
|
796
|
+
* })
|
|
797
|
+
*/
|
|
798
|
+
addConversationMetadata(conversationId, request, requestOptions) {
|
|
799
|
+
var _a, _b;
|
|
800
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
801
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
802
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, `/v1/conversations/${encodeURIComponent(conversationId)}/metadata`),
|
|
803
|
+
method: "POST",
|
|
804
|
+
headers: {
|
|
805
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
806
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
807
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
808
|
+
"X-Fern-Language": "JavaScript",
|
|
809
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
810
|
+
"X-Fern-SDK-Version": "0.0.0-alpha.11",
|
|
811
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
812
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
813
|
+
},
|
|
814
|
+
contentType: "application/json",
|
|
815
|
+
body: yield serializers.conversation.addConversationMetadata.Request.jsonOrThrow(request, {
|
|
816
|
+
unrecognizedObjectKeys: "strip",
|
|
817
|
+
}),
|
|
818
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
819
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
820
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
821
|
+
});
|
|
822
|
+
if (_response.ok) {
|
|
823
|
+
return yield serializers.conversation.addConversationMetadata.Response.parseOrThrow(_response.body, {
|
|
824
|
+
unrecognizedObjectKeys: "passthrough",
|
|
825
|
+
allowUnrecognizedUnionMembers: true,
|
|
826
|
+
allowUnrecognizedEnumValues: true,
|
|
827
|
+
breadcrumbsPrefix: ["response"],
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
if (_response.error.reason === "status-code") {
|
|
831
|
+
switch (_response.error.statusCode) {
|
|
832
|
+
case 404:
|
|
833
|
+
throw new MavenAGI.NotFoundError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
834
|
+
unrecognizedObjectKeys: "passthrough",
|
|
835
|
+
allowUnrecognizedUnionMembers: true,
|
|
836
|
+
allowUnrecognizedEnumValues: true,
|
|
837
|
+
breadcrumbsPrefix: ["response"],
|
|
838
|
+
}));
|
|
839
|
+
case 400:
|
|
840
|
+
throw new MavenAGI.BadRequestError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
841
|
+
unrecognizedObjectKeys: "passthrough",
|
|
842
|
+
allowUnrecognizedUnionMembers: true,
|
|
843
|
+
allowUnrecognizedEnumValues: true,
|
|
844
|
+
breadcrumbsPrefix: ["response"],
|
|
845
|
+
}));
|
|
846
|
+
case 500:
|
|
847
|
+
throw new MavenAGI.ServerError(yield serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
848
|
+
unrecognizedObjectKeys: "passthrough",
|
|
849
|
+
allowUnrecognizedUnionMembers: true,
|
|
850
|
+
allowUnrecognizedEnumValues: true,
|
|
851
|
+
breadcrumbsPrefix: ["response"],
|
|
852
|
+
}));
|
|
853
|
+
default:
|
|
854
|
+
throw new errors.MavenAGIError({
|
|
855
|
+
statusCode: _response.error.statusCode,
|
|
856
|
+
body: _response.error.body,
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
switch (_response.error.reason) {
|
|
861
|
+
case "non-json":
|
|
862
|
+
throw new errors.MavenAGIError({
|
|
863
|
+
statusCode: _response.error.statusCode,
|
|
864
|
+
body: _response.error.rawBody,
|
|
865
|
+
});
|
|
866
|
+
case "timeout":
|
|
867
|
+
throw new errors.MavenAGITimeoutError();
|
|
868
|
+
case "unknown":
|
|
869
|
+
throw new errors.MavenAGIError({
|
|
870
|
+
message: _response.error.errorMessage,
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
_getAuthorizationHeader() {
|
|
876
|
+
var _a, _b;
|
|
877
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
878
|
+
const appId = (_a = (yield core.Supplier.get(this._options.appId))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_ID"];
|
|
879
|
+
const appSecret = (_b = (yield core.Supplier.get(this._options.appSecret))) !== null && _b !== void 0 ? _b : process === null || process === void 0 ? void 0 : process.env["MAVENAGI_APP_SECRET"];
|
|
880
|
+
if (appId != null && appSecret != null) {
|
|
881
|
+
return core.BasicAuth.toAuthorizationHeader({
|
|
882
|
+
username: appId,
|
|
883
|
+
password: appSecret,
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
return undefined;
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
}
|