mavenagi 1.0.7 → 1.0.9
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 +8 -0
- package/Client.js +18 -8
- package/README.md +17 -17
- package/api/resources/actions/client/Client.d.ts +4 -1
- package/api/resources/actions/client/Client.js +29 -18
- package/api/resources/actions/types/ActionRequest.d.ts +2 -1
- package/api/resources/analytics/client/Client.d.ts +2 -0
- package/api/resources/analytics/client/Client.js +27 -17
- package/api/resources/analytics/types/CellData.d.ts +1 -1
- package/api/resources/analytics/types/ChartResponse.d.ts +1 -1
- package/api/resources/analytics/types/{BarChartRequest.d.ts → ConversationBarChartRequest.d.ts} +1 -1
- package/api/resources/analytics/types/ConversationChartRequest.d.ts +4 -4
- package/{dist/api/resources/analytics/types/DateHistogramRequest.d.ts → api/resources/analytics/types/ConversationDateHistogramRequest.d.ts} +1 -1
- package/api/resources/analytics/types/ConversationMetric.d.ts +1 -1
- package/api/resources/analytics/types/{PieChartRequest.d.ts → ConversationPieChartRequest.d.ts} +1 -1
- package/api/resources/analytics/types/ConversationTableRequest.d.ts +2 -1
- package/api/resources/analytics/types/FeedbackMetric.d.ts +1 -1
- package/api/resources/analytics/types/FeedbackTableRequest.d.ts +1 -0
- package/api/resources/analytics/types/FieldValue.d.ts +1 -1
- package/api/resources/analytics/types/TimeInterval.d.ts +1 -1
- package/api/resources/analytics/types/index.d.ts +3 -3
- package/api/resources/analytics/types/index.js +3 -3
- package/api/resources/appSettings/client/Client.d.ts +2 -0
- package/api/resources/appSettings/client/Client.js +21 -11
- package/api/resources/commons/errors/BadRequestError.js +17 -7
- package/api/resources/commons/errors/NotFoundError.js +17 -7
- package/api/resources/commons/errors/ServerError.js +17 -7
- package/api/resources/commons/types/ActionBase.d.ts +3 -1
- package/api/resources/commons/types/ActionParameterType.d.ts +1 -1
- package/api/resources/commons/types/ActionResponse.d.ts +2 -1
- package/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +1 -1
- package/api/resources/commons/types/BaseConversationResponse.d.ts +30 -0
- package/api/resources/commons/types/BasePaginatedRequest.d.ts +11 -0
- package/api/resources/commons/types/BotConversationMessageType.d.ts +1 -1
- package/api/resources/commons/types/BotMessage.d.ts +1 -0
- package/api/resources/commons/types/BotMessageStatus.d.ts +22 -0
- package/api/resources/commons/types/BotMessageStatus.js +14 -0
- package/api/resources/commons/types/BotResponse.d.ts +1 -1
- package/api/resources/commons/types/Capability.d.ts +1 -1
- package/api/resources/commons/types/ChartSpecSchema.d.ts +1 -1
- package/api/resources/commons/types/ConversationAnalysis.d.ts +2 -0
- package/api/resources/commons/types/ConversationInformation.d.ts +8 -0
- package/api/resources/commons/types/ConversationMessageResponse.d.ts +1 -1
- package/api/resources/commons/types/ConversationPrecondition.d.ts +1 -1
- package/api/resources/commons/types/ConversationPreview.d.ts +6 -0
- package/api/resources/commons/types/ConversationResponse.d.ts +6 -10
- package/api/resources/commons/types/DocumentInformation.d.ts +12 -0
- package/api/resources/commons/types/EntityType.d.ts +3 -1
- package/api/resources/commons/types/EntityType.js +2 -0
- package/api/resources/commons/types/EventTriggerType.d.ts +2 -1
- package/api/resources/commons/types/EventTriggerType.js +1 -0
- package/api/resources/commons/types/FeedbackType.d.ts +1 -1
- package/api/resources/commons/types/InboxItem.d.ts +19 -0
- package/api/resources/commons/types/InboxItem.js +5 -0
- package/api/resources/commons/types/InboxItemBase.d.ts +14 -0
- package/api/resources/commons/types/InboxItemBase.js +5 -0
- package/api/resources/commons/types/InboxItemDuplicateDocuments.d.ts +12 -0
- package/api/resources/commons/types/InboxItemDuplicateDocuments.js +5 -0
- package/api/resources/commons/types/InboxItemDuplicateKnowledgeBase.d.ts +12 -0
- package/api/resources/commons/types/InboxItemDuplicateKnowledgeBase.js +5 -0
- package/api/resources/commons/types/InboxItemFix.d.ts +16 -0
- package/api/resources/commons/types/InboxItemFix.js +5 -0
- package/api/resources/commons/types/InboxItemFixAddDocument.d.ts +10 -0
- package/api/resources/commons/types/InboxItemFixAddDocument.js +5 -0
- package/api/resources/commons/types/InboxItemFixBase.d.ts +8 -0
- package/api/resources/commons/types/InboxItemFixBase.js +5 -0
- package/api/resources/commons/types/InboxItemFixDeactivateDocument.d.ts +8 -0
- package/api/resources/commons/types/InboxItemFixDeactivateDocument.js +5 -0
- package/api/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.d.ts +8 -0
- package/api/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.js +5 -0
- package/api/resources/commons/types/InboxItemKnowledgeBaseAlert.d.ts +10 -0
- package/api/resources/commons/types/InboxItemKnowledgeBaseAlert.js +5 -0
- package/api/resources/commons/types/InboxItemMissingKnowledge.d.ts +10 -0
- package/api/resources/commons/types/InboxItemMissingKnowledge.js +5 -0
- package/api/resources/commons/types/InboxItemStatus.d.ts +26 -0
- package/api/resources/commons/types/InboxItemStatus.js +13 -0
- package/api/resources/commons/types/InboxItemType.d.ts +22 -0
- package/api/resources/commons/types/InboxItemType.js +12 -0
- package/api/resources/commons/types/KnowledgeBaseInformation.d.ts +8 -0
- package/api/resources/commons/types/KnowledgeBaseInformation.js +5 -0
- package/api/resources/commons/types/Page.d.ts +13 -0
- package/api/resources/commons/types/Page.js +5 -0
- package/api/resources/commons/types/Precondition.d.ts +1 -1
- package/api/resources/commons/types/PreconditionGroupOperator.d.ts +1 -1
- package/api/resources/commons/types/PreconditionOperator.d.ts +1 -1
- package/api/resources/commons/types/ResponseLength.d.ts +1 -1
- package/api/resources/commons/types/Sentiment.d.ts +1 -1
- package/api/resources/commons/types/UserConversationMessageType.d.ts +1 -1
- package/api/resources/commons/types/VisibilityType.d.ts +1 -1
- package/api/resources/commons/types/index.d.ts +23 -3
- package/api/resources/commons/types/index.js +23 -3
- package/api/resources/conversation/client/Client.d.ts +45 -1
- package/api/resources/conversation/client/Client.js +228 -44
- package/api/resources/conversation/types/ConversationField.d.ts +2 -1
- package/api/resources/conversation/types/ConversationField.js +1 -0
- package/api/resources/conversation/types/ConversationFilter.d.ts +2 -0
- package/api/resources/conversation/types/ConversationMetadata.d.ts +20 -0
- package/api/resources/conversation/types/ConversationMetadata.js +5 -0
- package/api/resources/conversation/types/ConversationRequest.d.ts +15 -1
- package/api/resources/conversation/types/ConversationsResponse.d.ts +8 -0
- package/api/resources/conversation/types/ConversationsResponse.js +5 -0
- package/api/resources/conversation/types/ConversationsSearchRequest.d.ts +8 -0
- package/api/resources/conversation/types/ConversationsSearchRequest.js +5 -0
- package/api/resources/conversation/types/FeedbackField.d.ts +1 -1
- package/api/resources/conversation/types/NumericConversationField.d.ts +2 -1
- package/api/resources/conversation/types/NumericConversationField.js +1 -0
- package/api/resources/conversation/types/Quality.d.ts +1 -1
- package/api/resources/conversation/types/QualityReason.d.ts +1 -1
- package/api/resources/conversation/types/ResolutionStatus.d.ts +9 -0
- package/{dist/api/resources/knowledge/types/KnowledgeBaseType.js → api/resources/conversation/types/ResolutionStatus.js} +5 -5
- package/api/resources/conversation/types/StreamResponse.d.ts +1 -1
- package/api/resources/conversation/types/UpdateMetadataRequest.d.ts +18 -0
- package/api/resources/conversation/types/UpdateMetadataRequest.js +5 -0
- package/api/resources/conversation/types/index.d.ts +5 -0
- package/api/resources/conversation/types/index.js +5 -0
- package/api/resources/inbox/client/Client.d.ts +121 -0
- package/api/resources/inbox/client/Client.js +488 -0
- package/api/resources/inbox/client/index.d.ts +1 -0
- package/api/resources/inbox/client/index.js +17 -0
- package/api/resources/inbox/client/requests/InboxItemFixRequest.d.ts +15 -0
- package/api/resources/inbox/client/requests/InboxItemFixRequest.js +5 -0
- package/api/resources/inbox/client/requests/InboxItemIgnoreRequest.d.ts +15 -0
- package/api/resources/inbox/client/requests/InboxItemIgnoreRequest.js +5 -0
- package/api/resources/inbox/client/requests/InboxItemRequest.d.ts +15 -0
- package/api/resources/inbox/client/requests/InboxItemRequest.js +5 -0
- package/api/resources/inbox/client/requests/index.d.ts +3 -0
- package/api/resources/inbox/client/requests/index.js +2 -0
- package/api/resources/inbox/index.d.ts +2 -0
- package/api/resources/inbox/index.js +18 -0
- package/api/resources/inbox/types/AddDocumentFixRequest.d.ts +10 -0
- package/api/resources/inbox/types/AddDocumentFixRequest.js +5 -0
- package/api/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +9 -0
- package/api/resources/inbox/types/ApplyInboxItemFixRequest.js +5 -0
- package/api/resources/inbox/types/BaseInboxSearchRequest.d.ts +9 -0
- package/api/resources/inbox/types/BaseInboxSearchRequest.js +5 -0
- package/api/resources/inbox/types/InboxSearchRequest.d.ts +14 -0
- package/api/resources/inbox/types/InboxSearchRequest.js +5 -0
- package/api/resources/inbox/types/InboxSearchResponse.d.ts +8 -0
- package/api/resources/inbox/types/InboxSearchResponse.js +5 -0
- package/api/resources/inbox/types/index.d.ts +5 -0
- package/api/resources/inbox/types/index.js +21 -0
- package/api/resources/index.d.ts +5 -0
- package/api/resources/index.js +23 -8
- package/api/resources/knowledge/client/Client.d.ts +3 -2
- package/api/resources/knowledge/client/Client.js +40 -31
- package/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts +0 -4
- package/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +1 -2
- package/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -2
- package/api/resources/knowledge/types/KnowledgeBaseVersionType.d.ts +1 -1
- package/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +1 -1
- package/api/resources/knowledge/types/index.d.ts +0 -1
- package/api/resources/knowledge/types/index.js +0 -1
- package/api/resources/realtime/client/Client.d.ts +34 -0
- package/api/resources/realtime/client/Client.js +87 -0
- package/api/resources/realtime/client/Socket.d.ts +41 -0
- package/api/resources/realtime/client/Socket.js +155 -0
- package/api/resources/realtime/client/index.d.ts +1 -0
- package/api/resources/realtime/client/index.js +2 -0
- package/api/resources/realtime/index.d.ts +2 -0
- package/api/resources/realtime/index.js +18 -0
- package/api/resources/realtime/types/AudioPublishEvent.d.ts +6 -0
- package/api/resources/realtime/types/AudioPublishEvent.js +5 -0
- package/api/resources/realtime/types/AudioSubscribeEvent.d.ts +6 -0
- package/api/resources/realtime/types/AudioSubscribeEvent.js +5 -0
- package/api/resources/realtime/types/ControlEvent.d.ts +6 -0
- package/api/resources/realtime/types/ControlEvent.js +5 -0
- package/api/resources/realtime/types/PublishEvent.d.ts +13 -0
- package/api/resources/realtime/types/PublishEvent.js +5 -0
- package/api/resources/realtime/types/SubscribeEvent.d.ts +22 -0
- package/api/resources/realtime/types/SubscribeEvent.js +5 -0
- package/api/resources/realtime/types/index.d.ts +5 -0
- package/api/resources/realtime/types/index.js +21 -0
- package/api/resources/translations/client/Client.d.ts +2 -0
- package/api/resources/translations/client/Client.js +21 -11
- package/api/resources/triggers/client/Client.d.ts +2 -0
- package/api/resources/triggers/client/Client.js +27 -17
- package/api/resources/users/client/Client.d.ts +2 -0
- package/api/resources/users/client/Client.js +31 -21
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +2 -2
- package/core/fetcher/Fetcher.js +6 -5
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +5 -5
- package/core/fetcher/getResponseBody.js +1 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +4 -5
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/index.d.ts +1 -0
- package/core/index.js +18 -7
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +7 -5
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +22 -19
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +11 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +2 -4
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/core/streaming-fetcher/Stream.d.ts +0 -1
- package/core/streaming-fetcher/Stream.js +20 -21
- package/core/websocket/events.d.ts +36 -0
- package/core/websocket/events.js +27 -0
- package/core/websocket/index.d.ts +1 -0
- package/core/websocket/index.js +17 -0
- package/core/websocket/ws.d.ts +137 -0
- package/core/websocket/ws.js +452 -0
- package/dist/Client.d.ts +8 -0
- package/dist/Client.js +18 -8
- package/dist/api/resources/actions/client/Client.d.ts +4 -1
- package/dist/api/resources/actions/client/Client.js +29 -18
- package/dist/api/resources/actions/types/ActionRequest.d.ts +2 -1
- package/dist/api/resources/analytics/client/Client.d.ts +2 -0
- package/dist/api/resources/analytics/client/Client.js +27 -17
- package/dist/api/resources/analytics/types/CellData.d.ts +1 -1
- package/dist/api/resources/analytics/types/ChartResponse.d.ts +1 -1
- package/dist/api/resources/analytics/types/{BarChartRequest.d.ts → ConversationBarChartRequest.d.ts} +1 -1
- package/dist/api/resources/analytics/types/ConversationBarChartRequest.js +5 -0
- package/dist/api/resources/analytics/types/ConversationChartRequest.d.ts +4 -4
- package/{api/resources/analytics/types/DateHistogramRequest.d.ts → dist/api/resources/analytics/types/ConversationDateHistogramRequest.d.ts} +1 -1
- package/dist/api/resources/analytics/types/ConversationDateHistogramRequest.js +5 -0
- package/dist/api/resources/analytics/types/ConversationMetric.d.ts +1 -1
- package/dist/api/resources/analytics/types/{PieChartRequest.d.ts → ConversationPieChartRequest.d.ts} +1 -1
- package/dist/api/resources/analytics/types/ConversationPieChartRequest.js +5 -0
- package/dist/api/resources/analytics/types/ConversationTableRequest.d.ts +2 -1
- package/dist/api/resources/analytics/types/FeedbackMetric.d.ts +1 -1
- package/dist/api/resources/analytics/types/FeedbackTableRequest.d.ts +1 -0
- package/dist/api/resources/analytics/types/FieldValue.d.ts +1 -1
- package/dist/api/resources/analytics/types/TimeInterval.d.ts +1 -1
- package/dist/api/resources/analytics/types/index.d.ts +3 -3
- package/dist/api/resources/analytics/types/index.js +3 -3
- package/dist/api/resources/appSettings/client/Client.d.ts +2 -0
- package/dist/api/resources/appSettings/client/Client.js +21 -11
- package/dist/api/resources/commons/errors/BadRequestError.js +17 -7
- package/dist/api/resources/commons/errors/NotFoundError.js +17 -7
- package/dist/api/resources/commons/errors/ServerError.js +17 -7
- package/dist/api/resources/commons/types/ActionBase.d.ts +3 -1
- package/dist/api/resources/commons/types/ActionParameterType.d.ts +1 -1
- package/dist/api/resources/commons/types/ActionResponse.d.ts +2 -1
- package/dist/api/resources/commons/types/AppUserIdentifyingPropertyType.d.ts +1 -1
- package/dist/api/resources/commons/types/BaseConversationResponse.d.ts +30 -0
- package/dist/api/resources/commons/types/BaseConversationResponse.js +5 -0
- package/dist/api/resources/commons/types/BasePaginatedRequest.d.ts +11 -0
- package/dist/api/resources/commons/types/BasePaginatedRequest.js +5 -0
- package/dist/api/resources/commons/types/BotConversationMessageType.d.ts +1 -1
- package/dist/api/resources/commons/types/BotMessage.d.ts +1 -0
- package/dist/api/resources/commons/types/BotMessageStatus.d.ts +22 -0
- package/dist/api/resources/commons/types/BotMessageStatus.js +14 -0
- package/dist/api/resources/commons/types/BotResponse.d.ts +1 -1
- package/dist/api/resources/commons/types/Capability.d.ts +1 -1
- package/dist/api/resources/commons/types/ChartSpecSchema.d.ts +1 -1
- package/dist/api/resources/commons/types/ConversationAnalysis.d.ts +2 -0
- package/dist/api/resources/commons/types/ConversationInformation.d.ts +8 -0
- package/dist/api/resources/commons/types/ConversationInformation.js +5 -0
- package/dist/api/resources/commons/types/ConversationMessageResponse.d.ts +1 -1
- package/dist/api/resources/commons/types/ConversationPrecondition.d.ts +1 -1
- package/dist/api/resources/commons/types/ConversationPreview.d.ts +6 -0
- package/dist/api/resources/commons/types/ConversationPreview.js +5 -0
- package/dist/api/resources/commons/types/ConversationResponse.d.ts +6 -10
- package/dist/api/resources/commons/types/DocumentInformation.d.ts +12 -0
- package/dist/api/resources/commons/types/DocumentInformation.js +5 -0
- package/dist/api/resources/commons/types/EntityType.d.ts +3 -1
- package/dist/api/resources/commons/types/EntityType.js +2 -0
- package/dist/api/resources/commons/types/EventTriggerType.d.ts +2 -1
- package/dist/api/resources/commons/types/EventTriggerType.js +1 -0
- package/dist/api/resources/commons/types/FeedbackType.d.ts +1 -1
- package/dist/api/resources/commons/types/InboxItem.d.ts +19 -0
- package/dist/api/resources/commons/types/InboxItem.js +5 -0
- package/dist/api/resources/commons/types/InboxItemBase.d.ts +14 -0
- package/dist/api/resources/commons/types/InboxItemBase.js +5 -0
- package/dist/api/resources/commons/types/InboxItemDuplicateDocuments.d.ts +12 -0
- package/dist/api/resources/commons/types/InboxItemDuplicateDocuments.js +5 -0
- package/dist/api/resources/commons/types/InboxItemDuplicateKnowledgeBase.d.ts +12 -0
- package/dist/api/resources/commons/types/InboxItemDuplicateKnowledgeBase.js +5 -0
- package/dist/api/resources/commons/types/InboxItemFix.d.ts +16 -0
- package/dist/api/resources/commons/types/InboxItemFix.js +5 -0
- package/dist/api/resources/commons/types/InboxItemFixAddDocument.d.ts +10 -0
- package/dist/api/resources/commons/types/InboxItemFixAddDocument.js +5 -0
- package/dist/api/resources/commons/types/InboxItemFixBase.d.ts +8 -0
- package/dist/api/resources/commons/types/InboxItemFixBase.js +5 -0
- package/dist/api/resources/commons/types/InboxItemFixDeactivateDocument.d.ts +8 -0
- package/dist/api/resources/commons/types/InboxItemFixDeactivateDocument.js +5 -0
- package/dist/api/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.d.ts +8 -0
- package/dist/api/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.js +5 -0
- package/dist/api/resources/commons/types/InboxItemKnowledgeBaseAlert.d.ts +10 -0
- package/dist/api/resources/commons/types/InboxItemKnowledgeBaseAlert.js +5 -0
- package/dist/api/resources/commons/types/InboxItemMissingKnowledge.d.ts +10 -0
- package/dist/api/resources/commons/types/InboxItemMissingKnowledge.js +5 -0
- package/dist/api/resources/commons/types/InboxItemStatus.d.ts +26 -0
- package/dist/api/resources/commons/types/InboxItemStatus.js +13 -0
- package/dist/api/resources/commons/types/InboxItemType.d.ts +22 -0
- package/dist/api/resources/commons/types/InboxItemType.js +12 -0
- package/dist/api/resources/commons/types/KnowledgeBaseInformation.d.ts +8 -0
- package/dist/api/resources/commons/types/KnowledgeBaseInformation.js +5 -0
- package/dist/api/resources/commons/types/Page.d.ts +13 -0
- package/dist/api/resources/commons/types/Page.js +5 -0
- package/dist/api/resources/commons/types/Precondition.d.ts +1 -1
- package/dist/api/resources/commons/types/PreconditionGroupOperator.d.ts +1 -1
- package/dist/api/resources/commons/types/PreconditionOperator.d.ts +1 -1
- package/dist/api/resources/commons/types/ResponseLength.d.ts +1 -1
- package/dist/api/resources/commons/types/Sentiment.d.ts +1 -1
- package/dist/api/resources/commons/types/UserConversationMessageType.d.ts +1 -1
- package/dist/api/resources/commons/types/VisibilityType.d.ts +1 -1
- package/dist/api/resources/commons/types/index.d.ts +23 -3
- package/dist/api/resources/commons/types/index.js +23 -3
- package/dist/api/resources/conversation/client/Client.d.ts +45 -1
- package/dist/api/resources/conversation/client/Client.js +228 -44
- package/dist/api/resources/conversation/types/ConversationField.d.ts +2 -1
- package/dist/api/resources/conversation/types/ConversationField.js +1 -0
- package/dist/api/resources/conversation/types/ConversationFilter.d.ts +2 -0
- package/dist/api/resources/conversation/types/ConversationMetadata.d.ts +20 -0
- package/dist/api/resources/conversation/types/ConversationMetadata.js +5 -0
- package/dist/api/resources/conversation/types/ConversationRequest.d.ts +15 -1
- package/dist/api/resources/conversation/types/ConversationsResponse.d.ts +8 -0
- package/dist/api/resources/conversation/types/ConversationsResponse.js +5 -0
- package/dist/api/resources/conversation/types/ConversationsSearchRequest.d.ts +8 -0
- package/dist/api/resources/conversation/types/ConversationsSearchRequest.js +5 -0
- package/dist/api/resources/conversation/types/FeedbackField.d.ts +1 -1
- package/dist/api/resources/conversation/types/NumericConversationField.d.ts +2 -1
- package/dist/api/resources/conversation/types/NumericConversationField.js +1 -0
- package/dist/api/resources/conversation/types/Quality.d.ts +1 -1
- package/dist/api/resources/conversation/types/QualityReason.d.ts +1 -1
- package/dist/api/resources/conversation/types/ResolutionStatus.d.ts +9 -0
- package/{api/resources/knowledge/types/KnowledgeBaseType.js → dist/api/resources/conversation/types/ResolutionStatus.js} +5 -5
- package/dist/api/resources/conversation/types/StreamResponse.d.ts +1 -1
- package/dist/api/resources/conversation/types/UpdateMetadataRequest.d.ts +18 -0
- package/dist/api/resources/conversation/types/UpdateMetadataRequest.js +5 -0
- package/dist/api/resources/conversation/types/index.d.ts +5 -0
- package/dist/api/resources/conversation/types/index.js +5 -0
- package/dist/api/resources/inbox/client/Client.d.ts +121 -0
- package/dist/api/resources/inbox/client/Client.js +488 -0
- package/dist/api/resources/inbox/client/index.d.ts +1 -0
- package/dist/api/resources/inbox/client/index.js +17 -0
- package/dist/api/resources/inbox/client/requests/InboxItemFixRequest.d.ts +15 -0
- package/dist/api/resources/inbox/client/requests/InboxItemFixRequest.js +5 -0
- package/dist/api/resources/inbox/client/requests/InboxItemIgnoreRequest.d.ts +15 -0
- package/dist/api/resources/inbox/client/requests/InboxItemIgnoreRequest.js +5 -0
- package/dist/api/resources/inbox/client/requests/InboxItemRequest.d.ts +15 -0
- package/dist/api/resources/inbox/client/requests/InboxItemRequest.js +5 -0
- package/dist/api/resources/inbox/client/requests/index.d.ts +3 -0
- package/dist/api/resources/inbox/client/requests/index.js +2 -0
- package/dist/api/resources/inbox/index.d.ts +2 -0
- package/dist/api/resources/inbox/index.js +18 -0
- package/dist/api/resources/inbox/types/AddDocumentFixRequest.d.ts +10 -0
- package/dist/api/resources/inbox/types/AddDocumentFixRequest.js +5 -0
- package/dist/api/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +9 -0
- package/dist/api/resources/inbox/types/ApplyInboxItemFixRequest.js +5 -0
- package/dist/api/resources/inbox/types/BaseInboxSearchRequest.d.ts +9 -0
- package/dist/api/resources/inbox/types/BaseInboxSearchRequest.js +5 -0
- package/dist/api/resources/inbox/types/InboxSearchRequest.d.ts +14 -0
- package/dist/api/resources/inbox/types/InboxSearchRequest.js +5 -0
- package/dist/api/resources/inbox/types/InboxSearchResponse.d.ts +8 -0
- package/dist/api/resources/inbox/types/InboxSearchResponse.js +5 -0
- package/dist/api/resources/inbox/types/index.d.ts +5 -0
- package/dist/api/resources/inbox/types/index.js +21 -0
- package/dist/api/resources/index.d.ts +5 -0
- package/dist/api/resources/index.js +23 -8
- package/dist/api/resources/knowledge/client/Client.d.ts +3 -2
- package/dist/api/resources/knowledge/client/Client.js +40 -31
- package/dist/api/resources/knowledge/types/KnowledgeBaseProperties.d.ts +0 -4
- package/dist/api/resources/knowledge/types/KnowledgeBaseRequest.d.ts +1 -2
- package/dist/api/resources/knowledge/types/KnowledgeBaseResponse.d.ts +1 -2
- package/dist/api/resources/knowledge/types/KnowledgeBaseVersionType.d.ts +1 -1
- package/dist/api/resources/knowledge/types/KnowledgeDocumentContentType.d.ts +1 -1
- package/dist/api/resources/knowledge/types/index.d.ts +0 -1
- package/dist/api/resources/knowledge/types/index.js +0 -1
- package/dist/api/resources/realtime/client/Client.d.ts +34 -0
- package/dist/api/resources/realtime/client/Client.js +87 -0
- package/dist/api/resources/realtime/client/Socket.d.ts +41 -0
- package/dist/api/resources/realtime/client/Socket.js +155 -0
- package/dist/api/resources/realtime/client/index.d.ts +1 -0
- package/dist/api/resources/realtime/client/index.js +2 -0
- package/dist/api/resources/realtime/index.d.ts +2 -0
- package/dist/api/resources/realtime/index.js +18 -0
- package/dist/api/resources/realtime/types/AudioPublishEvent.d.ts +6 -0
- package/dist/api/resources/realtime/types/AudioPublishEvent.js +5 -0
- package/dist/api/resources/realtime/types/AudioSubscribeEvent.d.ts +6 -0
- package/dist/api/resources/realtime/types/AudioSubscribeEvent.js +5 -0
- package/dist/api/resources/realtime/types/ControlEvent.d.ts +6 -0
- package/dist/api/resources/realtime/types/ControlEvent.js +5 -0
- package/dist/api/resources/realtime/types/PublishEvent.d.ts +13 -0
- package/dist/api/resources/realtime/types/PublishEvent.js +5 -0
- package/dist/api/resources/realtime/types/SubscribeEvent.d.ts +22 -0
- package/dist/api/resources/realtime/types/SubscribeEvent.js +5 -0
- package/dist/api/resources/realtime/types/index.d.ts +5 -0
- package/dist/api/resources/realtime/types/index.js +21 -0
- package/dist/api/resources/translations/client/Client.d.ts +2 -0
- package/dist/api/resources/translations/client/Client.js +21 -11
- package/dist/api/resources/triggers/client/Client.d.ts +2 -0
- package/dist/api/resources/triggers/client/Client.js +27 -17
- package/dist/api/resources/users/client/Client.d.ts +2 -0
- package/dist/api/resources/users/client/Client.js +31 -21
- package/dist/core/auth/BearerToken.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.js +6 -5
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +5 -5
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +4 -5
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +18 -7
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +7 -5
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +22 -19
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +11 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +2 -4
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
- package/dist/core/streaming-fetcher/Stream.js +20 -21
- package/dist/core/websocket/events.d.ts +36 -0
- package/dist/core/websocket/events.js +27 -0
- package/dist/core/websocket/index.d.ts +1 -0
- package/dist/core/websocket/index.js +17 -0
- package/dist/core/websocket/ws.d.ts +137 -0
- package/dist/core/websocket/ws.js +452 -0
- package/dist/environments.d.ts +1 -1
- package/dist/errors/MavenAGIError.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -8
- package/dist/serialization/resources/actions/types/ActionRequest.js +17 -7
- package/dist/serialization/resources/analytics/types/BarChartResponse.js +17 -7
- package/dist/serialization/resources/analytics/types/CellData.js +17 -7
- package/dist/serialization/resources/analytics/types/ChartResponse.js +17 -7
- package/dist/serialization/resources/analytics/types/ColumnDefinitionBase.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationAnalyticsRequest.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationAverage.js +17 -7
- package/dist/serialization/resources/analytics/types/{BarChartRequest.d.ts → ConversationBarChartRequest.d.ts} +2 -2
- package/dist/serialization/resources/analytics/types/{BarChartRequest.js → ConversationBarChartRequest.js} +19 -9
- package/dist/serialization/resources/analytics/types/ConversationBasicMetric.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationChartRequest.d.ts +6 -6
- package/dist/serialization/resources/analytics/types/ConversationChartRequest.js +23 -13
- package/dist/serialization/resources/analytics/types/ConversationColumnDefinition.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationCount.js +17 -7
- package/{serialization/resources/analytics/types/DateHistogramRequest.d.ts → dist/serialization/resources/analytics/types/ConversationDateHistogramRequest.d.ts} +2 -2
- package/{serialization/resources/analytics/types/DateHistogramRequest.js → dist/serialization/resources/analytics/types/ConversationDateHistogramRequest.js} +19 -9
- package/dist/serialization/resources/analytics/types/ConversationDistinctCount.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationGroupBy.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationMax.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationMedian.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationMetric.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationMin.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationNumericMetric.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationPercentile.js +17 -7
- package/{serialization/resources/analytics/types/PieChartRequest.d.ts → dist/serialization/resources/analytics/types/ConversationPieChartRequest.d.ts} +2 -2
- package/{serialization/resources/analytics/types/PieChartRequest.js → dist/serialization/resources/analytics/types/ConversationPieChartRequest.js} +19 -9
- package/dist/serialization/resources/analytics/types/ConversationRow.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationSum.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationTableRequest.js +17 -7
- package/dist/serialization/resources/analytics/types/ConversationTableResponse.js +17 -7
- package/dist/serialization/resources/analytics/types/DateHistogramResponse.js +17 -7
- package/dist/serialization/resources/analytics/types/FeedbackAnalyticsRequest.js +17 -7
- package/dist/serialization/resources/analytics/types/FeedbackColumnDefinition.js +17 -7
- package/dist/serialization/resources/analytics/types/FeedbackCount.js +17 -7
- package/dist/serialization/resources/analytics/types/FeedbackDistinctCount.js +17 -7
- package/dist/serialization/resources/analytics/types/FeedbackGroupBy.js +17 -7
- package/dist/serialization/resources/analytics/types/FeedbackMetric.js +17 -7
- package/dist/serialization/resources/analytics/types/FeedbackRow.js +17 -7
- package/dist/serialization/resources/analytics/types/FeedbackTableRequest.js +17 -7
- package/dist/serialization/resources/analytics/types/FeedbackTableResponse.js +17 -7
- package/dist/serialization/resources/analytics/types/FieldValue.js +17 -7
- package/dist/serialization/resources/analytics/types/GroupByBase.js +17 -7
- package/dist/serialization/resources/analytics/types/LabeledPoint.js +17 -7
- package/dist/serialization/resources/analytics/types/PieChartResponse.js +17 -7
- package/dist/serialization/resources/analytics/types/Range.js +17 -7
- package/dist/serialization/resources/analytics/types/RowBase.js +17 -7
- package/dist/serialization/resources/analytics/types/Series.js +17 -7
- package/dist/serialization/resources/analytics/types/TableResponseBase.js +17 -7
- package/dist/serialization/resources/analytics/types/TimeDataPoint.js +17 -7
- package/dist/serialization/resources/analytics/types/TimeInterval.js +17 -7
- package/dist/serialization/resources/analytics/types/TimeSeries.js +17 -7
- package/dist/serialization/resources/analytics/types/index.d.ts +3 -3
- package/dist/serialization/resources/analytics/types/index.js +3 -3
- package/dist/serialization/resources/appSettings/client/get.js +17 -7
- package/dist/serialization/resources/appSettings/client/index.js +17 -7
- package/dist/serialization/resources/commons/types/ActionBase.d.ts +1 -0
- package/dist/serialization/resources/commons/types/ActionBase.js +18 -7
- package/dist/serialization/resources/commons/types/ActionEnumOption.js +17 -7
- package/dist/serialization/resources/commons/types/ActionFormField.js +17 -7
- package/dist/serialization/resources/commons/types/ActionParameter.js +17 -7
- package/dist/serialization/resources/commons/types/ActionParameterType.js +17 -7
- package/dist/serialization/resources/commons/types/ActionResponse.js +17 -7
- package/dist/serialization/resources/commons/types/AppUser.js +17 -7
- package/dist/serialization/resources/commons/types/AppUserIdentifier.js +17 -7
- package/dist/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +17 -7
- package/dist/serialization/resources/commons/types/AppUserRequest.js +17 -7
- package/dist/serialization/resources/commons/types/AppUserResponse.js +17 -7
- package/dist/serialization/resources/commons/types/BaseConversationResponse.d.ts +27 -0
- package/dist/serialization/resources/commons/types/BaseConversationResponse.js +58 -0
- package/dist/serialization/resources/commons/types/BasePaginatedRequest.d.ts +14 -0
- package/dist/serialization/resources/commons/types/BasePaginatedRequest.js +45 -0
- package/dist/serialization/resources/commons/types/BotActionFormResponse.js +17 -7
- package/dist/serialization/resources/commons/types/BotChartResponse.js +17 -7
- package/dist/serialization/resources/commons/types/BotConversationMessageType.js +17 -7
- package/dist/serialization/resources/commons/types/BotMessage.d.ts +2 -0
- package/dist/serialization/resources/commons/types/BotMessage.js +19 -7
- package/dist/serialization/resources/commons/types/BotMessageStatus.d.ts +10 -0
- package/dist/serialization/resources/commons/types/BotMessageStatus.js +41 -0
- package/dist/serialization/resources/commons/types/BotResponse.js +17 -7
- package/dist/serialization/resources/commons/types/BotResponseMetadata.js +17 -7
- package/dist/serialization/resources/commons/types/BotTextResponse.js +17 -7
- package/dist/serialization/resources/commons/types/Capability.js +17 -7
- package/dist/serialization/resources/commons/types/ChartSpecSchema.js +17 -7
- package/dist/serialization/resources/commons/types/ConversationAnalysis.d.ts +1 -0
- package/dist/serialization/resources/commons/types/ConversationAnalysis.js +18 -7
- package/dist/serialization/resources/commons/types/ConversationExecutedActionPrecondition.js +17 -7
- package/dist/serialization/resources/commons/types/ConversationInformation.d.ts +13 -0
- package/dist/serialization/resources/commons/types/ConversationInformation.js +44 -0
- package/dist/serialization/resources/commons/types/ConversationMessageBase.js +17 -7
- package/dist/serialization/resources/commons/types/ConversationMessageResponse.js +17 -7
- package/dist/serialization/resources/commons/types/ConversationPrecondition.js +17 -7
- package/dist/serialization/resources/commons/types/ConversationPreview.d.ts +12 -0
- package/dist/serialization/resources/commons/types/ConversationPreview.js +42 -0
- package/dist/serialization/resources/commons/types/ConversationResponse.d.ts +2 -9
- package/dist/serialization/resources/commons/types/ConversationResponse.js +19 -16
- package/dist/serialization/resources/commons/types/ConversationSummary.js +17 -7
- package/dist/serialization/resources/commons/types/DocumentInformation.d.ts +15 -0
- package/dist/serialization/resources/commons/types/DocumentInformation.js +46 -0
- package/dist/serialization/resources/commons/types/EntityId.js +17 -7
- package/dist/serialization/resources/commons/types/EntityIdBase.js +17 -7
- package/dist/serialization/resources/commons/types/EntityIdFilter.js +17 -7
- package/dist/serialization/resources/commons/types/EntityIdWithoutAgent.js +17 -7
- package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/dist/serialization/resources/commons/types/EntityType.js +19 -7
- package/dist/serialization/resources/commons/types/ErrorMessage.js +17 -7
- package/dist/serialization/resources/commons/types/EventTriggerBase.js +17 -7
- package/dist/serialization/resources/commons/types/EventTriggerResponse.js +17 -7
- package/dist/serialization/resources/commons/types/EventTriggerType.d.ts +1 -1
- package/dist/serialization/resources/commons/types/EventTriggerType.js +18 -8
- package/dist/serialization/resources/commons/types/Feedback.js +17 -7
- package/dist/serialization/resources/commons/types/FeedbackBase.js +17 -7
- package/dist/serialization/resources/commons/types/FeedbackType.js +17 -7
- package/dist/serialization/resources/commons/types/InboxItem.d.ts +26 -0
- package/dist/serialization/resources/commons/types/InboxItem.js +55 -0
- package/dist/serialization/resources/commons/types/InboxItemBase.d.ts +17 -0
- package/dist/serialization/resources/commons/types/InboxItemBase.js +48 -0
- package/dist/serialization/resources/commons/types/InboxItemDuplicateDocuments.d.ts +17 -0
- package/dist/serialization/resources/commons/types/InboxItemDuplicateDocuments.js +50 -0
- package/dist/serialization/resources/commons/types/InboxItemDuplicateKnowledgeBase.d.ts +17 -0
- package/dist/serialization/resources/commons/types/InboxItemDuplicateKnowledgeBase.js +50 -0
- package/dist/serialization/resources/commons/types/InboxItemFix.d.ts +22 -0
- package/dist/serialization/resources/commons/types/InboxItemFix.js +53 -0
- package/dist/serialization/resources/commons/types/InboxItemFixAddDocument.d.ts +14 -0
- package/dist/serialization/resources/commons/types/InboxItemFixAddDocument.js +47 -0
- package/dist/serialization/resources/commons/types/InboxItemFixBase.d.ts +13 -0
- package/dist/serialization/resources/commons/types/InboxItemFixBase.js +44 -0
- package/dist/serialization/resources/commons/types/InboxItemFixDeactivateDocument.d.ts +14 -0
- package/dist/serialization/resources/commons/types/InboxItemFixDeactivateDocument.js +47 -0
- package/dist/serialization/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.d.ts +14 -0
- package/dist/serialization/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.js +47 -0
- package/dist/serialization/resources/commons/types/InboxItemKnowledgeBaseAlert.d.ts +16 -0
- package/dist/serialization/resources/commons/types/InboxItemKnowledgeBaseAlert.js +49 -0
- package/dist/serialization/resources/commons/types/InboxItemMissingKnowledge.d.ts +16 -0
- package/dist/serialization/resources/commons/types/InboxItemMissingKnowledge.js +49 -0
- package/dist/serialization/resources/commons/types/InboxItemStatus.d.ts +10 -0
- package/dist/serialization/resources/commons/types/InboxItemStatus.js +41 -0
- package/dist/serialization/resources/commons/types/InboxItemType.d.ts +10 -0
- package/dist/serialization/resources/commons/types/InboxItemType.js +46 -0
- package/dist/serialization/resources/commons/types/KnowledgeBaseInformation.d.ts +13 -0
- package/dist/serialization/resources/commons/types/KnowledgeBaseInformation.js +44 -0
- package/dist/serialization/resources/commons/types/MetadataPrecondition.js +17 -7
- package/dist/serialization/resources/commons/types/Page.d.ts +15 -0
- package/dist/serialization/resources/commons/types/Page.js +46 -0
- package/dist/serialization/resources/commons/types/Precondition.js +17 -7
- package/dist/serialization/resources/commons/types/PreconditionBase.js +17 -7
- package/dist/serialization/resources/commons/types/PreconditionGroup.js +17 -7
- package/dist/serialization/resources/commons/types/PreconditionGroupOperator.js +17 -7
- package/dist/serialization/resources/commons/types/PreconditionOperator.js +17 -7
- package/dist/serialization/resources/commons/types/ResponseConfig.js +17 -7
- package/dist/serialization/resources/commons/types/ResponseConfigPrecondition.js +17 -7
- package/dist/serialization/resources/commons/types/ResponseLength.js +17 -7
- package/dist/serialization/resources/commons/types/Sentiment.js +17 -7
- package/dist/serialization/resources/commons/types/Source.js +17 -7
- package/dist/serialization/resources/commons/types/TagsPrecondition.js +17 -7
- package/dist/serialization/resources/commons/types/UserConversationMessageType.js +17 -7
- package/dist/serialization/resources/commons/types/UserData.js +17 -7
- package/dist/serialization/resources/commons/types/UserMessage.js +17 -7
- package/dist/serialization/resources/commons/types/UserMessageAttachment.js +17 -7
- package/dist/serialization/resources/commons/types/UserMessageBase.js +17 -7
- package/dist/serialization/resources/commons/types/VisibilityType.js +17 -7
- package/dist/serialization/resources/commons/types/index.d.ts +23 -3
- package/dist/serialization/resources/commons/types/index.js +23 -3
- package/dist/serialization/resources/conversation/client/addConversationMetadata.js +17 -7
- package/dist/serialization/resources/conversation/client/appendNewMessages.js +17 -7
- package/dist/serialization/resources/conversation/client/index.js +17 -7
- package/dist/serialization/resources/conversation/types/AskRequest.js +17 -7
- package/dist/serialization/resources/conversation/types/AskStreamActionEvent.js +17 -7
- package/dist/serialization/resources/conversation/types/AskStreamChartEvent.js +17 -7
- package/dist/serialization/resources/conversation/types/AskStreamEndEvent.js +17 -7
- package/dist/serialization/resources/conversation/types/AskStreamMetadataEvent.js +17 -7
- package/dist/serialization/resources/conversation/types/AskStreamStartEvent.js +17 -7
- package/dist/serialization/resources/conversation/types/AskStreamTextEvent.js +17 -7
- package/dist/serialization/resources/conversation/types/Attachment.js +17 -7
- package/dist/serialization/resources/conversation/types/CategorizationResponse.js +17 -7
- package/dist/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/ConversationField.js +18 -7
- package/dist/serialization/resources/conversation/types/ConversationFilter.d.ts +3 -0
- package/dist/serialization/resources/conversation/types/ConversationFilter.js +20 -7
- package/dist/serialization/resources/conversation/types/ConversationMessageRequest.js +17 -7
- package/dist/serialization/resources/conversation/types/ConversationMetadata.d.ts +12 -0
- package/{serialization/resources/commons/types/ConversationBase.js → dist/serialization/resources/conversation/types/ConversationMetadata.js} +20 -17
- package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +9 -2
- package/dist/serialization/resources/conversation/types/ConversationRequest.js +27 -12
- package/dist/serialization/resources/conversation/types/ConversationsResponse.d.ts +14 -0
- package/dist/serialization/resources/conversation/types/ConversationsResponse.js +47 -0
- package/dist/serialization/resources/conversation/types/ConversationsSearchRequest.d.ts +16 -0
- package/dist/serialization/resources/conversation/types/ConversationsSearchRequest.js +49 -0
- package/dist/serialization/resources/conversation/types/FeedbackField.js +17 -7
- package/dist/serialization/resources/conversation/types/FeedbackFilter.js +17 -7
- package/dist/serialization/resources/conversation/types/FeedbackRequest.js +17 -7
- package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +17 -7
- package/dist/serialization/resources/conversation/types/NumericConversationField.d.ts +1 -1
- package/dist/serialization/resources/conversation/types/NumericConversationField.js +18 -7
- package/dist/serialization/resources/conversation/types/Quality.js +17 -7
- package/dist/serialization/resources/conversation/types/QualityReason.js +17 -7
- package/dist/serialization/resources/conversation/types/ResolutionStatus.d.ts +10 -0
- package/{serialization/resources/knowledge/types/KnowledgeBaseType.js → dist/serialization/resources/conversation/types/ResolutionStatus.js} +19 -9
- package/dist/serialization/resources/conversation/types/StreamResponse.js +17 -7
- package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.js +17 -7
- package/dist/serialization/resources/conversation/types/UpdateMetadataRequest.d.ts +13 -0
- package/dist/serialization/resources/conversation/types/UpdateMetadataRequest.js +44 -0
- package/dist/serialization/resources/conversation/types/index.d.ts +5 -0
- package/dist/serialization/resources/conversation/types/index.js +5 -0
- package/dist/serialization/resources/inbox/index.d.ts +1 -0
- package/dist/serialization/resources/inbox/index.js +17 -0
- package/dist/serialization/resources/inbox/types/AddDocumentFixRequest.d.ts +14 -0
- package/dist/serialization/resources/inbox/types/AddDocumentFixRequest.js +45 -0
- package/dist/serialization/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +14 -0
- package/dist/serialization/resources/inbox/types/ApplyInboxItemFixRequest.js +45 -0
- package/dist/serialization/resources/inbox/types/BaseInboxSearchRequest.d.ts +13 -0
- package/dist/serialization/resources/inbox/types/BaseInboxSearchRequest.js +44 -0
- package/dist/serialization/resources/inbox/types/InboxSearchRequest.d.ts +18 -0
- package/dist/serialization/resources/inbox/types/InboxSearchRequest.js +51 -0
- package/dist/serialization/resources/inbox/types/InboxSearchResponse.d.ts +14 -0
- package/dist/serialization/resources/inbox/types/InboxSearchResponse.js +47 -0
- package/dist/serialization/resources/inbox/types/index.d.ts +5 -0
- package/dist/serialization/resources/inbox/types/index.js +21 -0
- package/dist/serialization/resources/index.d.ts +4 -0
- package/dist/serialization/resources/index.js +22 -8
- package/dist/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +17 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts +0 -3
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseProperties.js +17 -10
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +17 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +17 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +17 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseVersionType.js +17 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +17 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +17 -7
- package/dist/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +17 -7
- package/dist/serialization/resources/knowledge/types/index.d.ts +0 -1
- package/dist/serialization/resources/knowledge/types/index.js +0 -1
- package/dist/serialization/resources/realtime/index.d.ts +1 -0
- package/dist/serialization/resources/realtime/index.js +17 -0
- package/dist/serialization/resources/realtime/types/AudioPublishEvent.d.ts +12 -0
- package/dist/serialization/resources/realtime/types/AudioPublishEvent.js +43 -0
- package/dist/serialization/resources/realtime/types/AudioSubscribeEvent.d.ts +12 -0
- package/dist/serialization/resources/realtime/types/AudioSubscribeEvent.js +43 -0
- package/dist/serialization/resources/realtime/types/ControlEvent.d.ts +12 -0
- package/dist/serialization/resources/realtime/types/ControlEvent.js +43 -0
- package/dist/serialization/resources/realtime/types/PublishEvent.d.ts +14 -0
- package/dist/serialization/resources/realtime/types/PublishEvent.js +49 -0
- package/dist/serialization/resources/realtime/types/SubscribeEvent.d.ts +24 -0
- package/dist/serialization/resources/realtime/types/SubscribeEvent.js +53 -0
- package/dist/serialization/resources/realtime/types/index.d.ts +5 -0
- package/dist/serialization/resources/realtime/types/index.js +21 -0
- package/dist/serialization/resources/translations/types/TranslationRequest.js +17 -7
- package/dist/serialization/resources/translations/types/TranslationResponse.js +17 -7
- package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +17 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +1 -1
- package/errors/MavenAGIError.js +2 -1
- package/index.d.ts +1 -0
- package/index.js +19 -8
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +18 -16
- package/reference.md +520 -16
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/actions/types/ActionRequest.js +17 -7
- package/serialization/resources/analytics/types/BarChartResponse.js +17 -7
- package/serialization/resources/analytics/types/CellData.js +17 -7
- package/serialization/resources/analytics/types/ChartResponse.js +17 -7
- package/serialization/resources/analytics/types/ColumnDefinitionBase.js +17 -7
- package/serialization/resources/analytics/types/ConversationAnalyticsRequest.js +17 -7
- package/serialization/resources/analytics/types/ConversationAverage.js +17 -7
- package/serialization/resources/analytics/types/{BarChartRequest.d.ts → ConversationBarChartRequest.d.ts} +2 -2
- package/serialization/resources/analytics/types/{BarChartRequest.js → ConversationBarChartRequest.js} +19 -9
- package/serialization/resources/analytics/types/ConversationBasicMetric.js +17 -7
- package/serialization/resources/analytics/types/ConversationChartRequest.d.ts +6 -6
- package/serialization/resources/analytics/types/ConversationChartRequest.js +23 -13
- package/serialization/resources/analytics/types/ConversationColumnDefinition.js +17 -7
- package/serialization/resources/analytics/types/ConversationCount.js +17 -7
- package/{dist/serialization/resources/analytics/types/DateHistogramRequest.d.ts → serialization/resources/analytics/types/ConversationDateHistogramRequest.d.ts} +2 -2
- package/{dist/serialization/resources/analytics/types/DateHistogramRequest.js → serialization/resources/analytics/types/ConversationDateHistogramRequest.js} +19 -9
- package/serialization/resources/analytics/types/ConversationDistinctCount.js +17 -7
- package/serialization/resources/analytics/types/ConversationGroupBy.js +17 -7
- package/serialization/resources/analytics/types/ConversationMax.js +17 -7
- package/serialization/resources/analytics/types/ConversationMedian.js +17 -7
- package/serialization/resources/analytics/types/ConversationMetric.js +17 -7
- package/serialization/resources/analytics/types/ConversationMin.js +17 -7
- package/serialization/resources/analytics/types/ConversationNumericMetric.js +17 -7
- package/serialization/resources/analytics/types/ConversationPercentile.js +17 -7
- package/{dist/serialization/resources/analytics/types/PieChartRequest.d.ts → serialization/resources/analytics/types/ConversationPieChartRequest.d.ts} +2 -2
- package/{dist/serialization/resources/analytics/types/PieChartRequest.js → serialization/resources/analytics/types/ConversationPieChartRequest.js} +19 -9
- package/serialization/resources/analytics/types/ConversationRow.js +17 -7
- package/serialization/resources/analytics/types/ConversationSum.js +17 -7
- package/serialization/resources/analytics/types/ConversationTableRequest.js +17 -7
- package/serialization/resources/analytics/types/ConversationTableResponse.js +17 -7
- package/serialization/resources/analytics/types/DateHistogramResponse.js +17 -7
- package/serialization/resources/analytics/types/FeedbackAnalyticsRequest.js +17 -7
- package/serialization/resources/analytics/types/FeedbackColumnDefinition.js +17 -7
- package/serialization/resources/analytics/types/FeedbackCount.js +17 -7
- package/serialization/resources/analytics/types/FeedbackDistinctCount.js +17 -7
- package/serialization/resources/analytics/types/FeedbackGroupBy.js +17 -7
- package/serialization/resources/analytics/types/FeedbackMetric.js +17 -7
- package/serialization/resources/analytics/types/FeedbackRow.js +17 -7
- package/serialization/resources/analytics/types/FeedbackTableRequest.js +17 -7
- package/serialization/resources/analytics/types/FeedbackTableResponse.js +17 -7
- package/serialization/resources/analytics/types/FieldValue.js +17 -7
- package/serialization/resources/analytics/types/GroupByBase.js +17 -7
- package/serialization/resources/analytics/types/LabeledPoint.js +17 -7
- package/serialization/resources/analytics/types/PieChartResponse.js +17 -7
- package/serialization/resources/analytics/types/Range.js +17 -7
- package/serialization/resources/analytics/types/RowBase.js +17 -7
- package/serialization/resources/analytics/types/Series.js +17 -7
- package/serialization/resources/analytics/types/TableResponseBase.js +17 -7
- package/serialization/resources/analytics/types/TimeDataPoint.js +17 -7
- package/serialization/resources/analytics/types/TimeInterval.js +17 -7
- package/serialization/resources/analytics/types/TimeSeries.js +17 -7
- package/serialization/resources/analytics/types/index.d.ts +3 -3
- package/serialization/resources/analytics/types/index.js +3 -3
- package/serialization/resources/appSettings/client/get.js +17 -7
- package/serialization/resources/appSettings/client/index.js +17 -7
- package/serialization/resources/commons/types/ActionBase.d.ts +1 -0
- package/serialization/resources/commons/types/ActionBase.js +18 -7
- package/serialization/resources/commons/types/ActionEnumOption.js +17 -7
- package/serialization/resources/commons/types/ActionFormField.js +17 -7
- package/serialization/resources/commons/types/ActionParameter.js +17 -7
- package/serialization/resources/commons/types/ActionParameterType.js +17 -7
- package/serialization/resources/commons/types/ActionResponse.js +17 -7
- package/serialization/resources/commons/types/AppUser.js +17 -7
- package/serialization/resources/commons/types/AppUserIdentifier.js +17 -7
- package/serialization/resources/commons/types/AppUserIdentifyingPropertyType.js +17 -7
- package/serialization/resources/commons/types/AppUserRequest.js +17 -7
- package/serialization/resources/commons/types/AppUserResponse.js +17 -7
- package/serialization/resources/commons/types/BaseConversationResponse.d.ts +27 -0
- package/serialization/resources/commons/types/BaseConversationResponse.js +58 -0
- package/serialization/resources/commons/types/BasePaginatedRequest.d.ts +14 -0
- package/serialization/resources/commons/types/BasePaginatedRequest.js +45 -0
- package/serialization/resources/commons/types/BotActionFormResponse.js +17 -7
- package/serialization/resources/commons/types/BotChartResponse.js +17 -7
- package/serialization/resources/commons/types/BotConversationMessageType.js +17 -7
- package/serialization/resources/commons/types/BotMessage.d.ts +2 -0
- package/serialization/resources/commons/types/BotMessage.js +19 -7
- package/serialization/resources/commons/types/BotMessageStatus.d.ts +10 -0
- package/serialization/resources/commons/types/BotMessageStatus.js +41 -0
- package/serialization/resources/commons/types/BotResponse.js +17 -7
- package/serialization/resources/commons/types/BotResponseMetadata.js +17 -7
- package/serialization/resources/commons/types/BotTextResponse.js +17 -7
- package/serialization/resources/commons/types/Capability.js +17 -7
- package/serialization/resources/commons/types/ChartSpecSchema.js +17 -7
- package/serialization/resources/commons/types/ConversationAnalysis.d.ts +1 -0
- package/serialization/resources/commons/types/ConversationAnalysis.js +18 -7
- package/serialization/resources/commons/types/ConversationExecutedActionPrecondition.js +17 -7
- package/serialization/resources/commons/types/ConversationInformation.d.ts +13 -0
- package/serialization/resources/commons/types/ConversationInformation.js +44 -0
- package/serialization/resources/commons/types/ConversationMessageBase.js +17 -7
- package/serialization/resources/commons/types/ConversationMessageResponse.js +17 -7
- package/serialization/resources/commons/types/ConversationPrecondition.js +17 -7
- package/serialization/resources/commons/types/ConversationPreview.d.ts +12 -0
- package/serialization/resources/commons/types/ConversationPreview.js +42 -0
- package/serialization/resources/commons/types/ConversationResponse.d.ts +2 -9
- package/serialization/resources/commons/types/ConversationResponse.js +19 -16
- package/serialization/resources/commons/types/ConversationSummary.js +17 -7
- package/serialization/resources/commons/types/DocumentInformation.d.ts +15 -0
- package/serialization/resources/commons/types/DocumentInformation.js +46 -0
- package/serialization/resources/commons/types/EntityId.js +17 -7
- package/serialization/resources/commons/types/EntityIdBase.js +17 -7
- package/serialization/resources/commons/types/EntityIdFilter.js +17 -7
- package/serialization/resources/commons/types/EntityIdWithoutAgent.js +17 -7
- package/serialization/resources/commons/types/EntityType.d.ts +1 -1
- package/serialization/resources/commons/types/EntityType.js +19 -7
- package/serialization/resources/commons/types/ErrorMessage.js +17 -7
- package/serialization/resources/commons/types/EventTriggerBase.js +17 -7
- package/serialization/resources/commons/types/EventTriggerResponse.js +17 -7
- package/serialization/resources/commons/types/EventTriggerType.d.ts +1 -1
- package/serialization/resources/commons/types/EventTriggerType.js +18 -8
- package/serialization/resources/commons/types/Feedback.js +17 -7
- package/serialization/resources/commons/types/FeedbackBase.js +17 -7
- package/serialization/resources/commons/types/FeedbackType.js +17 -7
- package/serialization/resources/commons/types/InboxItem.d.ts +26 -0
- package/serialization/resources/commons/types/InboxItem.js +55 -0
- package/serialization/resources/commons/types/InboxItemBase.d.ts +17 -0
- package/serialization/resources/commons/types/InboxItemBase.js +48 -0
- package/serialization/resources/commons/types/InboxItemDuplicateDocuments.d.ts +17 -0
- package/serialization/resources/commons/types/InboxItemDuplicateDocuments.js +50 -0
- package/serialization/resources/commons/types/InboxItemDuplicateKnowledgeBase.d.ts +17 -0
- package/serialization/resources/commons/types/InboxItemDuplicateKnowledgeBase.js +50 -0
- package/serialization/resources/commons/types/InboxItemFix.d.ts +22 -0
- package/serialization/resources/commons/types/InboxItemFix.js +53 -0
- package/serialization/resources/commons/types/InboxItemFixAddDocument.d.ts +14 -0
- package/serialization/resources/commons/types/InboxItemFixAddDocument.js +47 -0
- package/serialization/resources/commons/types/InboxItemFixBase.d.ts +13 -0
- package/serialization/resources/commons/types/InboxItemFixBase.js +44 -0
- package/serialization/resources/commons/types/InboxItemFixDeactivateDocument.d.ts +14 -0
- package/serialization/resources/commons/types/InboxItemFixDeactivateDocument.js +47 -0
- package/serialization/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.d.ts +14 -0
- package/serialization/resources/commons/types/InboxItemFixDeactivateKnowledgeBase.js +47 -0
- package/serialization/resources/commons/types/InboxItemKnowledgeBaseAlert.d.ts +16 -0
- package/serialization/resources/commons/types/InboxItemKnowledgeBaseAlert.js +49 -0
- package/serialization/resources/commons/types/InboxItemMissingKnowledge.d.ts +16 -0
- package/serialization/resources/commons/types/InboxItemMissingKnowledge.js +49 -0
- package/serialization/resources/commons/types/InboxItemStatus.d.ts +10 -0
- package/serialization/resources/commons/types/InboxItemStatus.js +41 -0
- package/serialization/resources/commons/types/InboxItemType.d.ts +10 -0
- package/serialization/resources/commons/types/InboxItemType.js +46 -0
- package/serialization/resources/commons/types/KnowledgeBaseInformation.d.ts +13 -0
- package/serialization/resources/commons/types/KnowledgeBaseInformation.js +44 -0
- package/serialization/resources/commons/types/MetadataPrecondition.js +17 -7
- package/serialization/resources/commons/types/Page.d.ts +15 -0
- package/serialization/resources/commons/types/Page.js +46 -0
- package/serialization/resources/commons/types/Precondition.js +17 -7
- package/serialization/resources/commons/types/PreconditionBase.js +17 -7
- package/serialization/resources/commons/types/PreconditionGroup.js +17 -7
- package/serialization/resources/commons/types/PreconditionGroupOperator.js +17 -7
- package/serialization/resources/commons/types/PreconditionOperator.js +17 -7
- package/serialization/resources/commons/types/ResponseConfig.js +17 -7
- package/serialization/resources/commons/types/ResponseConfigPrecondition.js +17 -7
- package/serialization/resources/commons/types/ResponseLength.js +17 -7
- package/serialization/resources/commons/types/Sentiment.js +17 -7
- package/serialization/resources/commons/types/Source.js +17 -7
- package/serialization/resources/commons/types/TagsPrecondition.js +17 -7
- package/serialization/resources/commons/types/UserConversationMessageType.js +17 -7
- package/serialization/resources/commons/types/UserData.js +17 -7
- package/serialization/resources/commons/types/UserMessage.js +17 -7
- package/serialization/resources/commons/types/UserMessageAttachment.js +17 -7
- package/serialization/resources/commons/types/UserMessageBase.js +17 -7
- package/serialization/resources/commons/types/VisibilityType.js +17 -7
- package/serialization/resources/commons/types/index.d.ts +23 -3
- package/serialization/resources/commons/types/index.js +23 -3
- package/serialization/resources/conversation/client/addConversationMetadata.js +17 -7
- package/serialization/resources/conversation/client/appendNewMessages.js +17 -7
- package/serialization/resources/conversation/client/index.js +17 -7
- package/serialization/resources/conversation/types/AskRequest.js +17 -7
- package/serialization/resources/conversation/types/AskStreamActionEvent.js +17 -7
- package/serialization/resources/conversation/types/AskStreamChartEvent.js +17 -7
- package/serialization/resources/conversation/types/AskStreamEndEvent.js +17 -7
- package/serialization/resources/conversation/types/AskStreamMetadataEvent.js +17 -7
- package/serialization/resources/conversation/types/AskStreamStartEvent.js +17 -7
- package/serialization/resources/conversation/types/AskStreamTextEvent.js +17 -7
- package/serialization/resources/conversation/types/Attachment.js +17 -7
- package/serialization/resources/conversation/types/CategorizationResponse.js +17 -7
- package/serialization/resources/conversation/types/ConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/ConversationField.js +18 -7
- package/serialization/resources/conversation/types/ConversationFilter.d.ts +3 -0
- package/serialization/resources/conversation/types/ConversationFilter.js +20 -7
- package/serialization/resources/conversation/types/ConversationMessageRequest.js +17 -7
- package/serialization/resources/conversation/types/ConversationMetadata.d.ts +12 -0
- package/{dist/serialization/resources/commons/types/ConversationBase.js → serialization/resources/conversation/types/ConversationMetadata.js} +20 -17
- package/serialization/resources/conversation/types/ConversationRequest.d.ts +9 -2
- package/serialization/resources/conversation/types/ConversationRequest.js +27 -12
- package/serialization/resources/conversation/types/ConversationsResponse.d.ts +14 -0
- package/serialization/resources/conversation/types/ConversationsResponse.js +47 -0
- package/serialization/resources/conversation/types/ConversationsSearchRequest.d.ts +16 -0
- package/serialization/resources/conversation/types/ConversationsSearchRequest.js +49 -0
- package/serialization/resources/conversation/types/FeedbackField.js +17 -7
- package/serialization/resources/conversation/types/FeedbackFilter.js +17 -7
- package/serialization/resources/conversation/types/FeedbackRequest.js +17 -7
- package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +17 -7
- package/serialization/resources/conversation/types/NumericConversationField.d.ts +1 -1
- package/serialization/resources/conversation/types/NumericConversationField.js +18 -7
- package/serialization/resources/conversation/types/Quality.js +17 -7
- package/serialization/resources/conversation/types/QualityReason.js +17 -7
- package/serialization/resources/conversation/types/ResolutionStatus.d.ts +10 -0
- package/{dist/serialization/resources/knowledge/types/KnowledgeBaseType.js → serialization/resources/conversation/types/ResolutionStatus.js} +19 -9
- package/serialization/resources/conversation/types/StreamResponse.js +17 -7
- package/serialization/resources/conversation/types/SubmitActionFormRequest.js +17 -7
- package/serialization/resources/conversation/types/UpdateMetadataRequest.d.ts +13 -0
- package/serialization/resources/conversation/types/UpdateMetadataRequest.js +44 -0
- package/serialization/resources/conversation/types/index.d.ts +5 -0
- package/serialization/resources/conversation/types/index.js +5 -0
- package/serialization/resources/inbox/index.d.ts +1 -0
- package/serialization/resources/inbox/index.js +17 -0
- package/serialization/resources/inbox/types/AddDocumentFixRequest.d.ts +14 -0
- package/serialization/resources/inbox/types/AddDocumentFixRequest.js +45 -0
- package/serialization/resources/inbox/types/ApplyInboxItemFixRequest.d.ts +14 -0
- package/serialization/resources/inbox/types/ApplyInboxItemFixRequest.js +45 -0
- package/serialization/resources/inbox/types/BaseInboxSearchRequest.d.ts +13 -0
- package/serialization/resources/inbox/types/BaseInboxSearchRequest.js +44 -0
- package/serialization/resources/inbox/types/InboxSearchRequest.d.ts +18 -0
- package/serialization/resources/inbox/types/InboxSearchRequest.js +51 -0
- package/serialization/resources/inbox/types/InboxSearchResponse.d.ts +14 -0
- package/serialization/resources/inbox/types/InboxSearchResponse.js +47 -0
- package/serialization/resources/inbox/types/index.d.ts +5 -0
- package/serialization/resources/inbox/types/index.js +21 -0
- package/serialization/resources/index.d.ts +4 -0
- package/serialization/resources/index.js +22 -8
- package/serialization/resources/knowledge/types/BaseKnowledgeDocument.js +17 -7
- package/serialization/resources/knowledge/types/KnowledgeBaseProperties.d.ts +0 -3
- package/serialization/resources/knowledge/types/KnowledgeBaseProperties.js +17 -10
- package/serialization/resources/knowledge/types/KnowledgeBaseRequest.js +17 -7
- package/serialization/resources/knowledge/types/KnowledgeBaseResponse.js +17 -7
- package/serialization/resources/knowledge/types/KnowledgeBaseVersion.js +17 -7
- package/serialization/resources/knowledge/types/KnowledgeBaseVersionType.js +17 -7
- package/serialization/resources/knowledge/types/KnowledgeDocumentContentType.js +17 -7
- package/serialization/resources/knowledge/types/KnowledgeDocumentRequest.js +17 -7
- package/serialization/resources/knowledge/types/KnowledgeDocumentResponse.js +17 -7
- package/serialization/resources/knowledge/types/index.d.ts +0 -1
- package/serialization/resources/knowledge/types/index.js +0 -1
- package/serialization/resources/realtime/index.d.ts +1 -0
- package/serialization/resources/realtime/index.js +17 -0
- package/serialization/resources/realtime/types/AudioPublishEvent.d.ts +12 -0
- package/serialization/resources/realtime/types/AudioPublishEvent.js +43 -0
- package/serialization/resources/realtime/types/AudioSubscribeEvent.d.ts +12 -0
- package/serialization/resources/realtime/types/AudioSubscribeEvent.js +43 -0
- package/serialization/resources/realtime/types/ControlEvent.d.ts +12 -0
- package/serialization/resources/realtime/types/ControlEvent.js +43 -0
- package/serialization/resources/realtime/types/PublishEvent.d.ts +14 -0
- package/serialization/resources/realtime/types/PublishEvent.js +49 -0
- package/serialization/resources/realtime/types/SubscribeEvent.d.ts +24 -0
- package/serialization/resources/realtime/types/SubscribeEvent.js +53 -0
- package/serialization/resources/realtime/types/index.d.ts +5 -0
- package/serialization/resources/realtime/types/index.js +21 -0
- package/serialization/resources/translations/types/TranslationRequest.js +17 -7
- package/serialization/resources/translations/types/TranslationResponse.js +17 -7
- package/serialization/resources/triggers/types/EventTriggerRequest.js +17 -7
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/commons/types/ConversationBase.d.ts +0 -20
- package/api/resources/knowledge/types/KnowledgeBaseType.d.ts +0 -12
- package/dist/api/resources/commons/types/ConversationBase.d.ts +0 -20
- package/dist/api/resources/knowledge/types/KnowledgeBaseType.d.ts +0 -12
- package/dist/serialization/resources/commons/types/ConversationBase.d.ts +0 -19
- package/dist/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +0 -10
- package/serialization/resources/commons/types/ConversationBase.d.ts +0 -19
- package/serialization/resources/knowledge/types/KnowledgeBaseType.d.ts +0 -10
- /package/api/resources/analytics/types/{BarChartRequest.js → ConversationBarChartRequest.js} +0 -0
- /package/api/resources/analytics/types/{DateHistogramRequest.js → ConversationDateHistogramRequest.js} +0 -0
- /package/api/resources/analytics/types/{PieChartRequest.js → ConversationPieChartRequest.js} +0 -0
- /package/api/resources/commons/types/{ConversationBase.js → BaseConversationResponse.js} +0 -0
- /package/{dist/api/resources/analytics/types/BarChartRequest.js → api/resources/commons/types/BasePaginatedRequest.js} +0 -0
- /package/{dist/api/resources/analytics/types/DateHistogramRequest.js → api/resources/commons/types/ConversationInformation.js} +0 -0
- /package/{dist/api/resources/analytics/types/PieChartRequest.js → api/resources/commons/types/ConversationPreview.js} +0 -0
- /package/{dist/api/resources/commons/types/ConversationBase.js → api/resources/commons/types/DocumentInformation.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bigint =
|
|
3
|
+
exports.bigint = bigint;
|
|
4
4
|
const Schema_1 = require("../../Schema");
|
|
5
5
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
6
|
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
@@ -8,30 +8,30 @@ const schema_utils_1 = require("../schema-utils");
|
|
|
8
8
|
function bigint() {
|
|
9
9
|
const baseSchema = {
|
|
10
10
|
parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
|
|
11
|
-
if (typeof raw
|
|
11
|
+
if (typeof raw === "bigint") {
|
|
12
12
|
return {
|
|
13
|
-
ok:
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
path: breadcrumbsPrefix,
|
|
17
|
-
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "string"),
|
|
18
|
-
},
|
|
19
|
-
],
|
|
13
|
+
ok: true,
|
|
14
|
+
value: raw,
|
|
20
15
|
};
|
|
21
16
|
}
|
|
22
|
-
|
|
23
|
-
ok: true,
|
|
24
|
-
value: BigInt(raw),
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
|
|
28
|
-
if (typeof bigint === "bigint") {
|
|
17
|
+
if (typeof raw === "number") {
|
|
29
18
|
return {
|
|
30
19
|
ok: true,
|
|
31
|
-
value:
|
|
20
|
+
value: BigInt(raw),
|
|
32
21
|
};
|
|
33
22
|
}
|
|
34
|
-
|
|
23
|
+
return {
|
|
24
|
+
ok: false,
|
|
25
|
+
errors: [
|
|
26
|
+
{
|
|
27
|
+
path: breadcrumbsPrefix,
|
|
28
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "bigint | number"),
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
|
|
34
|
+
if (typeof bigint !== "bigint") {
|
|
35
35
|
return {
|
|
36
36
|
ok: false,
|
|
37
37
|
errors: [
|
|
@@ -42,9 +42,12 @@ function bigint() {
|
|
|
42
42
|
],
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
+
return {
|
|
46
|
+
ok: true,
|
|
47
|
+
value: bigint,
|
|
48
|
+
};
|
|
45
49
|
},
|
|
46
50
|
getType: () => Schema_1.SchemaType.BIGINT,
|
|
47
51
|
};
|
|
48
52
|
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
49
53
|
}
|
|
50
|
-
exports.bigint = bigint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.date =
|
|
3
|
+
exports.date = date;
|
|
4
4
|
const Schema_1 = require("../../Schema");
|
|
5
5
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
6
|
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
@@ -60,4 +60,3 @@ function date() {
|
|
|
60
60
|
};
|
|
61
61
|
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
62
62
|
}
|
|
63
|
-
exports.date = date;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.enum_ =
|
|
3
|
+
exports.enum_ = enum_;
|
|
4
4
|
const Schema_1 = require("../../Schema");
|
|
5
5
|
const createIdentitySchemaCreator_1 = require("../../utils/createIdentitySchemaCreator");
|
|
6
6
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
@@ -36,4 +36,3 @@ function enum_(values) {
|
|
|
36
36
|
});
|
|
37
37
|
return schemaCreator();
|
|
38
38
|
}
|
|
39
|
-
exports.enum_ = enum_;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSchema, Schema } from "../../Schema";
|
|
2
|
-
export
|
|
2
|
+
export type SchemaGetter<SchemaType extends Schema<any, any>> = () => SchemaType;
|
|
3
3
|
export declare function lazy<Raw, Parsed>(getter: SchemaGetter<Schema<Raw, Parsed>>): Schema<Raw, Parsed>;
|
|
4
4
|
export declare function constructLazyBaseSchema<Raw, Parsed>(getter: SchemaGetter<Schema<Raw, Parsed>>): BaseSchema<Raw, Parsed>;
|
|
5
5
|
export declare function getMemoizedSchema<SchemaType extends Schema<any, any>>(getter: SchemaGetter<SchemaType>): SchemaType;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.lazy = lazy;
|
|
4
|
+
exports.constructLazyBaseSchema = constructLazyBaseSchema;
|
|
5
|
+
exports.getMemoizedSchema = getMemoizedSchema;
|
|
4
6
|
const schema_utils_1 = require("../schema-utils");
|
|
5
7
|
function lazy(getter) {
|
|
6
8
|
const baseSchema = constructLazyBaseSchema(getter);
|
|
7
9
|
return Object.assign(Object.assign({}, baseSchema), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
8
10
|
}
|
|
9
|
-
exports.lazy = lazy;
|
|
10
11
|
function constructLazyBaseSchema(getter) {
|
|
11
12
|
return {
|
|
12
13
|
parse: (raw, opts) => getMemoizedSchema(getter).parse(raw, opts),
|
|
@@ -14,7 +15,6 @@ function constructLazyBaseSchema(getter) {
|
|
|
14
15
|
getType: () => getMemoizedSchema(getter).getType(),
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
exports.constructLazyBaseSchema = constructLazyBaseSchema;
|
|
18
18
|
function getMemoizedSchema(getter) {
|
|
19
19
|
const castedGetter = getter;
|
|
20
20
|
if (castedGetter.__zurg_memoized == null) {
|
|
@@ -22,4 +22,3 @@ function getMemoizedSchema(getter) {
|
|
|
22
22
|
}
|
|
23
23
|
return castedGetter.__zurg_memoized;
|
|
24
24
|
}
|
|
25
|
-
exports.getMemoizedSchema = getMemoizedSchema;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lazyObject =
|
|
3
|
+
exports.lazyObject = lazyObject;
|
|
4
4
|
const object_1 = require("../object");
|
|
5
5
|
const object_like_1 = require("../object-like");
|
|
6
6
|
const schema_utils_1 = require("../schema-utils");
|
|
@@ -9,4 +9,3 @@ function lazyObject(getter) {
|
|
|
9
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
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));
|
|
11
11
|
}
|
|
12
|
-
exports.lazyObject = lazyObject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.list =
|
|
3
|
+
exports.list = list;
|
|
4
4
|
const Schema_1 = require("../../Schema");
|
|
5
5
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
6
|
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
@@ -19,7 +19,6 @@ function list(schema) {
|
|
|
19
19
|
};
|
|
20
20
|
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
21
21
|
}
|
|
22
|
-
exports.list = list;
|
|
23
22
|
function validateAndTransformArray(value, transformItem) {
|
|
24
23
|
if (!Array.isArray(value)) {
|
|
25
24
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.booleanLiteral =
|
|
3
|
+
exports.booleanLiteral = booleanLiteral;
|
|
4
4
|
const Schema_1 = require("../../Schema");
|
|
5
5
|
const createIdentitySchemaCreator_1 = require("../../utils/createIdentitySchemaCreator");
|
|
6
6
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
@@ -26,4 +26,3 @@ function booleanLiteral(literal) {
|
|
|
26
26
|
});
|
|
27
27
|
return schemaCreator();
|
|
28
28
|
}
|
|
29
|
-
exports.booleanLiteral = booleanLiteral;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringLiteral =
|
|
3
|
+
exports.stringLiteral = stringLiteral;
|
|
4
4
|
const Schema_1 = require("../../Schema");
|
|
5
5
|
const createIdentitySchemaCreator_1 = require("../../utils/createIdentitySchemaCreator");
|
|
6
6
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
@@ -26,4 +26,3 @@ function stringLiteral(literal) {
|
|
|
26
26
|
});
|
|
27
27
|
return schemaCreator();
|
|
28
28
|
}
|
|
29
|
-
exports.stringLiteral = stringLiteral;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BaseObjectSchema,
|
|
1
|
+
import { BaseObjectSchema, ObjectUtils, PropertySchemas, inferObjectSchemaFromPropertySchemas } from "./types";
|
|
2
2
|
export declare function object<ParsedKeys extends string, T extends PropertySchemas<ParsedKeys>>(schemas: T): inferObjectSchemaFromPropertySchemas<T>;
|
|
3
3
|
export declare function getObjectUtils<Raw, Parsed>(schema: BaseObjectSchema<Raw, Parsed>): ObjectUtils<Raw, Parsed>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.object = object;
|
|
4
|
+
exports.getObjectUtils = getObjectUtils;
|
|
4
5
|
const Schema_1 = require("../../Schema");
|
|
5
6
|
const entries_1 = require("../../utils/entries");
|
|
6
7
|
const filterObject_1 = require("../../utils/filterObject");
|
|
@@ -104,7 +105,6 @@ function object(schemas) {
|
|
|
104
105
|
};
|
|
105
106
|
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));
|
|
106
107
|
}
|
|
107
|
-
exports.object = object;
|
|
108
108
|
function validateAndTransformObject({ value, requiredKeys, getProperty, unrecognizedObjectKeys = "fail", skipValidation = false, breadcrumbsPrefix = [], }) {
|
|
109
109
|
if (!(0, isPlainObject_1.isPlainObject)(value)) {
|
|
110
110
|
return {
|
|
@@ -224,7 +224,6 @@ function getObjectUtils(schema) {
|
|
|
224
224
|
},
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
exports.getObjectUtils = getObjectUtils;
|
|
228
227
|
function validateAndTransformExtendedObject({ extensionKeys, value, transformBase, transformExtension, }) {
|
|
229
228
|
const extensionPropertiesSet = new Set(extensionKeys);
|
|
230
229
|
const [extensionProperties, baseProperties] = (0, partition_1.partition)((0, keys_1.keys)(value), (key) => extensionPropertiesSet.has(key));
|
|
@@ -254,6 +253,7 @@ function isSchemaOptional(schema) {
|
|
|
254
253
|
case Schema_1.SchemaType.ANY:
|
|
255
254
|
case Schema_1.SchemaType.UNKNOWN:
|
|
256
255
|
case Schema_1.SchemaType.OPTIONAL:
|
|
256
|
+
case Schema_1.SchemaType.OPTIONAL_NULLABLE:
|
|
257
257
|
return true;
|
|
258
258
|
default:
|
|
259
259
|
return false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ObjectSchema, PropertySchemas, inferParsedPropertySchema, inferRawObjectFromPropertySchemas } from "./types";
|
|
2
2
|
export declare function objectWithoutOptionalProperties<ParsedKeys extends string, T extends PropertySchemas<ParsedKeys>>(schemas: T): inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas<T>;
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type inferObjectWithoutOptionalPropertiesSchemaFromPropertySchemas<T extends PropertySchemas<keyof T>> = ObjectSchema<inferRawObjectFromPropertySchemas<T>, inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas<T>>;
|
|
4
|
+
export type inferParsedObjectWithoutOptionalPropertiesFromPropertySchemas<T extends PropertySchemas<keyof T>> = {
|
|
5
5
|
[K in keyof T]: inferParsedPropertySchema<T[K]>;
|
|
6
6
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.objectWithoutOptionalProperties =
|
|
3
|
+
exports.objectWithoutOptionalProperties = objectWithoutOptionalProperties;
|
|
4
4
|
const object_1 = require("./object");
|
|
5
5
|
function objectWithoutOptionalProperties(schemas) {
|
|
6
6
|
return (0, object_1.object)(schemas);
|
|
7
7
|
}
|
|
8
|
-
exports.objectWithoutOptionalProperties = objectWithoutOptionalProperties;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.property = property;
|
|
4
|
+
exports.isProperty = isProperty;
|
|
4
5
|
function property(rawKey, valueSchema) {
|
|
5
6
|
return {
|
|
6
7
|
rawKey,
|
|
@@ -8,9 +9,7 @@ function property(rawKey, valueSchema) {
|
|
|
8
9
|
isProperty: true,
|
|
9
10
|
};
|
|
10
11
|
}
|
|
11
|
-
exports.property = property;
|
|
12
12
|
function isProperty(maybeProperty) {
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
14
14
|
return maybeProperty.isProperty;
|
|
15
15
|
}
|
|
16
|
-
exports.isProperty = isProperty;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BaseSchema, inferParsed, inferRaw
|
|
1
|
+
import { BaseSchema, Schema, inferParsed, inferRaw } from "../../Schema";
|
|
2
2
|
import { addQuestionMarksToNullableProperties } from "../../utils/addQuestionMarksToNullableProperties";
|
|
3
3
|
import { ObjectLikeUtils } from "../object-like";
|
|
4
4
|
import { SchemaUtils } from "../schema-utils";
|
|
5
5
|
import { Property } from "./property";
|
|
6
|
-
export
|
|
6
|
+
export type ObjectSchema<Raw, Parsed> = BaseObjectSchema<Raw, Parsed> & ObjectLikeUtils<Raw, Parsed> & ObjectUtils<Raw, Parsed> & SchemaUtils<Raw, Parsed>;
|
|
7
7
|
export interface BaseObjectSchema<Raw, Parsed> extends BaseSchema<Raw, Parsed> {
|
|
8
8
|
_getRawProperties: () => (keyof Raw)[];
|
|
9
9
|
_getParsedProperties: () => (keyof Parsed)[];
|
|
@@ -16,16 +16,16 @@ export interface ObjectUtils<Raw, Parsed> {
|
|
|
16
16
|
[key: string]: unknown;
|
|
17
17
|
}>;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
19
|
+
export type inferRawObject<O extends ObjectSchema<any, any>> = O extends ObjectSchema<infer Raw, any> ? Raw : never;
|
|
20
|
+
export type inferParsedObject<O extends ObjectSchema<any, any>> = O extends ObjectSchema<any, infer Parsed> ? Parsed : never;
|
|
21
|
+
export type inferObjectSchemaFromPropertySchemas<T extends PropertySchemas<keyof T>> = ObjectSchema<inferRawObjectFromPropertySchemas<T>, inferParsedObjectFromPropertySchemas<T>>;
|
|
22
|
+
export type inferRawObjectFromPropertySchemas<T extends PropertySchemas<keyof T>> = addQuestionMarksToNullableProperties<{
|
|
23
23
|
[ParsedKey in keyof T as inferRawKey<ParsedKey, T[ParsedKey]>]: inferRawPropertySchema<T[ParsedKey]>;
|
|
24
24
|
}>;
|
|
25
|
-
export
|
|
25
|
+
export type inferParsedObjectFromPropertySchemas<T extends PropertySchemas<keyof T>> = addQuestionMarksToNullableProperties<{
|
|
26
26
|
[K in keyof T]: inferParsedPropertySchema<T[K]>;
|
|
27
27
|
}>;
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
28
|
+
export type PropertySchemas<ParsedKeys extends string | number | symbol> = Record<ParsedKeys, Property<any, any, any> | Schema<any, any>>;
|
|
29
|
+
export type inferRawPropertySchema<P extends Property<any, any, any> | Schema<any, any>> = P extends Property<any, infer Raw, any> ? Raw : P extends Schema<any, any> ? inferRaw<P> : never;
|
|
30
|
+
export type inferParsedPropertySchema<P extends Property<any, any, any> | Schema<any, any>> = P extends Property<any, any, infer Parsed> ? Parsed : P extends Schema<any, any> ? inferParsed<P> : never;
|
|
31
|
+
export type inferRawKey<ParsedKey extends string | number | symbol, P extends Property<any, any, any> | Schema<any, any>> = P extends Property<infer Raw, any, any> ? Raw : ParsedKey;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getObjectLikeUtils = getObjectLikeUtils;
|
|
4
|
+
exports.withParsedProperties = withParsedProperties;
|
|
4
5
|
const filterObject_1 = require("../../utils/filterObject");
|
|
5
6
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
7
|
const isPlainObject_1 = require("../../utils/isPlainObject");
|
|
@@ -10,7 +11,6 @@ function getObjectLikeUtils(schema) {
|
|
|
10
11
|
withParsedProperties: (properties) => withParsedProperties(schema, properties),
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
|
-
exports.getObjectLikeUtils = getObjectLikeUtils;
|
|
14
14
|
/**
|
|
15
15
|
* object-like utils are defined in one file to resolve issues with circular imports
|
|
16
16
|
*/
|
|
@@ -51,4 +51,3 @@ function withParsedProperties(objectLike, properties) {
|
|
|
51
51
|
};
|
|
52
52
|
return Object.assign(Object.assign(Object.assign({}, objectSchema), (0, schema_utils_1.getSchemaUtils)(objectSchema)), getObjectLikeUtils(objectSchema));
|
|
53
53
|
}
|
|
54
|
-
exports.withParsedProperties = withParsedProperties;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSchema, Schema } from "../../Schema";
|
|
2
|
-
export
|
|
2
|
+
export type ObjectLikeSchema<Raw, Parsed> = Schema<Raw, Parsed> & BaseSchema<Raw, Parsed> & ObjectLikeUtils<Raw, Parsed>;
|
|
3
3
|
export interface ObjectLikeUtils<Raw, Parsed> {
|
|
4
4
|
withParsedProperties: <T extends Record<string, any>>(properties: {
|
|
5
5
|
[K in keyof T]: T[K] | ((parsed: Parsed) => T[K]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.record =
|
|
3
|
+
exports.record = record;
|
|
4
4
|
const Schema_1 = require("../../Schema");
|
|
5
5
|
const entries_1 = require("../../utils/entries");
|
|
6
6
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
@@ -43,7 +43,6 @@ function record(keySchema, valueSchema) {
|
|
|
43
43
|
};
|
|
44
44
|
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
45
45
|
}
|
|
46
|
-
exports.record = record;
|
|
47
46
|
function validateAndTransformRecord({ value, isKeyNumeric, transformKey, transformValue, breadcrumbsPrefix = [], }) {
|
|
48
47
|
if (!(0, isPlainObject_1.isPlainObject)(value)) {
|
|
49
48
|
return {
|
|
@@ -57,8 +56,7 @@ function validateAndTransformRecord({ value, isKeyNumeric, transformKey, transfo
|
|
|
57
56
|
};
|
|
58
57
|
}
|
|
59
58
|
return (0, entries_1.entries)(value).reduce((accPromise, [stringKey, value]) => {
|
|
60
|
-
|
|
61
|
-
if (value == null) {
|
|
59
|
+
if (value === undefined) {
|
|
62
60
|
return accPromise;
|
|
63
61
|
}
|
|
64
62
|
const acc = accPromise;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BaseSchema } from "../../Schema";
|
|
2
2
|
import { SchemaUtils } from "../schema-utils";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type RecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseRecordSchema<RawKey, RawValue, ParsedKey, ParsedValue> & SchemaUtils<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
|
|
4
|
+
export type BaseRecordSchema<RawKey extends string | number, RawValue, ParsedKey extends string | number, ParsedValue> = BaseSchema<Record<RawKey, RawValue>, Record<ParsedKey, ParsedValue>>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BaseSchema, Schema, SchemaOptions } from "../../Schema";
|
|
2
2
|
export interface SchemaUtils<Raw, Parsed> {
|
|
3
|
+
nullable: () => Schema<Raw | null, Parsed | null>;
|
|
3
4
|
optional: () => Schema<Raw | null | undefined, Parsed | undefined>;
|
|
5
|
+
optionalNullable: () => Schema<Raw | null | undefined, Parsed | null | undefined>;
|
|
4
6
|
transform: <Transformed>(transformer: SchemaTransformer<Parsed, Transformed>) => Schema<Raw, Transformed>;
|
|
5
7
|
parseOrThrow: (raw: unknown, opts?: SchemaOptions) => Parsed;
|
|
6
8
|
jsonOrThrow: (raw: unknown, opts?: SchemaOptions) => Raw;
|
|
@@ -13,5 +15,7 @@ export declare function getSchemaUtils<Raw, Parsed>(schema: BaseSchema<Raw, Pars
|
|
|
13
15
|
/**
|
|
14
16
|
* schema utils are defined in one file to resolve issues with circular imports
|
|
15
17
|
*/
|
|
18
|
+
export declare function nullable<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null, Parsed | null>;
|
|
16
19
|
export declare function optional<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null | undefined, Parsed | undefined>;
|
|
20
|
+
export declare function optionalNullable<Raw, Parsed>(schema: BaseSchema<Raw, Parsed>): Schema<Raw | null | undefined, Parsed | null | undefined>;
|
|
17
21
|
export declare function transform<Raw, Parsed, Transformed>(schema: BaseSchema<Raw, Parsed>, transformer: SchemaTransformer<Parsed, Transformed>): Schema<Raw, Transformed>;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getSchemaUtils = getSchemaUtils;
|
|
4
|
+
exports.nullable = nullable;
|
|
5
|
+
exports.optional = optional;
|
|
6
|
+
exports.optionalNullable = optionalNullable;
|
|
7
|
+
exports.transform = transform;
|
|
4
8
|
const Schema_1 = require("../../Schema");
|
|
5
9
|
const JsonError_1 = require("./JsonError");
|
|
6
10
|
const ParseError_1 = require("./ParseError");
|
|
7
11
|
function getSchemaUtils(schema) {
|
|
8
12
|
return {
|
|
13
|
+
nullable: () => nullable(schema),
|
|
9
14
|
optional: () => optional(schema),
|
|
15
|
+
optionalNullable: () => optionalNullable(schema),
|
|
10
16
|
transform: (transformer) => transform(schema, transformer),
|
|
11
17
|
parseOrThrow: (raw, opts) => {
|
|
12
18
|
const parsed = schema.parse(raw, opts);
|
|
@@ -24,10 +30,33 @@ function getSchemaUtils(schema) {
|
|
|
24
30
|
},
|
|
25
31
|
};
|
|
26
32
|
}
|
|
27
|
-
exports.getSchemaUtils = getSchemaUtils;
|
|
28
33
|
/**
|
|
29
34
|
* schema utils are defined in one file to resolve issues with circular imports
|
|
30
35
|
*/
|
|
36
|
+
function nullable(schema) {
|
|
37
|
+
const baseSchema = {
|
|
38
|
+
parse: (raw, opts) => {
|
|
39
|
+
if (raw == null) {
|
|
40
|
+
return {
|
|
41
|
+
ok: true,
|
|
42
|
+
value: null,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return schema.parse(raw, opts);
|
|
46
|
+
},
|
|
47
|
+
json: (parsed, opts) => {
|
|
48
|
+
if (parsed == null) {
|
|
49
|
+
return {
|
|
50
|
+
ok: true,
|
|
51
|
+
value: null,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return schema.json(parsed, opts);
|
|
55
|
+
},
|
|
56
|
+
getType: () => Schema_1.SchemaType.NULLABLE,
|
|
57
|
+
};
|
|
58
|
+
return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
|
|
59
|
+
}
|
|
31
60
|
function optional(schema) {
|
|
32
61
|
const baseSchema = {
|
|
33
62
|
parse: (raw, opts) => {
|
|
@@ -58,7 +87,42 @@ function optional(schema) {
|
|
|
58
87
|
};
|
|
59
88
|
return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
|
|
60
89
|
}
|
|
61
|
-
|
|
90
|
+
function optionalNullable(schema) {
|
|
91
|
+
const baseSchema = {
|
|
92
|
+
parse: (raw, opts) => {
|
|
93
|
+
if (raw === undefined) {
|
|
94
|
+
return {
|
|
95
|
+
ok: true,
|
|
96
|
+
value: undefined,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (raw === null) {
|
|
100
|
+
return {
|
|
101
|
+
ok: true,
|
|
102
|
+
value: null,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return schema.parse(raw, opts);
|
|
106
|
+
},
|
|
107
|
+
json: (parsed, opts) => {
|
|
108
|
+
if (parsed === undefined) {
|
|
109
|
+
return {
|
|
110
|
+
ok: true,
|
|
111
|
+
value: undefined,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
if (parsed === null) {
|
|
115
|
+
return {
|
|
116
|
+
ok: true,
|
|
117
|
+
value: null,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return schema.json(parsed, opts);
|
|
121
|
+
},
|
|
122
|
+
getType: () => Schema_1.SchemaType.OPTIONAL_NULLABLE,
|
|
123
|
+
};
|
|
124
|
+
return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
|
|
125
|
+
}
|
|
62
126
|
function transform(schema, transformer) {
|
|
63
127
|
const baseSchema = {
|
|
64
128
|
parse: (raw, opts) => {
|
|
@@ -79,4 +143,3 @@ function transform(schema, transformer) {
|
|
|
79
143
|
};
|
|
80
144
|
return Object.assign(Object.assign({}, baseSchema), getSchemaUtils(baseSchema));
|
|
81
145
|
}
|
|
82
|
-
exports.transform = transform;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stringifyValidationError =
|
|
3
|
+
exports.stringifyValidationError = stringifyValidationError;
|
|
4
4
|
function stringifyValidationError(error) {
|
|
5
5
|
if (error.path.length === 0) {
|
|
6
6
|
return error.message;
|
|
7
7
|
}
|
|
8
8
|
return `${error.path.join(" -> ")}: ${error.message}`;
|
|
9
9
|
}
|
|
10
|
-
exports.stringifyValidationError = stringifyValidationError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.set =
|
|
3
|
+
exports.set = set;
|
|
4
4
|
const Schema_1 = require("../../Schema");
|
|
5
5
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
6
|
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
@@ -41,4 +41,3 @@ function set(schema) {
|
|
|
41
41
|
};
|
|
42
42
|
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
43
43
|
}
|
|
44
|
-
exports.set = set;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inferParsed, inferRaw
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
import { Schema, inferParsed, inferRaw } from "../../Schema";
|
|
2
|
+
export type UndiscriminatedUnionSchema<Schemas extends [...Schema[]]> = Schema<inferRawUnidiscriminatedUnionSchema<Schemas>, inferParsedUnidiscriminatedUnionSchema<Schemas>>;
|
|
3
|
+
export type inferRawUnidiscriminatedUnionSchema<Schemas extends [...Schema[]]> = inferRaw<Schemas[number]>;
|
|
4
|
+
export type inferParsedUnidiscriminatedUnionSchema<Schemas extends [...Schema[]]> = inferParsed<Schemas[number]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.undiscriminatedUnion =
|
|
3
|
+
exports.undiscriminatedUnion = undiscriminatedUnion;
|
|
4
4
|
const Schema_1 = require("../../Schema");
|
|
5
5
|
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
6
6
|
const schema_utils_1 = require("../schema-utils");
|
|
@@ -16,7 +16,6 @@ function undiscriminatedUnion(schemas) {
|
|
|
16
16
|
};
|
|
17
17
|
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
18
18
|
}
|
|
19
|
-
exports.undiscriminatedUnion = undiscriminatedUnion;
|
|
20
19
|
function validateAndTransformUndiscriminatedUnion(transform, schemas, opts) {
|
|
21
20
|
const errors = [];
|
|
22
21
|
for (const [index, schema] of schemas.entries()) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.discriminant =
|
|
3
|
+
exports.discriminant = discriminant;
|
|
4
4
|
function discriminant(parsedDiscriminant, rawDiscriminant) {
|
|
5
5
|
return {
|
|
6
6
|
parsedDiscriminant,
|
|
7
7
|
rawDiscriminant,
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
exports.discriminant = discriminant;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { inferParsedObject, inferRawObject
|
|
1
|
+
import { ObjectSchema, inferParsedObject, inferRawObject } from "../object";
|
|
2
2
|
import { Discriminant } from "./discriminant";
|
|
3
|
-
export
|
|
3
|
+
export type UnionSubtypes<DiscriminantValues extends string | number | symbol> = {
|
|
4
4
|
[K in DiscriminantValues]: ObjectSchema<any, any>;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type inferRawUnion<D extends string | Discriminant<any, any>, U extends UnionSubtypes<keyof U>> = {
|
|
7
7
|
[K in keyof U]: Record<inferRawDiscriminant<D>, K> & inferRawObject<U[K]>;
|
|
8
8
|
}[keyof U];
|
|
9
|
-
export
|
|
9
|
+
export type inferParsedUnion<D extends string | Discriminant<any, any>, U extends UnionSubtypes<keyof U>> = {
|
|
10
10
|
[K in keyof U]: Record<inferParsedDiscriminant<D>, K> & inferParsedObject<U[K]>;
|
|
11
11
|
}[keyof U];
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type inferRawDiscriminant<D extends string | Discriminant<any, any>> = D extends string ? D : D extends Discriminant<infer Raw, any> ? Raw : never;
|
|
13
|
+
export type inferParsedDiscriminant<D extends string | Discriminant<any, any>> = D extends string ? D : D extends Discriminant<any, infer Parsed> ? Parsed : never;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ObjectLikeSchema } from "../object-like";
|
|
2
2
|
import { Discriminant } from "./discriminant";
|
|
3
|
-
import { inferParsedUnion, inferRawUnion
|
|
3
|
+
import { UnionSubtypes, inferParsedUnion, inferRawUnion } from "./types";
|
|
4
4
|
export declare function union<D extends string | Discriminant<any, any>, U extends UnionSubtypes<any>>(discriminant: D, union: U): ObjectLikeSchema<inferRawUnion<D, U>, inferParsedUnion<D, U>>;
|
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.union =
|
|
14
|
+
exports.union = union;
|
|
15
15
|
const Schema_1 = require("../../Schema");
|
|
16
16
|
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
17
17
|
const isPlainObject_1 = require("../../utils/isPlainObject");
|
|
@@ -67,7 +67,6 @@ function union(discriminant, union) {
|
|
|
67
67
|
};
|
|
68
68
|
return Object.assign(Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema)), (0, object_like_1.getObjectLikeUtils)(baseSchema));
|
|
69
69
|
}
|
|
70
|
-
exports.union = union;
|
|
71
70
|
function transformAndValidateUnion({ value, discriminant, transformedDiscriminant, transformDiscriminantValue, getAdditionalPropertiesSchema, allowUnrecognizedUnionMembers = false, transformAdditionalProperties, breadcrumbsPrefix = [], }) {
|
|
72
71
|
if (!(0, isPlainObject_1.isPlainObject)(value)) {
|
|
73
72
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type MaybePromise<T> = T | Promise<T>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type addQuestionMarksToNullableProperties<T> = {
|
|
2
2
|
[K in OptionalKeys<T>]?: T[K];
|
|
3
3
|
} & Pick<T, RequiredKeys<T>>;
|
|
4
|
-
export
|
|
5
|
-
[K in keyof T]-?: undefined extends T[K] ? K :
|
|
4
|
+
export type OptionalKeys<T> = {
|
|
5
|
+
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
6
6
|
}[keyof T];
|
|
7
|
-
export
|
|
7
|
+
export type RequiredKeys<T> = Exclude<keyof T, OptionalKeys<T>>;
|