mavenagi 0.0.0-alpha.8 → 1.0.0
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 +15 -0
- package/Client.js +10 -0
- package/README.md +81 -22
- package/api/resources/actions/client/Client.d.ts +21 -4
- package/api/resources/actions/client/Client.js +33 -19
- package/api/resources/actions/types/ActionBase.d.ts +2 -2
- package/api/resources/actions/types/ActionRequest.d.ts +12 -4
- package/api/resources/actions/types/ActionResponse.d.ts +12 -4
- package/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +10 -0
- package/api/resources/actions/types/ConversationPrecondition.d.ts +16 -0
- package/api/resources/actions/types/MetadataPrecondition.d.ts +10 -0
- package/api/resources/actions/types/Precondition.d.ts +31 -0
- package/api/resources/actions/types/PreconditionBase.d.ts +8 -0
- package/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
- package/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
- package/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
- package/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
- package/api/resources/actions/types/PreconditionOperator.js +6 -0
- package/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
- package/api/resources/actions/types/index.d.ts +9 -1
- package/api/resources/actions/types/index.js +9 -1
- package/api/resources/appSettings/client/Client.d.ts +47 -0
- package/api/resources/appSettings/client/Client.js +125 -0
- package/api/resources/appSettings/client/index.d.ts +1 -0
- package/api/resources/appSettings/client/index.js +1 -0
- package/api/resources/appSettings/index.d.ts +1 -0
- package/api/resources/appSettings/index.js +1 -0
- package/api/resources/commons/types/AppUser.d.ts +3 -4
- package/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
- package/api/resources/commons/types/AppUserRequest.d.ts +22 -1
- package/api/resources/commons/types/AppUserResponse.d.ts +38 -1
- package/api/resources/commons/types/EntityType.d.ts +3 -1
- package/api/resources/commons/types/EntityType.js +2 -0
- package/api/resources/commons/types/Feedback.d.ts +32 -8
- package/api/resources/commons/types/FeedbackBase.d.ts +10 -0
- package/api/resources/commons/types/UserData.d.ts +10 -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 +6 -2
- package/api/resources/commons/types/index.js +6 -2
- package/api/resources/conversation/client/Client.d.ts +82 -36
- package/api/resources/conversation/client/Client.js +230 -91
- package/api/resources/conversation/client/index.d.ts +1 -1
- package/api/resources/conversation/client/index.js +1 -1
- package/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +15 -0
- package/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/api/resources/conversation/client/requests/index.js +1 -0
- package/api/resources/conversation/types/ActionFormField.d.ts +1 -0
- package/api/resources/conversation/types/AskRequest.d.ts +21 -5
- package/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
- package/api/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
- package/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
- package/api/resources/conversation/types/Attachment.d.ts +9 -0
- package/api/resources/conversation/types/BotChartResponse.d.ts +11 -0
- package/api/resources/conversation/types/BotChartResponse.js +4 -0
- package/api/resources/conversation/types/BotMessage.d.ts +2 -0
- package/api/resources/conversation/types/BotResponse.d.ts +4 -1
- package/api/resources/conversation/types/BotResponseMetadata.d.ts +2 -0
- package/api/resources/conversation/types/Capability.d.ts +15 -1
- package/api/resources/conversation/types/Capability.js +2 -0
- package/api/resources/conversation/types/CategorizationResponse.d.ts +6 -0
- package/api/resources/conversation/types/CategorizationResponse.js +4 -0
- package/api/resources/conversation/types/ChartSpecSchema.d.ts +7 -0
- package/api/resources/conversation/types/ChartSpecSchema.js +6 -0
- package/api/resources/conversation/types/ConversationAnalysis.d.ts +16 -0
- package/api/resources/conversation/types/ConversationAnalysis.js +4 -0
- package/api/resources/conversation/types/ConversationBase.d.ts +12 -2
- package/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -5
- package/api/resources/conversation/types/ConversationMessageRequest.d.ts +3 -1
- package/api/resources/conversation/types/ConversationRequest.d.ts +2 -2
- package/api/resources/conversation/types/ConversationResponse.d.ts +53 -2
- package/api/resources/conversation/types/FeedbackRequest.d.ts +24 -1
- package/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
- package/api/resources/conversation/types/ResponseConfig.d.ts +4 -4
- package/api/resources/conversation/types/Sentiment.d.ts +14 -0
- package/api/resources/conversation/types/Sentiment.js +10 -0
- package/api/resources/conversation/types/StreamResponse.d.ts +4 -1
- package/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
- package/api/resources/conversation/types/UserMessage.d.ts +5 -4
- package/api/resources/conversation/types/UserMessageBase.d.ts +11 -0
- package/api/resources/conversation/types/UserMessageBase.js +4 -0
- package/api/resources/conversation/types/index.d.ts +8 -2
- package/api/resources/conversation/types/index.js +8 -2
- package/api/resources/index.d.ts +4 -0
- package/api/resources/index.js +4 -0
- package/api/resources/knowledge/client/Client.d.ts +13 -4
- package/api/resources/knowledge/client/Client.js +55 -41
- package/api/resources/translations/client/Client.d.ts +52 -0
- package/api/resources/translations/client/Client.js +130 -0
- package/api/resources/translations/client/index.d.ts +1 -0
- package/api/resources/translations/client/index.js +1 -0
- package/api/resources/translations/index.d.ts +2 -0
- package/api/resources/translations/index.js +2 -0
- package/api/resources/translations/types/TranslationRequest.d.ts +16 -0
- package/api/resources/translations/types/TranslationRequest.js +4 -0
- package/api/resources/translations/types/TranslationResponse.d.ts +13 -0
- package/api/resources/translations/types/TranslationResponse.js +4 -0
- package/api/resources/translations/types/index.d.ts +2 -0
- package/api/resources/translations/types/index.js +2 -0
- package/api/resources/triggers/client/Client.d.ts +11 -2
- package/api/resources/triggers/client/Client.js +23 -17
- package/api/resources/triggers/types/index.d.ts +0 -3
- package/api/resources/triggers/types/index.js +0 -3
- package/api/resources/users/client/Client.d.ts +27 -12
- package/api/resources/users/client/Client.js +33 -23
- package/core/fetcher/Fetcher.d.ts +4 -1
- package/core/fetcher/Fetcher.js +18 -159
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +6 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +32 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +19 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +48 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +38 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +28 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +32 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +243 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +120 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +225 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
- package/core/runtime/runtime.d.ts +1 -0
- package/core/runtime/runtime.js +1 -0
- package/core/schemas/Schema.d.ts +8 -4
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +46 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +1 -0
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +8 -19
- package/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/core/schemas/builders/list/list.js +31 -44
- package/core/schemas/builders/object/object.js +90 -111
- package/core/schemas/builders/object/types.d.ts +2 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/core/schemas/builders/record/record.js +49 -60
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/core/schemas/builders/set/set.js +6 -15
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/core/schemas/builders/union/union.js +51 -62
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/Client.d.ts +15 -0
- package/dist/Client.js +10 -0
- package/dist/api/resources/actions/client/Client.d.ts +21 -4
- package/dist/api/resources/actions/client/Client.js +33 -19
- package/dist/api/resources/actions/types/ActionBase.d.ts +2 -2
- package/dist/api/resources/actions/types/ActionRequest.d.ts +12 -4
- package/dist/api/resources/actions/types/ActionResponse.d.ts +12 -4
- package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +10 -0
- package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.js +4 -0
- package/dist/api/resources/actions/types/ConversationPrecondition.d.ts +16 -0
- package/dist/api/resources/actions/types/ConversationPrecondition.js +4 -0
- package/dist/api/resources/actions/types/MetadataPrecondition.d.ts +10 -0
- package/dist/api/resources/actions/types/MetadataPrecondition.js +4 -0
- package/dist/api/resources/actions/types/Precondition.d.ts +31 -0
- package/dist/api/resources/actions/types/Precondition.js +4 -0
- package/dist/api/resources/actions/types/PreconditionBase.d.ts +8 -0
- package/dist/api/resources/actions/types/PreconditionBase.js +4 -0
- package/dist/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
- package/dist/api/resources/actions/types/PreconditionGroup.js +4 -0
- package/dist/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
- package/dist/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
- package/dist/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
- package/dist/api/resources/actions/types/PreconditionOperator.js +6 -0
- package/dist/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
- package/dist/api/resources/actions/types/TagsPrecondition.js +4 -0
- package/dist/api/resources/actions/types/index.d.ts +9 -1
- package/dist/api/resources/actions/types/index.js +9 -1
- package/dist/api/resources/appSettings/client/Client.d.ts +47 -0
- package/dist/api/resources/appSettings/client/Client.js +125 -0
- package/dist/api/resources/appSettings/client/index.d.ts +1 -0
- package/dist/api/resources/appSettings/client/index.js +1 -0
- package/dist/api/resources/appSettings/index.d.ts +1 -0
- package/dist/api/resources/appSettings/index.js +1 -0
- package/dist/api/resources/commons/types/AppUser.d.ts +3 -4
- package/dist/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
- package/dist/api/resources/commons/types/AppUserRequest.d.ts +22 -1
- package/dist/api/resources/commons/types/AppUserResponse.d.ts +38 -1
- package/dist/api/resources/commons/types/EntityType.d.ts +3 -1
- package/dist/api/resources/commons/types/EntityType.js +2 -0
- package/dist/api/resources/commons/types/EventTriggerBase.js +4 -0
- package/dist/api/resources/commons/types/EventTriggerResponse.js +4 -0
- package/dist/api/resources/commons/types/Feedback.d.ts +32 -8
- package/dist/api/resources/commons/types/FeedbackBase.d.ts +10 -0
- package/dist/api/resources/commons/types/FeedbackBase.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 +6 -2
- package/dist/api/resources/commons/types/index.js +6 -2
- package/dist/api/resources/conversation/client/Client.d.ts +82 -36
- package/dist/api/resources/conversation/client/Client.js +230 -91
- package/dist/api/resources/conversation/client/index.d.ts +1 -1
- package/dist/api/resources/conversation/client/index.js +1 -1
- package/dist/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +15 -0
- package/dist/api/resources/conversation/client/requests/ConversationGetRequest.js +4 -0
- package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
- package/dist/api/resources/conversation/client/requests/index.js +1 -0
- package/dist/api/resources/conversation/types/ActionFormField.d.ts +1 -0
- package/dist/api/resources/conversation/types/AskRequest.d.ts +21 -5
- package/dist/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
- package/dist/api/resources/conversation/types/AskStreamActionEvent.js +4 -0
- package/dist/api/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
- package/dist/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
- package/dist/api/resources/conversation/types/Attachment.d.ts +9 -0
- package/dist/api/resources/conversation/types/Attachment.js +4 -0
- package/dist/api/resources/conversation/types/BotChartResponse.d.ts +11 -0
- package/dist/api/resources/conversation/types/BotChartResponse.js +4 -0
- package/dist/api/resources/conversation/types/BotMessage.d.ts +2 -0
- package/dist/api/resources/conversation/types/BotResponse.d.ts +4 -1
- package/dist/api/resources/conversation/types/BotResponseMetadata.d.ts +2 -0
- package/dist/api/resources/conversation/types/Capability.d.ts +15 -1
- package/dist/api/resources/conversation/types/Capability.js +2 -0
- package/dist/api/resources/conversation/types/CategorizationResponse.d.ts +6 -0
- package/dist/api/resources/conversation/types/CategorizationResponse.js +4 -0
- package/dist/api/resources/conversation/types/ChartSpecSchema.d.ts +7 -0
- package/dist/api/resources/conversation/types/ChartSpecSchema.js +6 -0
- package/dist/api/resources/conversation/types/ConversationAnalysis.d.ts +16 -0
- package/dist/api/resources/conversation/types/ConversationAnalysis.js +4 -0
- package/dist/api/resources/conversation/types/ConversationBase.d.ts +12 -2
- package/dist/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -5
- package/dist/api/resources/conversation/types/ConversationMessageRequest.d.ts +3 -1
- package/dist/api/resources/conversation/types/ConversationRequest.d.ts +2 -2
- package/dist/api/resources/conversation/types/ConversationResponse.d.ts +53 -2
- package/dist/api/resources/conversation/types/FeedbackRequest.d.ts +24 -1
- package/dist/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
- package/dist/api/resources/conversation/types/ResponseConfig.d.ts +4 -4
- package/dist/api/resources/conversation/types/Sentiment.d.ts +14 -0
- package/dist/api/resources/conversation/types/Sentiment.js +10 -0
- package/dist/api/resources/conversation/types/StreamResponse.d.ts +4 -1
- package/dist/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
- package/dist/api/resources/conversation/types/UserMessage.d.ts +5 -4
- package/dist/api/resources/conversation/types/UserMessageBase.d.ts +11 -0
- package/dist/api/resources/conversation/types/UserMessageBase.js +4 -0
- package/dist/api/resources/conversation/types/index.d.ts +8 -2
- package/dist/api/resources/conversation/types/index.js +8 -2
- package/dist/api/resources/index.d.ts +4 -0
- package/dist/api/resources/index.js +4 -0
- package/dist/api/resources/knowledge/client/Client.d.ts +13 -4
- package/dist/api/resources/knowledge/client/Client.js +55 -41
- package/dist/api/resources/translations/client/Client.d.ts +52 -0
- package/dist/api/resources/translations/client/Client.js +130 -0
- package/dist/api/resources/translations/client/index.d.ts +1 -0
- package/dist/api/resources/translations/client/index.js +1 -0
- package/dist/api/resources/translations/index.d.ts +2 -0
- package/dist/api/resources/translations/index.js +2 -0
- package/dist/api/resources/translations/types/TranslationRequest.d.ts +16 -0
- package/dist/api/resources/translations/types/TranslationRequest.js +4 -0
- package/dist/api/resources/translations/types/TranslationResponse.d.ts +13 -0
- package/dist/api/resources/translations/types/TranslationResponse.js +4 -0
- package/dist/api/resources/translations/types/index.d.ts +2 -0
- package/dist/api/resources/translations/types/index.js +2 -0
- package/dist/api/resources/triggers/client/Client.d.ts +11 -2
- package/dist/api/resources/triggers/client/Client.js +23 -17
- package/dist/api/resources/triggers/types/index.d.ts +0 -3
- package/dist/api/resources/triggers/types/index.js +0 -3
- package/dist/api/resources/users/client/Client.d.ts +27 -12
- package/dist/api/resources/users/client/Client.js +33 -23
- package/dist/core/fetcher/Fetcher.d.ts +4 -1
- package/dist/core/fetcher/Fetcher.js +18 -159
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +6 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +32 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +19 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +48 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +38 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +28 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +32 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +243 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +120 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +225 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
- package/dist/core/runtime/runtime.d.ts +1 -0
- package/dist/core/runtime/runtime.js +1 -0
- package/dist/core/schemas/Schema.d.ts +8 -4
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +46 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +1 -0
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +8 -19
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/dist/core/schemas/builders/list/list.js +31 -44
- package/dist/core/schemas/builders/object/object.js +90 -111
- package/dist/core/schemas/builders/object/types.d.ts +2 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/dist/core/schemas/builders/record/record.js +49 -60
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/dist/core/schemas/builders/set/set.js +6 -15
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/dist/core/schemas/builders/union/union.js +51 -62
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/serialization/resources/actions/types/ActionBase.d.ts +1 -2
- package/dist/serialization/resources/actions/types/ActionBase.js +2 -2
- package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +14 -0
- package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +11 -0
- package/dist/serialization/resources/actions/types/ConversationPrecondition.d.ts +22 -0
- package/dist/serialization/resources/actions/types/ConversationPrecondition.js +17 -0
- package/dist/serialization/resources/actions/types/MetadataPrecondition.d.ts +14 -0
- package/dist/serialization/resources/actions/types/MetadataPrecondition.js +11 -0
- package/dist/serialization/resources/actions/types/Precondition.d.ts +22 -0
- package/dist/serialization/resources/actions/types/Precondition.js +19 -0
- package/dist/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
- package/dist/serialization/resources/actions/types/PreconditionBase.js +8 -0
- package/dist/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
- package/dist/serialization/resources/actions/types/PreconditionGroup.js +10 -0
- package/dist/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
- package/dist/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
- package/dist/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
- package/dist/serialization/resources/actions/types/PreconditionOperator.js +5 -0
- package/dist/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
- package/dist/serialization/resources/actions/types/TagsPrecondition.js +10 -0
- package/dist/serialization/resources/actions/types/index.d.ts +9 -1
- package/dist/serialization/resources/actions/types/index.js +9 -1
- package/dist/serialization/resources/appSettings/client/get.d.ts +9 -0
- package/dist/serialization/resources/appSettings/client/get.js +5 -0
- package/dist/serialization/resources/appSettings/client/index.d.ts +1 -0
- package/dist/serialization/resources/appSettings/client/index.js +1 -0
- package/dist/serialization/resources/appSettings/index.d.ts +1 -0
- package/dist/serialization/resources/appSettings/index.js +1 -0
- package/dist/serialization/resources/commons/types/AppUser.d.ts +4 -4
- package/dist/serialization/resources/commons/types/AppUser.js +4 -4
- package/dist/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
- package/dist/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
- package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +4 -1
- package/dist/serialization/resources/commons/types/AppUserRequest.js +7 -1
- package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +6 -1
- package/dist/serialization/resources/commons/types/AppUserResponse.js +9 -1
- package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/dist/serialization/resources/commons/types/EntityType.js +2 -0
- package/dist/serialization/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +1 -1
- package/dist/serialization/resources/{triggers → commons}/types/EventTriggerResponse.js +1 -1
- package/dist/serialization/resources/commons/types/Feedback.d.ts +6 -7
- package/dist/serialization/resources/commons/types/Feedback.js +9 -8
- package/dist/serialization/resources/commons/types/FeedbackBase.d.ts +14 -0
- package/dist/serialization/resources/commons/types/FeedbackBase.js +9 -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 +6 -2
- package/dist/serialization/resources/commons/types/index.js +6 -2
- package/dist/serialization/resources/conversation/types/ActionFormField.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/ActionFormField.js +1 -0
- package/dist/serialization/resources/conversation/types/AskRequest.d.ts +5 -5
- package/dist/serialization/resources/conversation/types/AskRequest.js +5 -5
- package/dist/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
- package/dist/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
- package/dist/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
- package/dist/serialization/resources/conversation/types/AskStreamStartEvent.js +2 -1
- package/dist/serialization/resources/{actions/types/Preconditions.d.ts → conversation/types/Attachment.d.ts} +4 -3
- package/dist/serialization/resources/conversation/types/Attachment.js +8 -0
- package/dist/serialization/resources/conversation/types/BotChartResponse.d.ts +15 -0
- package/dist/serialization/resources/conversation/types/BotChartResponse.js +10 -0
- package/dist/serialization/resources/conversation/types/BotMessage.d.ts +2 -0
- package/dist/serialization/resources/conversation/types/BotMessage.js +2 -0
- package/dist/serialization/resources/conversation/types/BotResponse.d.ts +5 -1
- package/dist/serialization/resources/conversation/types/BotResponse.js +2 -0
- package/dist/serialization/resources/conversation/types/BotResponseMetadata.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/BotResponseMetadata.js +1 -0
- package/dist/serialization/resources/conversation/types/Capability.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/Capability.js +1 -1
- package/dist/serialization/resources/conversation/types/CategorizationResponse.d.ts +12 -0
- package/dist/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
- package/dist/serialization/resources/conversation/types/ChartSpecSchema.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/ChartSpecSchema.js +5 -0
- package/dist/serialization/resources/conversation/types/ConversationAnalysis.d.ts +17 -0
- package/dist/serialization/resources/conversation/types/ConversationAnalysis.js +12 -0
- package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +6 -1
- package/dist/serialization/resources/conversation/types/ConversationBase.js +6 -1
- package/dist/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -3
- package/dist/serialization/resources/conversation/types/ConversationMessageBase.js +2 -3
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +4 -2
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.js +7 -2
- package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -2
- package/dist/serialization/resources/conversation/types/ConversationRequest.js +2 -2
- package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +4 -2
- package/dist/serialization/resources/conversation/types/ConversationResponse.js +4 -2
- package/dist/serialization/resources/conversation/types/FeedbackRequest.d.ts +7 -2
- package/dist/serialization/resources/conversation/types/FeedbackRequest.js +10 -2
- package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
- package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
- package/dist/serialization/resources/conversation/types/ResponseConfig.d.ts +3 -3
- package/dist/serialization/resources/conversation/types/ResponseConfig.js +3 -3
- package/dist/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
- package/dist/serialization/resources/conversation/types/Sentiment.js +5 -0
- package/dist/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
- package/dist/serialization/resources/conversation/types/StreamResponse.js +2 -0
- package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
- package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
- package/dist/serialization/resources/conversation/types/UserMessage.d.ts +5 -5
- package/dist/serialization/resources/conversation/types/UserMessage.js +5 -5
- package/dist/serialization/resources/conversation/types/UserMessageBase.d.ts +17 -0
- package/dist/serialization/resources/conversation/types/UserMessageBase.js +14 -0
- package/dist/serialization/resources/conversation/types/index.d.ts +8 -2
- package/dist/serialization/resources/conversation/types/index.js +8 -2
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +3 -0
- package/dist/serialization/resources/translations/index.d.ts +1 -0
- package/dist/serialization/resources/translations/index.js +1 -0
- package/dist/serialization/resources/translations/types/TranslationRequest.d.ts +13 -0
- package/dist/serialization/resources/translations/types/TranslationRequest.js +8 -0
- package/dist/serialization/resources/translations/types/TranslationResponse.d.ts +12 -0
- package/dist/serialization/resources/translations/types/TranslationResponse.js +7 -0
- package/dist/serialization/resources/translations/types/index.d.ts +2 -0
- package/dist/serialization/resources/translations/types/index.js +2 -0
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
- package/dist/serialization/resources/triggers/types/index.d.ts +0 -3
- package/dist/serialization/resources/triggers/types/index.js +0 -3
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/package.json +12 -2
- package/reference.md +1953 -0
- package/serialization/resources/actions/types/ActionBase.d.ts +1 -2
- package/serialization/resources/actions/types/ActionBase.js +2 -2
- package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +14 -0
- package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +11 -0
- package/serialization/resources/actions/types/ConversationPrecondition.d.ts +22 -0
- package/serialization/resources/actions/types/ConversationPrecondition.js +17 -0
- package/serialization/resources/actions/types/MetadataPrecondition.d.ts +14 -0
- package/serialization/resources/actions/types/MetadataPrecondition.js +11 -0
- package/serialization/resources/actions/types/Precondition.d.ts +22 -0
- package/serialization/resources/actions/types/Precondition.js +19 -0
- package/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
- package/serialization/resources/actions/types/PreconditionBase.js +8 -0
- package/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
- package/serialization/resources/actions/types/PreconditionGroup.js +10 -0
- package/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
- package/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
- package/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
- package/serialization/resources/actions/types/PreconditionOperator.js +5 -0
- package/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
- package/serialization/resources/actions/types/TagsPrecondition.js +10 -0
- package/serialization/resources/actions/types/index.d.ts +9 -1
- package/serialization/resources/actions/types/index.js +9 -1
- package/serialization/resources/appSettings/client/get.d.ts +9 -0
- package/serialization/resources/appSettings/client/get.js +5 -0
- package/serialization/resources/appSettings/client/index.d.ts +1 -0
- package/serialization/resources/appSettings/client/index.js +1 -0
- package/serialization/resources/appSettings/index.d.ts +1 -0
- package/serialization/resources/appSettings/index.js +1 -0
- package/serialization/resources/commons/types/AppUser.d.ts +4 -4
- package/serialization/resources/commons/types/AppUser.js +4 -4
- package/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
- package/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
- package/serialization/resources/commons/types/AppUserRequest.d.ts +4 -1
- package/serialization/resources/commons/types/AppUserRequest.js +7 -1
- package/serialization/resources/commons/types/AppUserResponse.d.ts +6 -1
- package/serialization/resources/commons/types/AppUserResponse.js +9 -1
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +2 -0
- package/serialization/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +1 -1
- package/serialization/resources/{triggers → commons}/types/EventTriggerResponse.js +1 -1
- package/serialization/resources/commons/types/Feedback.d.ts +6 -7
- package/serialization/resources/commons/types/Feedback.js +9 -8
- package/serialization/resources/commons/types/FeedbackBase.d.ts +14 -0
- package/serialization/resources/commons/types/FeedbackBase.js +9 -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 +6 -2
- package/serialization/resources/commons/types/index.js +6 -2
- package/serialization/resources/conversation/types/ActionFormField.d.ts +1 -0
- package/serialization/resources/conversation/types/ActionFormField.js +1 -0
- package/serialization/resources/conversation/types/AskRequest.d.ts +5 -5
- package/serialization/resources/conversation/types/AskRequest.js +5 -5
- package/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
- package/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
- package/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
- package/serialization/resources/conversation/types/AskStreamStartEvent.js +2 -1
- package/serialization/resources/{actions/types/Preconditions.d.ts → conversation/types/Attachment.d.ts} +4 -3
- package/serialization/resources/conversation/types/Attachment.js +8 -0
- package/serialization/resources/conversation/types/BotChartResponse.d.ts +15 -0
- package/serialization/resources/conversation/types/BotChartResponse.js +10 -0
- package/serialization/resources/conversation/types/BotMessage.d.ts +2 -0
- package/serialization/resources/conversation/types/BotMessage.js +2 -0
- package/serialization/resources/conversation/types/BotResponse.d.ts +5 -1
- package/serialization/resources/conversation/types/BotResponse.js +2 -0
- package/serialization/resources/conversation/types/BotResponseMetadata.d.ts +1 -0
- package/serialization/resources/conversation/types/BotResponseMetadata.js +1 -0
- package/serialization/resources/conversation/types/Capability.d.ts +1 -1
- package/serialization/resources/conversation/types/Capability.js +1 -1
- package/serialization/resources/conversation/types/CategorizationResponse.d.ts +12 -0
- package/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
- package/serialization/resources/conversation/types/ChartSpecSchema.d.ts +10 -0
- package/serialization/resources/conversation/types/ChartSpecSchema.js +5 -0
- package/serialization/resources/conversation/types/ConversationAnalysis.d.ts +17 -0
- package/serialization/resources/conversation/types/ConversationAnalysis.js +12 -0
- package/serialization/resources/conversation/types/ConversationBase.d.ts +6 -1
- package/serialization/resources/conversation/types/ConversationBase.js +6 -1
- package/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -3
- package/serialization/resources/conversation/types/ConversationMessageBase.js +2 -3
- package/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +4 -2
- package/serialization/resources/conversation/types/ConversationMessageRequest.js +7 -2
- package/serialization/resources/conversation/types/ConversationRequest.d.ts +2 -2
- package/serialization/resources/conversation/types/ConversationRequest.js +2 -2
- package/serialization/resources/conversation/types/ConversationResponse.d.ts +4 -2
- package/serialization/resources/conversation/types/ConversationResponse.js +4 -2
- package/serialization/resources/conversation/types/FeedbackRequest.d.ts +7 -2
- package/serialization/resources/conversation/types/FeedbackRequest.js +10 -2
- package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
- package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
- package/serialization/resources/conversation/types/ResponseConfig.d.ts +3 -3
- package/serialization/resources/conversation/types/ResponseConfig.js +3 -3
- package/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
- package/serialization/resources/conversation/types/Sentiment.js +5 -0
- package/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
- package/serialization/resources/conversation/types/StreamResponse.js +2 -0
- package/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
- package/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
- package/serialization/resources/conversation/types/UserMessage.d.ts +5 -5
- package/serialization/resources/conversation/types/UserMessage.js +5 -5
- package/serialization/resources/conversation/types/UserMessageBase.d.ts +17 -0
- package/serialization/resources/conversation/types/UserMessageBase.js +14 -0
- package/serialization/resources/conversation/types/index.d.ts +8 -2
- package/serialization/resources/conversation/types/index.js +8 -2
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +3 -0
- package/serialization/resources/translations/index.d.ts +1 -0
- package/serialization/resources/translations/index.js +1 -0
- package/serialization/resources/translations/types/TranslationRequest.d.ts +13 -0
- package/serialization/resources/translations/types/TranslationRequest.js +8 -0
- package/serialization/resources/translations/types/TranslationResponse.d.ts +12 -0
- package/serialization/resources/translations/types/TranslationResponse.js +7 -0
- package/serialization/resources/translations/types/index.d.ts +2 -0
- package/serialization/resources/translations/types/index.js +2 -0
- package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
- package/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
- package/serialization/resources/triggers/types/index.d.ts +0 -3
- package/serialization/resources/triggers/types/index.js +0 -3
- package/version.d.ts +1 -0
- package/version.js +1 -0
- package/api/resources/actions/types/Preconditions.d.ts +0 -7
- package/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
- package/api/resources/commons/types/User.d.ts +0 -10
- package/api/resources/conversation/types/ConversationContext.d.ts +0 -20
- package/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
- package/dist/api/resources/actions/types/Preconditions.d.ts +0 -7
- package/dist/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
- package/dist/api/resources/commons/types/User.d.ts +0 -10
- package/dist/api/resources/conversation/types/ConversationContext.d.ts +0 -20
- package/dist/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
- package/dist/serialization/resources/actions/types/Preconditions.js +0 -7
- package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
- package/dist/serialization/resources/commons/types/AppUserIdentification.js +0 -8
- package/dist/serialization/resources/commons/types/User.d.ts +0 -15
- package/dist/serialization/resources/commons/types/User.js +0 -10
- package/dist/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
- package/dist/serialization/resources/conversation/types/ConversationContext.js +0 -15
- package/dist/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
- package/dist/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
- package/serialization/resources/actions/types/Preconditions.js +0 -7
- package/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
- package/serialization/resources/commons/types/AppUserIdentification.js +0 -8
- package/serialization/resources/commons/types/User.d.ts +0 -15
- package/serialization/resources/commons/types/User.js +0 -10
- package/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
- package/serialization/resources/conversation/types/ConversationContext.js +0 -15
- package/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
- package/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
- /package/api/resources/actions/types/{Preconditions.js → ConversationExecutedActionPrecondition.js} +0 -0
- /package/api/resources/{commons/types/AppUserIdentification.js → actions/types/ConversationPrecondition.js} +0 -0
- /package/api/resources/{commons/types/User.js → actions/types/MetadataPrecondition.js} +0 -0
- /package/api/resources/{conversation/types/ConversationContext.js → actions/types/Precondition.js} +0 -0
- /package/api/resources/{conversation/types/ConversationMessageContext.js → actions/types/PreconditionBase.js} +0 -0
- /package/api/resources/{triggers/types/EventTriggerBase.js → actions/types/PreconditionGroup.js} +0 -0
- /package/api/resources/{triggers/types/EventTriggerResponse.js → actions/types/TagsPrecondition.js} +0 -0
- /package/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
- /package/{dist/api/resources/triggers → api/resources/commons}/types/EventTriggerBase.js +0 -0
- /package/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
- /package/{dist/api/resources/triggers → api/resources/commons}/types/EventTriggerResponse.js +0 -0
- /package/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
- /package/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
- /package/{dist/api/resources/actions/types/Preconditions.js → api/resources/commons/types/FeedbackBase.js} +0 -0
- /package/{dist/api/resources/commons/types/AppUserIdentification.js → api/resources/commons/types/UserData.js} +0 -0
- /package/{dist/api/resources/commons/types/User.js → api/resources/conversation/client/requests/ConversationGetRequest.js} +0 -0
- /package/{dist/api/resources/conversation/types/ConversationContext.js → api/resources/conversation/types/AskStreamActionEvent.js} +0 -0
- /package/{dist/api/resources/conversation/types/ConversationMessageContext.js → api/resources/conversation/types/Attachment.js} +0 -0
- /package/dist/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
- /package/dist/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
- /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
- /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
- /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
- /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
- /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
- /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
- /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
- /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
- /package/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
- /package/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
|
@@ -9,14 +9,23 @@ export declare namespace Knowledge {
|
|
|
9
9
|
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
10
10
|
appId?: core.Supplier<string | undefined>;
|
|
11
11
|
appSecret?: core.Supplier<string | undefined>;
|
|
12
|
+
/** Override the X-Organization-Id header */
|
|
12
13
|
organizationId: core.Supplier<string>;
|
|
14
|
+
/** Override the X-Agent-Id header */
|
|
13
15
|
agentId: core.Supplier<string>;
|
|
14
16
|
fetcher?: core.FetchFunction;
|
|
15
17
|
}
|
|
16
18
|
interface RequestOptions {
|
|
19
|
+
/** The maximum time to wait for a response in seconds. */
|
|
17
20
|
timeoutInSeconds?: number;
|
|
21
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
18
22
|
maxRetries?: number;
|
|
23
|
+
/** A hook to abort the request. */
|
|
19
24
|
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the X-Organization-Id header */
|
|
26
|
+
organizationId?: string;
|
|
27
|
+
/** Override the X-Agent-Id header */
|
|
28
|
+
agentId?: string;
|
|
20
29
|
}
|
|
21
30
|
}
|
|
22
31
|
export declare class Knowledge {
|
|
@@ -38,7 +47,7 @@ export declare class Knowledge {
|
|
|
38
47
|
* referenceId: "help-center"
|
|
39
48
|
* },
|
|
40
49
|
* name: "Help center",
|
|
41
|
-
* type:
|
|
50
|
+
* type: "API"
|
|
42
51
|
* })
|
|
43
52
|
*/
|
|
44
53
|
createOrUpdateKnowledgeBase(request: MavenAGI.KnowledgeBaseRequest, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBaseResponse>;
|
|
@@ -69,7 +78,7 @@ export declare class Knowledge {
|
|
|
69
78
|
*
|
|
70
79
|
* @example
|
|
71
80
|
* await client.knowledge.createKnowledgeBaseVersion("help-center", {
|
|
72
|
-
* type:
|
|
81
|
+
* type: "FULL"
|
|
73
82
|
* })
|
|
74
83
|
*/
|
|
75
84
|
createKnowledgeBaseVersion(knowledgeBaseReferenceId: string, request: MavenAGI.KnowledgeBaseVersion, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBaseVersion>;
|
|
@@ -103,7 +112,7 @@ export declare class Knowledge {
|
|
|
103
112
|
* knowledgeDocumentId: {
|
|
104
113
|
* referenceId: "getting-started"
|
|
105
114
|
* },
|
|
106
|
-
* contentType:
|
|
115
|
+
* contentType: "MARKDOWN",
|
|
107
116
|
* content: "## Getting started\\nThis is a getting started guide for the help center.",
|
|
108
117
|
* title: "Getting started"
|
|
109
118
|
* })
|
|
@@ -125,7 +134,7 @@ export declare class Knowledge {
|
|
|
125
134
|
* knowledgeDocumentId: {
|
|
126
135
|
* referenceId: "getting-started"
|
|
127
136
|
* },
|
|
128
|
-
* contentType:
|
|
137
|
+
* contentType: "MARKDOWN",
|
|
129
138
|
* content: "## Getting started\\nThis is a getting started guide for the help center.",
|
|
130
139
|
* title: "Getting started"
|
|
131
140
|
* })
|
|
@@ -36,7 +36,7 @@ export class Knowledge {
|
|
|
36
36
|
* referenceId: "help-center"
|
|
37
37
|
* },
|
|
38
38
|
* name: "Help center",
|
|
39
|
-
* type:
|
|
39
|
+
* type: "API"
|
|
40
40
|
* })
|
|
41
41
|
*/
|
|
42
42
|
createOrUpdateKnowledgeBase(request, requestOptions) {
|
|
@@ -51,18 +51,20 @@ export class Knowledge {
|
|
|
51
51
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
52
52
|
"X-Fern-Language": "JavaScript",
|
|
53
53
|
"X-Fern-SDK-Name": "mavenagi",
|
|
54
|
-
"X-Fern-SDK-Version": "
|
|
54
|
+
"X-Fern-SDK-Version": "1.0.0",
|
|
55
|
+
"User-Agent": "mavenagi/1.0.0",
|
|
55
56
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
57
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
58
|
},
|
|
58
59
|
contentType: "application/json",
|
|
59
|
-
|
|
60
|
+
requestType: "json",
|
|
61
|
+
body: serializers.KnowledgeBaseRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
60
62
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
61
63
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
62
64
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
63
65
|
});
|
|
64
66
|
if (_response.ok) {
|
|
65
|
-
return
|
|
67
|
+
return serializers.KnowledgeBaseResponse.parseOrThrow(_response.body, {
|
|
66
68
|
unrecognizedObjectKeys: "passthrough",
|
|
67
69
|
allowUnrecognizedUnionMembers: true,
|
|
68
70
|
allowUnrecognizedEnumValues: true,
|
|
@@ -72,21 +74,21 @@ export class Knowledge {
|
|
|
72
74
|
if (_response.error.reason === "status-code") {
|
|
73
75
|
switch (_response.error.statusCode) {
|
|
74
76
|
case 404:
|
|
75
|
-
throw new MavenAGI.NotFoundError(
|
|
77
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
76
78
|
unrecognizedObjectKeys: "passthrough",
|
|
77
79
|
allowUnrecognizedUnionMembers: true,
|
|
78
80
|
allowUnrecognizedEnumValues: true,
|
|
79
81
|
breadcrumbsPrefix: ["response"],
|
|
80
82
|
}));
|
|
81
83
|
case 400:
|
|
82
|
-
throw new MavenAGI.BadRequestError(
|
|
84
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
83
85
|
unrecognizedObjectKeys: "passthrough",
|
|
84
86
|
allowUnrecognizedUnionMembers: true,
|
|
85
87
|
allowUnrecognizedEnumValues: true,
|
|
86
88
|
breadcrumbsPrefix: ["response"],
|
|
87
89
|
}));
|
|
88
90
|
case 500:
|
|
89
|
-
throw new MavenAGI.ServerError(
|
|
91
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
90
92
|
unrecognizedObjectKeys: "passthrough",
|
|
91
93
|
allowUnrecognizedUnionMembers: true,
|
|
92
94
|
allowUnrecognizedEnumValues: true,
|
|
@@ -139,17 +141,19 @@ export class Knowledge {
|
|
|
139
141
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
140
142
|
"X-Fern-Language": "JavaScript",
|
|
141
143
|
"X-Fern-SDK-Name": "mavenagi",
|
|
142
|
-
"X-Fern-SDK-Version": "
|
|
144
|
+
"X-Fern-SDK-Version": "1.0.0",
|
|
145
|
+
"User-Agent": "mavenagi/1.0.0",
|
|
143
146
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
144
147
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
145
148
|
},
|
|
146
149
|
contentType: "application/json",
|
|
150
|
+
requestType: "json",
|
|
147
151
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
148
152
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
149
153
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
150
154
|
});
|
|
151
155
|
if (_response.ok) {
|
|
152
|
-
return
|
|
156
|
+
return serializers.KnowledgeBaseResponse.parseOrThrow(_response.body, {
|
|
153
157
|
unrecognizedObjectKeys: "passthrough",
|
|
154
158
|
allowUnrecognizedUnionMembers: true,
|
|
155
159
|
allowUnrecognizedEnumValues: true,
|
|
@@ -159,21 +163,21 @@ export class Knowledge {
|
|
|
159
163
|
if (_response.error.reason === "status-code") {
|
|
160
164
|
switch (_response.error.statusCode) {
|
|
161
165
|
case 404:
|
|
162
|
-
throw new MavenAGI.NotFoundError(
|
|
166
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
163
167
|
unrecognizedObjectKeys: "passthrough",
|
|
164
168
|
allowUnrecognizedUnionMembers: true,
|
|
165
169
|
allowUnrecognizedEnumValues: true,
|
|
166
170
|
breadcrumbsPrefix: ["response"],
|
|
167
171
|
}));
|
|
168
172
|
case 400:
|
|
169
|
-
throw new MavenAGI.BadRequestError(
|
|
173
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
170
174
|
unrecognizedObjectKeys: "passthrough",
|
|
171
175
|
allowUnrecognizedUnionMembers: true,
|
|
172
176
|
allowUnrecognizedEnumValues: true,
|
|
173
177
|
breadcrumbsPrefix: ["response"],
|
|
174
178
|
}));
|
|
175
179
|
case 500:
|
|
176
|
-
throw new MavenAGI.ServerError(
|
|
180
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
177
181
|
unrecognizedObjectKeys: "passthrough",
|
|
178
182
|
allowUnrecognizedUnionMembers: true,
|
|
179
183
|
allowUnrecognizedEnumValues: true,
|
|
@@ -214,7 +218,7 @@ export class Knowledge {
|
|
|
214
218
|
*
|
|
215
219
|
* @example
|
|
216
220
|
* await client.knowledge.createKnowledgeBaseVersion("help-center", {
|
|
217
|
-
* type:
|
|
221
|
+
* type: "FULL"
|
|
218
222
|
* })
|
|
219
223
|
*/
|
|
220
224
|
createKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions) {
|
|
@@ -229,18 +233,20 @@ export class Knowledge {
|
|
|
229
233
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
230
234
|
"X-Fern-Language": "JavaScript",
|
|
231
235
|
"X-Fern-SDK-Name": "mavenagi",
|
|
232
|
-
"X-Fern-SDK-Version": "
|
|
236
|
+
"X-Fern-SDK-Version": "1.0.0",
|
|
237
|
+
"User-Agent": "mavenagi/1.0.0",
|
|
233
238
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
234
239
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
235
240
|
},
|
|
236
241
|
contentType: "application/json",
|
|
237
|
-
|
|
242
|
+
requestType: "json",
|
|
243
|
+
body: serializers.KnowledgeBaseVersion.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
238
244
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
239
245
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
240
246
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
241
247
|
});
|
|
242
248
|
if (_response.ok) {
|
|
243
|
-
return
|
|
249
|
+
return serializers.KnowledgeBaseVersion.parseOrThrow(_response.body, {
|
|
244
250
|
unrecognizedObjectKeys: "passthrough",
|
|
245
251
|
allowUnrecognizedUnionMembers: true,
|
|
246
252
|
allowUnrecognizedEnumValues: true,
|
|
@@ -250,21 +256,21 @@ export class Knowledge {
|
|
|
250
256
|
if (_response.error.reason === "status-code") {
|
|
251
257
|
switch (_response.error.statusCode) {
|
|
252
258
|
case 404:
|
|
253
|
-
throw new MavenAGI.NotFoundError(
|
|
259
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
254
260
|
unrecognizedObjectKeys: "passthrough",
|
|
255
261
|
allowUnrecognizedUnionMembers: true,
|
|
256
262
|
allowUnrecognizedEnumValues: true,
|
|
257
263
|
breadcrumbsPrefix: ["response"],
|
|
258
264
|
}));
|
|
259
265
|
case 400:
|
|
260
|
-
throw new MavenAGI.BadRequestError(
|
|
266
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
261
267
|
unrecognizedObjectKeys: "passthrough",
|
|
262
268
|
allowUnrecognizedUnionMembers: true,
|
|
263
269
|
allowUnrecognizedEnumValues: true,
|
|
264
270
|
breadcrumbsPrefix: ["response"],
|
|
265
271
|
}));
|
|
266
272
|
case 500:
|
|
267
|
-
throw new MavenAGI.ServerError(
|
|
273
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
268
274
|
unrecognizedObjectKeys: "passthrough",
|
|
269
275
|
allowUnrecognizedUnionMembers: true,
|
|
270
276
|
allowUnrecognizedEnumValues: true,
|
|
@@ -317,11 +323,13 @@ export class Knowledge {
|
|
|
317
323
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
318
324
|
"X-Fern-Language": "JavaScript",
|
|
319
325
|
"X-Fern-SDK-Name": "mavenagi",
|
|
320
|
-
"X-Fern-SDK-Version": "
|
|
326
|
+
"X-Fern-SDK-Version": "1.0.0",
|
|
327
|
+
"User-Agent": "mavenagi/1.0.0",
|
|
321
328
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
322
329
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
323
330
|
},
|
|
324
331
|
contentType: "application/json",
|
|
332
|
+
requestType: "json",
|
|
325
333
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
326
334
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
327
335
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -332,21 +340,21 @@ export class Knowledge {
|
|
|
332
340
|
if (_response.error.reason === "status-code") {
|
|
333
341
|
switch (_response.error.statusCode) {
|
|
334
342
|
case 404:
|
|
335
|
-
throw new MavenAGI.NotFoundError(
|
|
343
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
336
344
|
unrecognizedObjectKeys: "passthrough",
|
|
337
345
|
allowUnrecognizedUnionMembers: true,
|
|
338
346
|
allowUnrecognizedEnumValues: true,
|
|
339
347
|
breadcrumbsPrefix: ["response"],
|
|
340
348
|
}));
|
|
341
349
|
case 400:
|
|
342
|
-
throw new MavenAGI.BadRequestError(
|
|
350
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
343
351
|
unrecognizedObjectKeys: "passthrough",
|
|
344
352
|
allowUnrecognizedUnionMembers: true,
|
|
345
353
|
allowUnrecognizedEnumValues: true,
|
|
346
354
|
breadcrumbsPrefix: ["response"],
|
|
347
355
|
}));
|
|
348
356
|
case 500:
|
|
349
|
-
throw new MavenAGI.ServerError(
|
|
357
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
350
358
|
unrecognizedObjectKeys: "passthrough",
|
|
351
359
|
allowUnrecognizedUnionMembers: true,
|
|
352
360
|
allowUnrecognizedEnumValues: true,
|
|
@@ -390,7 +398,7 @@ export class Knowledge {
|
|
|
390
398
|
* knowledgeDocumentId: {
|
|
391
399
|
* referenceId: "getting-started"
|
|
392
400
|
* },
|
|
393
|
-
* contentType:
|
|
401
|
+
* contentType: "MARKDOWN",
|
|
394
402
|
* content: "## Getting started\\nThis is a getting started guide for the help center.",
|
|
395
403
|
* title: "Getting started"
|
|
396
404
|
* })
|
|
@@ -407,18 +415,20 @@ export class Knowledge {
|
|
|
407
415
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
408
416
|
"X-Fern-Language": "JavaScript",
|
|
409
417
|
"X-Fern-SDK-Name": "mavenagi",
|
|
410
|
-
"X-Fern-SDK-Version": "
|
|
418
|
+
"X-Fern-SDK-Version": "1.0.0",
|
|
419
|
+
"User-Agent": "mavenagi/1.0.0",
|
|
411
420
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
412
421
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
413
422
|
},
|
|
414
423
|
contentType: "application/json",
|
|
415
|
-
|
|
424
|
+
requestType: "json",
|
|
425
|
+
body: serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
416
426
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
417
427
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
418
428
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
419
429
|
});
|
|
420
430
|
if (_response.ok) {
|
|
421
|
-
return
|
|
431
|
+
return serializers.KnowledgeDocumentResponse.parseOrThrow(_response.body, {
|
|
422
432
|
unrecognizedObjectKeys: "passthrough",
|
|
423
433
|
allowUnrecognizedUnionMembers: true,
|
|
424
434
|
allowUnrecognizedEnumValues: true,
|
|
@@ -428,21 +438,21 @@ export class Knowledge {
|
|
|
428
438
|
if (_response.error.reason === "status-code") {
|
|
429
439
|
switch (_response.error.statusCode) {
|
|
430
440
|
case 404:
|
|
431
|
-
throw new MavenAGI.NotFoundError(
|
|
441
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
432
442
|
unrecognizedObjectKeys: "passthrough",
|
|
433
443
|
allowUnrecognizedUnionMembers: true,
|
|
434
444
|
allowUnrecognizedEnumValues: true,
|
|
435
445
|
breadcrumbsPrefix: ["response"],
|
|
436
446
|
}));
|
|
437
447
|
case 400:
|
|
438
|
-
throw new MavenAGI.BadRequestError(
|
|
448
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
439
449
|
unrecognizedObjectKeys: "passthrough",
|
|
440
450
|
allowUnrecognizedUnionMembers: true,
|
|
441
451
|
allowUnrecognizedEnumValues: true,
|
|
442
452
|
breadcrumbsPrefix: ["response"],
|
|
443
453
|
}));
|
|
444
454
|
case 500:
|
|
445
|
-
throw new MavenAGI.ServerError(
|
|
455
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
446
456
|
unrecognizedObjectKeys: "passthrough",
|
|
447
457
|
allowUnrecognizedUnionMembers: true,
|
|
448
458
|
allowUnrecognizedEnumValues: true,
|
|
@@ -486,7 +496,7 @@ export class Knowledge {
|
|
|
486
496
|
* knowledgeDocumentId: {
|
|
487
497
|
* referenceId: "getting-started"
|
|
488
498
|
* },
|
|
489
|
-
* contentType:
|
|
499
|
+
* contentType: "MARKDOWN",
|
|
490
500
|
* content: "## Getting started\\nThis is a getting started guide for the help center.",
|
|
491
501
|
* title: "Getting started"
|
|
492
502
|
* })
|
|
@@ -503,18 +513,20 @@ export class Knowledge {
|
|
|
503
513
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
504
514
|
"X-Fern-Language": "JavaScript",
|
|
505
515
|
"X-Fern-SDK-Name": "mavenagi",
|
|
506
|
-
"X-Fern-SDK-Version": "
|
|
516
|
+
"X-Fern-SDK-Version": "1.0.0",
|
|
517
|
+
"User-Agent": "mavenagi/1.0.0",
|
|
507
518
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
508
519
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
509
520
|
},
|
|
510
521
|
contentType: "application/json",
|
|
511
|
-
|
|
522
|
+
requestType: "json",
|
|
523
|
+
body: serializers.KnowledgeDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
512
524
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
513
525
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
514
526
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
515
527
|
});
|
|
516
528
|
if (_response.ok) {
|
|
517
|
-
return
|
|
529
|
+
return serializers.KnowledgeDocumentResponse.parseOrThrow(_response.body, {
|
|
518
530
|
unrecognizedObjectKeys: "passthrough",
|
|
519
531
|
allowUnrecognizedUnionMembers: true,
|
|
520
532
|
allowUnrecognizedEnumValues: true,
|
|
@@ -524,21 +536,21 @@ export class Knowledge {
|
|
|
524
536
|
if (_response.error.reason === "status-code") {
|
|
525
537
|
switch (_response.error.statusCode) {
|
|
526
538
|
case 404:
|
|
527
|
-
throw new MavenAGI.NotFoundError(
|
|
539
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
528
540
|
unrecognizedObjectKeys: "passthrough",
|
|
529
541
|
allowUnrecognizedUnionMembers: true,
|
|
530
542
|
allowUnrecognizedEnumValues: true,
|
|
531
543
|
breadcrumbsPrefix: ["response"],
|
|
532
544
|
}));
|
|
533
545
|
case 400:
|
|
534
|
-
throw new MavenAGI.BadRequestError(
|
|
546
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
535
547
|
unrecognizedObjectKeys: "passthrough",
|
|
536
548
|
allowUnrecognizedUnionMembers: true,
|
|
537
549
|
allowUnrecognizedEnumValues: true,
|
|
538
550
|
breadcrumbsPrefix: ["response"],
|
|
539
551
|
}));
|
|
540
552
|
case 500:
|
|
541
|
-
throw new MavenAGI.ServerError(
|
|
553
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
542
554
|
unrecognizedObjectKeys: "passthrough",
|
|
543
555
|
allowUnrecognizedUnionMembers: true,
|
|
544
556
|
allowUnrecognizedEnumValues: true,
|
|
@@ -592,11 +604,13 @@ export class Knowledge {
|
|
|
592
604
|
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
593
605
|
"X-Fern-Language": "JavaScript",
|
|
594
606
|
"X-Fern-SDK-Name": "mavenagi",
|
|
595
|
-
"X-Fern-SDK-Version": "
|
|
607
|
+
"X-Fern-SDK-Version": "1.0.0",
|
|
608
|
+
"User-Agent": "mavenagi/1.0.0",
|
|
596
609
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
597
610
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
598
611
|
},
|
|
599
612
|
contentType: "application/json",
|
|
613
|
+
requestType: "json",
|
|
600
614
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
601
615
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
602
616
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -607,21 +621,21 @@ export class Knowledge {
|
|
|
607
621
|
if (_response.error.reason === "status-code") {
|
|
608
622
|
switch (_response.error.statusCode) {
|
|
609
623
|
case 404:
|
|
610
|
-
throw new MavenAGI.NotFoundError(
|
|
624
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
611
625
|
unrecognizedObjectKeys: "passthrough",
|
|
612
626
|
allowUnrecognizedUnionMembers: true,
|
|
613
627
|
allowUnrecognizedEnumValues: true,
|
|
614
628
|
breadcrumbsPrefix: ["response"],
|
|
615
629
|
}));
|
|
616
630
|
case 400:
|
|
617
|
-
throw new MavenAGI.BadRequestError(
|
|
631
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
618
632
|
unrecognizedObjectKeys: "passthrough",
|
|
619
633
|
allowUnrecognizedUnionMembers: true,
|
|
620
634
|
allowUnrecognizedEnumValues: true,
|
|
621
635
|
breadcrumbsPrefix: ["response"],
|
|
622
636
|
}));
|
|
623
637
|
case 500:
|
|
624
|
-
throw new MavenAGI.ServerError(
|
|
638
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
625
639
|
unrecognizedObjectKeys: "passthrough",
|
|
626
640
|
allowUnrecognizedUnionMembers: true,
|
|
627
641
|
allowUnrecognizedEnumValues: true,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as MavenAGI from "../../../index";
|
|
7
|
+
export declare namespace Translations {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.MavenAGIEnvironment | string>;
|
|
10
|
+
appId?: core.Supplier<string | undefined>;
|
|
11
|
+
appSecret?: core.Supplier<string | undefined>;
|
|
12
|
+
/** Override the X-Organization-Id header */
|
|
13
|
+
organizationId: core.Supplier<string>;
|
|
14
|
+
/** Override the X-Agent-Id header */
|
|
15
|
+
agentId: core.Supplier<string>;
|
|
16
|
+
fetcher?: core.FetchFunction;
|
|
17
|
+
}
|
|
18
|
+
interface RequestOptions {
|
|
19
|
+
/** The maximum time to wait for a response in seconds. */
|
|
20
|
+
timeoutInSeconds?: number;
|
|
21
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** A hook to abort the request. */
|
|
24
|
+
abortSignal?: AbortSignal;
|
|
25
|
+
/** Override the X-Organization-Id header */
|
|
26
|
+
organizationId?: string;
|
|
27
|
+
/** Override the X-Agent-Id header */
|
|
28
|
+
agentId?: string;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export declare class Translations {
|
|
32
|
+
protected readonly _options: Translations.Options;
|
|
33
|
+
constructor(_options: Translations.Options);
|
|
34
|
+
/**
|
|
35
|
+
* Translate text from one language to another
|
|
36
|
+
*
|
|
37
|
+
* @param {MavenAGI.TranslationRequest} request
|
|
38
|
+
* @param {Translations.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link MavenAGI.NotFoundError}
|
|
41
|
+
* @throws {@link MavenAGI.BadRequestError}
|
|
42
|
+
* @throws {@link MavenAGI.ServerError}
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* await client.translations.translate({
|
|
46
|
+
* text: "Hello world",
|
|
47
|
+
* targetLanguage: "es"
|
|
48
|
+
* })
|
|
49
|
+
*/
|
|
50
|
+
translate(request: MavenAGI.TranslationRequest, requestOptions?: Translations.RequestOptions): Promise<MavenAGI.TranslationResponse>;
|
|
51
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
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 Translations {
|
|
20
|
+
constructor(_options) {
|
|
21
|
+
this._options = _options;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Translate text from one language to another
|
|
25
|
+
*
|
|
26
|
+
* @param {MavenAGI.TranslationRequest} request
|
|
27
|
+
* @param {Translations.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.translations.translate({
|
|
35
|
+
* text: "Hello world",
|
|
36
|
+
* targetLanguage: "es"
|
|
37
|
+
* })
|
|
38
|
+
*/
|
|
39
|
+
translate(request, requestOptions) {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
43
|
+
url: urlJoin((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.MavenAGIEnvironment.Production, "/v1/translations/translate"),
|
|
44
|
+
method: "POST",
|
|
45
|
+
headers: {
|
|
46
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
47
|
+
"X-Organization-Id": yield core.Supplier.get(this._options.organizationId),
|
|
48
|
+
"X-Agent-Id": yield core.Supplier.get(this._options.agentId),
|
|
49
|
+
"X-Fern-Language": "JavaScript",
|
|
50
|
+
"X-Fern-SDK-Name": "mavenagi",
|
|
51
|
+
"X-Fern-SDK-Version": "1.0.0",
|
|
52
|
+
"User-Agent": "mavenagi/1.0.0",
|
|
53
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
54
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
55
|
+
},
|
|
56
|
+
contentType: "application/json",
|
|
57
|
+
requestType: "json",
|
|
58
|
+
body: serializers.TranslationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
59
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
60
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
61
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
62
|
+
});
|
|
63
|
+
if (_response.ok) {
|
|
64
|
+
return serializers.TranslationResponse.parseOrThrow(_response.body, {
|
|
65
|
+
unrecognizedObjectKeys: "passthrough",
|
|
66
|
+
allowUnrecognizedUnionMembers: true,
|
|
67
|
+
allowUnrecognizedEnumValues: true,
|
|
68
|
+
breadcrumbsPrefix: ["response"],
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (_response.error.reason === "status-code") {
|
|
72
|
+
switch (_response.error.statusCode) {
|
|
73
|
+
case 404:
|
|
74
|
+
throw new MavenAGI.NotFoundError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
75
|
+
unrecognizedObjectKeys: "passthrough",
|
|
76
|
+
allowUnrecognizedUnionMembers: true,
|
|
77
|
+
allowUnrecognizedEnumValues: true,
|
|
78
|
+
breadcrumbsPrefix: ["response"],
|
|
79
|
+
}));
|
|
80
|
+
case 400:
|
|
81
|
+
throw new MavenAGI.BadRequestError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
82
|
+
unrecognizedObjectKeys: "passthrough",
|
|
83
|
+
allowUnrecognizedUnionMembers: true,
|
|
84
|
+
allowUnrecognizedEnumValues: true,
|
|
85
|
+
breadcrumbsPrefix: ["response"],
|
|
86
|
+
}));
|
|
87
|
+
case 500:
|
|
88
|
+
throw new MavenAGI.ServerError(serializers.ErrorMessage.parseOrThrow(_response.error.body, {
|
|
89
|
+
unrecognizedObjectKeys: "passthrough",
|
|
90
|
+
allowUnrecognizedUnionMembers: true,
|
|
91
|
+
allowUnrecognizedEnumValues: true,
|
|
92
|
+
breadcrumbsPrefix: ["response"],
|
|
93
|
+
}));
|
|
94
|
+
default:
|
|
95
|
+
throw new errors.MavenAGIError({
|
|
96
|
+
statusCode: _response.error.statusCode,
|
|
97
|
+
body: _response.error.body,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
switch (_response.error.reason) {
|
|
102
|
+
case "non-json":
|
|
103
|
+
throw new errors.MavenAGIError({
|
|
104
|
+
statusCode: _response.error.statusCode,
|
|
105
|
+
body: _response.error.rawBody,
|
|
106
|
+
});
|
|
107
|
+
case "timeout":
|
|
108
|
+
throw new errors.MavenAGITimeoutError();
|
|
109
|
+
case "unknown":
|
|
110
|
+
throw new errors.MavenAGIError({
|
|
111
|
+
message: _response.error.errorMessage,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
_getAuthorizationHeader() {
|
|
117
|
+
var _a, _b;
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
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"];
|
|
120
|
+
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"];
|
|
121
|
+
if (appId != null && appSecret != null) {
|
|
122
|
+
return core.BasicAuth.toAuthorizationHeader({
|
|
123
|
+
username: appId,
|
|
124
|
+
password: appSecret,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
return undefined;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* text: "Hello world",
|
|
8
|
+
* targetLanguage: "es"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface TranslationRequest {
|
|
12
|
+
/** The text to translate */
|
|
13
|
+
text: string;
|
|
14
|
+
/** The target language to translate to, in ISO 639-1 code format. */
|
|
15
|
+
targetLanguage: string;
|
|
16
|
+
}
|