@coasys/ad4m 0.13.0-test-flows-1 → 0.13.1-staging.1
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/README.md +1 -0
- package/lib/index.cjs +6796 -6849
- package/lib/index.js +6757 -6820
- package/lib/src/Ad4mClient.d.ts +12 -4
- package/lib/src/Ad4mClient.js +15 -11
- package/lib/src/Literal.js +3 -3
- package/lib/src/agent/Agent.d.ts +4 -1
- package/lib/src/agent/Agent.js +6 -0
- package/lib/src/agent/AgentClient.d.ts +9 -23
- package/lib/src/agent/AgentClient.js +68 -148
- package/lib/src/ai/AIClient.d.ts +10 -6
- package/lib/src/ai/AIClient.js +29 -27
- package/lib/src/apiClient.d.ts +54 -42
- package/lib/src/apiClient.js +279 -252
- package/lib/src/expression/Expression.d.ts +13 -4
- package/lib/src/expression/Expression.js +0 -1
- package/lib/src/expression/ExpressionClient.js +1 -1
- package/lib/src/generated/api/AIPromptExamples.d.ts +4 -0
- package/lib/src/generated/api/AIPromptExamples.js +2 -0
- package/lib/src/generated/api/AIPromptExamplesInput.d.ts +4 -0
- package/lib/src/generated/api/AIPromptExamplesInput.js +2 -0
- package/lib/src/generated/api/AITask.d.ts +11 -0
- package/lib/src/generated/api/AITaskInput.d.ts +8 -0
- package/lib/src/generated/api/AddAgentInfosRequest.d.ts +3 -0
- package/lib/src/generated/api/AddAgentInfosRequest.js +2 -0
- package/lib/src/generated/api/AddLinkExpressionRequest.d.ts +2 -2
- package/lib/src/generated/api/AddLinkRequest.d.ts +2 -2
- package/lib/src/generated/api/AddLinksBulkRequest.d.ts +2 -2
- package/lib/src/generated/api/AddSdnaRequest.d.ts +2 -2
- package/lib/src/generated/api/Agent.d.ts +6 -0
- package/lib/src/generated/api/AgentAddEntanglementProofsParams.d.ts +9 -0
- package/lib/src/generated/api/AgentByDidParams.d.ts +3 -0
- package/lib/src/generated/api/AgentByDidParams.js +2 -0
- package/lib/src/generated/api/AgentRemoveAppParams.d.ts +3 -0
- package/lib/src/generated/api/AgentRemoveAppParams.js +2 -0
- package/lib/src/generated/api/AgentRevokeTokenParams.d.ts +3 -0
- package/lib/src/generated/api/AgentRevokeTokenParams.js +2 -0
- package/lib/src/generated/api/AgentSignature.d.ts +4 -0
- package/lib/src/generated/api/AgentSignature.js +2 -0
- package/lib/src/generated/api/AgentStatus.d.ts +8 -0
- package/lib/src/generated/api/AgentStatusChangedEvent.d.ts +7 -0
- package/lib/src/generated/api/AgentUpdatedEvent.d.ts +7 -0
- package/lib/src/generated/api/AiAddModelParams.d.ts +4 -0
- package/lib/src/generated/api/AiAddTaskParams.d.ts +4 -0
- package/lib/src/generated/api/AiDiscoverModelsParams.d.ts +8 -0
- package/lib/src/generated/api/AiDiscoverModelsParams.js +2 -0
- package/lib/src/generated/api/AiGetDefaultModelParams.d.ts +4 -0
- package/lib/src/generated/api/AiIdParams.d.ts +3 -0
- package/lib/src/generated/api/AiIdParams.js +2 -0
- package/lib/src/generated/api/AiModelLoadingStatusParams.d.ts +7 -0
- package/lib/src/generated/api/AiModelLoadingStatusParams.js +2 -0
- package/lib/src/generated/api/AiSetDefaultModelParams.d.ts +5 -0
- package/lib/src/generated/api/AiSetDefaultModelParams.js +1 -0
- package/lib/src/generated/api/AiTranscriptionCloseParams.d.ts +3 -0
- package/lib/src/generated/api/AiTranscriptionCloseParams.js +2 -0
- package/lib/src/generated/api/AiTranscriptionOpenParams.d.ts +5 -0
- package/lib/src/generated/api/AiTranscriptionOpenParams.js +1 -0
- package/lib/src/generated/api/AiUpdateModelParams.d.ts +5 -0
- package/lib/src/generated/api/AiUpdateModelParams.js +1 -0
- package/lib/src/generated/api/AiUpdateTaskParams.d.ts +4 -0
- package/lib/src/generated/api/AiUpdateTaskParams.js +1 -0
- package/lib/src/generated/api/Apps.d.ts +7 -0
- package/lib/src/generated/api/Apps.js +1 -0
- package/lib/src/generated/api/AuthInfo.d.ts +10 -0
- package/lib/src/generated/api/AuthInfo.js +1 -0
- package/lib/src/generated/api/AuthInfoInput.d.ts +4 -4
- package/lib/src/generated/api/AutoProcessorEvent.d.ts +89 -0
- package/lib/src/generated/api/AutoProcessorEvent.js +1 -0
- package/lib/src/generated/api/AutoProcessorNeighbourhoodState.d.ts +32 -0
- package/lib/src/generated/api/AutoProcessorNeighbourhoodState.js +1 -0
- package/lib/src/generated/api/AutoProcessorStep.d.ts +7 -0
- package/lib/src/generated/api/AutoProcessorStep.js +2 -0
- package/lib/src/generated/api/BroadcastRequest.d.ts +5 -0
- package/lib/src/generated/api/BroadcastRequest.js +2 -0
- package/lib/src/generated/api/Capability.d.ts +5 -0
- package/lib/src/generated/api/Capability.js +1 -0
- package/lib/src/generated/api/CreateSubjectRequest.d.ts +2 -2
- package/lib/src/generated/api/CreateUserRequest.d.ts +4 -0
- package/lib/src/generated/api/CreateUserRequest.js +2 -0
- package/lib/src/generated/api/DateTime.d.ts +1 -0
- package/lib/src/generated/api/DateTime.js +2 -0
- package/lib/src/generated/api/DecoratedExpressionProof.d.ts +6 -0
- package/lib/src/generated/api/DecoratedExpressionProof.js +2 -0
- package/lib/src/generated/api/DecoratedLinkExpression.d.ts +10 -0
- package/lib/src/generated/api/DecoratedLinkExpression.js +1 -0
- package/lib/src/generated/api/DecoratedNeighbourhoodExpression.d.ts +8 -0
- package/lib/src/generated/api/DecoratedNeighbourhoodExpression.js +1 -0
- package/lib/src/generated/api/DecoratedPerspective.d.ts +4 -0
- package/lib/src/generated/api/DecoratedPerspective.js +1 -0
- package/lib/src/generated/api/DisposeQueryRequest.d.ts +3 -0
- package/lib/src/generated/api/DisposeQueryRequest.js +2 -0
- package/lib/src/generated/api/EntanglementProof.d.ts +8 -0
- package/lib/src/generated/api/EntanglementProof.js +2 -0
- package/lib/src/generated/api/EntanglementProofInput.d.ts +1 -1
- package/lib/src/generated/api/EntanglementProofPreflightRequest.d.ts +4 -0
- package/lib/src/generated/api/EntanglementProofPreflightRequest.js +2 -0
- package/lib/src/generated/api/EntanglementProofsWrapper.d.ts +7 -0
- package/lib/src/generated/api/EntanglementProofsWrapper.js +1 -0
- package/lib/src/generated/api/Events.d.ts +46 -0
- package/lib/src/generated/api/Events.js +17 -0
- package/lib/src/generated/api/ExceptionInfo.d.ts +7 -0
- package/lib/src/generated/api/ExceptionInfo.js +1 -0
- package/lib/src/generated/api/ExceptionOccurredEvent.d.ts +7 -0
- package/lib/src/generated/api/ExceptionOccurredEvent.js +1 -0
- package/lib/src/generated/api/ExceptionType.d.ts +1 -0
- package/lib/src/generated/api/ExceptionType.js +2 -0
- package/lib/src/generated/api/ExecuteCommandsRequest.d.ts +4 -2
- package/lib/src/generated/api/ExportRequest.d.ts +1 -1
- package/lib/src/generated/api/ExpressionInteractRequest.d.ts +5 -0
- package/lib/src/generated/api/ExpressionInteractRequest.js +1 -0
- package/lib/src/generated/api/ExpressionProofInput.d.ts +4 -4
- package/lib/src/generated/api/ExpressionRendered.d.ts +11 -0
- package/lib/src/generated/api/ExpressionRendered.js +1 -0
- package/lib/src/generated/api/ExpressionUrlRequest.d.ts +3 -0
- package/lib/src/generated/api/ExpressionUrlRequest.js +2 -0
- package/lib/src/generated/api/FireOutcome.d.ts +14 -0
- package/lib/src/generated/api/FireOutcome.js +2 -0
- package/lib/src/generated/api/FriendSendMessageRequest.d.ts +1 -1
- package/lib/src/generated/api/HostRate.d.ts +7 -0
- package/lib/src/generated/api/HostRate.js +2 -0
- package/lib/src/generated/api/HostingInfoResult.d.ts +13 -0
- package/lib/src/generated/api/HostingInfoResult.js +1 -0
- package/lib/src/generated/api/HostingInfoUser.d.ts +9 -0
- package/lib/src/generated/api/HostingInfoUser.js +2 -0
- package/lib/src/generated/api/HostingRequestPaymentResult.d.ts +4 -0
- package/lib/src/generated/api/HostingRequestPaymentResult.js +2 -0
- package/lib/src/generated/api/HostingUserInfo.d.ts +6 -0
- package/lib/src/generated/api/HostingUserInfo.js +2 -0
- package/lib/src/generated/api/HostingVersionInfo.d.ts +7 -0
- package/lib/src/generated/api/HostingVersionInfo.js +2 -0
- package/lib/src/generated/api/HostingWalletResult.d.ts +8 -0
- package/lib/src/generated/api/HostingWalletResult.js +1 -0
- package/lib/src/generated/api/Icon.d.ts +3 -0
- package/lib/src/generated/api/Icon.js +2 -0
- package/lib/src/generated/api/ImportResult.d.ts +15 -0
- package/lib/src/generated/api/ImportResult.js +1 -0
- package/lib/src/generated/api/ImportStats.d.ts +7 -0
- package/lib/src/generated/api/ImportStats.js +2 -0
- package/lib/src/generated/api/InteractionCall.d.ts +4 -0
- package/lib/src/generated/api/InteractionCall.js +2 -0
- package/lib/src/generated/api/InteractionCallWrapper.d.ts +6 -0
- package/lib/src/generated/api/InteractionCallWrapper.js +2 -0
- package/lib/src/generated/api/InteractionMeta.d.ts +6 -0
- package/lib/src/generated/api/InteractionMeta.js +1 -0
- package/lib/src/generated/api/InteractionParameter.d.ts +4 -0
- package/lib/src/generated/api/InteractionParameter.js +2 -0
- package/lib/src/generated/api/KeepAliveQueryRequest.d.ts +3 -0
- package/lib/src/generated/api/KeepAliveQueryRequest.js +2 -0
- package/lib/src/generated/api/LanguageAddressParams.d.ts +3 -0
- package/lib/src/generated/api/LanguageAddressParams.js +2 -0
- package/lib/src/generated/api/LanguageHandle.d.ts +9 -0
- package/lib/src/generated/api/LanguageHandle.js +1 -0
- package/lib/src/generated/api/LanguageListParams.d.ts +3 -0
- package/lib/src/generated/api/LanguageListParams.js +2 -0
- package/lib/src/generated/api/LanguageMeta.d.ts +11 -0
- package/lib/src/generated/api/LanguageMeta.js +2 -0
- package/lib/src/generated/api/LanguageMetaInput.d.ts +2 -2
- package/lib/src/generated/api/LanguageRef.d.ts +4 -0
- package/lib/src/generated/api/LanguageRef.js +2 -0
- package/lib/src/generated/api/LanguageSettingsWrapper.d.ts +6 -0
- package/lib/src/generated/api/LanguageSettingsWrapper.js +2 -0
- package/lib/src/generated/api/LanguageWriteSettingsParams.d.ts +4 -0
- package/lib/src/generated/api/LanguageWriteSettingsParams.js +2 -0
- package/lib/src/generated/api/LinkExpressionInput.d.ts +1 -1
- package/lib/src/generated/api/LinkInput.d.ts +1 -1
- package/lib/src/generated/api/LinkMutationRequest.d.ts +12 -0
- package/lib/src/generated/api/LinkMutationRequest.js +1 -0
- package/lib/src/generated/api/LinkMutationsRequest.d.ts +5 -0
- package/lib/src/generated/api/LinkMutationsRequest.js +1 -0
- package/lib/src/generated/api/LinkStatus.d.ts +1 -1
- package/lib/src/generated/api/LinkUpdateInput.d.ts +5 -0
- package/lib/src/generated/api/LinkUpdateInput.js +1 -0
- package/lib/src/generated/api/LocalModel.d.ts +7 -0
- package/lib/src/generated/api/LocalModel.js +1 -0
- package/lib/src/generated/api/LocalModelInput.d.ts +7 -0
- package/lib/src/generated/api/LocalModelInput.js +1 -0
- package/lib/src/generated/api/MessageReceivedEvent.d.ts +7 -0
- package/lib/src/generated/api/MessageReceivedEvent.js +1 -0
- package/lib/src/generated/api/Model.d.ts +10 -0
- package/lib/src/generated/api/Model.js +1 -0
- package/lib/src/generated/api/ModelApi.d.ts +17 -0
- package/lib/src/generated/api/ModelApi.js +1 -0
- package/lib/src/generated/api/ModelApiInput.d.ts +11 -0
- package/lib/src/generated/api/ModelApiInput.js +2 -0
- package/lib/src/generated/api/ModelApiType.d.ts +1 -0
- package/lib/src/generated/api/ModelApiType.js +2 -0
- package/lib/src/generated/api/ModelInput.d.ts +9 -0
- package/lib/src/generated/api/ModelInput.js +1 -0
- package/lib/src/generated/api/ModelType.d.ts +1 -1
- package/lib/src/generated/api/Neighbourhood.d.ts +5 -0
- package/lib/src/generated/api/Neighbourhood.js +1 -0
- package/lib/src/generated/api/NeighbourhoodBroadcastParams.d.ts +7 -0
- package/lib/src/generated/api/NeighbourhoodBroadcastParams.js +1 -0
- package/lib/src/generated/api/NeighbourhoodOnlineStatusParams.d.ts +6 -0
- package/lib/src/generated/api/NeighbourhoodOnlineStatusParams.js +1 -0
- package/lib/src/generated/api/NeighbourhoodPerspectivePayload.d.ts +7 -0
- package/lib/src/generated/api/NeighbourhoodPerspectivePayload.js +1 -0
- package/lib/src/generated/api/NeighbourhoodPhase.d.ts +6 -0
- package/lib/src/generated/api/NeighbourhoodPhase.js +2 -0
- package/lib/src/generated/api/NeighbourhoodSignalFilter.d.ts +8 -0
- package/lib/src/generated/api/NeighbourhoodSignalFilter.js +1 -0
- package/lib/src/generated/api/NeighbourhoodSignalParams.d.ts +7 -0
- package/lib/src/generated/api/NeighbourhoodSignalParams.js +1 -0
- package/lib/src/generated/api/NeighbourhoodSignedPerspective.d.ts +8 -0
- package/lib/src/generated/api/NeighbourhoodSignedPerspective.js +1 -0
- package/lib/src/generated/api/NeighbourhoodUuidParams.d.ts +3 -0
- package/lib/src/generated/api/NeighbourhoodUuidParams.js +2 -0
- package/lib/src/generated/api/Notification.d.ts +16 -0
- package/lib/src/generated/api/Notification.js +2 -0
- package/lib/src/generated/api/NotificationGrantRequest.d.ts +6 -0
- package/lib/src/generated/api/NotificationGrantRequest.js +2 -0
- package/lib/src/generated/api/NotificationInput.d.ts +1 -1
- package/lib/src/generated/api/NotificationTriggeredEvent.d.ts +9 -0
- package/lib/src/generated/api/NotificationTriggeredEvent.js +1 -0
- package/lib/src/generated/api/OnlineAgent.d.ts +5 -0
- package/lib/src/generated/api/OnlineAgent.js +1 -0
- package/lib/src/generated/api/OutputRef.d.ts +12 -0
- package/lib/src/generated/api/OutputRef.js +2 -0
- package/lib/src/generated/api/OverlayView.d.ts +24 -0
- package/lib/src/generated/api/OverlayView.js +1 -0
- package/lib/src/generated/api/Perspective.d.ts +4 -0
- package/lib/src/generated/api/Perspective.js +1 -0
- package/lib/src/generated/api/PerspectiveAddAutoProcessorParams.d.ts +26 -0
- package/lib/src/generated/api/PerspectiveAddAutoProcessorParams.js +2 -0
- package/lib/src/generated/api/PerspectiveAddLinkExpressionParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveAddLinkExpressionParams.js +1 -0
- package/lib/src/generated/api/PerspectiveAddLinkParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveAddLinkParams.js +1 -0
- package/lib/src/generated/api/PerspectiveAddLinksParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveAddLinksParams.js +1 -0
- package/lib/src/generated/api/PerspectiveAddSdnaParams.d.ts +14 -0
- package/lib/src/generated/api/PerspectiveAddSdnaParams.js +1 -0
- package/lib/src/generated/api/PerspectiveAddSdnaResult.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveAddSdnaResult.js +2 -0
- package/lib/src/generated/api/PerspectiveCommitBatchParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveCommitBatchParams.js +2 -0
- package/lib/src/generated/api/PerspectiveCreateSubjectParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveCreateSubjectParams.js +2 -0
- package/lib/src/generated/api/PerspectiveEvaluateGettersParams.d.ts +9 -0
- package/lib/src/generated/api/PerspectiveEvaluateGettersParams.js +2 -0
- package/lib/src/generated/api/PerspectiveExecuteCommandsParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveExecuteCommandsParams.js +2 -0
- package/lib/src/generated/api/PerspectiveExpression.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveExpression.js +1 -0
- package/lib/src/generated/api/PerspectiveFlowProposalParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveFlowProposalParams.js +2 -0
- package/lib/src/generated/api/PerspectiveFlowReceiptVerdict.d.ts +12 -0
- package/lib/src/generated/api/PerspectiveFlowReceiptVerdict.js +1 -0
- package/lib/src/generated/api/PerspectiveFlowValidOutputsParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveFlowValidOutputsParams.js +2 -0
- package/lib/src/generated/api/PerspectiveGetSubjectDataParams.d.ts +5 -0
- package/lib/src/generated/api/PerspectiveGetSubjectDataParams.js +2 -0
- package/lib/src/generated/api/PerspectiveHandle.d.ts +10 -0
- package/lib/src/generated/api/PerspectiveHandle.js +1 -0
- package/lib/src/generated/api/PerspectiveLinkDiff.d.ts +9 -0
- package/lib/src/generated/api/PerspectiveLinkDiff.js +1 -0
- package/lib/src/generated/api/PerspectiveLinkMutationsParams.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveLinkMutationsParams.js +1 -0
- package/lib/src/generated/api/PerspectiveLinkUpdatedWithOwner.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveLinkUpdatedWithOwner.js +1 -0
- package/lib/src/generated/api/PerspectiveLinkWithOwner.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveLinkWithOwner.js +1 -0
- package/lib/src/generated/api/PerspectiveMintFlowReceiptParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveMintFlowReceiptParams.js +2 -0
- package/lib/src/generated/api/PerspectiveMintFlowReceiptResult.d.ts +9 -0
- package/lib/src/generated/api/PerspectiveMintFlowReceiptResult.js +1 -0
- package/lib/src/generated/api/PerspectiveModelQueryParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveModelQueryParams.js +2 -0
- package/lib/src/generated/api/PerspectiveModelSubscribeResult.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveModelSubscribeResult.js +2 -0
- package/lib/src/generated/api/PerspectiveNamedShacl.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveNamedShacl.js +1 -0
- package/lib/src/generated/api/PerspectiveProposeFlowTransitionParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveProposeFlowTransitionParams.js +1 -0
- package/lib/src/generated/api/PerspectiveQueryLinksParams.d.ts +15 -0
- package/lib/src/generated/api/PerspectiveQueryLinksParams.js +2 -0
- package/lib/src/generated/api/PerspectiveQueryParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveQueryParams.js +2 -0
- package/lib/src/generated/api/PerspectiveQuerySubscriptionFilter.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveQuerySubscriptionFilter.js +2 -0
- package/lib/src/generated/api/PerspectiveReceiptOutcome.d.ts +1 -0
- package/lib/src/generated/api/PerspectiveReceiptOutcome.js +2 -0
- package/lib/src/generated/api/PerspectiveRejectFlowProposalResult.d.ts +3 -0
- package/lib/src/generated/api/PerspectiveRejectFlowProposalResult.js +2 -0
- package/lib/src/generated/api/PerspectiveRemoveAutoProcessorParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveRemoveAutoProcessorParams.js +2 -0
- package/lib/src/generated/api/PerspectiveRemoveLinkParams.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveRemoveLinkParams.js +1 -0
- package/lib/src/generated/api/PerspectiveRemoveLinksParams.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveRemoveLinksParams.js +1 -0
- package/lib/src/generated/api/PerspectiveRemovedWithOwner.d.ts +5 -0
- package/lib/src/generated/api/PerspectiveRemovedWithOwner.js +2 -0
- package/lib/src/generated/api/PerspectiveResolveInterpretationParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveResolveInterpretationParams.js +2 -0
- package/lib/src/generated/api/PerspectiveShacl.d.ts +5 -0
- package/lib/src/generated/api/PerspectiveShacl.js +1 -0
- package/lib/src/generated/api/PerspectiveShaclNameParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveShaclNameParams.js +2 -0
- package/lib/src/generated/api/PerspectiveSparqlParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveSparqlParams.js +2 -0
- package/lib/src/generated/api/PerspectiveState.d.ts +1 -0
- package/lib/src/generated/api/PerspectiveState.js +2 -0
- package/lib/src/generated/api/PerspectiveStateFilter.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveStateFilter.js +1 -0
- package/lib/src/generated/api/PerspectiveSubjectClassesOfParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveSubjectClassesOfParams.js +2 -0
- package/lib/src/generated/api/PerspectiveSubscribeQueryResult.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveSubscribeQueryResult.js +2 -0
- package/lib/src/generated/api/PerspectiveSubscriptionParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveSubscriptionParams.js +2 -0
- package/lib/src/generated/api/PerspectiveUnsignedInput.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveUnsignedInput.js +1 -0
- package/lib/src/generated/api/PerspectiveUpdateLinkParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveUpdateLinkParams.js +1 -0
- package/lib/src/generated/api/PerspectiveUpdateParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveUpdateParams.js +2 -0
- package/lib/src/generated/api/PerspectiveUuidParams.d.ts +3 -0
- package/lib/src/generated/api/PerspectiveUuidParams.js +2 -0
- package/lib/src/generated/api/PerspectiveVerifyFlowReceiptParams.d.ts +9 -0
- package/lib/src/generated/api/PerspectiveVerifyFlowReceiptParams.js +1 -0
- package/lib/src/generated/api/PerspectiveWithOwner.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveWithOwner.js +1 -0
- package/lib/src/generated/api/ProposeOutcome.d.ts +45 -0
- package/lib/src/generated/api/ProposeOutcome.js +1 -0
- package/lib/src/generated/api/PublicPerspectiveInput.d.ts +4 -0
- package/lib/src/generated/api/PublicPerspectiveInput.js +1 -0
- package/lib/src/generated/api/PublishNeighbourhoodRequest.d.ts +2 -2
- package/lib/src/generated/api/RemoveLinkRequest.d.ts +1 -1
- package/lib/src/generated/api/RemoveLinksBulkRequest.d.ts +1 -1
- package/lib/src/generated/api/RequestCapabilityRequest.d.ts +4 -0
- package/lib/src/generated/api/RequestCapabilityRequest.js +1 -0
- package/lib/src/generated/api/RequestPaymentRequest.d.ts +3 -0
- package/lib/src/generated/api/RequestPaymentRequest.js +2 -0
- package/lib/src/generated/api/Resource.d.ts +4 -0
- package/lib/src/generated/api/Resource.js +2 -0
- package/lib/src/generated/api/RpcMethods.d.ts +841 -0
- package/lib/src/generated/api/RpcMethods.js +86 -0
- package/lib/src/generated/api/RunInterpretationRequest.d.ts +27 -1
- package/lib/src/generated/api/RunInterpretationWithHarnessRequest.d.ts +52 -0
- package/lib/src/generated/api/RunInterpretationWithHarnessRequest.js +1 -0
- package/lib/src/generated/api/RuntimeComputeLogParams.d.ts +14 -0
- package/lib/src/generated/api/RuntimeComputeLogParams.js +2 -0
- package/lib/src/generated/api/RuntimeFriendStatusParams.d.ts +3 -0
- package/lib/src/generated/api/RuntimeFriendStatusParams.js +2 -0
- package/lib/src/generated/api/RuntimeGrantNotificationParams.d.ts +4 -0
- package/lib/src/generated/api/RuntimeGrantNotificationParams.js +2 -0
- package/lib/src/generated/api/RuntimeImportPerspectiveResult.d.ts +4 -0
- package/lib/src/generated/api/RuntimeImportPerspectiveResult.js +2 -0
- package/lib/src/generated/api/RuntimeImportResult.d.ts +6 -0
- package/lib/src/generated/api/RuntimeImportResult.js +1 -0
- package/lib/src/generated/api/RuntimeInfo.d.ts +5 -0
- package/lib/src/generated/api/RuntimeInfo.js +2 -0
- package/lib/src/generated/api/RuntimeNotificationIdParams.d.ts +3 -0
- package/lib/src/generated/api/RuntimeNotificationIdParams.js +2 -0
- package/lib/src/generated/api/RuntimeSendFriendMessageParams.d.ts +8 -0
- package/lib/src/generated/api/RuntimeSendFriendMessageParams.js +1 -0
- package/lib/src/generated/api/RuntimeSetFreeHostingEnabledParams.d.ts +3 -0
- package/lib/src/generated/api/RuntimeSetFreeHostingEnabledParams.js +2 -0
- package/lib/src/generated/api/RuntimeUnytSendHotParams.d.ts +4 -0
- package/lib/src/generated/api/RuntimeUnytSendHotParams.js +2 -0
- package/lib/src/generated/api/RuntimeUnytWalletHistoryParams.d.ts +4 -0
- package/lib/src/generated/api/RuntimeUnytWalletHistoryParams.js +2 -0
- package/lib/src/generated/api/RuntimeUpdateNotificationParams.d.ts +11 -0
- package/lib/src/generated/api/RuntimeUpdateNotificationParams.js +2 -0
- package/lib/src/generated/api/SentMessage.d.ts +5 -0
- package/lib/src/generated/api/SentMessage.js +1 -0
- package/lib/src/generated/api/SetHostRatesRequest.d.ts +4 -0
- package/lib/src/generated/api/SetHostRatesRequest.js +1 -0
- package/lib/src/generated/api/SetHotWalletAddressRequest.d.ts +3 -0
- package/lib/src/generated/api/SetHotWalletAddressRequest.js +2 -0
- package/lib/src/generated/api/SetOnlineStatusRequest.d.ts +4 -0
- package/lib/src/generated/api/SetOnlineStatusRequest.js +2 -0
- package/lib/src/generated/api/SetUnytMembraneProofRequest.d.ts +6 -0
- package/lib/src/generated/api/SetUnytMembraneProofRequest.js +2 -0
- package/lib/src/generated/api/SetUserFreeAccessRequest.d.ts +4 -0
- package/lib/src/generated/api/SetUserFreeAccessRequest.js +2 -0
- package/lib/src/generated/api/ShaclLinkTriple.d.ts +10 -0
- package/lib/src/generated/api/ShaclLinkTriple.js +2 -0
- package/lib/src/generated/api/SignalRequest.d.ts +5 -0
- package/lib/src/generated/api/SignalRequest.js +2 -0
- package/lib/src/generated/api/SubscribeQueryRequest.d.ts +3 -0
- package/lib/src/generated/api/SubscribeQueryRequest.js +2 -0
- package/lib/src/generated/api/TokenizerSource.d.ts +5 -0
- package/lib/src/generated/api/TokenizerSource.js +2 -0
- package/lib/src/generated/api/TokenizerSourceInput.d.ts +5 -0
- package/lib/src/generated/api/TokenizerSourceInput.js +2 -0
- package/lib/src/generated/api/TranscriptionTextFilter.d.ts +5 -0
- package/lib/src/generated/api/TranscriptionTextFilter.js +2 -0
- package/lib/src/generated/api/TriggeredNotification.d.ts +6 -0
- package/lib/src/generated/api/TriggeredNotification.js +1 -0
- package/lib/src/generated/api/TrustedAgentsWrapper.d.ts +6 -0
- package/lib/src/generated/api/TrustedAgentsWrapper.js +2 -0
- package/lib/src/generated/api/UnlockAgentRequest.d.ts +1 -1
- package/lib/src/generated/api/UnytVersionInfo.d.ts +19 -0
- package/lib/src/generated/api/UnytVersionInfo.js +2 -0
- package/lib/src/generated/api/UpdateLinkRequest.d.ts +1 -1
- package/lib/src/generated/api/UpdateProfileRequest.d.ts +5 -0
- package/lib/src/generated/api/UpdateProfileRequest.js +1 -0
- package/lib/src/generated/api/UserCreationResult.d.ts +5 -0
- package/lib/src/generated/api/UserCreationResult.js +2 -0
- package/lib/src/generated/api/UserStatistics.d.ts +2 -1
- package/lib/src/generated/api/UserStatistics.js +0 -1
- package/lib/src/generated/api/UsersAppInfo.d.ts +6 -0
- package/lib/src/generated/api/UsersAppInfo.js +2 -0
- package/lib/src/generated/api/UsersEmailParams.d.ts +3 -0
- package/lib/src/generated/api/UsersEmailParams.js +2 -0
- package/lib/src/generated/api/UsersEmailTestAction.d.ts +1 -0
- package/lib/src/generated/api/UsersEmailTestAction.js +2 -0
- package/lib/src/generated/api/UsersEmailTestParams.d.ts +14 -0
- package/lib/src/generated/api/UsersEmailTestParams.js +1 -0
- package/lib/src/generated/api/UsersEmailTestResult.d.ts +5 -0
- package/lib/src/generated/api/UsersEmailTestResult.js +2 -0
- package/lib/src/generated/api/UsersLoginParams.d.ts +8 -0
- package/lib/src/generated/api/UsersLoginParams.js +2 -0
- package/lib/src/generated/api/UsersRequestVerificationParams.d.ts +5 -0
- package/lib/src/generated/api/UsersRequestVerificationParams.js +1 -0
- package/lib/src/generated/api/UsersSetCreditsParams.d.ts +4 -0
- package/lib/src/generated/api/UsersSetCreditsParams.js +2 -0
- package/lib/src/generated/api/UsersVerifyEmailParams.d.ts +12 -0
- package/lib/src/generated/api/UsersVerifyEmailParams.js +2 -0
- package/lib/src/generated/api/ValidOutput.d.ts +29 -0
- package/lib/src/generated/api/ValidOutput.js +1 -0
- package/lib/src/generated/api/VoiceActivityParamsInput.d.ts +7 -0
- package/lib/src/generated/api/VoiceActivityParamsInput.js +2 -0
- package/lib/src/generated/api/index.d.ts +8 -0
- package/lib/src/generated/api/index.js +5 -3
- package/lib/src/generated/api/serde_json/JsonValue.d.ts +3 -0
- package/lib/src/generated/api/serde_json/JsonValue.js +2 -0
- package/lib/src/index.d.ts +2 -3
- package/lib/src/index.js +1 -3
- package/lib/src/language/LanguageClient.d.ts +3 -3
- package/lib/src/language/LanguageClient.js +6 -6
- package/lib/src/language/LanguageMeta.d.ts +1 -1
- package/lib/src/links/Links.d.ts +16 -5
- package/lib/src/links/Links.js +34 -0
- package/lib/src/model/Ad4mModel.js +131 -68
- package/lib/src/model/ModelQueryBuilder.d.ts +22 -1
- package/lib/src/model/ModelQueryBuilder.js +55 -16
- package/lib/src/model/decorators.d.ts +20 -2
- package/lib/src/model/decorators.js +43 -7
- package/lib/src/model/query-sparql.js +2 -3
- package/lib/src/model/shacl-gen.js +27 -9
- package/lib/src/model/types.d.ts +12 -0
- package/lib/src/neighbourhood/Neighbourhood.d.ts +1 -1
- package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +5 -5
- package/lib/src/neighbourhood/NeighbourhoodClient.js +15 -15
- package/lib/src/notifyListeners.d.ts +2 -0
- package/lib/src/notifyListeners.js +12 -0
- package/lib/src/perspectives/AutoProcessor.d.ts +12 -80
- package/lib/src/perspectives/FlowInstance.d.ts +10 -2
- package/lib/src/perspectives/FlowInstance.js +23 -1
- package/lib/src/perspectives/FlowModels.d.ts +38 -1
- package/lib/src/perspectives/FlowModels.js +39 -2
- package/lib/src/perspectives/InterpretationModels.d.ts +2 -0
- package/lib/src/perspectives/InterpretationModels.js +6 -0
- package/lib/src/perspectives/Perspective.d.ts +8 -1
- package/lib/src/perspectives/Perspective.js +11 -0
- package/lib/src/perspectives/PerspectiveClient.d.ts +15 -51
- package/lib/src/perspectives/PerspectiveClient.js +58 -225
- package/lib/src/perspectives/PerspectiveDiff.d.ts +1 -1
- package/lib/src/perspectives/PerspectiveHandle.d.ts +15 -8
- package/lib/src/perspectives/PerspectiveHandle.js +25 -9
- package/lib/src/perspectives/PerspectiveProxy.d.ts +38 -64
- package/lib/src/perspectives/PerspectiveProxy.js +143 -215
- package/lib/src/perspectives/WakerSubscriptionManager.js +4 -8
- package/lib/src/runtime/RuntimeClient.d.ts +15 -27
- package/lib/src/runtime/RuntimeClient.js +57 -113
- package/lib/src/runtime/RuntimeTypes.d.ts +2 -2
- package/lib/src/runtime/RuntimeTypes.js +2 -2
- package/lib/src/shacl/SHACLFlow.d.ts +27 -2
- package/lib/src/shacl/SHACLFlow.js +55 -11
- package/lib/src/shacl/SHACLShape.d.ts +3 -0
- package/lib/src/shacl/SHACLShape.js +169 -321
- package/package.json +15 -16
- package/src/Ad4mClient.test.ts +403 -138
- package/src/Ad4mClient.ts +16 -12
- package/src/Literal.test.ts +32 -0
- package/src/Literal.ts +3 -3
- package/src/agent/Agent.ts +8 -0
- package/src/agent/AgentClient.ts +87 -195
- package/src/agent/mutatePublicPerspective.test.ts +110 -0
- package/src/ai/AIClient.ts +40 -43
- package/src/ai/transcription-stream.test.ts +54 -0
- package/src/apiClient.test.ts +613 -185
- package/src/apiClient.ts +282 -288
- package/src/cache/cache.test.ts +7 -8
- package/src/expression/Expression.ts +12 -3
- package/src/expression/ExpressionClient.ts +6 -7
- package/src/generated/api/AIPromptExamples.ts +3 -0
- package/src/generated/api/AIPromptExamplesInput.ts +3 -0
- package/src/generated/api/AITask.ts +4 -0
- package/src/generated/api/AITaskInput.ts +4 -0
- package/src/generated/api/AddAgentInfosRequest.ts +3 -0
- package/src/generated/api/AddLinkExpressionRequest.ts +1 -1
- package/src/generated/api/AddLinkRequest.ts +1 -1
- package/src/generated/api/AddLinksBulkRequest.ts +1 -1
- package/src/generated/api/AddSdnaRequest.ts +1 -1
- package/src/generated/api/Agent.ts +4 -0
- package/src/generated/api/AgentAddEntanglementProofsParams.ts +8 -0
- package/src/generated/api/AgentByDidParams.ts +3 -0
- package/src/generated/api/AgentRemoveAppParams.ts +3 -0
- package/src/generated/api/AgentRevokeTokenParams.ts +3 -0
- package/src/generated/api/AgentSignature.ts +3 -0
- package/src/generated/api/AgentStatus.ts +4 -0
- package/src/generated/api/AgentStatusChangedEvent.ts +7 -0
- package/src/generated/api/AgentUpdatedEvent.ts +7 -0
- package/src/generated/api/AiAddModelParams.ts +4 -0
- package/src/generated/api/AiAddTaskParams.ts +4 -0
- package/src/generated/api/AiDiscoverModelsParams.ts +7 -0
- package/src/generated/api/AiGetDefaultModelParams.ts +4 -0
- package/src/generated/api/AiIdParams.ts +3 -0
- package/src/generated/api/AiModelLoadingStatusParams.ts +6 -0
- package/src/generated/api/AiSetDefaultModelParams.ts +4 -0
- package/src/generated/api/AiTranscriptionCloseParams.ts +3 -0
- package/src/generated/api/AiTranscriptionOpenParams.ts +4 -0
- package/src/generated/api/AiUpdateModelParams.ts +4 -0
- package/src/generated/api/AiUpdateTaskParams.ts +4 -0
- package/src/generated/api/Apps.ts +4 -0
- package/src/generated/api/AuthInfo.ts +4 -0
- package/src/generated/api/AuthInfoInput.ts +1 -1
- package/src/generated/api/AutoProcessorEvent.ts +90 -0
- package/src/generated/api/AutoProcessorNeighbourhoodState.ts +33 -0
- package/src/generated/api/AutoProcessorStep.ts +9 -0
- package/src/generated/api/BroadcastRequest.ts +3 -0
- package/src/generated/api/Capability.ts +4 -0
- package/src/generated/api/CreateSubjectRequest.ts +1 -1
- package/src/generated/api/CreateUserRequest.ts +3 -0
- package/src/generated/api/DateTime.ts +3 -0
- package/src/generated/api/DecoratedExpressionProof.ts +3 -0
- package/src/generated/api/DecoratedLinkExpression.ts +6 -0
- package/src/generated/api/DecoratedNeighbourhoodExpression.ts +5 -0
- package/src/generated/api/DecoratedPerspective.ts +4 -0
- package/src/generated/api/DisposeQueryRequest.ts +3 -0
- package/src/generated/api/EntanglementProof.ts +3 -0
- package/src/generated/api/EntanglementProofInput.ts +1 -1
- package/src/generated/api/EntanglementProofPreflightRequest.ts +3 -0
- package/src/generated/api/EntanglementProofsWrapper.ts +7 -0
- package/src/generated/api/Events.ts +66 -0
- package/src/generated/api/ExceptionInfo.ts +4 -0
- package/src/generated/api/ExceptionOccurredEvent.ts +7 -0
- package/src/generated/api/ExceptionType.ts +3 -0
- package/src/generated/api/ExecuteCommandsRequest.ts +1 -1
- package/src/generated/api/ExportRequest.ts +1 -1
- package/src/generated/api/ExpressionInteractRequest.ts +4 -0
- package/src/generated/api/ExpressionProofInput.ts +1 -1
- package/src/generated/api/ExpressionRendered.ts +6 -0
- package/src/generated/api/ExpressionUrlRequest.ts +3 -0
- package/src/generated/api/FireOutcome.ts +11 -0
- package/src/generated/api/FriendSendMessageRequest.ts +1 -1
- package/src/generated/api/HostRate.ts +6 -0
- package/src/generated/api/HostingInfoResult.ts +13 -0
- package/src/generated/api/HostingInfoUser.ts +7 -0
- package/src/generated/api/HostingRequestPaymentResult.ts +3 -0
- package/src/generated/api/HostingUserInfo.ts +3 -0
- package/src/generated/api/HostingVersionInfo.ts +7 -0
- package/src/generated/api/HostingWalletResult.ts +8 -0
- package/src/generated/api/Icon.ts +3 -0
- package/src/generated/api/ImportResult.ts +4 -0
- package/src/generated/api/ImportStats.ts +3 -0
- package/src/generated/api/InteractionCall.ts +3 -0
- package/src/generated/api/InteractionCallWrapper.ts +6 -0
- package/src/generated/api/InteractionMeta.ts +4 -0
- package/src/generated/api/InteractionParameter.ts +3 -0
- package/src/generated/api/KeepAliveQueryRequest.ts +3 -0
- package/src/generated/api/LanguageAddressParams.ts +3 -0
- package/src/generated/api/LanguageHandle.ts +4 -0
- package/src/generated/api/LanguageListParams.ts +3 -0
- package/src/generated/api/LanguageMeta.ts +3 -0
- package/src/generated/api/LanguageMetaInput.ts +1 -1
- package/src/generated/api/LanguageRef.ts +3 -0
- package/src/generated/api/LanguageSettingsWrapper.ts +6 -0
- package/src/generated/api/LanguageWriteSettingsParams.ts +3 -0
- package/src/generated/api/LinkExpressionInput.ts +1 -1
- package/src/generated/api/LinkInput.ts +1 -1
- package/src/generated/api/LinkMutationRequest.ts +8 -0
- package/src/generated/api/LinkMutationsRequest.ts +4 -0
- package/src/generated/api/LinkStatus.ts +1 -1
- package/src/generated/api/LinkUpdateInput.ts +4 -0
- package/src/generated/api/LocalModel.ts +4 -0
- package/src/generated/api/LocalModelInput.ts +4 -0
- package/src/generated/api/MessageReceivedEvent.ts +7 -0
- package/src/generated/api/Model.ts +6 -0
- package/src/generated/api/ModelApi.ts +14 -0
- package/src/generated/api/ModelApiInput.ts +8 -0
- package/src/generated/api/ModelApiType.ts +3 -0
- package/src/generated/api/ModelInput.ts +6 -0
- package/src/generated/api/ModelType.ts +1 -1
- package/src/generated/api/Neighbourhood.ts +4 -0
- package/src/generated/api/NeighbourhoodBroadcastParams.ts +4 -0
- package/src/generated/api/NeighbourhoodOnlineStatusParams.ts +4 -0
- package/src/generated/api/NeighbourhoodPerspectivePayload.ts +9 -0
- package/src/generated/api/NeighbourhoodPhase.ts +8 -0
- package/src/generated/api/NeighbourhoodSignalFilter.ts +5 -0
- package/src/generated/api/NeighbourhoodSignalParams.ts +4 -0
- package/src/generated/api/NeighbourhoodSignedPerspective.ts +8 -0
- package/src/generated/api/NeighbourhoodUuidParams.ts +3 -0
- package/src/generated/api/Notification.ts +7 -0
- package/src/generated/api/NotificationGrantRequest.ts +6 -0
- package/src/generated/api/NotificationInput.ts +1 -1
- package/src/generated/api/NotificationTriggeredEvent.ts +8 -0
- package/src/generated/api/OnlineAgent.ts +4 -0
- package/src/generated/api/OutputRef.ts +11 -0
- package/src/generated/api/OverlayView.ts +25 -0
- package/src/generated/api/Perspective.ts +4 -0
- package/src/generated/api/PerspectiveAddAutoProcessorParams.ts +11 -0
- package/src/generated/api/PerspectiveAddLinkExpressionParams.ts +4 -0
- package/src/generated/api/PerspectiveAddLinkParams.ts +4 -0
- package/src/generated/api/PerspectiveAddLinksParams.ts +4 -0
- package/src/generated/api/PerspectiveAddSdnaParams.ts +7 -0
- package/src/generated/api/PerspectiveAddSdnaResult.ts +6 -0
- package/src/generated/api/PerspectiveCommitBatchParams.ts +3 -0
- package/src/generated/api/PerspectiveCreateSubjectParams.ts +3 -0
- package/src/generated/api/PerspectiveEvaluateGettersParams.ts +6 -0
- package/src/generated/api/PerspectiveExecuteCommandsParams.ts +3 -0
- package/src/generated/api/PerspectiveExpression.ts +5 -0
- package/src/generated/api/PerspectiveFlowProposalParams.ts +3 -0
- package/src/generated/api/PerspectiveFlowReceiptVerdict.ts +8 -0
- package/src/generated/api/PerspectiveFlowValidOutputsParams.ts +7 -0
- package/src/generated/api/PerspectiveGetSubjectDataParams.ts +3 -0
- package/src/generated/api/PerspectiveHandle.ts +5 -0
- package/src/generated/api/PerspectiveLinkDiff.ts +7 -0
- package/src/generated/api/PerspectiveLinkMutationsParams.ts +4 -0
- package/src/generated/api/PerspectiveLinkUpdatedWithOwner.ts +4 -0
- package/src/generated/api/PerspectiveLinkWithOwner.ts +4 -0
- package/src/generated/api/PerspectiveMintFlowReceiptParams.ts +3 -0
- package/src/generated/api/PerspectiveMintFlowReceiptResult.ts +9 -0
- package/src/generated/api/PerspectiveModelQueryParams.ts +6 -0
- package/src/generated/api/PerspectiveModelSubscribeResult.ts +6 -0
- package/src/generated/api/PerspectiveNamedShacl.ts +4 -0
- package/src/generated/api/PerspectiveProposeFlowTransitionParams.ts +4 -0
- package/src/generated/api/PerspectiveQueryLinksParams.ts +11 -0
- package/src/generated/api/PerspectiveQueryParams.ts +3 -0
- package/src/generated/api/PerspectiveQuerySubscriptionFilter.ts +3 -0
- package/src/generated/api/PerspectiveReceiptOutcome.ts +3 -0
- package/src/generated/api/PerspectiveRejectFlowProposalResult.ts +3 -0
- package/src/generated/api/PerspectiveRemoveAutoProcessorParams.ts +3 -0
- package/src/generated/api/PerspectiveRemoveLinkParams.ts +4 -0
- package/src/generated/api/PerspectiveRemoveLinksParams.ts +4 -0
- package/src/generated/api/PerspectiveRemovedWithOwner.ts +3 -0
- package/src/generated/api/PerspectiveResolveInterpretationParams.ts +6 -0
- package/src/generated/api/PerspectiveShacl.ts +4 -0
- package/src/generated/api/PerspectiveShaclNameParams.ts +3 -0
- package/src/generated/api/PerspectiveSparqlParams.ts +7 -0
- package/src/generated/api/PerspectiveState.ts +3 -0
- package/src/generated/api/PerspectiveStateFilter.ts +5 -0
- package/src/generated/api/PerspectiveSubjectClassesOfParams.ts +3 -0
- package/src/generated/api/PerspectiveSubscribeQueryResult.ts +3 -0
- package/src/generated/api/PerspectiveSubscriptionParams.ts +3 -0
- package/src/generated/api/PerspectiveUnsignedInput.ts +4 -0
- package/src/generated/api/PerspectiveUpdateLinkParams.ts +5 -0
- package/src/generated/api/PerspectiveUpdateParams.ts +3 -0
- package/src/generated/api/PerspectiveUuidParams.ts +3 -0
- package/src/generated/api/PerspectiveVerifyFlowReceiptParams.ts +9 -0
- package/src/generated/api/PerspectiveWithOwner.ts +4 -0
- package/src/generated/api/ProposeOutcome.ts +46 -0
- package/src/generated/api/PublicPerspectiveInput.ts +4 -0
- package/src/generated/api/PublishNeighbourhoodRequest.ts +2 -2
- package/src/generated/api/RemoveLinkRequest.ts +1 -1
- package/src/generated/api/RemoveLinksBulkRequest.ts +1 -1
- package/src/generated/api/RequestCapabilityRequest.ts +4 -0
- package/src/generated/api/RequestPaymentRequest.ts +3 -0
- package/src/generated/api/Resource.ts +3 -0
- package/src/generated/api/RpcMethods.ts +419 -0
- package/src/generated/api/RunInterpretationRequest.ts +28 -2
- package/src/generated/api/RunInterpretationWithHarnessRequest.ts +51 -0
- package/src/generated/api/RuntimeComputeLogParams.ts +15 -0
- package/src/generated/api/RuntimeFriendStatusParams.ts +3 -0
- package/src/generated/api/RuntimeGrantNotificationParams.ts +3 -0
- package/src/generated/api/RuntimeImportPerspectiveResult.ts +3 -0
- package/src/generated/api/RuntimeImportResult.ts +8 -0
- package/src/generated/api/RuntimeInfo.ts +3 -0
- package/src/generated/api/RuntimeNotificationIdParams.ts +3 -0
- package/src/generated/api/RuntimeSendFriendMessageParams.ts +8 -0
- package/src/generated/api/RuntimeSetFreeHostingEnabledParams.ts +3 -0
- package/src/generated/api/RuntimeUnytSendHotParams.ts +3 -0
- package/src/generated/api/RuntimeUnytWalletHistoryParams.ts +3 -0
- package/src/generated/api/RuntimeUpdateNotificationParams.ts +3 -0
- package/src/generated/api/SentMessage.ts +4 -0
- package/src/generated/api/SetHostRatesRequest.ts +4 -0
- package/src/generated/api/SetHotWalletAddressRequest.ts +3 -0
- package/src/generated/api/SetOnlineStatusRequest.ts +3 -0
- package/src/generated/api/SetUnytMembraneProofRequest.ts +7 -0
- package/src/generated/api/SetUserFreeAccessRequest.ts +3 -0
- package/src/generated/api/ShaclLinkTriple.ts +8 -0
- package/src/generated/api/SignalRequest.ts +3 -0
- package/src/generated/api/SubscribeQueryRequest.ts +3 -0
- package/src/generated/api/TokenizerSource.ts +3 -0
- package/src/generated/api/TokenizerSourceInput.ts +3 -0
- package/src/generated/api/TranscriptionTextFilter.ts +3 -0
- package/src/generated/api/TriggeredNotification.ts +4 -0
- package/src/generated/api/TrustedAgentsWrapper.ts +6 -0
- package/src/generated/api/UnlockAgentRequest.ts +1 -1
- package/src/generated/api/UnytVersionInfo.ts +20 -0
- package/src/generated/api/UpdateLinkRequest.ts +1 -1
- package/src/generated/api/UpdateProfileRequest.ts +4 -0
- package/src/generated/api/UserCreationResult.ts +3 -0
- package/src/generated/api/UserStatistics.ts +2 -1
- package/src/generated/api/UsersAppInfo.ts +6 -0
- package/src/generated/api/UsersEmailParams.ts +3 -0
- package/src/generated/api/UsersEmailTestAction.ts +3 -0
- package/src/generated/api/UsersEmailTestParams.ts +12 -0
- package/src/generated/api/UsersEmailTestResult.ts +7 -0
- package/src/generated/api/UsersLoginParams.ts +7 -0
- package/src/generated/api/UsersRequestVerificationParams.ts +4 -0
- package/src/generated/api/UsersSetCreditsParams.ts +3 -0
- package/src/generated/api/UsersVerifyEmailParams.ts +11 -0
- package/src/generated/api/ValidOutput.ts +30 -0
- package/src/generated/api/VoiceActivityParamsInput.ts +3 -0
- package/src/generated/api/index.ts +11 -2
- package/src/generated/api/serde_json/JsonValue.ts +3 -0
- package/src/index.ts +2 -3
- package/src/language/LanguageClient.ts +12 -13
- package/src/links/Links.ts +49 -3
- package/src/model/Ad4mModel.test.ts +308 -25
- package/src/model/Ad4mModel.ts +136 -73
- package/src/model/ModelQueryBuilder.ts +65 -18
- package/src/model/decorators.ts +64 -9
- package/src/model/query-sparql.ts +2 -3
- package/src/model/relation-filtering.test.ts +191 -0
- package/src/model/shacl-gen.ts +19 -9
- package/src/model/shacl-roundtrip.test.ts +52 -0
- package/src/model/types.ts +12 -0
- package/src/neighbourhood/NeighbourhoodClient.test.ts +60 -0
- package/src/neighbourhood/NeighbourhoodClient.ts +27 -27
- package/src/neighbourhood/NeighbourhoodProxy.test.ts +14 -9
- package/src/notifyListeners.test.ts +19 -0
- package/src/notifyListeners.ts +10 -0
- package/src/perspectives/AutoProcessor.ts +13 -82
- package/src/perspectives/FlowInstance.ts +29 -2
- package/src/perspectives/FlowModels.ts +47 -2
- package/src/perspectives/InterpretationModels.ts +4 -0
- package/src/perspectives/Perspective.ts +18 -2
- package/src/perspectives/PerspectiveClient.test.ts +122 -45
- package/src/perspectives/PerspectiveClient.ts +106 -303
- package/src/perspectives/PerspectiveHandle.ts +32 -9
- package/src/perspectives/PerspectiveProxy.test.ts +198 -194
- package/src/perspectives/PerspectiveProxy.ts +159 -226
- package/src/perspectives/WakerSubscriptionManager.test.ts +54 -1
- package/src/perspectives/WakerSubscriptionManager.ts +4 -8
- package/src/perspectives/link-updated-type.test.ts +55 -0
- package/src/perspectives/listener-leaks.test.ts +204 -0
- package/src/perspectives/shacl-rpc.test.ts +22 -27
- package/src/runtime/RuntimeClient.ts +75 -157
- package/src/runtime/RuntimeTypes.ts +3 -3
- package/src/shacl/SHACLFlow.test.ts +49 -1
- package/src/shacl/SHACLFlow.ts +66 -11
- package/src/shacl/SHACLShape.test.ts +160 -16
- package/src/shacl/SHACLShape.ts +160 -438
- package/lib/shims/reflect-metadata.d.ts +0 -0
- package/lib/shims/reflect-metadata.js +0 -0
- package/lib/shims/type-graphql.d.ts +0 -32
- package/lib/shims/type-graphql.js +0 -70
- package/lib/src/PubSub.d.ts +0 -17
- package/lib/src/PubSub.js +0 -17
- package/lib/src/agent/AgentResolver.d.ts +0 -30
- package/lib/src/agent/AgentResolver.js +0 -325
- package/lib/src/ai/AIResolver.d.ts +0 -75
- package/lib/src/ai/AIResolver.js +0 -455
- package/lib/src/buildSchema.d.ts +0 -1
- package/lib/src/buildSchema.js +0 -38
- package/lib/src/expression/ExpressionResolver.d.ts +0 -10
- package/lib/src/expression/ExpressionResolver.js +0 -106
- package/lib/src/language/LanguageContext.d.ts +0 -37
- package/lib/src/language/LanguageContext.js +0 -2
- package/lib/src/language/LanguageResolver.d.ts +0 -19
- package/lib/src/language/LanguageResolver.js +0 -143
- package/lib/src/links/Links.test.js +0 -33
- package/lib/src/model/Ad4mModel.test.js +0 -2055
- package/lib/src/model/Subject.d.ts +0 -25
- package/lib/src/model/Subject.js +0 -164
- package/lib/src/model/hydration-batch.d.ts +0 -34
- package/lib/src/model/hydration-batch.js +0 -147
- package/lib/src/model/hydration-batching.test.d.ts +0 -7
- package/lib/src/model/hydration-batching.test.js +0 -456
- package/lib/src/model/model-manifest.d.ts +0 -41
- package/lib/src/model/model-manifest.js +0 -11
- package/lib/src/model/prolog-facts.d.ts +0 -37
- package/lib/src/model/prolog-facts.js +0 -134
- package/lib/src/model/query-cache.test.js +0 -43
- package/lib/src/model/query-prolog.d.ts +0 -15
- package/lib/src/model/query-prolog.js +0 -140
- package/lib/src/model/query-sparql-batch.d.ts +0 -17
- package/lib/src/model/query-sparql-batch.js +0 -260
- package/lib/src/model/query-sparql.test.js +0 -312
- package/lib/src/model/relation-filtering.test.js +0 -838
- package/lib/src/model/subscription-delta.test.d.ts +0 -24
- package/lib/src/model/subscription-delta.test.js +0 -180
- package/lib/src/model/subscription-pool.d.ts +0 -39
- package/lib/src/model/subscription-pool.js +0 -165
- package/lib/src/neighbourhood/NeighbourhoodProxy.test.js +0 -73
- package/lib/src/neighbourhood/NeighbourhoodResolver.d.ts +0 -24
- package/lib/src/neighbourhood/NeighbourhoodResolver.js +0 -182
- package/lib/src/perspectives/Perspective.test.js +0 -20
- package/lib/src/perspectives/PerspectiveClient.test.js +0 -224
- package/lib/src/perspectives/PerspectiveResolver.d.ts +0 -56
- package/lib/src/perspectives/PerspectiveResolver.js +0 -519
- package/lib/src/runtime/RuntimeResolver.d.ts +0 -173
- package/lib/src/runtime/RuntimeResolver.js +0 -1122
- package/lib/src/schema.gql +0 -631
- package/lib/src/shacl/SHACLFlow.test.js +0 -205
- package/lib/src/shacl/SHACLShape.test.js +0 -418
- package/lib/src/unwrapApolloResult.d.ts +0 -2
- package/lib/src/unwrapApolloResult.js +0 -14
- /package/lib/src/{links/Links.test.d.ts → generated/api/AITask.js} +0 -0
- /package/lib/src/{model/Ad4mModel.test.d.ts → generated/api/AITaskInput.js} +0 -0
- /package/lib/src/{model/query-cache.test.d.ts → generated/api/Agent.js} +0 -0
- /package/lib/src/{model/query-sparql.test.d.ts → generated/api/AgentAddEntanglementProofsParams.js} +0 -0
- /package/lib/src/{model/relation-filtering.test.d.ts → generated/api/AgentStatus.js} +0 -0
- /package/lib/src/{neighbourhood/NeighbourhoodProxy.test.d.ts → generated/api/AgentStatusChangedEvent.js} +0 -0
- /package/lib/src/{perspectives/Perspective.test.d.ts → generated/api/AgentUpdatedEvent.js} +0 -0
- /package/lib/src/{perspectives/PerspectiveClient.test.d.ts → generated/api/AiAddModelParams.js} +0 -0
- /package/lib/src/{shacl/SHACLFlow.test.d.ts → generated/api/AiAddTaskParams.js} +0 -0
- /package/lib/src/{shacl/SHACLShape.test.d.ts → generated/api/AiGetDefaultModelParams.js} +0 -0
|
@@ -38,7 +38,9 @@ export class ModelQueryBuilder<T extends Ad4mModel> {
|
|
|
38
38
|
private queryParams: Query = {};
|
|
39
39
|
private modelClassName: string | null = null;
|
|
40
40
|
private ctor: typeof Ad4mModel;
|
|
41
|
-
private currentSubscription?:
|
|
41
|
+
private currentSubscription?: { dispose: () => Promise<void> };
|
|
42
|
+
/** Tail of the subscribe/dispose chain; see `serialize()`. */
|
|
43
|
+
private subscriptionChain: Promise<void> = Promise.resolve();
|
|
42
44
|
|
|
43
45
|
constructor(perspective: PerspectiveProxy, ctor: typeof Ad4mModel, query?: Query) {
|
|
44
46
|
this.perspective = perspective;
|
|
@@ -55,14 +57,34 @@ export class ModelQueryBuilder<T extends Ad4mModel> {
|
|
|
55
57
|
* 3. Notifies the backend to clean up subscription resources
|
|
56
58
|
* 4. Clears the subscription reference
|
|
57
59
|
*
|
|
60
|
+
* Steps 1, 2 and 4 happen synchronously, so `builder.dispose()` without
|
|
61
|
+
* `await` is still a complete local cleanup. The returned promise resolves
|
|
62
|
+
* once the executor has released this subscriber's hold on the subscription
|
|
63
|
+
* (it never rejects). The executor shares one subscription between all
|
|
64
|
+
* subscribers of the same query and only drops it when the last one
|
|
65
|
+
* disposes, so disposing here does not interrupt another builder's updates.
|
|
66
|
+
*
|
|
58
67
|
* You should call this method when you're done with a subscription
|
|
59
68
|
* to prevent memory leaks and ensure proper cleanup.
|
|
60
69
|
*/
|
|
61
|
-
dispose() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
dispose(): Promise<void> {
|
|
71
|
+
const current = this.currentSubscription;
|
|
72
|
+
this.currentSubscription = undefined;
|
|
73
|
+
return current ? current.dispose() : Promise.resolve();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Runs one subscribe variant after every earlier one on this builder has
|
|
78
|
+
* finished. Each variant disposes the previous subscription (awaiting the
|
|
79
|
+
* executor) and then registers its own; two overlapping calls would both
|
|
80
|
+
* find no current subscription, both register, and the builder could only
|
|
81
|
+
* ever dispose the last one. Serializing keeps exactly one subscription
|
|
82
|
+
* per builder.
|
|
83
|
+
*/
|
|
84
|
+
private serialize<R>(run: () => Promise<R>): Promise<R> {
|
|
85
|
+
const result = this.subscriptionChain.then(run, run);
|
|
86
|
+
this.subscriptionChain = result.then(() => {}, () => {});
|
|
87
|
+
return result;
|
|
66
88
|
}
|
|
67
89
|
|
|
68
90
|
/**
|
|
@@ -420,9 +442,16 @@ export class ModelQueryBuilder<T extends Ad4mModel> {
|
|
|
420
442
|
* ```
|
|
421
443
|
*
|
|
422
444
|
*/
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
445
|
+
subscribe(callback: (results: T[]) => void): Promise<T[]> {
|
|
446
|
+
return this.serialize(() => this.subscribeNow(callback));
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
private async subscribeNow(callback: (results: T[]) => void): Promise<T[]> {
|
|
450
|
+
// Clean up any existing subscription. Awaited so the executor has
|
|
451
|
+
// released the previous hold before the new registration arrives: the
|
|
452
|
+
// executor hands out one shared id per query, and a dispose landing after
|
|
453
|
+
// the re-subscribe would otherwise release the id just handed back.
|
|
454
|
+
await this.dispose();
|
|
426
455
|
|
|
427
456
|
const ctor = this.ctor;
|
|
428
457
|
|
|
@@ -516,7 +545,7 @@ export class ModelQueryBuilder<T extends Ad4mModel> {
|
|
|
516
545
|
disposed = true;
|
|
517
546
|
if (keepaliveTimer) clearTimeout(keepaliveTimer);
|
|
518
547
|
unsubscribe();
|
|
519
|
-
this.perspective.client.disposeQuerySubscription(this.perspective.uuid, subscriptionId).
|
|
548
|
+
return this.perspective.client.disposeQuerySubscription(this.perspective.uuid, subscriptionId).then(() => {}, () => {});
|
|
520
549
|
},
|
|
521
550
|
};
|
|
522
551
|
|
|
@@ -589,9 +618,16 @@ export class ModelQueryBuilder<T extends Ad4mModel> {
|
|
|
589
618
|
* ```
|
|
590
619
|
*
|
|
591
620
|
*/
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
621
|
+
countSubscribe(callback: (count: number) => void): Promise<number> {
|
|
622
|
+
return this.serialize(() => this.countSubscribeNow(callback));
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
private async countSubscribeNow(callback: (count: number) => void): Promise<number> {
|
|
626
|
+
// Clean up any existing subscription. Awaited so the executor has
|
|
627
|
+
// released the previous hold before the new registration arrives: the
|
|
628
|
+
// executor hands out one shared id per query, and a dispose landing after
|
|
629
|
+
// the re-subscribe would otherwise release the id just handed back.
|
|
630
|
+
await this.dispose();
|
|
595
631
|
|
|
596
632
|
const countParams = { ...this.queryParams, limit: 0 };
|
|
597
633
|
const { className, queryJson } = (this.ctor as any).prepareModelQueryParams(
|
|
@@ -658,7 +694,7 @@ export class ModelQueryBuilder<T extends Ad4mModel> {
|
|
|
658
694
|
disposed = true;
|
|
659
695
|
if (keepaliveTimer) clearTimeout(keepaliveTimer);
|
|
660
696
|
unsubscribe();
|
|
661
|
-
this.perspective.client.disposeQuerySubscription(this.perspective.uuid, subscriptionId).
|
|
697
|
+
return this.perspective.client.disposeQuerySubscription(this.perspective.uuid, subscriptionId).then(() => {}, () => {});
|
|
662
698
|
},
|
|
663
699
|
};
|
|
664
700
|
|
|
@@ -732,13 +768,24 @@ export class ModelQueryBuilder<T extends Ad4mModel> {
|
|
|
732
768
|
* ```
|
|
733
769
|
*
|
|
734
770
|
*/
|
|
735
|
-
|
|
771
|
+
paginateSubscribe(
|
|
736
772
|
pageSize: number,
|
|
737
773
|
pageNumber: number,
|
|
738
774
|
callback: (results: PaginationResult<T>) => void
|
|
739
775
|
): Promise<PaginationResult<T>> {
|
|
740
|
-
|
|
741
|
-
|
|
776
|
+
return this.serialize(() => this.paginateSubscribeNow(pageSize, pageNumber, callback));
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
private async paginateSubscribeNow(
|
|
780
|
+
pageSize: number,
|
|
781
|
+
pageNumber: number,
|
|
782
|
+
callback: (results: PaginationResult<T>) => void
|
|
783
|
+
): Promise<PaginationResult<T>> {
|
|
784
|
+
// Clean up any existing subscription. Awaited so the executor has
|
|
785
|
+
// released the previous hold before the new registration arrives: the
|
|
786
|
+
// executor hands out one shared id per query, and a dispose landing after
|
|
787
|
+
// the re-subscribe would otherwise release the id just handed back.
|
|
788
|
+
await this.dispose();
|
|
742
789
|
|
|
743
790
|
const ctor = this.ctor;
|
|
744
791
|
|
|
@@ -853,7 +900,7 @@ export class ModelQueryBuilder<T extends Ad4mModel> {
|
|
|
853
900
|
disposed = true;
|
|
854
901
|
if (keepaliveTimer) clearTimeout(keepaliveTimer);
|
|
855
902
|
unsubscribe();
|
|
856
|
-
this.perspective.client.disposeQuerySubscription(this.perspective.uuid, subscriptionId).
|
|
903
|
+
return this.perspective.client.disposeQuerySubscription(this.perspective.uuid, subscriptionId).then(() => {}, () => {});
|
|
857
904
|
},
|
|
858
905
|
};
|
|
859
906
|
|
package/src/model/decorators.ts
CHANGED
|
@@ -36,6 +36,8 @@ export interface RelationMetadataEntry {
|
|
|
36
36
|
* The expression can reference 'Base' which will be replaced with the instance's base expression.
|
|
37
37
|
*/
|
|
38
38
|
getter?: string;
|
|
39
|
+
/** No writer for this relation; see `RelationOptions.readOnly`. */
|
|
40
|
+
readOnly?: boolean;
|
|
39
41
|
/**
|
|
40
42
|
* Whether to auto-generate a conformance filter when `target` is set.
|
|
41
43
|
* Defaults to `true` — set to `false` to opt out of DB-level type filtering
|
|
@@ -595,6 +597,9 @@ export interface ModelConfig {
|
|
|
595
597
|
* - Generates the necessary SDNA code for the model's properties and relations
|
|
596
598
|
* - Enables the use of other model decorators (@Property, @HasMany, etc.)
|
|
597
599
|
* - Provides static query methods through the Ad4mModel base class
|
|
600
|
+
*
|
|
601
|
+
* Schema generation calls the class constructor once, without a perspective, to read
|
|
602
|
+
* field defaults, so keep constructors free of side effects.
|
|
598
603
|
*
|
|
599
604
|
* @example
|
|
600
605
|
* ```typescript
|
|
@@ -817,7 +822,7 @@ export interface RelationOptions {
|
|
|
817
822
|
/**
|
|
818
823
|
* The predicate URI used to link the two models.
|
|
819
824
|
* Defaults to `'ad4m://has_child'` when omitted.
|
|
820
|
-
* Cannot be combined with `getter
|
|
825
|
+
* Cannot be combined with `getter`, except on a `readOnly` relation.
|
|
821
826
|
*/
|
|
822
827
|
through?: string;
|
|
823
828
|
/** The target model class (use a thunk to avoid circular-dependency issues). Optional for untyped string relations.
|
|
@@ -830,7 +835,9 @@ export interface RelationOptions {
|
|
|
830
835
|
*
|
|
831
836
|
* Mutually exclusive with `through` — a getter replaces link-based resolution,
|
|
832
837
|
* so there is no predicate to add to or remove from. When `getter` is provided
|
|
833
|
-
* the relation is read-only (no adder/remover actions are generated).
|
|
838
|
+
* the relation is read-only (no adder/remover actions are generated). The
|
|
839
|
+
* exception is `readOnly: true`, where `through` names the predicate the
|
|
840
|
+
* getter reads and becomes the shape's path.
|
|
834
841
|
*
|
|
835
842
|
* **Combines with `target`**, which names the class the traversal's values
|
|
836
843
|
* hydrate into — without it `include` has no shape to resolve and the relation
|
|
@@ -851,6 +858,14 @@ export interface RelationOptions {
|
|
|
851
858
|
* ```
|
|
852
859
|
*/
|
|
853
860
|
getter?: string;
|
|
861
|
+
/**
|
|
862
|
+
* A relation read through `through` that this model must not write: no
|
|
863
|
+
* `add*`/`remove*`/`set*` methods and no adder or remover actions. Pair
|
|
864
|
+
* it with `getter` when the stored links need filtering on the way out
|
|
865
|
+
* (only those signed by their target, say) but the predicate should
|
|
866
|
+
* still be the shape's path, so a subscription re-runs when one lands.
|
|
867
|
+
*/
|
|
868
|
+
readOnly?: boolean;
|
|
854
869
|
/** Whether the link is stored locally (not shared on the network) */
|
|
855
870
|
local?: boolean;
|
|
856
871
|
/**
|
|
@@ -889,6 +904,9 @@ export interface RelationOptions {
|
|
|
889
904
|
* this to decode `literal:<type>:<value>` wire form on hydration.
|
|
890
905
|
* Omit for URI relations that point at other model instances.
|
|
891
906
|
*
|
|
907
|
+
* Mutually exclusive with `target`: a relation holds either literals or
|
|
908
|
+
* model instances. Combines with `through` or `getter`.
|
|
909
|
+
*
|
|
892
910
|
* @example
|
|
893
911
|
* ```typescript
|
|
894
912
|
* @HasMany({ through: "run://source", datatype: "xsd:string" })
|
|
@@ -1043,13 +1061,33 @@ function resolveRelationArgs(
|
|
|
1043
1061
|
);
|
|
1044
1062
|
}
|
|
1045
1063
|
|
|
1046
|
-
//
|
|
1064
|
+
// `datatype` makes the relation's values encoded literals; `target` makes
|
|
1065
|
+
// them model instances. `buildSHACL` would emit `sh:nodeKind sh:Literal`
|
|
1066
|
+
// and `sh:class` on the same property shape, so the executor would decode
|
|
1067
|
+
// the values as literals while `include` tried to hydrate them as
|
|
1068
|
+
// instances. Checked before the getter path returns, so a getter
|
|
1069
|
+
// relation is held to the same rule.
|
|
1070
|
+
if (opts.datatype && opts.target) {
|
|
1071
|
+
throw new Error(
|
|
1072
|
+
'Relation decorator: `datatype` and `target` are mutually exclusive. ' +
|
|
1073
|
+
'`datatype` declares a relation of literal values; `target` declares a ' +
|
|
1074
|
+
'relation to model instances. Drop `datatype` to link instances, or drop ' +
|
|
1075
|
+
'`target` to store literals.'
|
|
1076
|
+
);
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
// getter is mutually exclusive with a WRITABLE through: the relation would
|
|
1080
|
+
// write raw links and read back whatever the getter lets through. With
|
|
1081
|
+
// `readOnly` there is nothing to write, and `through` only names the
|
|
1082
|
+
// predicate the getter reads — the shape's path, which is what makes a
|
|
1083
|
+
// subscription re-run when one of those links lands.
|
|
1047
1084
|
if (opts.getter) {
|
|
1048
|
-
if (opts.through) {
|
|
1085
|
+
if (opts.through && !opts.readOnly) {
|
|
1049
1086
|
throw new Error(
|
|
1050
1087
|
'Relation decorator: `getter` and `through` are mutually exclusive. ' +
|
|
1051
|
-
'Use `getter` alone for custom read-only relations,
|
|
1052
|
-
'(with optional `target`) for standard link-based relations
|
|
1088
|
+
'Use `getter` alone for custom read-only relations, `through` ' +
|
|
1089
|
+
'(with optional `target`) for standard link-based relations, or ' +
|
|
1090
|
+
'both with `readOnly: true` to read that predicate through the getter.'
|
|
1053
1091
|
);
|
|
1054
1092
|
}
|
|
1055
1093
|
// `target` and `where` are NOT mutually exclusive with `getter`.
|
|
@@ -1149,12 +1187,13 @@ export function HasMany(
|
|
|
1149
1187
|
...(opts.instantiateAs && { instantiateAs: opts.instantiateAs }),
|
|
1150
1188
|
...(opts.ordering && { ordering: opts.ordering }),
|
|
1151
1189
|
...(opts.interpretationHint && { interpretationHint: opts.interpretationHint }),
|
|
1190
|
+
...(opts.readOnly && { readOnly: true }),
|
|
1152
1191
|
};
|
|
1153
1192
|
|
|
1154
1193
|
const relKey = key as string;
|
|
1155
1194
|
// Only add mutation methods when a predicate is available
|
|
1156
|
-
// (getter-only relations are read-only)
|
|
1157
|
-
if (opts.through) {
|
|
1195
|
+
// (getter-only relations are read-only) and writing is allowed
|
|
1196
|
+
if (opts.through && !opts.readOnly) {
|
|
1158
1197
|
(target as any)[`add${capitalize(relKey)}`] = async function(this: any, arg: any, batchId?: string) {
|
|
1159
1198
|
return (this as any).addRelationValue(relKey, arg, batchId);
|
|
1160
1199
|
};
|
|
@@ -1200,6 +1239,15 @@ export function HasOne(
|
|
|
1200
1239
|
second?: Omit<RelationOptions, 'target'>,
|
|
1201
1240
|
): PropertyDecorator {
|
|
1202
1241
|
const opts = resolveRelationArgs(first, second);
|
|
1242
|
+
// `readOnly` lets `through` and `getter` stand together on `@HasMany`.
|
|
1243
|
+
// `@HasOne` reads through its predicate as a property and carries no
|
|
1244
|
+
// getter, so the pair would read the predicate unfiltered.
|
|
1245
|
+
if (opts.through && opts.getter) {
|
|
1246
|
+
throw new Error(
|
|
1247
|
+
'@HasOne: `through` with `getter` is not supported, even with `readOnly`. ' +
|
|
1248
|
+
'Use `@HasMany` for a read-only relation read through a getter.'
|
|
1249
|
+
);
|
|
1250
|
+
}
|
|
1203
1251
|
return function <T>(target: T, key: keyof T) {
|
|
1204
1252
|
const ctor = (target as any).constructor;
|
|
1205
1253
|
if (!relationRegistry.has(ctor)) relationRegistry.set(ctor, {});
|
|
@@ -1217,10 +1265,17 @@ export function HasOne(
|
|
|
1217
1265
|
...(opts.instantiateAs && { instantiateAs: opts.instantiateAs }),
|
|
1218
1266
|
...(opts.ordering && { ordering: opts.ordering }),
|
|
1219
1267
|
...(opts.interpretationHint && { interpretationHint: opts.interpretationHint }),
|
|
1268
|
+
...(opts.readOnly && { readOnly: true }),
|
|
1220
1269
|
};
|
|
1221
1270
|
|
|
1222
1271
|
const relKey = key as string;
|
|
1223
|
-
if (opts.through) {
|
|
1272
|
+
if (opts.through && opts.readOnly) {
|
|
1273
|
+
applyPropertyMetadata({
|
|
1274
|
+
through: opts.through,
|
|
1275
|
+
readOnly: true,
|
|
1276
|
+
local: opts.local,
|
|
1277
|
+
})(target, key);
|
|
1278
|
+
} else if (opts.through) {
|
|
1224
1279
|
// Register as a writable property
|
|
1225
1280
|
applyPropertyMetadata({
|
|
1226
1281
|
through: opts.through,
|
|
@@ -206,9 +206,8 @@ export function valueToLiteralIri(value: any): string {
|
|
|
206
206
|
// `"[object Object]"` and arrays into `"1,2"` — silently storing the
|
|
207
207
|
// wrong shape and breaking equality filters (`findAll({ where:
|
|
208
208
|
// { config: {...} } })` would match against `"[object Object]"`).
|
|
209
|
-
// The `value !== null` guard
|
|
210
|
-
// `
|
|
211
|
-
// throws on the empty-literal check.
|
|
209
|
+
// The `value !== null` guard keeps the historical encoding of `null`,
|
|
210
|
+
// `literal:string:null`, rather than `literal:json:null`.
|
|
212
211
|
if (value !== null && typeof value === 'object') {
|
|
213
212
|
return Literal.from(value).toUrl();
|
|
214
213
|
}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
Property,
|
|
15
15
|
Flag,
|
|
16
16
|
HasMany,
|
|
17
|
+
HasOne,
|
|
17
18
|
Optional,
|
|
18
19
|
buildConformanceFilter,
|
|
19
20
|
} from "./decorators";
|
|
@@ -641,6 +642,111 @@ describe("where clause validation", () => {
|
|
|
641
642
|
});
|
|
642
643
|
});
|
|
643
644
|
|
|
645
|
+
describe("relation datatype vs target (#908)", () => {
|
|
646
|
+
const DATATYPE_TARGET = /datatype.*target.*mutually exclusive/i;
|
|
647
|
+
|
|
648
|
+
it("throws when an options object sets both datatype and target", () => {
|
|
649
|
+
expect(() => {
|
|
650
|
+
@Model({ name: "InvalidDatatypeTarget" })
|
|
651
|
+
class _Invalid extends Ad4mModel {
|
|
652
|
+
@HasMany({
|
|
653
|
+
through: "test://pred",
|
|
654
|
+
target: () => FlaggedTarget,
|
|
655
|
+
datatype: "xsd://string",
|
|
656
|
+
})
|
|
657
|
+
items: string[] = [];
|
|
658
|
+
}
|
|
659
|
+
}).toThrow(DATATYPE_TARGET);
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
it("throws when the target-thunk shorthand is given a datatype", () => {
|
|
663
|
+
expect(() => {
|
|
664
|
+
@Model({ name: "InvalidDatatypeTargetShorthand" })
|
|
665
|
+
class _Invalid extends Ad4mModel {
|
|
666
|
+
@HasMany(() => FlaggedTarget, {
|
|
667
|
+
through: "test://pred",
|
|
668
|
+
datatype: "xsd://string",
|
|
669
|
+
})
|
|
670
|
+
items: string[] = [];
|
|
671
|
+
}
|
|
672
|
+
}).toThrow(DATATYPE_TARGET);
|
|
673
|
+
});
|
|
674
|
+
|
|
675
|
+
it("throws on a getter relation that sets both", () => {
|
|
676
|
+
expect(() => {
|
|
677
|
+
@Model({ name: "InvalidGetterDatatypeTarget" })
|
|
678
|
+
class _Invalid extends Ad4mModel {
|
|
679
|
+
@HasMany({
|
|
680
|
+
getter: "SELECT ?target WHERE { ?target ?p <Base> . }",
|
|
681
|
+
target: () => FlaggedTarget,
|
|
682
|
+
datatype: "xsd://string",
|
|
683
|
+
})
|
|
684
|
+
items: string[] = [];
|
|
685
|
+
}
|
|
686
|
+
}).toThrow(DATATYPE_TARGET);
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
it("throws on a to-one relation that sets both", () => {
|
|
690
|
+
expect(() => {
|
|
691
|
+
@Model({ name: "InvalidHasOneDatatypeTarget" })
|
|
692
|
+
class _Invalid extends Ad4mModel {
|
|
693
|
+
@HasOne(() => FlaggedTarget, {
|
|
694
|
+
through: "test://pred",
|
|
695
|
+
datatype: "xsd://string",
|
|
696
|
+
})
|
|
697
|
+
item: string = "";
|
|
698
|
+
}
|
|
699
|
+
}).toThrow(DATATYPE_TARGET);
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
it("keeps datatype with through as a literal relation", () => {
|
|
703
|
+
@Model({ name: "ValidDatatypeThrough" })
|
|
704
|
+
class ValidDatatypeThrough extends Ad4mModel {
|
|
705
|
+
@HasMany({ through: "test://pred", datatype: "xsd://string" })
|
|
706
|
+
items: string[] = [];
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
const { shape } = (ValidDatatypeThrough as any).generateSHACL();
|
|
710
|
+
const rel = shape.properties.find((p: any) => p.name === "items");
|
|
711
|
+
|
|
712
|
+
expect(rel.datatype).toBe("xsd://string");
|
|
713
|
+
expect(rel.nodeKind).toBe("Literal");
|
|
714
|
+
expect(rel.class).toBeUndefined();
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
it("keeps datatype with getter as a literal relation", () => {
|
|
718
|
+
@Model({ name: "ValidDatatypeGetter" })
|
|
719
|
+
class ValidDatatypeGetter extends Ad4mModel {
|
|
720
|
+
@HasMany({
|
|
721
|
+
getter: "SELECT ?target WHERE { <Base> <test://pred> ?target . }",
|
|
722
|
+
datatype: "xsd://string",
|
|
723
|
+
})
|
|
724
|
+
items: string[] = [];
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
const { shape } = (ValidDatatypeGetter as any).generateSHACL();
|
|
728
|
+
const rel = shape.properties.find((p: any) => p.name === "items");
|
|
729
|
+
|
|
730
|
+
expect(rel.datatype).toBe("xsd://string");
|
|
731
|
+
expect(rel.nodeKind).toBe("Literal");
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
it("keeps target without datatype as an instance relation", () => {
|
|
735
|
+
@Model({ name: "ValidTargetOnly" })
|
|
736
|
+
class ValidTargetOnly extends Ad4mModel {
|
|
737
|
+
@HasMany(() => FlaggedTarget, { through: "test://pred" })
|
|
738
|
+
items: string[] = [];
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
const { shape } = (ValidTargetOnly as any).generateSHACL();
|
|
742
|
+
const rel = shape.properties.find((p: any) => p.name === "items");
|
|
743
|
+
|
|
744
|
+
expect(rel.datatype).toBeUndefined();
|
|
745
|
+
expect(rel.nodeKind).toBe("IRI");
|
|
746
|
+
expect(rel.targetClassName).toBe("FlaggedTarget");
|
|
747
|
+
});
|
|
748
|
+
});
|
|
749
|
+
|
|
644
750
|
describe("where clause compilation", () => {
|
|
645
751
|
// Under the source-of-truth refactor the SHACL writer no longer inlines
|
|
646
752
|
// `where` conditions into the relation's SPARQL getter. Instead it emits
|
|
@@ -865,3 +971,88 @@ describe("compileWhereClause()", () => {
|
|
|
865
971
|
expect(conditions[0]).toContain("value");
|
|
866
972
|
});
|
|
867
973
|
});
|
|
974
|
+
|
|
975
|
+
// ============================================================================
|
|
976
|
+
// readOnly relations
|
|
977
|
+
// ============================================================================
|
|
978
|
+
|
|
979
|
+
@Model({ name: "ReadOnlyRelations" })
|
|
980
|
+
class ReadOnlyRelations extends Ad4mModel {
|
|
981
|
+
@HasMany({
|
|
982
|
+
through: "test://voted_by",
|
|
983
|
+
getter: "SELECT ?target WHERE { ?source <test://voted_by> ?target . }",
|
|
984
|
+
readOnly: true,
|
|
985
|
+
})
|
|
986
|
+
votedBy: string[] = [];
|
|
987
|
+
|
|
988
|
+
@HasMany({ through: "test://tags" })
|
|
989
|
+
tags: string[] = [];
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
describe("readOnly relations", () => {
|
|
993
|
+
const shape = () => (ReadOnlyRelations as any).generateSHACL().shape as SHACLShape;
|
|
994
|
+
const prop = (name: string) =>
|
|
995
|
+
shape().properties.find((p: SHACLPropertyShape) => p.name === name)!;
|
|
996
|
+
|
|
997
|
+
it("keep their predicate as the shape's path, so a subscription re-runs on it", () => {
|
|
998
|
+
expect(prop("votedBy").path).toBe("test://voted_by");
|
|
999
|
+
expect(prop("votedBy").getter).toContain("test://voted_by");
|
|
1000
|
+
});
|
|
1001
|
+
|
|
1002
|
+
it("generate no adder or remover and are marked not writable", () => {
|
|
1003
|
+
expect(prop("votedBy").adder).toBeUndefined();
|
|
1004
|
+
expect(prop("votedBy").remover).toBeUndefined();
|
|
1005
|
+
expect(prop("votedBy").writable).toBe(false);
|
|
1006
|
+
});
|
|
1007
|
+
|
|
1008
|
+
it("get no add/remove/set methods", () => {
|
|
1009
|
+
const instance = ReadOnlyRelations.prototype as any;
|
|
1010
|
+
expect(instance.addVotedBy).toBeUndefined();
|
|
1011
|
+
expect(instance.removeVotedBy).toBeUndefined();
|
|
1012
|
+
expect(instance.setVotedBy).toBeUndefined();
|
|
1013
|
+
expect(typeof instance.addTags).toBe("function");
|
|
1014
|
+
});
|
|
1015
|
+
|
|
1016
|
+
it("leave an ordinary relation writable", () => {
|
|
1017
|
+
expect(prop("tags").adder).toBeDefined();
|
|
1018
|
+
expect(prop("tags").writable).not.toBe(false);
|
|
1019
|
+
});
|
|
1020
|
+
});
|
|
1021
|
+
|
|
1022
|
+
@Model({ name: "SavesReadOnly" })
|
|
1023
|
+
class SavesReadOnly extends Ad4mModel {
|
|
1024
|
+
@HasMany({ through: "test://read_only", readOnly: true })
|
|
1025
|
+
readOnlyLinks: string[] = ["test://a"];
|
|
1026
|
+
|
|
1027
|
+
@HasMany({ through: "test://writable" })
|
|
1028
|
+
writableLinks: string[] = ["test://b"];
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
describe("readOnly relations when saving", () => {
|
|
1032
|
+
it("are skipped by save() and create(), even without a getter", async () => {
|
|
1033
|
+
const proto = SavesReadOnly.prototype as any;
|
|
1034
|
+
const set = jest.spyOn(proto, "setRelationValues").mockResolvedValue(undefined);
|
|
1035
|
+
const add = jest.spyOn(proto, "addRelationValue").mockResolvedValue(undefined);
|
|
1036
|
+
try {
|
|
1037
|
+
const instance = new SavesReadOnly({ uuid: "p" } as any, "test://instance");
|
|
1038
|
+
await (instance as any).innerUpdate(true);
|
|
1039
|
+
|
|
1040
|
+
const touched = [...set.mock.calls, ...add.mock.calls].map((call) => call[0]);
|
|
1041
|
+
expect(touched).toContain("writableLinks");
|
|
1042
|
+
expect(touched).not.toContain("readOnlyLinks");
|
|
1043
|
+
} finally {
|
|
1044
|
+
set.mockRestore();
|
|
1045
|
+
add.mockRestore();
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1048
|
+
|
|
1049
|
+
it("refuse `through` with `getter` on @HasOne, where the getter would be dropped", () => {
|
|
1050
|
+
expect(() => {
|
|
1051
|
+
class Refused extends Ad4mModel {
|
|
1052
|
+
@HasOne({ through: "test://one", getter: "SELECT ?target WHERE { ?source <test://one> ?target . }", readOnly: true })
|
|
1053
|
+
one: string = "";
|
|
1054
|
+
}
|
|
1055
|
+
return Refused;
|
|
1056
|
+
}).toThrow(/@HasOne.*through.*getter/);
|
|
1057
|
+
});
|
|
1058
|
+
});
|
package/src/model/shacl-gen.ts
CHANGED
|
@@ -118,6 +118,14 @@ export function buildSHACL(
|
|
|
118
118
|
|
|
119
119
|
let destructorActions: any[] = [];
|
|
120
120
|
|
|
121
|
+
// Class-field initialisers (`count = 0`) run in the constructor, not on the
|
|
122
|
+
// prototype, so read them from one instance built without a perspective.
|
|
123
|
+
let instance: any;
|
|
124
|
+
try { instance = new target(); } catch {}
|
|
125
|
+
const fieldValue = (propName: string): unknown => {
|
|
126
|
+
try { return obj[propName] ?? instance?.[propName]; } catch { return undefined; }
|
|
127
|
+
};
|
|
128
|
+
|
|
121
129
|
// ── Convert properties to SHACL property shapes ────────────────────
|
|
122
130
|
for (const propName in properties) {
|
|
123
131
|
const propMeta = properties[propName];
|
|
@@ -163,9 +171,10 @@ export function buildSHACL(
|
|
|
163
171
|
const isLiteral =
|
|
164
172
|
propMeta.resolveLanguage === undefined || propMeta.resolveLanguage === "literal";
|
|
165
173
|
if ((propMeta.initial !== undefined || isLiteral) && !propMeta.getter) {
|
|
166
|
-
const initialType = typeof
|
|
174
|
+
const initialType = typeof fieldValue(propName);
|
|
167
175
|
if (initialType === "number") {
|
|
168
|
-
|
|
176
|
+
// decimal, not integer: a `= 0` default must not make 0.5 invalid.
|
|
177
|
+
propShape.datatype = "xsd://decimal";
|
|
169
178
|
} else if (initialType === "boolean") {
|
|
170
179
|
propShape.datatype = "xsd://boolean";
|
|
171
180
|
} else if (initialType === "string" || isLiteral) {
|
|
@@ -343,8 +352,12 @@ export function buildSHACL(
|
|
|
343
352
|
}
|
|
344
353
|
|
|
345
354
|
// Adder / Remover actions — only meaningful for relations backed
|
|
346
|
-
// by a real link predicate. Getter-only relations are read-only
|
|
347
|
-
|
|
355
|
+
// by a real link predicate. Getter-only relations are read-only,
|
|
356
|
+
// and so is one declared `readOnly`, which keeps its predicate as
|
|
357
|
+
// the shape's path but must offer no way to write it.
|
|
358
|
+
if (relMeta.readOnly) {
|
|
359
|
+
relShape.writable = false;
|
|
360
|
+
} else if (relMeta.predicate) {
|
|
348
361
|
relShape.adder = [{
|
|
349
362
|
action: "addLink",
|
|
350
363
|
source: "this",
|
|
@@ -503,11 +516,8 @@ export function buildSHACL(
|
|
|
503
516
|
});
|
|
504
517
|
}
|
|
505
518
|
|
|
506
|
-
//
|
|
507
|
-
//
|
|
508
|
-
// which the Rust executor parses as a valid (no-op) command list,
|
|
509
|
-
// avoiding "No SHACL constructor found" errors for models whose
|
|
510
|
-
// properties are all optional and have no @Flag.
|
|
519
|
+
// Empty lists are valid: the executor stores them as `literal:string:[]`,
|
|
520
|
+
// so `createSubject` works for all-optional models without a @Flag.
|
|
511
521
|
shape.setConstructorActions(constructorActions);
|
|
512
522
|
shape.setDestructorActions(destructorActions);
|
|
513
523
|
|
|
@@ -473,4 +473,56 @@ describe("inverse relations appear once in the generated shape", () => {
|
|
|
473
473
|
);
|
|
474
474
|
expect(props.map((p) => p.name).sort()).toEqual(["comments", "inReplyTo"]);
|
|
475
475
|
});
|
|
476
|
+
|
|
477
|
+
describe("datatype inferred from class-field initialisers", () => {
|
|
478
|
+
it("maps number and boolean fields to xsd://decimal and xsd://boolean", () => {
|
|
479
|
+
@Model({ name: "Counter" })
|
|
480
|
+
class Counter extends Ad4mModel {
|
|
481
|
+
@Property({ through: "ns://count" })
|
|
482
|
+
count: number = 0;
|
|
483
|
+
|
|
484
|
+
@Property({ through: "ns://done" })
|
|
485
|
+
done: boolean = false;
|
|
486
|
+
|
|
487
|
+
@Property({ through: "ns://label" })
|
|
488
|
+
label: string = "";
|
|
489
|
+
|
|
490
|
+
@Property({ through: "ns://explicit", datatype: "xsd://decimal" })
|
|
491
|
+
explicit: number = 0;
|
|
492
|
+
|
|
493
|
+
// No initialiser: no runtime type to read, so it keeps the string default.
|
|
494
|
+
@Property({ through: "ns://bare" })
|
|
495
|
+
bare!: number;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
const { shape } = (Counter as any).generateSHACL();
|
|
499
|
+
const datatype = Object.fromEntries(shape.properties.map((p: any) => [p.name, p.datatype]));
|
|
500
|
+
expect(datatype).toEqual({
|
|
501
|
+
count: "xsd://decimal",
|
|
502
|
+
done: "xsd://boolean",
|
|
503
|
+
label: "xsd://string",
|
|
504
|
+
explicit: "xsd://decimal",
|
|
505
|
+
bare: "xsd://string",
|
|
506
|
+
});
|
|
507
|
+
expect(
|
|
508
|
+
flatten(shape).find((l) => l.source === "ns://Counter.count" && l.predicate === "sh://datatype")?.target,
|
|
509
|
+
).toBe("xsd://decimal");
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
it("falls back to the string default when the constructor cannot run without arguments", () => {
|
|
513
|
+
@Model({ name: "NeedsArgs" })
|
|
514
|
+
class NeedsArgs extends Ad4mModel {
|
|
515
|
+
@Property({ through: "ns://count" })
|
|
516
|
+
count: number = 0;
|
|
517
|
+
|
|
518
|
+
constructor(perspective: any, baseExpression?: string) {
|
|
519
|
+
super(perspective, baseExpression);
|
|
520
|
+
if (!perspective) throw new Error("perspective required");
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
const { shape } = (NeedsArgs as any).generateSHACL();
|
|
525
|
+
expect(shape.properties.find((p: any) => p.name === "count").datatype).toBe("xsd://string");
|
|
526
|
+
});
|
|
527
|
+
});
|
|
476
528
|
});
|
package/src/model/types.ts
CHANGED
|
@@ -184,6 +184,12 @@ export interface TraverseOptions {
|
|
|
184
184
|
* happened to return first. A global `limit`/`offset` is applied to the
|
|
185
185
|
* sliced union afterwards, not before it.
|
|
186
186
|
*
|
|
187
|
+
* A `where` the store cannot evaluate (a bare `author` condition, for one)
|
|
188
|
+
* is applied after hydration, so after the slice: a row it removes has
|
|
189
|
+
* still taken one of its anchor's places, and that anchor comes back with
|
|
190
|
+
* fewer than N even when more matching rows exist. Filtering first would
|
|
191
|
+
* mean fetching every anchor's rows whole, which is what the limit avoids.
|
|
192
|
+
*
|
|
187
193
|
* Refused alongside `levels`, which applies its own per-anchor limit at
|
|
188
194
|
* every depth.
|
|
189
195
|
*/
|
|
@@ -212,6 +218,10 @@ export interface TraverseOptions {
|
|
|
212
218
|
* A global `limit`/`offset` applies to that flat union once, after every level has been cut to
|
|
213
219
|
* its own breadth — not to each level.
|
|
214
220
|
*
|
|
221
|
+
* As with `limitPerAnchor`, each level is cut before any `where` the store cannot evaluate, so a
|
|
222
|
+
* row that filter removes still took a place at its level. The walk has already descended below
|
|
223
|
+
* that row by then, so its own replies can come back without it.
|
|
224
|
+
*
|
|
215
225
|
* Combining this with `transitive` or `limitPerAnchor` is an **error**, not a preference the
|
|
216
226
|
* executor resolves: `transitive` is the unbounded form of the same walk, and `limitPerAnchor`
|
|
217
227
|
* has no place to act when the walk sets a per-anchor limit at every depth itself. (It is not a
|
|
@@ -753,6 +763,8 @@ export interface RelationMetadata {
|
|
|
753
763
|
predicate: string;
|
|
754
764
|
/** Custom getter code */
|
|
755
765
|
getter?: string;
|
|
766
|
+
/** No writer for this relation: `save()` and `create()` skip it */
|
|
767
|
+
readOnly?: boolean;
|
|
756
768
|
/** Whether stored locally only */
|
|
757
769
|
local?: boolean;
|
|
758
770
|
/** Link direction: 'forward' for HasMany/HasOne, 'reverse' for BelongsToMany/BelongsToOne */
|