@coasys/ad4m 0.12.1-dev → 0.13.0-postmessage-ws-proxy.3
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 +2 -25
- package/jest-setup.ts +1 -1
- package/lib/index.cjs +8677 -15318
- package/lib/index.js +14507 -21223
- package/lib/src/Ad4mClient.d.ts +9 -3
- package/lib/src/Ad4mClient.js +40 -13
- package/lib/src/Literal.js +6 -5
- package/lib/src/agent/Agent.js +26 -272
- package/lib/src/agent/AgentClient.d.ts +33 -21
- package/lib/src/agent/AgentClient.js +180 -374
- package/lib/src/agent/AgentStatus.js +2 -37
- package/lib/src/ai/AIClient.d.ts +12 -4
- package/lib/src/ai/AIClient.js +81 -285
- package/lib/src/ai/AITypes.d.ts +55 -0
- package/lib/src/ai/AITypes.js +18 -0
- package/lib/src/ai/Tasks.js +10 -133
- package/lib/src/apiClient.d.ts +53 -0
- package/lib/src/apiClient.js +234 -0
- package/lib/src/cache/PersistentCache.d.ts +40 -0
- package/lib/src/cache/PersistentCache.js +139 -0
- package/lib/src/expression/Expression.d.ts +1 -1
- package/lib/src/expression/Expression.js +13 -122
- package/lib/src/expression/ExpressionClient.d.ts +11 -3
- package/lib/src/expression/ExpressionClient.js +120 -75
- package/lib/src/expression/ExpressionRef.js +4 -27
- package/lib/src/generated/api/AIModelLoadingStatus.d.ts +7 -0
- package/lib/src/generated/api/AIModelLoadingStatus.js +2 -0
- package/lib/src/generated/api/AddLinkExpressionRequest.d.ts +6 -0
- package/lib/src/generated/api/AddLinkExpressionRequest.js +1 -0
- package/lib/src/generated/api/AddLinkRequest.d.ts +6 -0
- package/lib/src/generated/api/AddLinkRequest.js +1 -0
- package/lib/src/generated/api/AddLinksBulkRequest.d.ts +6 -0
- package/lib/src/generated/api/AddLinksBulkRequest.js +1 -0
- package/lib/src/generated/api/AddSdnaRequest.d.ts +6 -0
- package/lib/src/generated/api/AddSdnaRequest.js +2 -0
- package/lib/src/generated/api/ApplyTemplateRequest.d.ts +4 -0
- package/lib/src/generated/api/ApplyTemplateRequest.js +2 -0
- package/lib/src/generated/api/AuthInfoInput.d.ts +10 -0
- package/lib/src/generated/api/AuthInfoInput.js +1 -0
- package/lib/src/generated/api/CapabilityInput.d.ts +5 -0
- package/lib/src/generated/api/CapabilityInput.js +1 -0
- package/lib/src/generated/api/CommitBatchRequest.d.ts +3 -0
- package/lib/src/generated/api/CommitBatchRequest.js +2 -0
- package/lib/src/generated/api/ComputeLogEntry.d.ts +9 -0
- package/lib/src/generated/api/ComputeLogEntry.js +2 -0
- package/lib/src/generated/api/CreateExpressionRequest.d.ts +4 -0
- package/lib/src/generated/api/CreateExpressionRequest.js +2 -0
- package/lib/src/generated/api/CreatePerspectiveRequest.d.ts +3 -0
- package/lib/src/generated/api/CreatePerspectiveRequest.js +2 -0
- package/lib/src/generated/api/CreateSubjectRequest.d.ts +6 -0
- package/lib/src/generated/api/CreateSubjectRequest.js +2 -0
- package/lib/src/generated/api/EmbedRequest.d.ts +4 -0
- package/lib/src/generated/api/EmbedRequest.js +2 -0
- package/lib/src/generated/api/EntanglementProofInput.d.ts +6 -0
- package/lib/src/generated/api/EntanglementProofInput.js +2 -0
- package/lib/src/generated/api/ExecuteCommandsRequest.d.ts +4 -0
- package/lib/src/generated/api/ExecuteCommandsRequest.js +2 -0
- package/lib/src/generated/api/ExportRequest.d.ts +5 -0
- package/lib/src/generated/api/ExportRequest.js +2 -0
- package/lib/src/generated/api/ExpressionManyRequest.d.ts +3 -0
- package/lib/src/generated/api/ExpressionManyRequest.js +2 -0
- package/lib/src/generated/api/ExpressionProof.d.ts +4 -0
- package/lib/src/generated/api/ExpressionProof.js +2 -0
- package/lib/src/generated/api/ExpressionProofInput.d.ts +6 -0
- package/lib/src/generated/api/ExpressionProofInput.js +2 -0
- package/lib/src/generated/api/FriendSendMessageRequest.d.ts +3 -0
- package/lib/src/generated/api/FriendSendMessageRequest.js +2 -0
- package/lib/src/generated/api/FriendsListRequest.d.ts +3 -0
- package/lib/src/generated/api/FriendsListRequest.js +2 -0
- package/lib/src/generated/api/GenerateAgentRequest.d.ts +3 -0
- package/lib/src/generated/api/GenerateAgentRequest.js +2 -0
- package/lib/src/generated/api/GenerateJwtRequest.d.ts +4 -0
- package/lib/src/generated/api/GenerateJwtRequest.js +2 -0
- package/lib/src/generated/api/GetSubjectDataRequest.d.ts +4 -0
- package/lib/src/generated/api/GetSubjectDataRequest.js +2 -0
- package/lib/src/generated/api/ImportAgentRequest.d.ts +6 -0
- package/lib/src/generated/api/ImportAgentRequest.js +2 -0
- package/lib/src/generated/api/ImportRequest.d.ts +4 -0
- package/lib/src/generated/api/ImportRequest.js +2 -0
- package/lib/src/generated/api/JoinNeighbourhoodRequest.d.ts +3 -0
- package/lib/src/generated/api/JoinNeighbourhoodRequest.js +2 -0
- package/lib/src/generated/api/LanguageMetaInput.d.ts +6 -0
- package/lib/src/generated/api/LanguageMetaInput.js +2 -0
- package/lib/src/generated/api/Link.d.ts +5 -0
- package/lib/src/generated/api/Link.js +2 -0
- package/lib/src/generated/api/LinkExpression.d.ts +10 -0
- package/lib/src/generated/api/LinkExpression.js +1 -0
- package/lib/src/generated/api/LinkExpressionInput.d.ts +10 -0
- package/lib/src/generated/api/LinkExpressionInput.js +1 -0
- package/lib/src/generated/api/LinkInput.d.ts +5 -0
- package/lib/src/generated/api/LinkInput.js +2 -0
- package/lib/src/generated/api/LinkLanguageTemplatesRequest.d.ts +3 -0
- package/lib/src/generated/api/LinkLanguageTemplatesRequest.js +2 -0
- package/lib/src/generated/api/LinkMutations.d.ts +6 -0
- package/lib/src/generated/api/LinkMutations.js +1 -0
- package/lib/src/generated/api/LinkStatus.d.ts +1 -0
- package/lib/src/generated/api/LinkStatus.js +2 -0
- package/lib/src/generated/api/LockAgentRequest.d.ts +3 -0
- package/lib/src/generated/api/LockAgentRequest.js +2 -0
- package/lib/src/generated/api/ModelType.d.ts +1 -0
- package/lib/src/generated/api/ModelType.js +2 -0
- package/lib/src/generated/api/NotificationInput.d.ts +10 -0
- package/lib/src/generated/api/NotificationInput.js +2 -0
- package/lib/src/generated/api/OpenLinkRequest.d.ts +3 -0
- package/lib/src/generated/api/OpenLinkRequest.js +2 -0
- package/lib/src/generated/api/PermitCapabilityRequest.d.ts +3 -0
- package/lib/src/generated/api/PermitCapabilityRequest.js +2 -0
- package/lib/src/generated/api/PerspectiveInput.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveInput.js +1 -0
- package/lib/src/generated/api/PromptRequest.d.ts +4 -0
- package/lib/src/generated/api/PromptRequest.js +2 -0
- package/lib/src/generated/api/PublishLanguageRequest.d.ts +5 -0
- package/lib/src/generated/api/PublishLanguageRequest.js +1 -0
- package/lib/src/generated/api/PublishNeighbourhoodRequest.d.ts +6 -0
- package/lib/src/generated/api/PublishNeighbourhoodRequest.js +1 -0
- package/lib/src/generated/api/QueryRequest.d.ts +7 -0
- package/lib/src/generated/api/QueryRequest.js +2 -0
- package/lib/src/generated/api/RemoveLinkRequest.d.ts +5 -0
- package/lib/src/generated/api/RemoveLinkRequest.js +1 -0
- package/lib/src/generated/api/RemoveLinksBulkRequest.d.ts +5 -0
- package/lib/src/generated/api/RemoveLinksBulkRequest.js +1 -0
- package/lib/src/generated/api/ResourceInput.d.ts +4 -0
- package/lib/src/generated/api/ResourceInput.js +2 -0
- package/lib/src/generated/api/SetDefaultModelRequest.d.ts +4 -0
- package/lib/src/generated/api/SetDefaultModelRequest.js +1 -0
- package/lib/src/generated/api/SetFreeHostingEnabledRequest.d.ts +3 -0
- package/lib/src/generated/api/SetFreeHostingEnabledRequest.js +2 -0
- package/lib/src/generated/api/SetMultiUserRequest.d.ts +3 -0
- package/lib/src/generated/api/SetMultiUserRequest.js +2 -0
- package/lib/src/generated/api/SetStatusRequest.d.ts +3 -0
- package/lib/src/generated/api/SetStatusRequest.js +2 -0
- package/lib/src/generated/api/SignMessageRequest.d.ts +3 -0
- package/lib/src/generated/api/SignMessageRequest.js +2 -0
- package/lib/src/generated/api/TrustedAgentsRequest.d.ts +3 -0
- package/lib/src/generated/api/TrustedAgentsRequest.js +2 -0
- package/lib/src/generated/api/UnlockAgentRequest.d.ts +4 -0
- package/lib/src/generated/api/UnlockAgentRequest.js +2 -0
- package/lib/src/generated/api/UpdateLinkRequest.d.ts +7 -0
- package/lib/src/generated/api/UpdateLinkRequest.js +1 -0
- package/lib/src/generated/api/UpdatePerspectiveRequest.d.ts +3 -0
- package/lib/src/generated/api/UpdatePerspectiveRequest.js +2 -0
- package/lib/src/generated/api/UserStatistics.d.ts +9 -0
- package/lib/src/generated/api/UserStatistics.js +2 -0
- package/lib/src/generated/api/VerificationRequestResult.d.ts +6 -0
- package/lib/src/generated/api/VerificationRequestResult.js +2 -0
- package/lib/src/generated/api/VerifySignatureRequest.d.ts +5 -0
- package/lib/src/generated/api/VerifySignatureRequest.js +2 -0
- package/lib/src/generated/api/WriteSettingsRequest.d.ts +3 -0
- package/lib/src/generated/api/WriteSettingsRequest.js +2 -0
- package/lib/src/generated/api/index.d.ts +42 -0
- package/lib/src/generated/api/index.js +7 -0
- package/lib/src/index.d.ts +8 -2
- package/lib/src/index.js +8 -2
- package/lib/src/jestSetup.d.ts +0 -1
- package/lib/src/jestSetup.js +1 -1
- package/lib/src/language/Icon.js +2 -21
- package/lib/src/language/Language.d.ts +26 -176
- package/lib/src/language/Language.js +32 -72
- package/lib/src/language/LanguageClient.d.ts +2 -2
- package/lib/src/language/LanguageClient.js +15 -105
- package/lib/src/language/LanguageHandle.js +2 -41
- package/lib/src/language/LanguageMeta.js +4 -75
- package/lib/src/language/LanguageRef.js +2 -25
- package/lib/src/links/Links.js +14 -111
- package/lib/src/model/Ad4mModel.d.ts +143 -63
- package/lib/src/model/Ad4mModel.js +583 -425
- package/lib/src/model/Ad4mModel.test.js +1434 -688
- package/lib/src/model/ModelQueryBuilder.d.ts +61 -45
- package/lib/src/model/ModelQueryBuilder.js +315 -157
- package/lib/src/model/Subject.js +6 -6
- package/lib/src/model/decorators.d.ts +36 -8
- package/lib/src/model/decorators.js +41 -14
- package/lib/src/model/hydration-batch.d.ts +34 -0
- package/lib/src/model/hydration-batch.js +147 -0
- package/lib/src/model/hydration-batching.test.d.ts +7 -0
- package/lib/src/model/hydration-batching.test.js +456 -0
- package/lib/src/model/hydration.d.ts +3 -92
- package/lib/src/model/hydration.js +3 -691
- package/lib/src/model/index.d.ts +3 -4
- package/lib/src/model/index.js +3 -4
- package/lib/src/model/json-schema.js +2 -2
- package/lib/src/model/model-manifest.d.ts +41 -0
- package/lib/src/model/model-manifest.js +11 -0
- package/lib/src/model/query-cache.d.ts +30 -0
- package/lib/src/model/query-cache.js +66 -0
- package/lib/src/model/query-cache.test.d.ts +1 -0
- package/lib/src/model/query-cache.test.js +43 -0
- package/lib/src/model/query-common.d.ts +1 -1
- package/lib/src/model/query-common.js +1 -1
- package/lib/src/model/query-sparql-batch.d.ts +17 -0
- package/lib/src/model/query-sparql-batch.js +260 -0
- package/lib/src/model/query-sparql.d.ts +51 -0
- package/lib/src/model/query-sparql.js +466 -0
- package/lib/src/model/query-sparql.test.d.ts +1 -0
- package/lib/src/model/query-sparql.test.js +312 -0
- package/lib/src/model/{surreal-utils.d.ts → query-utils.d.ts} +13 -9
- package/lib/src/model/query-utils.js +189 -0
- package/lib/src/model/relation-filtering.test.js +15 -15
- package/lib/src/model/sdna.js +1 -1
- package/lib/src/model/shacl-gen.js +154 -57
- package/lib/src/model/subscription-delta.test.d.ts +24 -0
- package/lib/src/model/subscription-delta.test.js +180 -0
- package/lib/src/model/subscription-pool.d.ts +39 -0
- package/lib/src/model/subscription-pool.js +165 -0
- package/lib/src/model/types.d.ts +195 -5
- package/lib/src/model/types.js +5 -2
- package/lib/src/neighbourhood/Neighbourhood.js +4 -32
- package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +3 -3
- package/lib/src/neighbourhood/NeighbourhoodClient.js +40 -203
- package/lib/src/perspectives/LinkQuery.js +2 -42
- package/lib/src/perspectives/Perspective.d.ts +1 -1
- package/lib/src/perspectives/Perspective.js +10 -52
- package/lib/src/perspectives/PerspectiveClient.d.ts +22 -32
- package/lib/src/perspectives/PerspectiveClient.js +188 -454
- package/lib/src/perspectives/PerspectiveClient.test.d.ts +1 -0
- package/lib/src/perspectives/PerspectiveClient.test.js +224 -0
- package/lib/src/perspectives/PerspectiveDiff.js +4 -31
- package/lib/src/perspectives/PerspectiveHandle.js +3 -43
- package/lib/src/perspectives/PerspectiveProxy.d.ts +157 -78
- package/lib/src/perspectives/PerspectiveProxy.js +475 -389
- package/lib/src/perspectives/PerspectiveResolver.d.ts +0 -1
- package/lib/src/perspectives/PerspectiveResolver.js +0 -11
- package/lib/src/perspectives/SparqlBindings.d.ts +47 -0
- package/lib/src/perspectives/SparqlBindings.js +65 -0
- package/lib/src/perspectives/WakerSubscriptionManager.d.ts +3 -3
- package/lib/src/perspectives/WakerSubscriptionManager.js +12 -12
- package/lib/src/runtime/RuntimeClient.d.ts +8 -6
- package/lib/src/runtime/RuntimeClient.js +97 -454
- package/lib/src/runtime/RuntimeResolver.d.ts +14 -0
- package/lib/src/runtime/RuntimeResolver.js +84 -0
- package/lib/src/runtime/RuntimeTypes.d.ts +101 -0
- package/lib/src/runtime/RuntimeTypes.js +45 -0
- package/lib/src/schema.gql +14 -1
- package/lib/src/shacl/SHACLFlow.d.ts +1 -1
- package/lib/src/shacl/SHACLFlow.js +9 -9
- package/lib/src/shacl/SHACLShape.d.ts +26 -1
- package/lib/src/shacl/SHACLShape.js +140 -38
- package/lib/src/shacl/SHACLShape.test.js +82 -0
- package/lib/src/typeDefs.js +3 -615
- package/lib/src/utils.d.ts +6 -6
- package/lib/src/utils.js +6 -6
- package/package.json +9 -24
- package/rollup.config.js +0 -7
- package/src/Ad4mClient.test.ts +1192 -1288
- package/src/Ad4mClient.ts +46 -15
- package/src/Literal.test.ts +10 -5
- package/src/Literal.ts +6 -5
- package/src/agent/Agent.ts +0 -99
- package/src/agent/AgentClient.ts +238 -467
- package/src/agent/AgentStatus.ts +0 -12
- package/src/ai/AIClient.ts +96 -296
- package/src/ai/AITypes.ts +66 -0
- package/src/ai/Tasks.ts +0 -52
- package/src/apiClient.ts +287 -0
- package/src/cache/PersistentCache.ts +145 -0
- package/src/cache/cache.test.ts +713 -0
- package/src/expression/Expression.ts +3 -43
- package/src/expression/ExpressionClient.ts +148 -77
- package/src/expression/ExpressionRef.ts +2 -8
- package/src/generated/api/AIModelLoadingStatus.ts +3 -0
- package/src/generated/api/AddLinkExpressionRequest.ts +4 -0
- package/src/generated/api/AddLinkRequest.ts +4 -0
- package/src/generated/api/AddLinksBulkRequest.ts +4 -0
- package/src/generated/api/AddSdnaRequest.ts +3 -0
- package/src/generated/api/ApplyTemplateRequest.ts +3 -0
- package/src/generated/api/AuthInfoInput.ts +4 -0
- package/src/generated/api/CapabilityInput.ts +4 -0
- package/src/generated/api/CommitBatchRequest.ts +3 -0
- package/src/generated/api/ComputeLogEntry.ts +3 -0
- package/src/generated/api/CreateExpressionRequest.ts +3 -0
- package/src/generated/api/CreatePerspectiveRequest.ts +3 -0
- package/src/generated/api/CreateSubjectRequest.ts +3 -0
- package/src/generated/api/EmbedRequest.ts +3 -0
- package/src/generated/api/EntanglementProofInput.ts +3 -0
- package/src/generated/api/ExecuteCommandsRequest.ts +3 -0
- package/src/generated/api/ExportRequest.ts +3 -0
- package/src/generated/api/ExpressionManyRequest.ts +3 -0
- package/src/generated/api/ExpressionProof.ts +3 -0
- package/src/generated/api/ExpressionProofInput.ts +3 -0
- package/src/generated/api/FriendSendMessageRequest.ts +3 -0
- package/src/generated/api/FriendsListRequest.ts +3 -0
- package/src/generated/api/GenerateAgentRequest.ts +3 -0
- package/src/generated/api/GenerateJwtRequest.ts +3 -0
- package/src/generated/api/GetSubjectDataRequest.ts +3 -0
- package/src/generated/api/ImportAgentRequest.ts +3 -0
- package/src/generated/api/ImportRequest.ts +3 -0
- package/src/generated/api/JoinNeighbourhoodRequest.ts +3 -0
- package/src/generated/api/LanguageMetaInput.ts +3 -0
- package/src/generated/api/Link.ts +3 -0
- package/src/generated/api/LinkExpression.ts +6 -0
- package/src/generated/api/LinkExpressionInput.ts +6 -0
- package/src/generated/api/LinkInput.ts +3 -0
- package/src/generated/api/LinkLanguageTemplatesRequest.ts +3 -0
- package/src/generated/api/LinkMutations.ts +5 -0
- package/src/generated/api/LinkStatus.ts +3 -0
- package/src/generated/api/LockAgentRequest.ts +3 -0
- package/src/generated/api/ModelType.ts +3 -0
- package/src/generated/api/NotificationInput.ts +3 -0
- package/src/generated/api/OpenLinkRequest.ts +3 -0
- package/src/generated/api/PermitCapabilityRequest.ts +3 -0
- package/src/generated/api/PerspectiveInput.ts +4 -0
- package/src/generated/api/PromptRequest.ts +3 -0
- package/src/generated/api/PublishLanguageRequest.ts +4 -0
- package/src/generated/api/PublishNeighbourhoodRequest.ts +4 -0
- package/src/generated/api/QueryRequest.ts +6 -0
- package/src/generated/api/RemoveLinkRequest.ts +4 -0
- package/src/generated/api/RemoveLinksBulkRequest.ts +4 -0
- package/src/generated/api/ResourceInput.ts +3 -0
- package/src/generated/api/SetDefaultModelRequest.ts +4 -0
- package/src/generated/api/SetFreeHostingEnabledRequest.ts +3 -0
- package/src/generated/api/SetMultiUserRequest.ts +3 -0
- package/src/generated/api/SetStatusRequest.ts +3 -0
- package/src/generated/api/SignMessageRequest.ts +3 -0
- package/src/generated/api/TrustedAgentsRequest.ts +3 -0
- package/src/generated/api/UnlockAgentRequest.ts +3 -0
- package/src/generated/api/UpdateLinkRequest.ts +5 -0
- package/src/generated/api/UpdatePerspectiveRequest.ts +3 -0
- package/src/generated/api/UserStatistics.ts +3 -0
- package/src/generated/api/VerificationRequestResult.ts +3 -0
- package/src/generated/api/VerifySignatureRequest.ts +3 -0
- package/src/generated/api/WriteSettingsRequest.ts +3 -0
- package/src/generated/api/index.ts +49 -0
- package/src/index.ts +8 -2
- package/src/jestSetup.ts +1 -1
- package/src/language/Icon.ts +0 -4
- package/src/language/Language.ts +51 -248
- package/src/language/LanguageClient.ts +21 -132
- package/src/language/LanguageHandle.ts +0 -14
- package/src/language/LanguageMeta.ts +0 -29
- package/src/language/LanguageRef.ts +0 -7
- package/src/links/Links.ts +0 -37
- package/src/model/Ad4mModel.test.ts +1664 -792
- package/src/model/Ad4mModel.ts +664 -499
- package/src/model/ModelQueryBuilder.ts +362 -183
- package/src/model/decorators.ts +71 -22
- package/src/model/hydration.ts +3 -772
- package/src/model/index.ts +3 -4
- package/src/model/json-schema.ts +2 -2
- package/src/model/query-cache.test.ts +54 -0
- package/src/model/query-cache.ts +79 -0
- package/src/model/query-common.ts +1 -1
- package/src/model/query-sparql.test.ts +376 -0
- package/src/model/query-sparql.ts +504 -0
- package/src/model/query-utils.ts +209 -0
- package/src/model/relation-filtering.test.ts +60 -53
- package/src/model/sdna.ts +1 -1
- package/src/model/shacl-gen.ts +163 -64
- package/src/model/shacl-roundtrip.test.ts +197 -0
- package/src/model/types-typed-query.test.ts +360 -0
- package/src/model/types.ts +256 -5
- package/src/neighbourhood/Neighbourhood.ts +0 -9
- package/src/neighbourhood/NeighbourhoodClient.ts +42 -207
- package/src/neighbourhood/NeighbourhoodProxy.test.ts +34 -36
- package/src/perspectives/LinkQuery.ts +0 -15
- package/src/perspectives/Perspective.ts +1 -12
- package/src/perspectives/PerspectiveClient.test.ts +262 -0
- package/src/perspectives/PerspectiveClient.ts +252 -468
- package/src/perspectives/PerspectiveDiff.ts +0 -8
- package/src/perspectives/PerspectiveHandle.ts +1 -12
- package/src/perspectives/PerspectiveProxy.test.ts +125 -0
- package/src/perspectives/PerspectiveProxy.ts +522 -434
- package/src/perspectives/SparqlBindings.ts +79 -0
- package/src/perspectives/WakerSubscriptionManager.ts +13 -13
- package/src/runtime/RuntimeClient.ts +118 -461
- package/src/runtime/RuntimeTypes.ts +144 -0
- package/src/shacl/SHACLFlow.ts +9 -9
- package/src/shacl/SHACLShape.test.ts +204 -0
- package/src/shacl/SHACLShape.ts +191 -39
- package/src/typeDefs.ts +3 -5
- package/src/utils.ts +6 -6
- package/tsconfig.json +3 -7
- package/lib/src/model/query-surreal.d.ts +0 -44
- package/lib/src/model/query-surreal.js +0 -249
- package/lib/src/model/surreal-utils.js +0 -128
- package/shims/reflect-metadata.ts +0 -0
- package/shims/type-graphql.ts +0 -75
- package/src/PubSub.ts +0 -17
- package/src/agent/AgentResolver.ts +0 -263
- package/src/ai/AIResolver.ts +0 -372
- package/src/buildSchema.ts +0 -43
- package/src/expression/ExpressionResolver.ts +0 -64
- package/src/language/LanguageContext.ts +0 -37
- package/src/language/LanguageResolver.ts +0 -98
- package/src/model/Subject.ts +0 -159
- package/src/model/prolog-facts.ts +0 -145
- package/src/model/query-prolog.ts +0 -148
- package/src/model/query-surreal.ts +0 -280
- package/src/model/surreal-utils.ts +0 -147
- package/src/neighbourhood/NeighbourhoodResolver.ts +0 -100
- package/src/perspectives/PerspectiveResolver.ts +0 -372
- package/src/runtime/RuntimeResolver.ts +0 -691
- package/src/unwrapApolloResult.ts +0 -16
- package/tsconfig-browser.json +0 -82
|
@@ -9,43 +9,25 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
import {
|
|
12
|
+
var _PerspectiveClient_apiClient, _PerspectiveClient_perspectiveAddedCallbacks, _PerspectiveClient_perspectiveUpdatedCallbacks, _PerspectiveClient_perspectiveRemovedCallbacks, _PerspectiveClient_perspectiveSyncStateChangeCallbacks, _PerspectiveClient_expressionClient, _PerspectiveClient_neighbourhoodClient, _PerspectiveClient_aiClient, _PerspectiveClient_unsubscribers, _PerspectiveClient_linkUnsubscribers, _PerspectiveClient_querySubscriptionUnsubscribers;
|
|
13
|
+
import { ApiClient, RpcError } from "../apiClient";
|
|
14
14
|
import { NeighbourhoodProxy } from "../neighbourhood/NeighbourhoodProxy";
|
|
15
|
-
import unwrapApolloResult from "../unwrapApolloResult";
|
|
16
15
|
import { PerspectiveProxy } from './PerspectiveProxy';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
uuid
|
|
26
|
-
name
|
|
27
|
-
sharedUrl
|
|
28
|
-
state
|
|
29
|
-
owners
|
|
30
|
-
neighbourhood {
|
|
31
|
-
data {
|
|
32
|
-
linkLanguage
|
|
33
|
-
meta {
|
|
34
|
-
links
|
|
35
|
-
{
|
|
36
|
-
author
|
|
37
|
-
timestamp
|
|
38
|
-
data { source, predicate, target }
|
|
39
|
-
proof { valid, invalid, signature, key }
|
|
40
|
-
}
|
|
16
|
+
function normalizeQueryResult(raw, errorContext) {
|
|
17
|
+
let finalResult = raw;
|
|
18
|
+
if (typeof finalResult === 'string') {
|
|
19
|
+
try {
|
|
20
|
+
finalResult = JSON.parse(finalResult);
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
console.error(errorContext, e);
|
|
41
24
|
}
|
|
42
25
|
}
|
|
43
|
-
|
|
26
|
+
return finalResult;
|
|
44
27
|
}
|
|
45
|
-
`;
|
|
46
28
|
export class PerspectiveClient {
|
|
47
|
-
constructor(
|
|
48
|
-
|
|
29
|
+
constructor(baseUrl, token, subscribe = true, sharedApiClient) {
|
|
30
|
+
_PerspectiveClient_apiClient.set(this, void 0);
|
|
49
31
|
_PerspectiveClient_perspectiveAddedCallbacks.set(this, void 0);
|
|
50
32
|
_PerspectiveClient_perspectiveUpdatedCallbacks.set(this, void 0);
|
|
51
33
|
_PerspectiveClient_perspectiveRemovedCallbacks.set(this, void 0);
|
|
@@ -53,11 +35,17 @@ export class PerspectiveClient {
|
|
|
53
35
|
_PerspectiveClient_expressionClient.set(this, void 0);
|
|
54
36
|
_PerspectiveClient_neighbourhoodClient.set(this, void 0);
|
|
55
37
|
_PerspectiveClient_aiClient.set(this, void 0);
|
|
56
|
-
|
|
38
|
+
_PerspectiveClient_unsubscribers.set(this, void 0);
|
|
39
|
+
_PerspectiveClient_linkUnsubscribers.set(this, void 0);
|
|
40
|
+
_PerspectiveClient_querySubscriptionUnsubscribers.set(this, void 0);
|
|
41
|
+
__classPrivateFieldSet(this, _PerspectiveClient_apiClient, sharedApiClient || new ApiClient(baseUrl, token), "f");
|
|
57
42
|
__classPrivateFieldSet(this, _PerspectiveClient_perspectiveAddedCallbacks, [], "f");
|
|
58
43
|
__classPrivateFieldSet(this, _PerspectiveClient_perspectiveUpdatedCallbacks, [], "f");
|
|
59
44
|
__classPrivateFieldSet(this, _PerspectiveClient_perspectiveRemovedCallbacks, [], "f");
|
|
60
45
|
__classPrivateFieldSet(this, _PerspectiveClient_perspectiveSyncStateChangeCallbacks, [], "f");
|
|
46
|
+
__classPrivateFieldSet(this, _PerspectiveClient_unsubscribers, [], "f");
|
|
47
|
+
__classPrivateFieldSet(this, _PerspectiveClient_linkUnsubscribers, new Map(), "f");
|
|
48
|
+
__classPrivateFieldSet(this, _PerspectiveClient_querySubscriptionUnsubscribers, new Map(), "f");
|
|
61
49
|
if (subscribe) {
|
|
62
50
|
this.subscribePerspectiveAdded();
|
|
63
51
|
this.subscribePerspectiveUpdated();
|
|
@@ -77,362 +65,160 @@ export class PerspectiveClient {
|
|
|
77
65
|
return __classPrivateFieldGet(this, _PerspectiveClient_aiClient, "f");
|
|
78
66
|
}
|
|
79
67
|
async all() {
|
|
80
|
-
const
|
|
81
|
-
query: gql `query perspectives {
|
|
82
|
-
perspectives {
|
|
83
|
-
${PERSPECTIVE_HANDLE_FIELDS}
|
|
84
|
-
}
|
|
85
|
-
}`
|
|
86
|
-
}));
|
|
68
|
+
const perspectives = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.all');
|
|
87
69
|
return perspectives.map(handle => new PerspectiveProxy(handle, this));
|
|
88
70
|
}
|
|
89
71
|
async byUUID(uuid) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
72
|
+
try {
|
|
73
|
+
const perspective = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.get', { uuid });
|
|
74
|
+
if (!perspective)
|
|
75
|
+
return null;
|
|
76
|
+
return new PerspectiveProxy(perspective, this);
|
|
77
|
+
}
|
|
78
|
+
catch (e) {
|
|
79
|
+
if (e instanceof RpcError && e.status === 404)
|
|
80
|
+
return null;
|
|
81
|
+
throw e;
|
|
82
|
+
}
|
|
101
83
|
}
|
|
102
84
|
async snapshotByUUID(uuid) {
|
|
103
|
-
|
|
104
|
-
query: gql `query perspectiveSnapshot($uuid: String!) {
|
|
105
|
-
perspectiveSnapshot(uuid: $uuid) {
|
|
106
|
-
links { ${LINK_EXPRESSION_FIELDS} }
|
|
107
|
-
}
|
|
108
|
-
}`,
|
|
109
|
-
variables: { uuid }
|
|
110
|
-
}));
|
|
111
|
-
return perspectiveSnapshot;
|
|
85
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.snapshot', { uuid });
|
|
112
86
|
}
|
|
113
87
|
async publishSnapshotByUUID(uuid) {
|
|
114
|
-
|
|
115
|
-
mutation: gql `mutation perspectivePublishSnapshot($uuid: String!) {
|
|
116
|
-
perspectivePublishSnapshot(uuid: $uuid)
|
|
117
|
-
}`,
|
|
118
|
-
variables: { uuid }
|
|
119
|
-
}));
|
|
120
|
-
return perspectivePublishSnapshot;
|
|
88
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.publishSnapshot', { uuid });
|
|
121
89
|
}
|
|
122
90
|
async queryLinks(uuid, query) {
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
91
|
+
const params = { uuid };
|
|
92
|
+
if (query.source)
|
|
93
|
+
params.source = query.source;
|
|
94
|
+
if (query.predicate)
|
|
95
|
+
params.predicate = query.predicate;
|
|
96
|
+
if (query.target)
|
|
97
|
+
params.target = query.target;
|
|
98
|
+
if (query.fromDate)
|
|
99
|
+
params.fromDate = query.fromDate instanceof Date ? query.fromDate.toISOString() : String(query.fromDate);
|
|
100
|
+
if (query.untilDate)
|
|
101
|
+
params.untilDate = query.untilDate instanceof Date ? query.untilDate.toISOString() : String(query.untilDate);
|
|
102
|
+
if (query.limit !== undefined)
|
|
103
|
+
params.limit = query.limit;
|
|
104
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.queryLinks', params);
|
|
132
105
|
}
|
|
133
106
|
async queryProlog(uuid, query) {
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
return JSON.parse(perspectiveQueryProlog);
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Executes a read-only SurrealQL query against a perspective's link cache.
|
|
144
|
-
*
|
|
145
|
-
* Security: Only SELECT, RETURN, and other read-only queries are permitted.
|
|
146
|
-
* Mutating operations (DELETE, UPDATE, INSERT, etc.) are blocked.
|
|
147
|
-
*
|
|
148
|
-
* Note: GraphQL field name is "perspectiveQuerySurrealDb" (lowercase "b" in "Db")
|
|
149
|
-
* as generated from Rust method "perspective_query_surreal_db"
|
|
150
|
-
*/
|
|
151
|
-
async querySurrealDB(uuid, query) {
|
|
152
|
-
const { perspectiveQuerySurrealDb } = unwrapApolloResult(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").query({
|
|
153
|
-
query: gql `query perspectiveQuerySurrealDb($uuid: String!, $query: String!) {
|
|
154
|
-
perspectiveQuerySurrealDb(uuid: $uuid, query: $query)
|
|
155
|
-
}`,
|
|
156
|
-
variables: { uuid, query }
|
|
157
|
-
}));
|
|
158
|
-
return JSON.parse(perspectiveQuerySurrealDb);
|
|
107
|
+
const result = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.queryProlog', { uuid, query });
|
|
108
|
+
return JSON.parse(result);
|
|
109
|
+
}
|
|
110
|
+
async querySparql(uuid, query) {
|
|
111
|
+
const result = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.querySparql', { uuid, engine: 'sparql', query });
|
|
112
|
+
return JSON.parse(result);
|
|
159
113
|
}
|
|
160
114
|
async subscribeQuery(uuid, query) {
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
let finalResult = result;
|
|
172
|
-
let isInit = false;
|
|
173
|
-
if (finalResult.startsWith("#init#")) {
|
|
174
|
-
finalResult = finalResult.substring(6);
|
|
175
|
-
isInit = true;
|
|
176
|
-
}
|
|
177
|
-
try {
|
|
178
|
-
finalResult = JSON.parse(finalResult);
|
|
179
|
-
}
|
|
180
|
-
catch (e) {
|
|
181
|
-
console.error('Error parsing perspectiveSubscribeQuery result:', e);
|
|
182
|
-
}
|
|
183
|
-
return { subscriptionId, result: finalResult, isInit };
|
|
184
|
-
}
|
|
185
|
-
async perspectiveSubscribeSurrealQuery(uuid, query) {
|
|
186
|
-
const { perspectiveSubscribeSurrealQuery } = unwrapApolloResult(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({
|
|
187
|
-
mutation: gql `mutation perspectiveSubscribeSurrealQuery($uuid: String!, $query: String!) {
|
|
188
|
-
perspectiveSubscribeSurrealQuery(uuid: $uuid, query: $query) {
|
|
189
|
-
subscriptionId
|
|
190
|
-
result
|
|
191
|
-
}
|
|
192
|
-
}`,
|
|
193
|
-
variables: { uuid, query }
|
|
194
|
-
}));
|
|
195
|
-
const { subscriptionId, result } = perspectiveSubscribeSurrealQuery;
|
|
196
|
-
let finalResult = result;
|
|
197
|
-
let isInit = false;
|
|
198
|
-
if (finalResult.startsWith("#init#")) {
|
|
199
|
-
finalResult = finalResult.substring(6);
|
|
200
|
-
isInit = true;
|
|
201
|
-
}
|
|
202
|
-
try {
|
|
203
|
-
finalResult = JSON.parse(finalResult);
|
|
204
|
-
}
|
|
205
|
-
catch (e) {
|
|
206
|
-
console.error('Error parsing perspectiveSubscribeSurrealQuery result:', e);
|
|
207
|
-
}
|
|
208
|
-
return { subscriptionId, result: finalResult, isInit };
|
|
209
|
-
}
|
|
210
|
-
async perspectiveKeepAliveSurrealQuery(uuid, subscriptionId) {
|
|
211
|
-
const { perspectiveKeepAliveSurrealQuery } = unwrapApolloResult(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({
|
|
212
|
-
mutation: gql `mutation perspectiveKeepAliveSurrealQuery($uuid: String!, $subscriptionId: String!) {
|
|
213
|
-
perspectiveKeepAliveSurrealQuery(uuid: $uuid, subscriptionId: $subscriptionId)
|
|
214
|
-
}`,
|
|
215
|
-
variables: { uuid, subscriptionId }
|
|
216
|
-
}));
|
|
217
|
-
return perspectiveKeepAliveSurrealQuery;
|
|
218
|
-
}
|
|
219
|
-
async perspectiveDisposeSurrealQuerySubscription(uuid, subscriptionId) {
|
|
220
|
-
const { perspectiveDisposeSurrealQuerySubscription } = unwrapApolloResult(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({
|
|
221
|
-
mutation: gql `mutation perspectiveDisposeSurrealQuerySubscription($uuid: String!, $subscriptionId: String!) {
|
|
222
|
-
perspectiveDisposeSurrealQuerySubscription(uuid: $uuid, subscriptionId: $subscriptionId)
|
|
223
|
-
}`,
|
|
224
|
-
variables: { uuid, subscriptionId }
|
|
225
|
-
}));
|
|
226
|
-
return perspectiveDisposeSurrealQuerySubscription;
|
|
115
|
+
const response = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.subscribeQuery', { uuid, query });
|
|
116
|
+
const { subscriptionId, result } = response;
|
|
117
|
+
const parsed = normalizeQueryResult(result, 'Error parsing subscribeQuery result:');
|
|
118
|
+
return { subscriptionId, result: parsed };
|
|
119
|
+
}
|
|
120
|
+
async perspectiveKeepAliveQuery(uuid, subscriptionId) {
|
|
121
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.keepAliveQuery', { uuid, subscriptionId });
|
|
122
|
+
}
|
|
123
|
+
async perspectiveDisposeQuerySubscription(uuid, subscriptionId) {
|
|
124
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.disposeQuery', { uuid, subscriptionId });
|
|
227
125
|
}
|
|
228
126
|
subscribeToQueryUpdates(subscriptionId, onData) {
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}).subscribe({
|
|
239
|
-
next: (result) => {
|
|
240
|
-
if (result.data && result.data.perspectiveQuerySubscription) {
|
|
241
|
-
let finalResult = result.data.perspectiveQuerySubscription;
|
|
242
|
-
let isInit = false;
|
|
243
|
-
if (finalResult.startsWith("#init#")) {
|
|
244
|
-
finalResult = finalResult.substring(6);
|
|
245
|
-
isInit = true;
|
|
246
|
-
}
|
|
247
|
-
try {
|
|
248
|
-
finalResult = JSON.parse(finalResult);
|
|
249
|
-
if (isInit && typeof finalResult === 'object') {
|
|
250
|
-
finalResult.isInit = true;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
catch (e) {
|
|
254
|
-
console.error('Error parsing perspectiveQuerySubscription:', e);
|
|
255
|
-
}
|
|
256
|
-
onData(finalResult);
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
error: (e) => console.error('Error in query subscription:', e)
|
|
127
|
+
const unsub = __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").subscribe((data) => {
|
|
128
|
+
const event = data;
|
|
129
|
+
if (event.type !== 'query-subscription-update')
|
|
130
|
+
return;
|
|
131
|
+
const eventSubscriptionId = event.subscriptionId || event.subscription_id;
|
|
132
|
+
if (eventSubscriptionId !== subscriptionId)
|
|
133
|
+
return;
|
|
134
|
+
const parsed = normalizeQueryResult(event.result, 'Error parsing query subscription:');
|
|
135
|
+
onData(parsed);
|
|
260
136
|
});
|
|
261
|
-
|
|
137
|
+
__classPrivateFieldGet(this, _PerspectiveClient_querySubscriptionUnsubscribers, "f").set(subscriptionId, unsub);
|
|
138
|
+
return unsub;
|
|
262
139
|
}
|
|
263
140
|
async keepAliveQuery(uuid, subscriptionId) {
|
|
264
|
-
|
|
265
|
-
mutation: gql `mutation perspectiveKeepAliveQuery($uuid: String!, $subscriptionId: String!) {
|
|
266
|
-
perspectiveKeepAliveQuery(uuid: $uuid, subscriptionId: $subscriptionId)
|
|
267
|
-
}`,
|
|
268
|
-
variables: { uuid, subscriptionId }
|
|
269
|
-
}));
|
|
270
|
-
return perspectiveKeepAliveQuery;
|
|
141
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.keepAliveQuery', { uuid, subscriptionId });
|
|
271
142
|
}
|
|
272
143
|
async disposeQuerySubscription(uuid, subscriptionId) {
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
})
|
|
279
|
-
|
|
144
|
+
const unsub = __classPrivateFieldGet(this, _PerspectiveClient_querySubscriptionUnsubscribers, "f").get(subscriptionId);
|
|
145
|
+
if (unsub) {
|
|
146
|
+
unsub();
|
|
147
|
+
__classPrivateFieldGet(this, _PerspectiveClient_querySubscriptionUnsubscribers, "f").delete(subscriptionId);
|
|
148
|
+
}
|
|
149
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.disposeQuery', { uuid, subscriptionId });
|
|
150
|
+
}
|
|
151
|
+
async modelQuery(uuid, className, queryJson) {
|
|
152
|
+
const resultJson = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.modelQuery', { uuid, class_name: className, query_json: queryJson });
|
|
153
|
+
return JSON.parse(resultJson);
|
|
154
|
+
}
|
|
155
|
+
async evaluateGetters(uuid, className, instanceIds, propertyNames) {
|
|
156
|
+
const resultJson = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.evaluateGetters', {
|
|
157
|
+
uuid,
|
|
158
|
+
class_name: className,
|
|
159
|
+
instance_ids: instanceIds,
|
|
160
|
+
...(propertyNames && { property_names: propertyNames }),
|
|
161
|
+
});
|
|
162
|
+
return JSON.parse(resultJson);
|
|
163
|
+
}
|
|
164
|
+
async modelSubscribe(uuid, className, queryJson) {
|
|
165
|
+
const response = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.modelSubscribe', { uuid, class_name: className, query_json: queryJson });
|
|
166
|
+
return {
|
|
167
|
+
subscriptionId: response.subscription_id,
|
|
168
|
+
result: JSON.parse(response.result)
|
|
169
|
+
};
|
|
280
170
|
}
|
|
281
171
|
async add(name) {
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
perspectiveAdd(name: $name) {
|
|
285
|
-
${PERSPECTIVE_HANDLE_FIELDS}
|
|
286
|
-
}
|
|
287
|
-
}`,
|
|
288
|
-
variables: { name }
|
|
289
|
-
}));
|
|
290
|
-
return new PerspectiveProxy(perspectiveAdd, this);
|
|
172
|
+
const handle = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.create', { name });
|
|
173
|
+
return new PerspectiveProxy(handle, this);
|
|
291
174
|
}
|
|
292
175
|
async update(uuid, name) {
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
perspectiveUpdate(uuid: $uuid, name: $name) {
|
|
296
|
-
${PERSPECTIVE_HANDLE_FIELDS}
|
|
297
|
-
}
|
|
298
|
-
}`,
|
|
299
|
-
variables: { uuid, name }
|
|
300
|
-
}));
|
|
301
|
-
return new PerspectiveProxy(perspectiveUpdate, this);
|
|
176
|
+
const handle = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.update', { uuid, name });
|
|
177
|
+
return new PerspectiveProxy(handle, this);
|
|
302
178
|
}
|
|
303
179
|
async remove(uuid) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
perspectiveRemove(uuid: $uuid)
|
|
307
|
-
}`,
|
|
308
|
-
variables: { uuid }
|
|
309
|
-
}));
|
|
180
|
+
const result = await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.remove', { uuid });
|
|
181
|
+
return { perspectiveRemove: result };
|
|
310
182
|
}
|
|
311
183
|
async addLink(uuid, link, status = 'shared', batchId) {
|
|
312
|
-
|
|
313
|
-
mutation: gql `mutation perspectiveAddLink($uuid: String!, $link: LinkInput!, $status: String!, $batchId: String) {
|
|
314
|
-
perspectiveAddLink(uuid: $uuid, link: $link, status: $status, batchId: $batchId) {
|
|
315
|
-
${LINK_EXPRESSION_FIELDS}
|
|
316
|
-
}
|
|
317
|
-
}`,
|
|
318
|
-
variables: { uuid, link, status, batchId }
|
|
319
|
-
}));
|
|
320
|
-
return perspectiveAddLink;
|
|
184
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.addLink', { uuid, link, status, batchId });
|
|
321
185
|
}
|
|
322
186
|
async addLinks(uuid, links, status = 'shared', batchId) {
|
|
323
|
-
|
|
324
|
-
mutation: gql `mutation perspectiveAddLinks($uuid: String!, $links: [LinkInput!]!, $status: String!, $batchId: String) {
|
|
325
|
-
perspectiveAddLinks(uuid: $uuid, links: $links, status: $status, batchId: $batchId) {
|
|
326
|
-
${LINK_EXPRESSION_FIELDS}
|
|
327
|
-
}
|
|
328
|
-
}`,
|
|
329
|
-
variables: { uuid, links, status, batchId }
|
|
330
|
-
}));
|
|
331
|
-
return perspectiveAddLinks;
|
|
187
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.addLinks', { uuid, links, status, batchId });
|
|
332
188
|
}
|
|
333
189
|
async removeLinks(uuid, links, batchId) {
|
|
334
|
-
|
|
335
|
-
mutation: gql `mutation perspectiveRemoveLinks($uuid: String!, $links: [LinkExpressionInput!]!, $batchId: String) {
|
|
336
|
-
perspectiveRemoveLinks(uuid: $uuid, links: $links, batchId: $batchId) {
|
|
337
|
-
${LINK_EXPRESSION_FIELDS}
|
|
338
|
-
}
|
|
339
|
-
}`,
|
|
340
|
-
variables: { uuid, links, batchId }
|
|
341
|
-
}));
|
|
342
|
-
return perspectiveRemoveLinks;
|
|
190
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.removeLinks', { uuid, links, batchId });
|
|
343
191
|
}
|
|
344
192
|
async linkMutations(uuid, mutations, status) {
|
|
345
|
-
|
|
346
|
-
mutation: gql `mutation perspectiveLinkMutations($uuid: String!, $mutations: LinkMutations!, $status: String){
|
|
347
|
-
perspectiveLinkMutations(mutations: $mutations, uuid: $uuid, status: $status) {
|
|
348
|
-
additions {
|
|
349
|
-
${LINK_EXPRESSION_FIELDS}
|
|
350
|
-
}
|
|
351
|
-
removals {
|
|
352
|
-
${LINK_EXPRESSION_FIELDS}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}`,
|
|
356
|
-
variables: { uuid, mutations, status }
|
|
357
|
-
}));
|
|
358
|
-
return perspectiveLinkMutations;
|
|
193
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.linkMutations', { uuid, mutations, status });
|
|
359
194
|
}
|
|
360
195
|
async addLinkExpression(uuid, link, status = 'shared', batchId) {
|
|
361
|
-
|
|
362
|
-
mutation: gql `mutation perspectiveAddLinkExpression($uuid: String!, $link: LinkExpressionInput!, $status: String!, $batchId: String) {
|
|
363
|
-
perspectiveAddLinkExpression(uuid: $uuid, link: $link, status: $status, batchId: $batchId) {
|
|
364
|
-
${LINK_EXPRESSION_FIELDS}
|
|
365
|
-
}
|
|
366
|
-
}`,
|
|
367
|
-
variables: { uuid, link, status, batchId }
|
|
368
|
-
}));
|
|
369
|
-
return perspectiveAddLinkExpression;
|
|
196
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.addLinkExpression', { uuid, link, status, batchId });
|
|
370
197
|
}
|
|
371
198
|
async updateLink(uuid, oldLink, newLink, batchId) {
|
|
372
|
-
|
|
373
|
-
mutation: gql `mutation perspectiveUpdateLink($uuid: String!, $oldLink: LinkExpressionInput!, $newLink: LinkInput!, $batchId: String) {
|
|
374
|
-
perspectiveUpdateLink(uuid: $uuid, oldLink: $oldLink, newLink: $newLink, batchId: $batchId) {
|
|
375
|
-
${LINK_EXPRESSION_FIELDS}
|
|
376
|
-
}
|
|
377
|
-
}`,
|
|
378
|
-
variables: { uuid, oldLink, newLink, batchId }
|
|
379
|
-
}));
|
|
380
|
-
return perspectiveUpdateLink;
|
|
199
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.updateLink', { uuid, oldLink, newLink, batchId });
|
|
381
200
|
}
|
|
382
201
|
async removeLink(uuid, link, batchId) {
|
|
383
202
|
delete link.__typename;
|
|
384
203
|
delete link.data.__typename;
|
|
385
204
|
delete link.proof.__typename;
|
|
386
205
|
delete link.status;
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
perspectiveRemoveLink(link: $link, uuid: $uuid, batchId: $batchId)
|
|
390
|
-
}`,
|
|
391
|
-
variables: { uuid, link, batchId }
|
|
392
|
-
}));
|
|
393
|
-
return perspectiveRemoveLink;
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
* Adds Social DNA code to a perspective.
|
|
397
|
-
*
|
|
398
|
-
* Preferred usage: pass shaclJson (from SHACLShape.toJSON()) as the primary schema definition.
|
|
399
|
-
* The sdnaCode parameter is kept for backward compatibility but SHACL is the source of truth
|
|
400
|
-
* for all SDNA operations. Prolog engines remain available for complex queries.
|
|
401
|
-
*
|
|
402
|
-
* @param sdnaCode - Legacy Prolog code (pass empty string when using shaclJson)
|
|
403
|
-
* @param shaclJson - SHACL JSON string from SHACLShape.toJSON() (recommended)
|
|
404
|
-
*/
|
|
206
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.removeLink', { uuid, link, batchId });
|
|
207
|
+
}
|
|
405
208
|
async addSdna(uuid, name, sdnaCode, sdnaType, shaclJson) {
|
|
406
|
-
return
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
variables: { uuid, name, sdnaCode: sdnaCode || "", sdnaType, shaclJson }
|
|
411
|
-
})).perspectiveAddSdna;
|
|
209
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.addSdna', { uuid, name, sdnaCode: sdnaCode || "", sdnaType, shaclJson });
|
|
210
|
+
}
|
|
211
|
+
async addSdnaBatch(uuid, entries) {
|
|
212
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.addSdna', { uuid, entries: entries.map(e => ({ ...e, sdnaCode: e.sdnaCode || "" })) });
|
|
412
213
|
}
|
|
413
214
|
async executeCommands(uuid, commands, expression, parameters, batchId) {
|
|
414
|
-
return
|
|
415
|
-
mutation: gql `mutation perspectiveExecuteCommands($uuid: String!, $commands: String!, $expression: String!, $parameters: String, $batchId: String) {
|
|
416
|
-
perspectiveExecuteCommands(uuid: $uuid, commands: $commands, expression: $expression, parameters: $parameters, batchId: $batchId)
|
|
417
|
-
}`,
|
|
418
|
-
variables: { uuid, commands, expression, parameters, batchId }
|
|
419
|
-
})).perspectiveExecuteCommands;
|
|
215
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.executeCommands', { uuid, commands, expression, parameters, batchId });
|
|
420
216
|
}
|
|
421
217
|
async createSubject(uuid, subjectClass, expressionAddress, initialValues, batchId) {
|
|
422
|
-
return
|
|
423
|
-
mutation: gql `mutation perspectiveCreateSubject($uuid: String!, $subjectClass: String!, $expressionAddress: String!, $initialValues: String, $batchId: String) {
|
|
424
|
-
perspectiveCreateSubject(uuid: $uuid, subjectClass: $subjectClass, expressionAddress: $expressionAddress, initialValues: $initialValues, batchId: $batchId)
|
|
425
|
-
}`,
|
|
426
|
-
variables: { uuid, subjectClass, expressionAddress, initialValues, batchId }
|
|
427
|
-
})).perspectiveCreateSubject;
|
|
218
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.createSubject', { uuid, subjectClass, expressionAddress, initialValues, batchId });
|
|
428
219
|
}
|
|
429
220
|
async getSubjectData(uuid, subjectClass, expressionAddress) {
|
|
430
|
-
return
|
|
431
|
-
mutation: gql `mutation perspectiveGetSubjectData($uuid: String!, $subjectClass: String!, $expressionAddress: String!) {
|
|
432
|
-
perspectiveGetSubjectData(uuid: $uuid, subjectClass: $subjectClass, expressionAddress: $expressionAddress)
|
|
433
|
-
}`,
|
|
434
|
-
variables: { uuid, subjectClass, expressionAddress }
|
|
435
|
-
})).perspectiveGetSubjectData;
|
|
221
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.getSubjectData', { uuid, subjectClass, expressionAddress });
|
|
436
222
|
}
|
|
437
223
|
// ExpressionClient functions, needed for Subjects:
|
|
438
224
|
async getExpression(expressionURI) {
|
|
@@ -446,166 +232,114 @@ export class PerspectiveClient {
|
|
|
446
232
|
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveAddedCallbacks, "f").push(cb);
|
|
447
233
|
}
|
|
448
234
|
subscribePerspectiveAdded() {
|
|
449
|
-
__classPrivateFieldGet(this,
|
|
450
|
-
|
|
451
|
-
|
|
235
|
+
const unsub = __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").subscribe((data) => {
|
|
236
|
+
if (data.type === 'perspective-added') {
|
|
237
|
+
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveAddedCallbacks, "f").forEach(cb => cb(data.perspective));
|
|
452
238
|
}
|
|
453
|
-
`
|
|
454
|
-
}).subscribe({
|
|
455
|
-
next: result => {
|
|
456
|
-
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveAddedCallbacks, "f").forEach(cb => {
|
|
457
|
-
cb(result.data.perspectiveAdded);
|
|
458
|
-
});
|
|
459
|
-
},
|
|
460
|
-
error: (e) => console.error(e)
|
|
461
239
|
});
|
|
240
|
+
__classPrivateFieldGet(this, _PerspectiveClient_unsubscribers, "f").push(unsub);
|
|
462
241
|
}
|
|
463
242
|
addPerspectiveUpdatedListener(cb) {
|
|
464
243
|
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveUpdatedCallbacks, "f").push(cb);
|
|
465
244
|
}
|
|
466
245
|
subscribePerspectiveUpdated() {
|
|
467
|
-
__classPrivateFieldGet(this,
|
|
468
|
-
|
|
469
|
-
|
|
246
|
+
const unsub = __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").subscribe((data) => {
|
|
247
|
+
if (data.type === 'perspective-updated') {
|
|
248
|
+
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveUpdatedCallbacks, "f").forEach(cb => cb(data.perspective));
|
|
470
249
|
}
|
|
471
|
-
`
|
|
472
|
-
}).subscribe({
|
|
473
|
-
next: result => {
|
|
474
|
-
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveUpdatedCallbacks, "f").forEach(cb => {
|
|
475
|
-
cb(result.data.perspectiveUpdated);
|
|
476
|
-
});
|
|
477
|
-
},
|
|
478
|
-
error: (e) => console.error(e)
|
|
479
250
|
});
|
|
251
|
+
__classPrivateFieldGet(this, _PerspectiveClient_unsubscribers, "f").push(unsub);
|
|
480
252
|
}
|
|
481
253
|
addPerspectiveSyncedListener(cb) {
|
|
482
254
|
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveSyncStateChangeCallbacks, "f").push(cb);
|
|
483
255
|
}
|
|
484
256
|
async addPerspectiveSyncStateChangeListener(uuid, cb) {
|
|
485
|
-
__classPrivateFieldGet(this,
|
|
486
|
-
|
|
487
|
-
|
|
257
|
+
const unsub = __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").subscribe((data) => {
|
|
258
|
+
if (data.type === 'sync-state-change' && data.uuid === uuid) {
|
|
259
|
+
cb.forEach(c => c(data.state));
|
|
488
260
|
}
|
|
489
|
-
`
|
|
490
|
-
}).subscribe({
|
|
491
|
-
next: result => {
|
|
492
|
-
cb.forEach(c => {
|
|
493
|
-
c(result.data.perspectiveSyncStateChange);
|
|
494
|
-
});
|
|
495
|
-
},
|
|
496
|
-
error: (e) => console.error(e)
|
|
497
261
|
});
|
|
262
|
+
__classPrivateFieldGet(this, _PerspectiveClient_unsubscribers, "f").push(unsub);
|
|
498
263
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
499
264
|
}
|
|
500
265
|
addPerspectiveRemovedListener(cb) {
|
|
501
266
|
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveRemovedCallbacks, "f").push(cb);
|
|
502
267
|
}
|
|
503
268
|
subscribePerspectiveRemoved() {
|
|
504
|
-
__classPrivateFieldGet(this,
|
|
505
|
-
|
|
506
|
-
|
|
269
|
+
const unsub = __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").subscribe((data) => {
|
|
270
|
+
if (data.type === 'perspective-removed') {
|
|
271
|
+
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveRemovedCallbacks, "f").forEach(cb => cb(data.uuid));
|
|
507
272
|
}
|
|
508
|
-
`
|
|
509
|
-
}).subscribe({
|
|
510
|
-
next: result => {
|
|
511
|
-
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveRemovedCallbacks, "f").forEach(cb => {
|
|
512
|
-
cb(result.data.perspectiveRemoved);
|
|
513
|
-
});
|
|
514
|
-
},
|
|
515
|
-
error: (e) => console.error(e)
|
|
516
273
|
});
|
|
274
|
+
__classPrivateFieldGet(this, _PerspectiveClient_unsubscribers, "f").push(unsub);
|
|
517
275
|
}
|
|
518
276
|
async addPerspectiveLinkAddedListener(uuid, cb) {
|
|
519
|
-
__classPrivateFieldGet(this,
|
|
520
|
-
|
|
521
|
-
|
|
277
|
+
const unsub = __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").subscribe((data) => {
|
|
278
|
+
if (data.type === 'link-added' && data.perspectiveUuid === uuid) {
|
|
279
|
+
cb.forEach(c => c(data.link));
|
|
522
280
|
}
|
|
523
|
-
`
|
|
524
|
-
}).subscribe({
|
|
525
|
-
next: result => {
|
|
526
|
-
cb.forEach(c => {
|
|
527
|
-
c(result.data.perspectiveLinkAdded);
|
|
528
|
-
});
|
|
529
|
-
},
|
|
530
|
-
error: (e) => console.error(e)
|
|
531
281
|
});
|
|
532
|
-
|
|
282
|
+
let existing = __classPrivateFieldGet(this, _PerspectiveClient_linkUnsubscribers, "f").get(uuid) || [];
|
|
283
|
+
existing.push(unsub);
|
|
284
|
+
__classPrivateFieldGet(this, _PerspectiveClient_linkUnsubscribers, "f").set(uuid, existing);
|
|
285
|
+
await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").waitForSubscription();
|
|
533
286
|
}
|
|
534
287
|
async addPerspectiveLinkRemovedListener(uuid, cb) {
|
|
535
|
-
__classPrivateFieldGet(this,
|
|
536
|
-
|
|
537
|
-
|
|
288
|
+
const unsub = __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").subscribe((data) => {
|
|
289
|
+
if (data.type === 'link-removed' && data.perspectiveUuid === uuid) {
|
|
290
|
+
const link = data.link;
|
|
291
|
+
if (!link.status) {
|
|
292
|
+
delete link.status;
|
|
293
|
+
}
|
|
294
|
+
cb.forEach(c => c(link));
|
|
538
295
|
}
|
|
539
|
-
`
|
|
540
|
-
}).subscribe({
|
|
541
|
-
next: result => {
|
|
542
|
-
cb.forEach(c => {
|
|
543
|
-
if (!result.data.perspectiveLinkRemoved.status) {
|
|
544
|
-
delete result.data.perspectiveLinkRemoved.status;
|
|
545
|
-
}
|
|
546
|
-
c(result.data.perspectiveLinkRemoved);
|
|
547
|
-
});
|
|
548
|
-
},
|
|
549
|
-
error: (e) => console.error(e)
|
|
550
296
|
});
|
|
551
|
-
|
|
297
|
+
let existing = __classPrivateFieldGet(this, _PerspectiveClient_linkUnsubscribers, "f").get(uuid) || [];
|
|
298
|
+
existing.push(unsub);
|
|
299
|
+
__classPrivateFieldGet(this, _PerspectiveClient_linkUnsubscribers, "f").set(uuid, existing);
|
|
300
|
+
await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").waitForSubscription();
|
|
552
301
|
}
|
|
553
302
|
async addPerspectiveLinkUpdatedListener(uuid, cb) {
|
|
554
|
-
__classPrivateFieldGet(this,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
newLink {
|
|
561
|
-
${LINK_EXPRESSION_FIELDS}
|
|
562
|
-
}
|
|
303
|
+
const unsub = __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").subscribe((data) => {
|
|
304
|
+
if (data.type === 'link-updated' && data.perspectiveUuid === uuid) {
|
|
305
|
+
const newLink = data.newLink;
|
|
306
|
+
const oldLink = data.oldLink;
|
|
307
|
+
if (!newLink.status) {
|
|
308
|
+
delete newLink.status;
|
|
563
309
|
}
|
|
310
|
+
if (!oldLink.status) {
|
|
311
|
+
delete oldLink.status;
|
|
312
|
+
}
|
|
313
|
+
cb.forEach(c => c(data));
|
|
564
314
|
}
|
|
565
|
-
`
|
|
566
|
-
}).subscribe({
|
|
567
|
-
next: result => {
|
|
568
|
-
cb.forEach(c => {
|
|
569
|
-
if (!result.data.perspectiveLinkUpdated.newLink.status) {
|
|
570
|
-
delete result.data.perspectiveLinkUpdated.newLink.status;
|
|
571
|
-
}
|
|
572
|
-
if (!result.data.perspectiveLinkUpdated.oldLink.status) {
|
|
573
|
-
delete result.data.perspectiveLinkUpdated.oldLink.status;
|
|
574
|
-
}
|
|
575
|
-
c(result.data.perspectiveLinkUpdated);
|
|
576
|
-
});
|
|
577
|
-
},
|
|
578
|
-
error: (e) => console.error(e)
|
|
579
315
|
});
|
|
580
|
-
|
|
316
|
+
let existing = __classPrivateFieldGet(this, _PerspectiveClient_linkUnsubscribers, "f").get(uuid) || [];
|
|
317
|
+
existing.push(unsub);
|
|
318
|
+
__classPrivateFieldGet(this, _PerspectiveClient_linkUnsubscribers, "f").set(uuid, existing);
|
|
319
|
+
await __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").waitForSubscription();
|
|
320
|
+
}
|
|
321
|
+
/** Unsubscribe all link/sync-state listeners registered for the given perspective UUID.
|
|
322
|
+
* Called by PerspectiveProxy.dispose() to prevent subscription leaks. */
|
|
323
|
+
removeAllListeners(uuid) {
|
|
324
|
+
const unsubs = __classPrivateFieldGet(this, _PerspectiveClient_linkUnsubscribers, "f").get(uuid);
|
|
325
|
+
if (unsubs) {
|
|
326
|
+
for (const fn of unsubs) {
|
|
327
|
+
try {
|
|
328
|
+
fn();
|
|
329
|
+
}
|
|
330
|
+
catch { }
|
|
331
|
+
}
|
|
332
|
+
__classPrivateFieldGet(this, _PerspectiveClient_linkUnsubscribers, "f").delete(uuid);
|
|
333
|
+
}
|
|
581
334
|
}
|
|
582
335
|
getNeighbourhoodProxy(uuid) {
|
|
583
336
|
return new NeighbourhoodProxy(__classPrivateFieldGet(this, _PerspectiveClient_neighbourhoodClient, "f"), uuid);
|
|
584
337
|
}
|
|
585
338
|
async createBatch(uuid) {
|
|
586
|
-
|
|
587
|
-
mutation: gql `mutation perspectiveCreateBatch($uuid: String!) {
|
|
588
|
-
perspectiveCreateBatch(uuid: $uuid)
|
|
589
|
-
}`,
|
|
590
|
-
variables: { uuid }
|
|
591
|
-
}));
|
|
592
|
-
return perspectiveCreateBatch;
|
|
339
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.createBatch', { uuid });
|
|
593
340
|
}
|
|
594
341
|
async commitBatch(uuid, batchId) {
|
|
595
|
-
|
|
596
|
-
mutation: gql `mutation perspectiveCommitBatch($uuid: String!, $batchId: String!) {
|
|
597
|
-
perspectiveCommitBatch(uuid: $uuid, batchId: $batchId) {
|
|
598
|
-
additions {
|
|
599
|
-
${LINK_EXPRESSION_FIELDS}
|
|
600
|
-
}
|
|
601
|
-
removals {
|
|
602
|
-
${LINK_EXPRESSION_FIELDS}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
}`,
|
|
606
|
-
variables: { uuid, batchId }
|
|
607
|
-
}));
|
|
608
|
-
return perspectiveCommitBatch;
|
|
342
|
+
return __classPrivateFieldGet(this, _PerspectiveClient_apiClient, "f").call('perspective.commitBatch', { uuid, batchId });
|
|
609
343
|
}
|
|
610
344
|
}
|
|
611
|
-
|
|
345
|
+
_PerspectiveClient_apiClient = new WeakMap(), _PerspectiveClient_perspectiveAddedCallbacks = new WeakMap(), _PerspectiveClient_perspectiveUpdatedCallbacks = new WeakMap(), _PerspectiveClient_perspectiveRemovedCallbacks = new WeakMap(), _PerspectiveClient_perspectiveSyncStateChangeCallbacks = new WeakMap(), _PerspectiveClient_expressionClient = new WeakMap(), _PerspectiveClient_neighbourhoodClient = new WeakMap(), _PerspectiveClient_aiClient = new WeakMap(), _PerspectiveClient_unsubscribers = new WeakMap(), _PerspectiveClient_linkUnsubscribers = new WeakMap(), _PerspectiveClient_querySubscriptionUnsubscribers = new WeakMap();
|