mavenagi 1.0.3 → 1.0.5
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 +9 -7
- package/Client.js +19 -15
- package/README.md +29 -13
- package/api/index.js +17 -1
- package/api/resources/actions/client/Client.d.ts +2 -0
- package/api/resources/actions/client/Client.js +46 -46
- package/api/resources/actions/client/index.js +2 -1
- package/api/resources/actions/index.js +18 -2
- package/api/resources/actions/types/ActionRequest.js +2 -1
- package/api/resources/actions/types/index.d.ts +0 -12
- package/api/resources/actions/types/index.js +17 -13
- package/api/resources/appSettings/client/Client.d.ts +2 -0
- package/api/resources/appSettings/client/Client.js +40 -20
- package/api/resources/appSettings/client/index.js +2 -1
- package/api/resources/appSettings/index.js +17 -1
- package/api/resources/commons/errors/BadRequestError.js +29 -2
- package/api/resources/commons/errors/NotFoundError.js +29 -2
- package/api/resources/commons/errors/ServerError.js +29 -2
- package/api/resources/commons/errors/index.js +19 -3
- package/api/resources/commons/index.js +18 -2
- package/api/resources/commons/types/ActionBase.js +5 -0
- package/api/resources/commons/types/ActionEnumOption.d.ts +9 -0
- package/api/resources/commons/types/ActionEnumOption.js +5 -0
- package/api/resources/commons/types/ActionFormField.d.ts +20 -0
- package/api/resources/commons/types/ActionFormField.js +5 -0
- package/api/resources/commons/types/ActionParameter.d.ts +18 -0
- package/api/resources/commons/types/ActionParameter.js +5 -0
- package/api/resources/commons/types/ActionParameterType.d.ts +9 -0
- package/api/resources/commons/types/ActionParameterType.js +11 -0
- package/api/resources/commons/types/ActionResponse.js +5 -0
- package/api/resources/commons/types/AppUser.js +2 -1
- package/api/resources/commons/types/AppUserIdentifier.js +2 -1
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.js +4 -1
- package/api/resources/commons/types/AppUserRequest.js +2 -1
- package/api/resources/commons/types/AppUserResponse.js +2 -1
- package/api/resources/commons/types/BotActionFormResponse.js +5 -0
- package/api/resources/commons/types/BotChartResponse.js +5 -0
- package/{dist/api/resources/conversation → api/resources/commons}/types/BotConversationMessageType.d.ts +1 -2
- package/api/resources/commons/types/BotConversationMessageType.js +10 -0
- package/api/resources/commons/types/BotMessage.js +5 -0
- package/api/resources/{conversation → commons}/types/BotResponse.d.ts +1 -4
- package/api/resources/commons/types/BotResponse.js +5 -0
- package/api/resources/commons/types/BotResponseMetadata.js +5 -0
- package/api/resources/commons/types/BotTextResponse.js +5 -0
- package/api/resources/commons/types/Capability.d.ts +10 -0
- package/{dist/api/resources/conversation → api/resources/commons}/types/Capability.js +4 -1
- package/api/resources/commons/types/ChartSpecSchema.js +9 -0
- package/api/resources/commons/types/ConversationAnalysis.js +5 -0
- package/api/resources/commons/types/ConversationBase.js +5 -0
- package/api/resources/commons/types/ConversationExecutedActionPrecondition.js +5 -0
- package/api/resources/commons/types/ConversationMessageBase.js +5 -0
- package/api/resources/commons/types/ConversationMessageResponse.js +5 -0
- package/api/resources/commons/types/ConversationPrecondition.js +5 -0
- package/api/resources/commons/types/ConversationResponse.js +5 -0
- package/api/resources/commons/types/EntityId.js +2 -1
- package/api/resources/commons/types/EntityIdBase.js +2 -1
- package/api/resources/commons/types/EntityType.d.ts +2 -2
- package/api/resources/commons/types/EntityType.js +5 -2
- package/api/resources/commons/types/ErrorMessage.js +2 -1
- package/api/resources/commons/types/EventTriggerBase.js +2 -1
- package/api/resources/commons/types/EventTriggerResponse.js +2 -1
- package/api/resources/commons/types/EventTriggerType.js +4 -1
- package/api/resources/commons/types/Feedback.js +2 -1
- package/api/resources/commons/types/FeedbackBase.js +2 -1
- package/api/resources/commons/types/FeedbackType.js +4 -1
- package/api/resources/commons/types/MetadataPrecondition.js +5 -0
- package/api/resources/commons/types/Precondition.js +5 -0
- package/api/resources/commons/types/PreconditionBase.js +5 -0
- package/api/resources/commons/types/PreconditionGroup.js +5 -0
- package/api/resources/commons/types/PreconditionGroupOperator.js +10 -0
- package/api/resources/commons/types/PreconditionOperator.js +9 -0
- package/api/resources/commons/types/ResponseConfig.d.ts +22 -0
- package/api/resources/commons/types/ResponseConfig.js +5 -0
- package/api/resources/commons/types/ResponseLength.js +11 -0
- package/api/resources/{conversation → commons}/types/Sentiment.js +4 -1
- package/api/resources/commons/types/Source.js +5 -0
- package/api/resources/commons/types/TagsPrecondition.js +5 -0
- package/api/resources/{conversation → commons}/types/UserConversationMessageType.js +4 -1
- package/api/resources/commons/types/UserData.js +2 -1
- package/api/resources/commons/types/UserMessage.js +5 -0
- package/api/resources/commons/types/UserMessageAttachment.js +5 -0
- package/api/resources/commons/types/UserMessageBase.js +5 -0
- package/api/resources/commons/types/VisibilityType.js +4 -1
- package/api/resources/commons/types/index.d.ts +37 -0
- package/api/resources/commons/types/index.js +70 -17
- package/api/resources/conversation/client/Client.d.ts +7 -1
- package/api/resources/conversation/client/Client.js +72 -138
- package/api/resources/conversation/client/index.js +17 -1
- package/api/resources/conversation/client/requests/ConversationGetRequest.js +2 -1
- package/api/resources/conversation/client/requests/index.js +2 -1
- package/api/resources/conversation/index.js +18 -2
- package/api/resources/conversation/types/AskRequest.d.ts +7 -1
- package/api/resources/conversation/types/AskRequest.js +2 -1
- package/api/resources/conversation/types/AskStreamActionEvent.js +2 -1
- package/api/resources/conversation/types/AskStreamChartEvent.js +2 -1
- package/api/resources/conversation/types/AskStreamEndEvent.js +2 -1
- package/api/resources/conversation/types/AskStreamMetadataEvent.js +2 -1
- package/api/resources/conversation/types/AskStreamStartEvent.js +2 -1
- package/api/resources/conversation/types/AskStreamTextEvent.js +2 -1
- package/api/resources/conversation/types/Attachment.d.ts +1 -1
- package/api/resources/conversation/types/Attachment.js +2 -1
- package/api/resources/conversation/types/CategorizationResponse.js +2 -1
- package/api/resources/conversation/types/ConversationMessageRequest.js +2 -1
- package/api/resources/conversation/types/ConversationRequest.js +2 -1
- package/api/resources/conversation/types/FeedbackRequest.js +2 -1
- package/api/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
- package/api/resources/conversation/types/StreamResponse.js +2 -1
- package/api/resources/conversation/types/SubmitActionFormRequest.d.ts +2 -0
- package/api/resources/conversation/types/SubmitActionFormRequest.js +2 -1
- package/api/resources/conversation/types/index.d.ts +0 -24
- package/api/resources/conversation/types/index.js +31 -39
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +46 -16
- package/api/resources/knowledge/client/Client.d.ts +2 -0
- package/api/resources/knowledge/client/Client.js +58 -98
- package/api/resources/knowledge/client/index.js +2 -1
- package/api/resources/knowledge/index.js +18 -2
- package/api/resources/knowledge/types/BaseKnowledgeDocument.js +2 -1
- package/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts +2 -0
- package/api/resources/knowledge/types/KnowledgeBaseProperties.js +2 -1
- package/api/resources/knowledge/types/KnowledgeBaseRequest.js +2 -1
- package/api/resources/knowledge/types/KnowledgeBaseResponse.js +2 -1
- package/api/resources/knowledge/types/KnowledgeBaseType.js +4 -1
- package/api/resources/knowledge/types/KnowledgeBaseVersion.js +2 -1
- package/api/resources/knowledge/types/KnowledgeBaseVersionType.js +4 -1
- package/api/resources/knowledge/types/KnowledgeDocumentContentType.js +4 -1
- package/api/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -1
- package/api/resources/knowledge/types/KnowledgeDocumentResponse.js +2 -1
- package/api/resources/knowledge/types/index.js +26 -10
- package/api/resources/translations/client/Client.d.ts +2 -0
- package/api/resources/translations/client/Client.js +40 -20
- package/api/resources/translations/client/index.js +2 -1
- package/api/resources/translations/index.js +18 -2
- package/api/resources/translations/types/TranslationRequest.js +2 -1
- package/api/resources/translations/types/TranslationResponse.js +2 -1
- package/api/resources/translations/types/index.js +18 -2
- package/api/resources/triggers/client/Client.d.ts +2 -0
- package/api/resources/triggers/client/Client.js +46 -46
- package/api/resources/triggers/client/index.js +2 -1
- package/api/resources/triggers/index.js +18 -2
- package/api/resources/triggers/types/EventTriggerRequest.js +2 -1
- package/api/resources/triggers/types/index.js +17 -1
- package/api/resources/users/client/Client.d.ts +4 -1
- package/api/resources/users/client/Client.js +51 -34
- package/api/resources/users/client/index.d.ts +1 -1
- package/api/resources/users/client/index.js +17 -1
- package/api/resources/users/client/requests/UserGetRequest.d.ts +13 -0
- package/api/resources/users/client/requests/UserGetRequest.js +5 -0
- package/api/resources/users/client/requests/index.d.ts +1 -0
- package/api/resources/users/client/requests/index.js +2 -0
- package/api/resources/users/index.js +17 -1
- package/core/auth/BasicAuth.js +7 -4
- package/core/auth/BearerToken.js +4 -1
- package/core/auth/index.js +7 -2
- package/core/fetcher/APIResponse.js +2 -1
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/Fetcher.js +18 -14
- package/core/fetcher/Supplier.js +4 -1
- package/core/fetcher/createRequestUrl.js +10 -3
- package/core/fetcher/getFetchFn.js +33 -6
- package/core/fetcher/getHeader.js +5 -1
- package/core/fetcher/getRequestBody.js +5 -1
- package/core/fetcher/getResponseBody.js +10 -3
- package/core/fetcher/index.js +9 -3
- package/core/fetcher/makeRequest.js +8 -4
- package/core/fetcher/requestWithRetries.js +18 -5
- package/core/fetcher/signals.js +7 -2
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +5 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +5 -1
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +5 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +34 -7
- package/core/index.js +34 -5
- package/core/runtime/index.js +5 -1
- package/core/runtime/runtime.js +4 -1
- package/core/schemas/Schema.js +4 -1
- package/core/schemas/builders/bigint/bigint.js +13 -9
- package/core/schemas/builders/bigint/index.js +5 -1
- package/core/schemas/builders/date/date.js +14 -10
- package/core/schemas/builders/date/index.js +5 -1
- package/core/schemas/builders/enum/enum.js +11 -7
- package/core/schemas/builders/enum/index.js +5 -1
- package/core/schemas/builders/index.js +30 -14
- package/core/schemas/builders/lazy/index.js +7 -2
- package/core/schemas/builders/lazy/lazy.js +11 -5
- package/core/schemas/builders/lazy/lazyObject.js +11 -7
- package/core/schemas/builders/list/index.js +5 -1
- package/core/schemas/builders/list/list.js +12 -8
- package/core/schemas/builders/literals/booleanLiteral.js +10 -6
- package/core/schemas/builders/literals/index.js +7 -2
- package/core/schemas/builders/literals/stringLiteral.js +10 -6
- package/core/schemas/builders/object/index.js +11 -3
- package/core/schemas/builders/object/object.js +66 -33
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -3
- package/core/schemas/builders/object/property.js +7 -2
- package/core/schemas/builders/object/types.d.ts +5 -0
- package/core/schemas/builders/object/types.js +2 -1
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +15 -10
- package/core/schemas/builders/object-like/index.js +6 -1
- package/core/schemas/builders/object-like/types.js +2 -1
- package/core/schemas/builders/primitives/any.js +6 -3
- package/core/schemas/builders/primitives/boolean.js +8 -5
- package/core/schemas/builders/primitives/index.js +13 -5
- package/core/schemas/builders/primitives/number.js +8 -5
- package/core/schemas/builders/primitives/string.js +8 -5
- package/core/schemas/builders/primitives/unknown.js +6 -3
- package/core/schemas/builders/record/index.js +5 -1
- package/core/schemas/builders/record/record.js +18 -14
- package/core/schemas/builders/record/types.js +2 -1
- package/core/schemas/builders/schema-utils/JsonError.js +7 -3
- package/core/schemas/builders/schema-utils/ParseError.js +7 -3
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +15 -9
- package/core/schemas/builders/schema-utils/index.js +11 -3
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +5 -1
- package/core/schemas/builders/set/index.js +5 -1
- package/core/schemas/builders/set/set.js +14 -10
- package/core/schemas/builders/undiscriminated-union/index.js +5 -1
- package/core/schemas/builders/undiscriminated-union/types.js +2 -1
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +10 -6
- package/core/schemas/builders/union/discriminant.js +5 -1
- package/core/schemas/builders/union/index.js +7 -2
- package/core/schemas/builders/union/types.js +2 -1
- package/core/schemas/builders/union/union.js +18 -14
- package/core/schemas/index.js +17 -1
- package/core/schemas/utils/MaybePromise.js +2 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -1
- package/core/schemas/utils/createIdentitySchemaCreator.js +8 -4
- package/core/schemas/utils/entries.js +5 -1
- package/core/schemas/utils/filterObject.js +5 -1
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -1
- package/core/schemas/utils/isPlainObject.js +5 -1
- package/core/schemas/utils/keys.js +5 -1
- package/core/schemas/utils/maybeSkipValidation.js +5 -1
- package/core/schemas/utils/partition.js +5 -1
- package/core/streaming-fetcher/Stream.js +9 -4
- package/core/streaming-fetcher/index.js +5 -1
- package/dist/Client.d.ts +9 -7
- package/dist/Client.js +19 -15
- package/dist/api/index.js +17 -1
- package/dist/api/resources/actions/client/Client.d.ts +2 -0
- package/dist/api/resources/actions/client/Client.js +46 -46
- package/dist/api/resources/actions/client/index.js +2 -1
- package/dist/api/resources/actions/index.js +18 -2
- package/dist/api/resources/actions/types/ActionRequest.js +2 -1
- package/dist/api/resources/actions/types/index.d.ts +0 -12
- package/dist/api/resources/actions/types/index.js +17 -13
- package/dist/api/resources/appSettings/client/Client.d.ts +2 -0
- package/dist/api/resources/appSettings/client/Client.js +40 -20
- package/dist/api/resources/appSettings/client/index.js +2 -1
- package/dist/api/resources/appSettings/index.js +17 -1
- package/dist/api/resources/commons/errors/BadRequestError.js +29 -2
- package/dist/api/resources/commons/errors/NotFoundError.js +29 -2
- package/dist/api/resources/commons/errors/ServerError.js +29 -2
- package/dist/api/resources/commons/errors/index.js +19 -3
- package/dist/api/resources/commons/index.js +18 -2
- package/dist/api/resources/commons/types/ActionBase.js +5 -0
- package/dist/api/resources/commons/types/ActionEnumOption.d.ts +9 -0
- package/dist/api/resources/commons/types/ActionEnumOption.js +5 -0
- package/dist/api/resources/commons/types/ActionFormField.d.ts +20 -0
- package/dist/api/resources/commons/types/ActionFormField.js +5 -0
- package/dist/api/resources/commons/types/ActionParameter.d.ts +18 -0
- package/dist/api/resources/commons/types/ActionParameter.js +5 -0
- package/dist/api/resources/commons/types/ActionParameterType.d.ts +9 -0
- package/dist/api/resources/commons/types/ActionParameterType.js +11 -0
- package/dist/api/resources/commons/types/ActionResponse.js +5 -0
- package/dist/api/resources/commons/types/AppUser.js +2 -1
- package/dist/api/resources/commons/types/AppUserIdentifier.js +2 -1
- package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.js +4 -1
- package/dist/api/resources/commons/types/AppUserRequest.js +2 -1
- package/dist/api/resources/commons/types/AppUserResponse.js +2 -1
- package/dist/api/resources/commons/types/BotActionFormResponse.js +5 -0
- package/dist/api/resources/commons/types/BotChartResponse.js +5 -0
- package/{api/resources/conversation → dist/api/resources/commons}/types/BotConversationMessageType.d.ts +1 -2
- package/dist/api/resources/commons/types/BotConversationMessageType.js +10 -0
- package/dist/api/resources/commons/types/BotMessage.js +5 -0
- package/dist/api/resources/{conversation → commons}/types/BotResponse.d.ts +1 -4
- package/dist/api/resources/commons/types/BotResponse.js +5 -0
- package/dist/api/resources/commons/types/BotResponseMetadata.js +5 -0
- package/dist/api/resources/commons/types/BotTextResponse.js +5 -0
- package/dist/api/resources/commons/types/Capability.d.ts +10 -0
- package/{api/resources/conversation → dist/api/resources/commons}/types/Capability.js +4 -1
- package/dist/api/resources/commons/types/ChartSpecSchema.js +9 -0
- package/dist/api/resources/commons/types/ConversationAnalysis.js +5 -0
- package/dist/api/resources/commons/types/ConversationBase.js +5 -0
- package/dist/api/resources/commons/types/ConversationExecutedActionPrecondition.js +5 -0
- package/dist/api/resources/commons/types/ConversationMessageBase.js +5 -0
- package/dist/api/resources/commons/types/ConversationMessageResponse.js +5 -0
- package/dist/api/resources/commons/types/ConversationPrecondition.js +5 -0
- package/dist/api/resources/commons/types/ConversationResponse.js +5 -0
- package/dist/api/resources/commons/types/EntityId.js +2 -1
- package/dist/api/resources/commons/types/EntityIdBase.js +2 -1
- package/dist/api/resources/commons/types/EntityType.d.ts +2 -2
- package/dist/api/resources/commons/types/EntityType.js +5 -2
- package/dist/api/resources/commons/types/ErrorMessage.js +2 -1
- package/dist/api/resources/commons/types/EventTriggerBase.js +2 -1
- package/dist/api/resources/commons/types/EventTriggerResponse.js +2 -1
- package/dist/api/resources/commons/types/EventTriggerType.js +4 -1
- package/dist/api/resources/commons/types/Feedback.js +2 -1
- package/dist/api/resources/commons/types/FeedbackBase.js +2 -1
- package/dist/api/resources/commons/types/FeedbackType.js +4 -1
- package/dist/api/resources/commons/types/MetadataPrecondition.js +5 -0
- package/dist/api/resources/commons/types/Precondition.js +5 -0
- package/dist/api/resources/commons/types/PreconditionBase.js +5 -0
- package/dist/api/resources/commons/types/PreconditionGroup.js +5 -0
- package/dist/api/resources/commons/types/PreconditionGroupOperator.js +10 -0
- package/dist/api/resources/commons/types/PreconditionOperator.js +9 -0
- package/dist/api/resources/commons/types/ResponseConfig.d.ts +22 -0
- package/dist/api/resources/commons/types/ResponseConfig.js +5 -0
- package/dist/api/resources/commons/types/ResponseLength.js +11 -0
- package/dist/api/resources/{conversation → commons}/types/Sentiment.js +4 -1
- package/dist/api/resources/commons/types/Source.js +5 -0
- package/dist/api/resources/commons/types/TagsPrecondition.js +5 -0
- package/dist/api/resources/{conversation → commons}/types/UserConversationMessageType.js +4 -1
- package/dist/api/resources/commons/types/UserData.js +2 -1
- package/dist/api/resources/commons/types/UserMessage.js +5 -0
- package/dist/api/resources/commons/types/UserMessageAttachment.js +5 -0
- package/dist/api/resources/commons/types/UserMessageBase.js +5 -0
- package/dist/api/resources/commons/types/VisibilityType.js +4 -1
- package/dist/api/resources/commons/types/index.d.ts +37 -0
- package/dist/api/resources/commons/types/index.js +70 -17
- package/dist/api/resources/conversation/client/Client.d.ts +7 -1
- package/dist/api/resources/conversation/client/Client.js +72 -138
- package/dist/api/resources/conversation/client/index.js +17 -1
- package/dist/api/resources/conversation/client/requests/ConversationGetRequest.js +2 -1
- package/dist/api/resources/conversation/client/requests/index.js +2 -1
- package/dist/api/resources/conversation/index.js +18 -2
- package/dist/api/resources/conversation/types/AskRequest.d.ts +7 -1
- package/dist/api/resources/conversation/types/AskRequest.js +2 -1
- package/dist/api/resources/conversation/types/AskStreamActionEvent.js +2 -1
- package/dist/api/resources/conversation/types/AskStreamChartEvent.js +2 -1
- package/dist/api/resources/conversation/types/AskStreamEndEvent.js +2 -1
- package/dist/api/resources/conversation/types/AskStreamMetadataEvent.js +2 -1
- package/dist/api/resources/conversation/types/AskStreamStartEvent.js +2 -1
- package/dist/api/resources/conversation/types/AskStreamTextEvent.js +2 -1
- package/dist/api/resources/conversation/types/Attachment.d.ts +1 -1
- package/dist/api/resources/conversation/types/Attachment.js +2 -1
- package/dist/api/resources/conversation/types/CategorizationResponse.js +2 -1
- package/dist/api/resources/conversation/types/ConversationMessageRequest.js +2 -1
- package/dist/api/resources/conversation/types/ConversationRequest.js +2 -1
- package/dist/api/resources/conversation/types/FeedbackRequest.js +2 -1
- package/dist/api/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
- package/dist/api/resources/conversation/types/StreamResponse.js +2 -1
- package/dist/api/resources/conversation/types/SubmitActionFormRequest.d.ts +2 -0
- package/dist/api/resources/conversation/types/SubmitActionFormRequest.js +2 -1
- package/dist/api/resources/conversation/types/index.d.ts +0 -24
- package/dist/api/resources/conversation/types/index.js +31 -39
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +46 -16
- package/dist/api/resources/knowledge/client/Client.d.ts +2 -0
- package/dist/api/resources/knowledge/client/Client.js +58 -98
- package/dist/api/resources/knowledge/client/index.js +2 -1
- package/dist/api/resources/knowledge/index.js +18 -2
- package/dist/api/resources/knowledge/types/BaseKnowledgeDocument.js +2 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts +2 -0
- package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.js +2 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.js +2 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.js +2 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.js +4 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersion.js +2 -1
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersionType.js +4 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.js +4 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentRequest.js +2 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentResponse.js +2 -1
- package/dist/api/resources/knowledge/types/index.js +26 -10
- package/dist/api/resources/translations/client/Client.d.ts +2 -0
- package/dist/api/resources/translations/client/Client.js +40 -20
- package/dist/api/resources/translations/client/index.js +2 -1
- package/dist/api/resources/translations/index.js +18 -2
- package/dist/api/resources/translations/types/TranslationRequest.js +2 -1
- package/dist/api/resources/translations/types/TranslationResponse.js +2 -1
- package/dist/api/resources/translations/types/index.js +18 -2
- package/dist/api/resources/triggers/client/Client.d.ts +2 -0
- package/dist/api/resources/triggers/client/Client.js +46 -46
- package/dist/api/resources/triggers/client/index.js +2 -1
- package/dist/api/resources/triggers/index.js +18 -2
- package/dist/api/resources/triggers/types/EventTriggerRequest.js +2 -1
- package/dist/api/resources/triggers/types/index.js +17 -1
- package/dist/api/resources/users/client/Client.d.ts +4 -1
- package/dist/api/resources/users/client/Client.js +51 -34
- package/dist/api/resources/users/client/index.d.ts +1 -1
- package/dist/api/resources/users/client/index.js +17 -1
- package/dist/api/resources/users/client/requests/UserGetRequest.d.ts +13 -0
- package/dist/api/resources/users/client/requests/UserGetRequest.js +5 -0
- package/dist/api/resources/users/client/requests/index.d.ts +1 -0
- package/dist/api/resources/users/client/requests/index.js +2 -0
- package/dist/api/resources/users/index.js +17 -1
- package/dist/core/auth/BasicAuth.js +7 -4
- package/dist/core/auth/BearerToken.js +4 -1
- package/dist/core/auth/index.js +7 -2
- package/dist/core/fetcher/APIResponse.js +2 -1
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.js +18 -14
- package/dist/core/fetcher/Supplier.js +4 -1
- package/dist/core/fetcher/createRequestUrl.js +10 -3
- package/dist/core/fetcher/getFetchFn.js +33 -6
- package/dist/core/fetcher/getHeader.js +5 -1
- package/dist/core/fetcher/getRequestBody.js +5 -1
- package/dist/core/fetcher/getResponseBody.js +10 -3
- package/dist/core/fetcher/index.js +9 -3
- package/dist/core/fetcher/makeRequest.js +8 -4
- package/dist/core/fetcher/requestWithRetries.js +18 -5
- package/dist/core/fetcher/signals.js +7 -2
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +5 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +5 -1
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +5 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +34 -7
- package/dist/core/index.js +34 -5
- package/dist/core/runtime/index.js +5 -1
- package/dist/core/runtime/runtime.js +4 -1
- package/dist/core/schemas/Schema.js +4 -1
- package/dist/core/schemas/builders/bigint/bigint.js +13 -9
- package/dist/core/schemas/builders/bigint/index.js +5 -1
- package/dist/core/schemas/builders/date/date.js +14 -10
- package/dist/core/schemas/builders/date/index.js +5 -1
- package/dist/core/schemas/builders/enum/enum.js +11 -7
- package/dist/core/schemas/builders/enum/index.js +5 -1
- package/dist/core/schemas/builders/index.js +30 -14
- package/dist/core/schemas/builders/lazy/index.js +7 -2
- package/dist/core/schemas/builders/lazy/lazy.js +11 -5
- package/dist/core/schemas/builders/lazy/lazyObject.js +11 -7
- package/dist/core/schemas/builders/list/index.js +5 -1
- package/dist/core/schemas/builders/list/list.js +12 -8
- package/dist/core/schemas/builders/literals/booleanLiteral.js +10 -6
- package/dist/core/schemas/builders/literals/index.js +7 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +10 -6
- package/dist/core/schemas/builders/object/index.js +11 -3
- package/dist/core/schemas/builders/object/object.js +66 -33
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -3
- package/dist/core/schemas/builders/object/property.js +7 -2
- package/dist/core/schemas/builders/object/types.d.ts +5 -0
- package/dist/core/schemas/builders/object/types.js +2 -1
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +15 -10
- package/dist/core/schemas/builders/object-like/index.js +6 -1
- package/dist/core/schemas/builders/object-like/types.js +2 -1
- package/dist/core/schemas/builders/primitives/any.js +6 -3
- package/dist/core/schemas/builders/primitives/boolean.js +8 -5
- package/dist/core/schemas/builders/primitives/index.js +13 -5
- package/dist/core/schemas/builders/primitives/number.js +8 -5
- package/dist/core/schemas/builders/primitives/string.js +8 -5
- package/dist/core/schemas/builders/primitives/unknown.js +6 -3
- package/dist/core/schemas/builders/record/index.js +5 -1
- package/dist/core/schemas/builders/record/record.js +18 -14
- package/dist/core/schemas/builders/record/types.js +2 -1
- package/dist/core/schemas/builders/schema-utils/JsonError.js +7 -3
- package/dist/core/schemas/builders/schema-utils/ParseError.js +7 -3
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +15 -9
- package/dist/core/schemas/builders/schema-utils/index.js +11 -3
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +5 -1
- package/dist/core/schemas/builders/set/index.js +5 -1
- package/dist/core/schemas/builders/set/set.js +14 -10
- package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -1
- package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -1
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +10 -6
- package/dist/core/schemas/builders/union/discriminant.js +5 -1
- package/dist/core/schemas/builders/union/index.js +7 -2
- package/dist/core/schemas/builders/union/types.js +2 -1
- package/dist/core/schemas/builders/union/union.js +18 -14
- package/dist/core/schemas/index.js +17 -1
- package/dist/core/schemas/utils/MaybePromise.js +2 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -1
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +8 -4
- package/dist/core/schemas/utils/entries.js +5 -1
- package/dist/core/schemas/utils/filterObject.js +5 -1
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -1
- package/dist/core/schemas/utils/isPlainObject.js +5 -1
- package/dist/core/schemas/utils/keys.js +5 -1
- package/dist/core/schemas/utils/maybeSkipValidation.js +5 -1
- package/dist/core/schemas/utils/partition.js +5 -1
- package/dist/core/streaming-fetcher/Stream.js +9 -4
- package/dist/core/streaming-fetcher/index.js +5 -1
- package/dist/environments.js +4 -1
- package/dist/errors/MavenAGIError.js +5 -1
- package/dist/errors/MavenAGITimeoutError.d.ts +1 -1
- package/dist/errors/MavenAGITimeoutError.js +7 -3
- package/dist/errors/index.js +7 -2
- package/dist/index.js +34 -4
- package/dist/serialization/index.js +17 -1
- package/dist/serialization/resources/actions/index.js +17 -1
- package/dist/serialization/resources/actions/types/ActionRequest.d.ts +1 -1
- package/dist/serialization/resources/actions/types/ActionRequest.js +32 -6
- package/dist/serialization/resources/actions/types/index.d.ts +0 -12
- package/dist/serialization/resources/actions/types/index.js +17 -13
- package/dist/serialization/resources/appSettings/client/get.js +28 -2
- package/dist/serialization/resources/appSettings/client/index.js +27 -1
- package/dist/serialization/resources/appSettings/index.js +17 -1
- package/dist/serialization/resources/commons/index.js +17 -1
- package/dist/serialization/resources/commons/types/ActionBase.js +40 -0
- package/dist/serialization/resources/commons/types/ActionEnumOption.d.ts +13 -0
- package/dist/serialization/resources/commons/types/ActionEnumOption.js +34 -0
- package/dist/serialization/resources/{conversation → commons}/types/ActionFormField.d.ts +5 -1
- package/dist/serialization/resources/commons/types/ActionFormField.js +41 -0
- package/{serialization/resources/actions → dist/serialization/resources/commons}/types/ActionParameter.d.ts +4 -0
- package/dist/serialization/resources/commons/types/ActionParameter.js +40 -0
- package/dist/serialization/resources/commons/types/ActionParameterType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/ActionParameterType.js +31 -0
- package/{serialization/resources/actions → dist/serialization/resources/commons}/types/ActionResponse.d.ts +1 -1
- package/dist/serialization/resources/commons/types/ActionResponse.js +37 -0
- package/dist/serialization/resources/commons/types/AppUser.js +32 -6
- package/dist/serialization/resources/commons/types/AppUserIdentifier.js +30 -4
- package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +28 -2
- package/dist/serialization/resources/commons/types/AppUserRequest.js +32 -6
- package/dist/serialization/resources/commons/types/AppUserResponse.js +32 -6
- package/dist/serialization/resources/commons/types/BotActionFormResponse.js +37 -0
- package/dist/serialization/resources/commons/types/BotChartResponse.js +36 -0
- package/{serialization/resources/conversation → dist/serialization/resources/commons}/types/BotConversationMessageType.d.ts +1 -1
- package/dist/serialization/resources/commons/types/BotConversationMessageType.js +31 -0
- package/dist/serialization/resources/{conversation → commons}/types/BotMessage.d.ts +1 -1
- package/dist/serialization/resources/commons/types/BotMessage.js +43 -0
- package/{serialization/resources/conversation → dist/serialization/resources/commons}/types/BotResponse.d.ts +1 -5
- package/dist/serialization/resources/commons/types/BotResponse.js +43 -0
- package/dist/serialization/resources/commons/types/BotResponseMetadata.js +36 -0
- package/dist/serialization/resources/commons/types/BotTextResponse.js +33 -0
- package/dist/serialization/resources/commons/types/Capability.js +31 -0
- package/dist/serialization/resources/commons/types/ChartSpecSchema.js +31 -0
- package/dist/serialization/resources/commons/types/ConversationAnalysis.js +38 -0
- package/dist/serialization/resources/commons/types/ConversationBase.js +40 -0
- package/dist/serialization/resources/commons/types/ConversationExecutedActionPrecondition.js +37 -0
- package/dist/serialization/resources/commons/types/ConversationMessageBase.js +34 -0
- package/dist/serialization/resources/commons/types/ConversationMessageResponse.js +41 -0
- package/dist/serialization/resources/commons/types/ConversationPrecondition.js +43 -0
- package/dist/serialization/resources/{conversation → commons}/types/ConversationResponse.d.ts +1 -1
- package/dist/serialization/resources/commons/types/ConversationResponse.js +41 -0
- package/dist/serialization/resources/commons/types/EntityId.js +32 -6
- package/dist/serialization/resources/commons/types/EntityIdBase.js +28 -2
- package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/dist/serialization/resources/commons/types/EntityType.js +29 -3
- package/dist/serialization/resources/commons/types/ErrorMessage.js +28 -2
- package/dist/serialization/resources/commons/types/EventTriggerBase.js +30 -4
- package/dist/serialization/resources/commons/types/EventTriggerResponse.js +32 -6
- package/dist/serialization/resources/commons/types/EventTriggerType.js +28 -2
- package/dist/serialization/resources/commons/types/Feedback.js +35 -9
- package/dist/serialization/resources/commons/types/FeedbackBase.js +30 -4
- package/dist/serialization/resources/commons/types/FeedbackType.js +28 -2
- package/dist/serialization/resources/commons/types/MetadataPrecondition.js +37 -0
- package/dist/serialization/resources/commons/types/Precondition.js +45 -0
- package/dist/serialization/resources/commons/types/PreconditionBase.js +34 -0
- package/dist/serialization/resources/commons/types/PreconditionGroup.js +36 -0
- package/dist/serialization/resources/commons/types/PreconditionGroupOperator.js +31 -0
- package/dist/serialization/resources/commons/types/PreconditionOperator.js +31 -0
- package/dist/serialization/resources/commons/types/ResponseConfig.js +37 -0
- package/dist/serialization/resources/commons/types/ResponseLength.js +31 -0
- package/dist/serialization/resources/commons/types/Sentiment.js +31 -0
- package/dist/serialization/resources/commons/types/Source.js +34 -0
- package/dist/serialization/resources/commons/types/TagsPrecondition.js +36 -0
- package/dist/serialization/resources/commons/types/UserConversationMessageType.js +31 -0
- package/dist/serialization/resources/commons/types/UserData.js +30 -4
- package/dist/serialization/resources/{conversation → commons}/types/UserMessage.d.ts +1 -1
- package/dist/serialization/resources/commons/types/UserMessage.js +40 -0
- package/dist/serialization/resources/commons/types/UserMessageAttachment.js +33 -0
- package/dist/serialization/resources/{conversation → commons}/types/UserMessageBase.d.ts +1 -1
- package/dist/serialization/resources/commons/types/UserMessageBase.js +40 -0
- package/dist/serialization/resources/commons/types/VisibilityType.js +28 -2
- package/dist/serialization/resources/commons/types/index.d.ts +37 -0
- package/dist/serialization/resources/commons/types/index.js +70 -17
- package/dist/serialization/resources/conversation/client/addConversationMetadata.js +29 -3
- package/dist/serialization/resources/conversation/client/appendNewMessages.js +29 -3
- package/dist/serialization/resources/conversation/client/index.js +28 -2
- package/dist/serialization/resources/conversation/index.js +18 -2
- package/dist/serialization/resources/conversation/types/AskRequest.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/AskRequest.js +34 -7
- package/dist/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/AskStreamActionEvent.js +29 -3
- package/dist/serialization/resources/conversation/types/AskStreamChartEvent.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/AskStreamChartEvent.js +29 -3
- package/dist/serialization/resources/conversation/types/AskStreamEndEvent.js +30 -4
- package/dist/serialization/resources/conversation/types/AskStreamMetadataEvent.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/AskStreamMetadataEvent.js +29 -3
- package/dist/serialization/resources/conversation/types/AskStreamStartEvent.js +30 -4
- package/dist/serialization/resources/conversation/types/AskStreamTextEvent.js +28 -2
- package/dist/serialization/resources/conversation/types/Attachment.js +28 -2
- package/dist/serialization/resources/conversation/types/CategorizationResponse.js +28 -2
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.js +32 -6
- package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/ConversationRequest.js +34 -8
- package/dist/serialization/resources/conversation/types/FeedbackRequest.js +35 -9
- package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +30 -4
- package/dist/serialization/resources/conversation/types/StreamResponse.js +40 -14
- package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -0
- package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.js +29 -2
- package/dist/serialization/resources/conversation/types/index.d.ts +0 -24
- package/dist/serialization/resources/conversation/types/index.js +31 -39
- package/dist/serialization/resources/index.js +42 -13
- package/dist/serialization/resources/knowledge/index.js +17 -1
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +28 -2
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts +1 -0
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.js +32 -4
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +32 -6
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +32 -6
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.js +28 -2
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +30 -4
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersionType.js +28 -2
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +28 -2
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +34 -8
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +32 -6
- package/dist/serialization/resources/knowledge/types/index.js +26 -10
- package/dist/serialization/resources/translations/index.js +17 -1
- package/dist/serialization/resources/translations/types/TranslationRequest.js +28 -2
- package/dist/serialization/resources/translations/types/TranslationResponse.js +28 -2
- package/dist/serialization/resources/translations/types/index.js +18 -2
- package/dist/serialization/resources/triggers/index.js +17 -1
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +32 -6
- package/dist/serialization/resources/triggers/types/index.js +17 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +4 -1
- package/environments.js +4 -1
- package/errors/MavenAGIError.js +5 -1
- package/errors/MavenAGITimeoutError.d.ts +1 -1
- package/errors/MavenAGITimeoutError.js +7 -3
- package/errors/index.js +7 -2
- package/index.js +34 -4
- package/package.json +1 -2
- package/reference.md +21 -2
- package/serialization/index.js +17 -1
- package/serialization/resources/actions/index.js +17 -1
- package/serialization/resources/actions/types/ActionRequest.d.ts +1 -1
- package/serialization/resources/actions/types/ActionRequest.js +32 -6
- package/serialization/resources/actions/types/index.d.ts +0 -12
- package/serialization/resources/actions/types/index.js +17 -13
- package/serialization/resources/appSettings/client/get.js +28 -2
- package/serialization/resources/appSettings/client/index.js +27 -1
- package/serialization/resources/appSettings/index.js +17 -1
- package/serialization/resources/commons/index.js +17 -1
- package/serialization/resources/commons/types/ActionBase.js +40 -0
- package/serialization/resources/commons/types/ActionEnumOption.d.ts +13 -0
- package/serialization/resources/commons/types/ActionEnumOption.js +34 -0
- package/serialization/resources/{conversation → commons}/types/ActionFormField.d.ts +5 -1
- package/serialization/resources/commons/types/ActionFormField.js +41 -0
- package/{dist/serialization/resources/actions → serialization/resources/commons}/types/ActionParameter.d.ts +4 -0
- package/serialization/resources/commons/types/ActionParameter.js +40 -0
- package/serialization/resources/commons/types/ActionParameterType.d.ts +10 -0
- package/serialization/resources/commons/types/ActionParameterType.js +31 -0
- package/{dist/serialization/resources/actions → serialization/resources/commons}/types/ActionResponse.d.ts +1 -1
- package/serialization/resources/commons/types/ActionResponse.js +37 -0
- package/serialization/resources/commons/types/AppUser.js +32 -6
- package/serialization/resources/commons/types/AppUserIdentifier.js +30 -4
- package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +28 -2
- package/serialization/resources/commons/types/AppUserRequest.js +32 -6
- package/serialization/resources/commons/types/AppUserResponse.js +32 -6
- package/serialization/resources/commons/types/BotActionFormResponse.js +37 -0
- package/serialization/resources/commons/types/BotChartResponse.js +36 -0
- package/{dist/serialization/resources/conversation → serialization/resources/commons}/types/BotConversationMessageType.d.ts +1 -1
- package/serialization/resources/commons/types/BotConversationMessageType.js +31 -0
- package/serialization/resources/{conversation → commons}/types/BotMessage.d.ts +1 -1
- package/serialization/resources/commons/types/BotMessage.js +43 -0
- package/{dist/serialization/resources/conversation → serialization/resources/commons}/types/BotResponse.d.ts +1 -5
- package/serialization/resources/commons/types/BotResponse.js +43 -0
- package/serialization/resources/commons/types/BotResponseMetadata.js +36 -0
- package/serialization/resources/commons/types/BotTextResponse.js +33 -0
- package/serialization/resources/commons/types/Capability.js +31 -0
- package/serialization/resources/commons/types/ChartSpecSchema.js +31 -0
- package/serialization/resources/commons/types/ConversationAnalysis.js +38 -0
- package/serialization/resources/commons/types/ConversationBase.js +40 -0
- package/serialization/resources/commons/types/ConversationExecutedActionPrecondition.js +37 -0
- package/serialization/resources/commons/types/ConversationMessageBase.js +34 -0
- package/serialization/resources/commons/types/ConversationMessageResponse.js +41 -0
- package/serialization/resources/commons/types/ConversationPrecondition.js +43 -0
- package/serialization/resources/{conversation → commons}/types/ConversationResponse.d.ts +1 -1
- package/serialization/resources/commons/types/ConversationResponse.js +41 -0
- package/serialization/resources/commons/types/EntityId.js +32 -6
- package/serialization/resources/commons/types/EntityIdBase.js +28 -2
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +29 -3
- package/serialization/resources/commons/types/ErrorMessage.js +28 -2
- package/serialization/resources/commons/types/EventTriggerBase.js +30 -4
- package/serialization/resources/commons/types/EventTriggerResponse.js +32 -6
- package/serialization/resources/commons/types/EventTriggerType.js +28 -2
- package/serialization/resources/commons/types/Feedback.js +35 -9
- package/serialization/resources/commons/types/FeedbackBase.js +30 -4
- package/serialization/resources/commons/types/FeedbackType.js +28 -2
- package/serialization/resources/commons/types/MetadataPrecondition.js +37 -0
- package/serialization/resources/commons/types/Precondition.js +45 -0
- package/serialization/resources/commons/types/PreconditionBase.js +34 -0
- package/serialization/resources/commons/types/PreconditionGroup.js +36 -0
- package/serialization/resources/commons/types/PreconditionGroupOperator.js +31 -0
- package/serialization/resources/commons/types/PreconditionOperator.js +31 -0
- package/serialization/resources/commons/types/ResponseConfig.js +37 -0
- package/serialization/resources/commons/types/ResponseLength.js +31 -0
- package/serialization/resources/commons/types/Sentiment.js +31 -0
- package/serialization/resources/commons/types/Source.js +34 -0
- package/serialization/resources/commons/types/TagsPrecondition.js +36 -0
- package/serialization/resources/commons/types/UserConversationMessageType.js +31 -0
- package/serialization/resources/commons/types/UserData.js +30 -4
- package/serialization/resources/{conversation → commons}/types/UserMessage.d.ts +1 -1
- package/serialization/resources/commons/types/UserMessage.js +40 -0
- package/serialization/resources/commons/types/UserMessageAttachment.js +33 -0
- package/serialization/resources/{conversation → commons}/types/UserMessageBase.d.ts +1 -1
- package/serialization/resources/commons/types/UserMessageBase.js +40 -0
- package/serialization/resources/commons/types/VisibilityType.js +28 -2
- package/serialization/resources/commons/types/index.d.ts +37 -0
- package/serialization/resources/commons/types/index.js +70 -17
- package/serialization/resources/conversation/client/addConversationMetadata.js +29 -3
- package/serialization/resources/conversation/client/appendNewMessages.js +29 -3
- package/serialization/resources/conversation/client/index.js +28 -2
- package/serialization/resources/conversation/index.js +18 -2
- package/serialization/resources/conversation/types/AskRequest.d.ts +1 -0
- package/serialization/resources/conversation/types/AskRequest.js +34 -7
- package/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +1 -1
- package/serialization/resources/conversation/types/AskStreamActionEvent.js +29 -3
- package/serialization/resources/conversation/types/AskStreamChartEvent.d.ts +1 -1
- package/serialization/resources/conversation/types/AskStreamChartEvent.js +29 -3
- package/serialization/resources/conversation/types/AskStreamEndEvent.js +30 -4
- package/serialization/resources/conversation/types/AskStreamMetadataEvent.d.ts +1 -1
- package/serialization/resources/conversation/types/AskStreamMetadataEvent.js +29 -3
- package/serialization/resources/conversation/types/AskStreamStartEvent.js +30 -4
- package/serialization/resources/conversation/types/AskStreamTextEvent.js +28 -2
- package/serialization/resources/conversation/types/Attachment.js +28 -2
- package/serialization/resources/conversation/types/CategorizationResponse.js +28 -2
- package/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +1 -1
- package/serialization/resources/conversation/types/ConversationMessageRequest.js +32 -6
- package/serialization/resources/conversation/types/ConversationRequest.d.ts +1 -1
- package/serialization/resources/conversation/types/ConversationRequest.js +34 -8
- package/serialization/resources/conversation/types/FeedbackRequest.js +35 -9
- package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +30 -4
- package/serialization/resources/conversation/types/StreamResponse.js +40 -14
- package/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -0
- package/serialization/resources/conversation/types/SubmitActionFormRequest.js +29 -2
- package/serialization/resources/conversation/types/index.d.ts +0 -24
- package/serialization/resources/conversation/types/index.js +31 -39
- package/serialization/resources/index.js +42 -13
- package/serialization/resources/knowledge/index.js +17 -1
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +28 -2
- package/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts +1 -0
- package/serialization/resources/knowledge/types/KnowledgeBaseProperties.js +32 -4
- package/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +32 -6
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +32 -6
- package/serialization/resources/knowledge/types/KnowledgeBaseType.js +28 -2
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +30 -4
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionType.js +28 -2
- package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +28 -2
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +34 -8
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +32 -6
- package/serialization/resources/knowledge/types/index.js +26 -10
- package/serialization/resources/translations/index.js +17 -1
- package/serialization/resources/translations/types/TranslationRequest.js +28 -2
- package/serialization/resources/translations/types/TranslationResponse.js +28 -2
- package/serialization/resources/translations/types/index.js +18 -2
- package/serialization/resources/triggers/index.js +17 -1
- package/serialization/resources/triggers/types/EventTriggerRequest.js +32 -6
- package/serialization/resources/triggers/types/index.js +17 -1
- package/version.d.ts +1 -1
- package/version.js +4 -1
- package/api/resources/actions/types/ActionBase.js +0 -4
- package/api/resources/actions/types/ActionParameter.d.ts +0 -9
- package/api/resources/actions/types/ActionParameter.js +0 -4
- package/api/resources/actions/types/ActionResponse.js +0 -4
- package/api/resources/actions/types/ConversationExecutedActionPrecondition.js +0 -4
- package/api/resources/actions/types/ConversationPrecondition.js +0 -4
- package/api/resources/actions/types/MetadataPrecondition.js +0 -4
- package/api/resources/actions/types/Precondition.js +0 -4
- package/api/resources/actions/types/PreconditionBase.js +0 -4
- package/api/resources/actions/types/PreconditionGroup.js +0 -4
- package/api/resources/actions/types/PreconditionGroupOperator.js +0 -7
- package/api/resources/actions/types/PreconditionOperator.js +0 -6
- package/api/resources/actions/types/TagsPrecondition.js +0 -4
- package/api/resources/conversation/types/ActionFormField.d.ts +0 -10
- package/api/resources/conversation/types/ActionFormField.js +0 -4
- package/api/resources/conversation/types/BotActionFormResponse.js +0 -4
- package/api/resources/conversation/types/BotActionResponse.d.ts +0 -15
- package/api/resources/conversation/types/BotActionResponse.js +0 -4
- package/api/resources/conversation/types/BotChartResponse.js +0 -4
- package/api/resources/conversation/types/BotConversationMessageType.js +0 -8
- package/api/resources/conversation/types/BotMessage.js +0 -4
- package/api/resources/conversation/types/BotResponse.js +0 -4
- package/api/resources/conversation/types/BotResponseMetadata.js +0 -4
- package/api/resources/conversation/types/BotTextResponse.js +0 -4
- package/api/resources/conversation/types/Capability.d.ts +0 -22
- package/api/resources/conversation/types/ChartSpecSchema.js +0 -6
- package/api/resources/conversation/types/ConversationAnalysis.js +0 -4
- package/api/resources/conversation/types/ConversationBase.js +0 -4
- package/api/resources/conversation/types/ConversationMessageBase.js +0 -4
- package/api/resources/conversation/types/ConversationMessageResponse.js +0 -4
- package/api/resources/conversation/types/ConversationResponse.js +0 -4
- package/api/resources/conversation/types/ResponseConfig.d.ts +0 -12
- package/api/resources/conversation/types/ResponseConfig.js +0 -4
- package/api/resources/conversation/types/ResponseLength.js +0 -8
- package/api/resources/conversation/types/Source.js +0 -4
- package/api/resources/conversation/types/UserMessage.js +0 -4
- package/api/resources/conversation/types/UserMessageAttachment.js +0 -4
- package/api/resources/conversation/types/UserMessageBase.js +0 -4
- package/dist/api/resources/actions/types/ActionBase.js +0 -4
- package/dist/api/resources/actions/types/ActionParameter.d.ts +0 -9
- package/dist/api/resources/actions/types/ActionParameter.js +0 -4
- package/dist/api/resources/actions/types/ActionResponse.js +0 -4
- package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.js +0 -4
- package/dist/api/resources/actions/types/ConversationPrecondition.js +0 -4
- package/dist/api/resources/actions/types/MetadataPrecondition.js +0 -4
- package/dist/api/resources/actions/types/Precondition.js +0 -4
- package/dist/api/resources/actions/types/PreconditionBase.js +0 -4
- package/dist/api/resources/actions/types/PreconditionGroup.js +0 -4
- package/dist/api/resources/actions/types/PreconditionGroupOperator.js +0 -7
- package/dist/api/resources/actions/types/PreconditionOperator.js +0 -6
- package/dist/api/resources/actions/types/TagsPrecondition.js +0 -4
- package/dist/api/resources/conversation/types/ActionFormField.d.ts +0 -10
- package/dist/api/resources/conversation/types/ActionFormField.js +0 -4
- package/dist/api/resources/conversation/types/BotActionFormResponse.js +0 -4
- package/dist/api/resources/conversation/types/BotActionResponse.d.ts +0 -15
- package/dist/api/resources/conversation/types/BotActionResponse.js +0 -4
- package/dist/api/resources/conversation/types/BotChartResponse.js +0 -4
- package/dist/api/resources/conversation/types/BotConversationMessageType.js +0 -8
- package/dist/api/resources/conversation/types/BotMessage.js +0 -4
- package/dist/api/resources/conversation/types/BotResponse.js +0 -4
- package/dist/api/resources/conversation/types/BotResponseMetadata.js +0 -4
- package/dist/api/resources/conversation/types/BotTextResponse.js +0 -4
- package/dist/api/resources/conversation/types/Capability.d.ts +0 -22
- package/dist/api/resources/conversation/types/ChartSpecSchema.js +0 -6
- package/dist/api/resources/conversation/types/ConversationAnalysis.js +0 -4
- package/dist/api/resources/conversation/types/ConversationBase.js +0 -4
- package/dist/api/resources/conversation/types/ConversationMessageBase.js +0 -4
- package/dist/api/resources/conversation/types/ConversationMessageResponse.js +0 -4
- package/dist/api/resources/conversation/types/ConversationResponse.js +0 -4
- package/dist/api/resources/conversation/types/ResponseConfig.d.ts +0 -12
- package/dist/api/resources/conversation/types/ResponseConfig.js +0 -4
- package/dist/api/resources/conversation/types/ResponseLength.js +0 -8
- package/dist/api/resources/conversation/types/Source.js +0 -4
- package/dist/api/resources/conversation/types/UserMessage.js +0 -4
- package/dist/api/resources/conversation/types/UserMessageAttachment.js +0 -4
- package/dist/api/resources/conversation/types/UserMessageBase.js +0 -4
- package/dist/serialization/resources/actions/types/ActionBase.js +0 -14
- package/dist/serialization/resources/actions/types/ActionParameter.js +0 -10
- package/dist/serialization/resources/actions/types/ActionResponse.js +0 -11
- package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +0 -11
- package/dist/serialization/resources/actions/types/ConversationPrecondition.js +0 -17
- package/dist/serialization/resources/actions/types/MetadataPrecondition.js +0 -11
- package/dist/serialization/resources/actions/types/Precondition.js +0 -19
- package/dist/serialization/resources/actions/types/PreconditionBase.js +0 -8
- package/dist/serialization/resources/actions/types/PreconditionGroup.js +0 -10
- package/dist/serialization/resources/actions/types/PreconditionGroupOperator.js +0 -5
- package/dist/serialization/resources/actions/types/PreconditionOperator.js +0 -5
- package/dist/serialization/resources/actions/types/TagsPrecondition.js +0 -10
- package/dist/serialization/resources/conversation/types/ActionFormField.js +0 -11
- package/dist/serialization/resources/conversation/types/BotActionFormResponse.js +0 -11
- package/dist/serialization/resources/conversation/types/BotActionResponse.d.ts +0 -17
- package/dist/serialization/resources/conversation/types/BotActionResponse.js +0 -12
- package/dist/serialization/resources/conversation/types/BotChartResponse.js +0 -10
- package/dist/serialization/resources/conversation/types/BotConversationMessageType.js +0 -5
- package/dist/serialization/resources/conversation/types/BotMessage.js +0 -17
- package/dist/serialization/resources/conversation/types/BotResponse.js +0 -19
- package/dist/serialization/resources/conversation/types/BotResponseMetadata.js +0 -10
- package/dist/serialization/resources/conversation/types/BotTextResponse.js +0 -7
- package/dist/serialization/resources/conversation/types/Capability.js +0 -5
- package/dist/serialization/resources/conversation/types/ChartSpecSchema.js +0 -5
- package/dist/serialization/resources/conversation/types/ConversationAnalysis.js +0 -12
- package/dist/serialization/resources/conversation/types/ConversationBase.js +0 -14
- package/dist/serialization/resources/conversation/types/ConversationMessageBase.js +0 -8
- package/dist/serialization/resources/conversation/types/ConversationMessageResponse.js +0 -15
- package/dist/serialization/resources/conversation/types/ConversationResponse.js +0 -15
- package/dist/serialization/resources/conversation/types/ResponseConfig.js +0 -11
- package/dist/serialization/resources/conversation/types/ResponseLength.js +0 -5
- package/dist/serialization/resources/conversation/types/Sentiment.js +0 -5
- package/dist/serialization/resources/conversation/types/Source.js +0 -8
- package/dist/serialization/resources/conversation/types/UserConversationMessageType.js +0 -5
- package/dist/serialization/resources/conversation/types/UserMessage.js +0 -14
- package/dist/serialization/resources/conversation/types/UserMessageAttachment.js +0 -7
- package/dist/serialization/resources/conversation/types/UserMessageBase.js +0 -14
- package/serialization/resources/actions/types/ActionBase.js +0 -14
- package/serialization/resources/actions/types/ActionParameter.js +0 -10
- package/serialization/resources/actions/types/ActionResponse.js +0 -11
- package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +0 -11
- package/serialization/resources/actions/types/ConversationPrecondition.js +0 -17
- package/serialization/resources/actions/types/MetadataPrecondition.js +0 -11
- package/serialization/resources/actions/types/Precondition.js +0 -19
- package/serialization/resources/actions/types/PreconditionBase.js +0 -8
- package/serialization/resources/actions/types/PreconditionGroup.js +0 -10
- package/serialization/resources/actions/types/PreconditionGroupOperator.js +0 -5
- package/serialization/resources/actions/types/PreconditionOperator.js +0 -5
- package/serialization/resources/actions/types/TagsPrecondition.js +0 -10
- package/serialization/resources/conversation/types/ActionFormField.js +0 -11
- package/serialization/resources/conversation/types/BotActionFormResponse.js +0 -11
- package/serialization/resources/conversation/types/BotActionResponse.d.ts +0 -17
- package/serialization/resources/conversation/types/BotActionResponse.js +0 -12
- package/serialization/resources/conversation/types/BotChartResponse.js +0 -10
- package/serialization/resources/conversation/types/BotConversationMessageType.js +0 -5
- package/serialization/resources/conversation/types/BotMessage.js +0 -17
- package/serialization/resources/conversation/types/BotResponse.js +0 -19
- package/serialization/resources/conversation/types/BotResponseMetadata.js +0 -10
- package/serialization/resources/conversation/types/BotTextResponse.js +0 -7
- package/serialization/resources/conversation/types/Capability.js +0 -5
- package/serialization/resources/conversation/types/ChartSpecSchema.js +0 -5
- package/serialization/resources/conversation/types/ConversationAnalysis.js +0 -12
- package/serialization/resources/conversation/types/ConversationBase.js +0 -14
- package/serialization/resources/conversation/types/ConversationMessageBase.js +0 -8
- package/serialization/resources/conversation/types/ConversationMessageResponse.js +0 -15
- package/serialization/resources/conversation/types/ConversationResponse.js +0 -15
- package/serialization/resources/conversation/types/ResponseConfig.js +0 -11
- package/serialization/resources/conversation/types/ResponseLength.js +0 -5
- package/serialization/resources/conversation/types/Sentiment.js +0 -5
- package/serialization/resources/conversation/types/Source.js +0 -8
- package/serialization/resources/conversation/types/UserConversationMessageType.js +0 -5
- package/serialization/resources/conversation/types/UserMessage.js +0 -14
- package/serialization/resources/conversation/types/UserMessageAttachment.js +0 -7
- package/serialization/resources/conversation/types/UserMessageBase.js +0 -14
- /package/api/resources/{actions → commons}/types/ActionBase.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/ActionResponse.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/BotActionFormResponse.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/BotChartResponse.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/BotMessage.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/BotResponseMetadata.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/BotTextResponse.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/ChartSpecSchema.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/ConversationAnalysis.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/ConversationBase.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/ConversationExecutedActionPrecondition.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/ConversationMessageBase.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/ConversationMessageResponse.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/ConversationPrecondition.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/ConversationResponse.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/MetadataPrecondition.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/Precondition.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/PreconditionBase.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/PreconditionGroup.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/PreconditionGroupOperator.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/PreconditionOperator.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/ResponseLength.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/Sentiment.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/Source.d.ts +0 -0
- /package/api/resources/{actions → commons}/types/TagsPrecondition.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/UserConversationMessageType.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/UserMessage.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/UserMessageAttachment.d.ts +0 -0
- /package/api/resources/{conversation → commons}/types/UserMessageBase.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/ActionBase.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/ActionResponse.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/BotActionFormResponse.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/BotChartResponse.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/BotMessage.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/BotResponseMetadata.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/BotTextResponse.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/ChartSpecSchema.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/ConversationAnalysis.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/ConversationBase.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/ConversationExecutedActionPrecondition.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/ConversationMessageBase.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/ConversationMessageResponse.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/ConversationPrecondition.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/ConversationResponse.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/MetadataPrecondition.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/Precondition.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/PreconditionBase.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/PreconditionGroup.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/PreconditionGroupOperator.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/PreconditionOperator.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/ResponseLength.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/Sentiment.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/Source.d.ts +0 -0
- /package/dist/api/resources/{actions → commons}/types/TagsPrecondition.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/UserConversationMessageType.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/UserMessage.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/UserMessageAttachment.d.ts +0 -0
- /package/dist/api/resources/{conversation → commons}/types/UserMessageBase.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/ActionBase.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/BotActionFormResponse.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/BotChartResponse.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/BotResponseMetadata.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/BotTextResponse.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/Capability.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/ChartSpecSchema.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/ConversationAnalysis.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/ConversationBase.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/ConversationExecutedActionPrecondition.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/ConversationMessageBase.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/ConversationMessageResponse.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/ConversationPrecondition.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/MetadataPrecondition.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/Precondition.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/PreconditionBase.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/PreconditionGroup.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/PreconditionGroupOperator.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/PreconditionOperator.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/ResponseConfig.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/ResponseLength.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/Sentiment.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/Source.d.ts +0 -0
- /package/dist/serialization/resources/{actions → commons}/types/TagsPrecondition.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/UserConversationMessageType.d.ts +0 -0
- /package/dist/serialization/resources/{conversation → commons}/types/UserMessageAttachment.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/ActionBase.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/BotActionFormResponse.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/BotChartResponse.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/BotResponseMetadata.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/BotTextResponse.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/Capability.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/ChartSpecSchema.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/ConversationAnalysis.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/ConversationBase.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/ConversationExecutedActionPrecondition.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/ConversationMessageBase.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/ConversationMessageResponse.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/ConversationPrecondition.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/MetadataPrecondition.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/Precondition.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/PreconditionBase.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/PreconditionGroup.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/PreconditionGroupOperator.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/PreconditionOperator.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/ResponseConfig.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/ResponseLength.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/Sentiment.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/Source.d.ts +0 -0
- /package/serialization/resources/{actions → commons}/types/TagsPrecondition.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/UserConversationMessageType.d.ts +0 -0
- /package/serialization/resources/{conversation → commons}/types/UserMessageAttachment.d.ts +0 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bigint = void 0;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
|
+
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
7
|
+
const schema_utils_1 = require("../schema-utils");
|
|
8
|
+
function bigint() {
|
|
6
9
|
const baseSchema = {
|
|
7
10
|
parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
|
|
8
11
|
if (typeof raw !== "string") {
|
|
@@ -11,7 +14,7 @@ export function bigint() {
|
|
|
11
14
|
errors: [
|
|
12
15
|
{
|
|
13
16
|
path: breadcrumbsPrefix,
|
|
14
|
-
message: getErrorMessageForIncorrectType(raw, "string"),
|
|
17
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "string"),
|
|
15
18
|
},
|
|
16
19
|
],
|
|
17
20
|
};
|
|
@@ -34,13 +37,14 @@ export function bigint() {
|
|
|
34
37
|
errors: [
|
|
35
38
|
{
|
|
36
39
|
path: breadcrumbsPrefix,
|
|
37
|
-
message: getErrorMessageForIncorrectType(bigint, "bigint"),
|
|
40
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(bigint, "bigint"),
|
|
38
41
|
},
|
|
39
42
|
],
|
|
40
43
|
};
|
|
41
44
|
}
|
|
42
45
|
},
|
|
43
|
-
getType: () => SchemaType.BIGINT,
|
|
46
|
+
getType: () => Schema_1.SchemaType.BIGINT,
|
|
44
47
|
};
|
|
45
|
-
return Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema));
|
|
48
|
+
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
46
49
|
}
|
|
50
|
+
exports.bigint = bigint;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bigint = void 0;
|
|
4
|
+
var bigint_1 = require("./bigint");
|
|
5
|
+
Object.defineProperty(exports, "bigint", { enumerable: true, get: function () { return bigint_1.bigint; } });
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.date = void 0;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
|
+
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
7
|
+
const schema_utils_1 = require("../schema-utils");
|
|
5
8
|
// https://stackoverflow.com/questions/12756159/regex-and-iso8601-formatted-datetime
|
|
6
9
|
const ISO_8601_REGEX = /^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
|
|
7
|
-
|
|
10
|
+
function date() {
|
|
8
11
|
const baseSchema = {
|
|
9
12
|
parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
|
|
10
13
|
if (typeof raw !== "string") {
|
|
@@ -13,7 +16,7 @@ export function date() {
|
|
|
13
16
|
errors: [
|
|
14
17
|
{
|
|
15
18
|
path: breadcrumbsPrefix,
|
|
16
|
-
message: getErrorMessageForIncorrectType(raw, "string"),
|
|
19
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "string"),
|
|
17
20
|
},
|
|
18
21
|
],
|
|
19
22
|
};
|
|
@@ -24,7 +27,7 @@ export function date() {
|
|
|
24
27
|
errors: [
|
|
25
28
|
{
|
|
26
29
|
path: breadcrumbsPrefix,
|
|
27
|
-
message: getErrorMessageForIncorrectType(raw, "ISO 8601 date string"),
|
|
30
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "ISO 8601 date string"),
|
|
28
31
|
},
|
|
29
32
|
],
|
|
30
33
|
};
|
|
@@ -47,13 +50,14 @@ export function date() {
|
|
|
47
50
|
errors: [
|
|
48
51
|
{
|
|
49
52
|
path: breadcrumbsPrefix,
|
|
50
|
-
message: getErrorMessageForIncorrectType(date, "Date object"),
|
|
53
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(date, "Date object"),
|
|
51
54
|
},
|
|
52
55
|
],
|
|
53
56
|
};
|
|
54
57
|
}
|
|
55
58
|
},
|
|
56
|
-
getType: () => SchemaType.DATE,
|
|
59
|
+
getType: () => Schema_1.SchemaType.DATE,
|
|
57
60
|
};
|
|
58
|
-
return Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema));
|
|
61
|
+
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
59
62
|
}
|
|
63
|
+
exports.date = date;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.date = void 0;
|
|
4
|
+
var date_1 = require("./date");
|
|
5
|
+
Object.defineProperty(exports, "date", { enumerable: true, get: function () { return date_1.date; } });
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enum_ = void 0;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const createIdentitySchemaCreator_1 = require("../../utils/createIdentitySchemaCreator");
|
|
6
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
7
|
+
function enum_(values) {
|
|
5
8
|
const validValues = new Set(values);
|
|
6
|
-
const schemaCreator = createIdentitySchemaCreator(SchemaType.ENUM, (value, { allowUnrecognizedEnumValues, breadcrumbsPrefix = [] } = {}) => {
|
|
9
|
+
const schemaCreator = (0, createIdentitySchemaCreator_1.createIdentitySchemaCreator)(Schema_1.SchemaType.ENUM, (value, { allowUnrecognizedEnumValues, breadcrumbsPrefix = [] } = {}) => {
|
|
7
10
|
if (typeof value !== "string") {
|
|
8
11
|
return {
|
|
9
12
|
ok: false,
|
|
10
13
|
errors: [
|
|
11
14
|
{
|
|
12
15
|
path: breadcrumbsPrefix,
|
|
13
|
-
message: getErrorMessageForIncorrectType(value, "string"),
|
|
16
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, "string"),
|
|
14
17
|
},
|
|
15
18
|
],
|
|
16
19
|
};
|
|
@@ -21,7 +24,7 @@ export function enum_(values) {
|
|
|
21
24
|
errors: [
|
|
22
25
|
{
|
|
23
26
|
path: breadcrumbsPrefix,
|
|
24
|
-
message: getErrorMessageForIncorrectType(value, "enum"),
|
|
27
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, "enum"),
|
|
25
28
|
},
|
|
26
29
|
],
|
|
27
30
|
};
|
|
@@ -33,3 +36,4 @@ export function enum_(values) {
|
|
|
33
36
|
});
|
|
34
37
|
return schemaCreator();
|
|
35
38
|
}
|
|
39
|
+
exports.enum_ = enum_;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enum_ = void 0;
|
|
4
|
+
var enum_1 = require("./enum");
|
|
5
|
+
Object.defineProperty(exports, "enum_", { enumerable: true, get: function () { return enum_1.enum_; } });
|
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./bigint"), exports);
|
|
18
|
+
__exportStar(require("./date"), exports);
|
|
19
|
+
__exportStar(require("./enum"), exports);
|
|
20
|
+
__exportStar(require("./lazy"), exports);
|
|
21
|
+
__exportStar(require("./list"), exports);
|
|
22
|
+
__exportStar(require("./literals"), exports);
|
|
23
|
+
__exportStar(require("./object"), exports);
|
|
24
|
+
__exportStar(require("./object-like"), exports);
|
|
25
|
+
__exportStar(require("./primitives"), exports);
|
|
26
|
+
__exportStar(require("./record"), exports);
|
|
27
|
+
__exportStar(require("./schema-utils"), exports);
|
|
28
|
+
__exportStar(require("./set"), exports);
|
|
29
|
+
__exportStar(require("./undiscriminated-union"), exports);
|
|
30
|
+
__exportStar(require("./union"), exports);
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lazyObject = exports.lazy = void 0;
|
|
4
|
+
var lazy_1 = require("./lazy");
|
|
5
|
+
Object.defineProperty(exports, "lazy", { enumerable: true, get: function () { return lazy_1.lazy; } });
|
|
6
|
+
var lazyObject_1 = require("./lazyObject");
|
|
7
|
+
Object.defineProperty(exports, "lazyObject", { enumerable: true, get: function () { return lazyObject_1.lazyObject; } });
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMemoizedSchema = exports.constructLazyBaseSchema = exports.lazy = void 0;
|
|
4
|
+
const schema_utils_1 = require("../schema-utils");
|
|
5
|
+
function lazy(getter) {
|
|
3
6
|
const baseSchema = constructLazyBaseSchema(getter);
|
|
4
|
-
return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
|
|
7
|
+
return Object.assign(Object.assign({}, baseSchema), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
5
8
|
}
|
|
6
|
-
|
|
9
|
+
exports.lazy = lazy;
|
|
10
|
+
function constructLazyBaseSchema(getter) {
|
|
7
11
|
return {
|
|
8
12
|
parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts),
|
|
9
13
|
json: (parsed, opts) => getMemoizedSchema(getter).json(parsed, opts),
|
|
10
14
|
getType: () => getMemoizedSchema(getter).getType(),
|
|
11
15
|
};
|
|
12
16
|
}
|
|
13
|
-
|
|
17
|
+
exports.constructLazyBaseSchema = constructLazyBaseSchema;
|
|
18
|
+
function getMemoizedSchema(getter) {
|
|
14
19
|
const castedGetter = getter;
|
|
15
20
|
if (castedGetter.__zurg_memoized == null) {
|
|
16
21
|
castedGetter.__zurg_memoized = getter();
|
|
17
22
|
}
|
|
18
23
|
return castedGetter.__zurg_memoized;
|
|
19
24
|
}
|
|
25
|
+
exports.getMemoizedSchema = getMemoizedSchema;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lazyObject = void 0;
|
|
4
|
+
const object_1 = require("../object");
|
|
5
|
+
const object_like_1 = require("../object-like");
|
|
6
|
+
const schema_utils_1 = require("../schema-utils");
|
|
7
|
+
const lazy_1 = require("./lazy");
|
|
8
|
+
function lazyObject(getter) {
|
|
9
|
+
const baseSchema = Object.assign(Object.assign({}, (0, lazy_1.constructLazyBaseSchema)(getter)), { _getRawProperties: () => (0, lazy_1.getMemoizedSchema)(getter)._getRawProperties(), _getParsedProperties: () => (0, lazy_1.getMemoizedSchema)(getter)._getParsedProperties() });
|
|
10
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, baseSchema), (0, schema_utils_1.getSchemaUtils)(baseSchema)), (0, object_like_1.getObjectLikeUtils)(baseSchema)), (0, object_1.getObjectUtils)(baseSchema));
|
|
8
11
|
}
|
|
12
|
+
exports.lazyObject = lazyObject;
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.list = void 0;
|
|
4
|
+
var list_1 = require("./list");
|
|
5
|
+
Object.defineProperty(exports, "list", { enumerable: true, get: function () { return list_1.list; } });
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.list = void 0;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
|
+
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
7
|
+
const schema_utils_1 = require("../schema-utils");
|
|
8
|
+
function list(schema) {
|
|
6
9
|
const baseSchema = {
|
|
7
10
|
parse: (raw, opts) => validateAndTransformArray(raw, (item, index) => {
|
|
8
11
|
var _a;
|
|
@@ -12,17 +15,18 @@ export function list(schema) {
|
|
|
12
15
|
var _a;
|
|
13
16
|
return schema.json(item, Object.assign(Object.assign({}, opts), { breadcrumbsPrefix: [...((_a = opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix) !== null && _a !== void 0 ? _a : []), `[${index}]`] }));
|
|
14
17
|
}),
|
|
15
|
-
getType: () => SchemaType.LIST,
|
|
18
|
+
getType: () => Schema_1.SchemaType.LIST,
|
|
16
19
|
};
|
|
17
|
-
return Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema));
|
|
20
|
+
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
18
21
|
}
|
|
22
|
+
exports.list = list;
|
|
19
23
|
function validateAndTransformArray(value, transformItem) {
|
|
20
24
|
if (!Array.isArray(value)) {
|
|
21
25
|
return {
|
|
22
26
|
ok: false,
|
|
23
27
|
errors: [
|
|
24
28
|
{
|
|
25
|
-
message: getErrorMessageForIncorrectType(value, "list"),
|
|
29
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, "list"),
|
|
26
30
|
path: [],
|
|
27
31
|
},
|
|
28
32
|
],
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.booleanLiteral = void 0;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const createIdentitySchemaCreator_1 = require("../../utils/createIdentitySchemaCreator");
|
|
6
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
7
|
+
function booleanLiteral(literal) {
|
|
8
|
+
const schemaCreator = (0, createIdentitySchemaCreator_1.createIdentitySchemaCreator)(Schema_1.SchemaType.BOOLEAN_LITERAL, (value, { breadcrumbsPrefix = [] } = {}) => {
|
|
6
9
|
if (value === literal) {
|
|
7
10
|
return {
|
|
8
11
|
ok: true,
|
|
@@ -15,7 +18,7 @@ export function booleanLiteral(literal) {
|
|
|
15
18
|
errors: [
|
|
16
19
|
{
|
|
17
20
|
path: breadcrumbsPrefix,
|
|
18
|
-
message: getErrorMessageForIncorrectType(value, `${literal.toString()}`),
|
|
21
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, `${literal.toString()}`),
|
|
19
22
|
},
|
|
20
23
|
],
|
|
21
24
|
};
|
|
@@ -23,3 +26,4 @@ export function booleanLiteral(literal) {
|
|
|
23
26
|
});
|
|
24
27
|
return schemaCreator();
|
|
25
28
|
}
|
|
29
|
+
exports.booleanLiteral = booleanLiteral;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.booleanLiteral = exports.stringLiteral = void 0;
|
|
4
|
+
var stringLiteral_1 = require("./stringLiteral");
|
|
5
|
+
Object.defineProperty(exports, "stringLiteral", { enumerable: true, get: function () { return stringLiteral_1.stringLiteral; } });
|
|
6
|
+
var booleanLiteral_1 = require("./booleanLiteral");
|
|
7
|
+
Object.defineProperty(exports, "booleanLiteral", { enumerable: true, get: function () { return booleanLiteral_1.booleanLiteral; } });
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stringLiteral = void 0;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const createIdentitySchemaCreator_1 = require("../../utils/createIdentitySchemaCreator");
|
|
6
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
7
|
+
function stringLiteral(literal) {
|
|
8
|
+
const schemaCreator = (0, createIdentitySchemaCreator_1.createIdentitySchemaCreator)(Schema_1.SchemaType.STRING_LITERAL, (value, { breadcrumbsPrefix = [] } = {}) => {
|
|
6
9
|
if (value === literal) {
|
|
7
10
|
return {
|
|
8
11
|
ok: true,
|
|
@@ -15,7 +18,7 @@ export function stringLiteral(literal) {
|
|
|
15
18
|
errors: [
|
|
16
19
|
{
|
|
17
20
|
path: breadcrumbsPrefix,
|
|
18
|
-
message: getErrorMessageForIncorrectType(value, `"${literal}"`),
|
|
21
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, `"${literal}"`),
|
|
19
22
|
},
|
|
20
23
|
],
|
|
21
24
|
};
|
|
@@ -23,3 +26,4 @@ export function stringLiteral(literal) {
|
|
|
23
26
|
});
|
|
24
27
|
return schemaCreator();
|
|
25
28
|
}
|
|
29
|
+
exports.stringLiteral = stringLiteral;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.property = exports.isProperty = exports.objectWithoutOptionalProperties = exports.object = exports.getObjectUtils = void 0;
|
|
4
|
+
var object_1 = require("./object");
|
|
5
|
+
Object.defineProperty(exports, "getObjectUtils", { enumerable: true, get: function () { return object_1.getObjectUtils; } });
|
|
6
|
+
Object.defineProperty(exports, "object", { enumerable: true, get: function () { return object_1.object; } });
|
|
7
|
+
var objectWithoutOptionalProperties_1 = require("./objectWithoutOptionalProperties");
|
|
8
|
+
Object.defineProperty(exports, "objectWithoutOptionalProperties", { enumerable: true, get: function () { return objectWithoutOptionalProperties_1.objectWithoutOptionalProperties; } });
|
|
9
|
+
var property_1 = require("./property");
|
|
10
|
+
Object.defineProperty(exports, "isProperty", { enumerable: true, get: function () { return property_1.isProperty; } });
|
|
11
|
+
Object.defineProperty(exports, "property", { enumerable: true, get: function () { return property_1.property; } });
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getObjectUtils = exports.object = void 0;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const entries_1 = require("../../utils/entries");
|
|
6
|
+
const filterObject_1 = require("../../utils/filterObject");
|
|
7
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
8
|
+
const isPlainObject_1 = require("../../utils/isPlainObject");
|
|
9
|
+
const keys_1 = require("../../utils/keys");
|
|
10
|
+
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
11
|
+
const partition_1 = require("../../utils/partition");
|
|
12
|
+
const object_like_1 = require("../object-like");
|
|
13
|
+
const schema_utils_1 = require("../schema-utils");
|
|
14
|
+
const property_1 = require("./property");
|
|
15
|
+
function object(schemas) {
|
|
13
16
|
const baseSchema = {
|
|
14
|
-
_getRawProperties: () => Object.entries(schemas).map(([parsedKey, propertySchema]) => isProperty(propertySchema) ? propertySchema.rawKey : parsedKey),
|
|
15
|
-
_getParsedProperties: () => keys(schemas),
|
|
17
|
+
_getRawProperties: () => Object.entries(schemas).map(([parsedKey, propertySchema]) => (0, property_1.isProperty)(propertySchema) ? propertySchema.rawKey : parsedKey),
|
|
18
|
+
_getParsedProperties: () => (0, keys_1.keys)(schemas),
|
|
16
19
|
parse: (raw, opts) => {
|
|
17
20
|
const rawKeyToProperty = {};
|
|
18
21
|
const requiredKeys = [];
|
|
19
|
-
for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) {
|
|
20
|
-
const rawKey = isProperty(schemaOrObjectProperty) ? schemaOrObjectProperty.rawKey : parsedKey;
|
|
21
|
-
const valueSchema = isProperty(schemaOrObjectProperty)
|
|
22
|
+
for (const [parsedKey, schemaOrObjectProperty] of (0, entries_1.entries)(schemas)) {
|
|
23
|
+
const rawKey = (0, property_1.isProperty)(schemaOrObjectProperty) ? schemaOrObjectProperty.rawKey : parsedKey;
|
|
24
|
+
const valueSchema = (0, property_1.isProperty)(schemaOrObjectProperty)
|
|
22
25
|
? schemaOrObjectProperty.valueSchema
|
|
23
26
|
: schemaOrObjectProperty;
|
|
24
27
|
const property = {
|
|
@@ -55,8 +58,8 @@ export function object(schemas) {
|
|
|
55
58
|
},
|
|
56
59
|
json: (parsed, opts) => {
|
|
57
60
|
const requiredKeys = [];
|
|
58
|
-
for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) {
|
|
59
|
-
const valueSchema = isProperty(schemaOrObjectProperty)
|
|
61
|
+
for (const [parsedKey, schemaOrObjectProperty] of (0, entries_1.entries)(schemas)) {
|
|
62
|
+
const valueSchema = (0, property_1.isProperty)(schemaOrObjectProperty)
|
|
60
63
|
? schemaOrObjectProperty.valueSchema
|
|
61
64
|
: schemaOrObjectProperty;
|
|
62
65
|
if (isSchemaRequired(valueSchema)) {
|
|
@@ -72,7 +75,7 @@ export function object(schemas) {
|
|
|
72
75
|
if (property == null) {
|
|
73
76
|
return undefined;
|
|
74
77
|
}
|
|
75
|
-
if (isProperty(property)) {
|
|
78
|
+
if ((0, property_1.isProperty)(property)) {
|
|
76
79
|
return {
|
|
77
80
|
transformedKey: property.rawKey,
|
|
78
81
|
transform: (propertyValue) => {
|
|
@@ -97,18 +100,19 @@ export function object(schemas) {
|
|
|
97
100
|
omitUndefined: opts === null || opts === void 0 ? void 0 : opts.omitUndefined,
|
|
98
101
|
});
|
|
99
102
|
},
|
|
100
|
-
getType: () => SchemaType.OBJECT,
|
|
103
|
+
getType: () => Schema_1.SchemaType.OBJECT,
|
|
101
104
|
};
|
|
102
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema)), getObjectLikeUtils(baseSchema)), getObjectUtils(baseSchema));
|
|
105
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema)), (0, object_like_1.getObjectLikeUtils)(baseSchema)), getObjectUtils(baseSchema));
|
|
103
106
|
}
|
|
107
|
+
exports.object = object;
|
|
104
108
|
function validateAndTransformObject({ value, requiredKeys, getProperty, unrecognizedObjectKeys = "fail", skipValidation = false, breadcrumbsPrefix = [], }) {
|
|
105
|
-
if (!isPlainObject(value)) {
|
|
109
|
+
if (!(0, isPlainObject_1.isPlainObject)(value)) {
|
|
106
110
|
return {
|
|
107
111
|
ok: false,
|
|
108
112
|
errors: [
|
|
109
113
|
{
|
|
110
114
|
path: breadcrumbsPrefix,
|
|
111
|
-
message: getErrorMessageForIncorrectType(value, "object"),
|
|
115
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(value, "object"),
|
|
112
116
|
},
|
|
113
117
|
],
|
|
114
118
|
};
|
|
@@ -164,7 +168,7 @@ function validateAndTransformObject({ value, requiredKeys, getProperty, unrecogn
|
|
|
164
168
|
};
|
|
165
169
|
}
|
|
166
170
|
}
|
|
167
|
-
|
|
171
|
+
function getObjectUtils(schema) {
|
|
168
172
|
return {
|
|
169
173
|
extend: (extension) => {
|
|
170
174
|
const baseSchema = {
|
|
@@ -186,17 +190,46 @@ export function getObjectUtils(schema) {
|
|
|
186
190
|
transformExtension: (parsedExtension) => extension.json(parsedExtension, opts),
|
|
187
191
|
});
|
|
188
192
|
},
|
|
189
|
-
getType: () => SchemaType.OBJECT,
|
|
193
|
+
getType: () => Schema_1.SchemaType.OBJECT,
|
|
190
194
|
};
|
|
191
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema)), getObjectLikeUtils(baseSchema)), getObjectUtils(baseSchema));
|
|
195
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, baseSchema), (0, schema_utils_1.getSchemaUtils)(baseSchema)), (0, object_like_1.getObjectLikeUtils)(baseSchema)), getObjectUtils(baseSchema));
|
|
196
|
+
},
|
|
197
|
+
passthrough: () => {
|
|
198
|
+
const baseSchema = {
|
|
199
|
+
_getParsedProperties: () => schema._getParsedProperties(),
|
|
200
|
+
_getRawProperties: () => schema._getRawProperties(),
|
|
201
|
+
parse: (raw, opts) => {
|
|
202
|
+
const transformed = schema.parse(raw, Object.assign(Object.assign({}, opts), { unrecognizedObjectKeys: "passthrough" }));
|
|
203
|
+
if (!transformed.ok) {
|
|
204
|
+
return transformed;
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
ok: true,
|
|
208
|
+
value: Object.assign(Object.assign({}, raw), transformed.value),
|
|
209
|
+
};
|
|
210
|
+
},
|
|
211
|
+
json: (parsed, opts) => {
|
|
212
|
+
const transformed = schema.json(parsed, Object.assign(Object.assign({}, opts), { unrecognizedObjectKeys: "passthrough" }));
|
|
213
|
+
if (!transformed.ok) {
|
|
214
|
+
return transformed;
|
|
215
|
+
}
|
|
216
|
+
return {
|
|
217
|
+
ok: true,
|
|
218
|
+
value: Object.assign(Object.assign({}, parsed), transformed.value),
|
|
219
|
+
};
|
|
220
|
+
},
|
|
221
|
+
getType: () => Schema_1.SchemaType.OBJECT,
|
|
222
|
+
};
|
|
223
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, baseSchema), (0, schema_utils_1.getSchemaUtils)(baseSchema)), (0, object_like_1.getObjectLikeUtils)(baseSchema)), getObjectUtils(baseSchema));
|
|
192
224
|
},
|
|
193
225
|
};
|
|
194
226
|
}
|
|
227
|
+
exports.getObjectUtils = getObjectUtils;
|
|
195
228
|
function validateAndTransformExtendedObject({ extensionKeys, value, transformBase, transformExtension, }) {
|
|
196
229
|
const extensionPropertiesSet = new Set(extensionKeys);
|
|
197
|
-
const [extensionProperties, baseProperties] = partition(keys(value), (key) => extensionPropertiesSet.has(key));
|
|
198
|
-
const transformedBase = transformBase(filterObject(value, baseProperties));
|
|
199
|
-
const transformedExtension = transformExtension(filterObject(value, extensionProperties));
|
|
230
|
+
const [extensionProperties, baseProperties] = (0, partition_1.partition)((0, keys_1.keys)(value), (key) => extensionPropertiesSet.has(key));
|
|
231
|
+
const transformedBase = transformBase((0, filterObject_1.filterObject)(value, baseProperties));
|
|
232
|
+
const transformedExtension = transformExtension((0, filterObject_1.filterObject)(value, extensionProperties));
|
|
200
233
|
if (transformedBase.ok && transformedExtension.ok) {
|
|
201
234
|
return {
|
|
202
235
|
ok: true,
|
|
@@ -218,9 +251,9 @@ function isSchemaRequired(schema) {
|
|
|
218
251
|
}
|
|
219
252
|
function isSchemaOptional(schema) {
|
|
220
253
|
switch (schema.getType()) {
|
|
221
|
-
case SchemaType.ANY:
|
|
222
|
-
case SchemaType.UNKNOWN:
|
|
223
|
-
case SchemaType.OPTIONAL:
|
|
254
|
+
case Schema_1.SchemaType.ANY:
|
|
255
|
+
case Schema_1.SchemaType.UNKNOWN:
|
|
256
|
+
case Schema_1.SchemaType.OPTIONAL:
|
|
224
257
|
return true;
|
|
225
258
|
default:
|
|
226
259
|
return false;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.objectWithoutOptionalProperties = void 0;
|
|
4
|
+
const object_1 = require("./object");
|
|
5
|
+
function objectWithoutOptionalProperties(schemas) {
|
|
6
|
+
return (0, object_1.object)(schemas);
|
|
4
7
|
}
|
|
8
|
+
exports.objectWithoutOptionalProperties = objectWithoutOptionalProperties;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isProperty = exports.property = void 0;
|
|
4
|
+
function property(rawKey, valueSchema) {
|
|
2
5
|
return {
|
|
3
6
|
rawKey,
|
|
4
7
|
valueSchema,
|
|
5
8
|
isProperty: true,
|
|
6
9
|
};
|
|
7
10
|
}
|
|
8
|
-
|
|
11
|
+
exports.property = property;
|
|
12
|
+
function isProperty(maybeProperty) {
|
|
9
13
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
10
14
|
return maybeProperty.isProperty;
|
|
11
15
|
}
|
|
16
|
+
exports.isProperty = isProperty;
|