@coasys/ad4m 0.13.1-staging.1 → 0.13.1-staging.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/lib/index.cjs +4199 -1221
- package/lib/index.js +4189 -1222
- package/lib/src/Ad4mClient.d.ts +7 -0
- package/lib/src/Ad4mClient.js +9 -0
- package/lib/src/apiClient.d.ts +13 -0
- package/lib/src/apiClient.js +67 -12
- package/lib/src/generated/api/AgentsByDidsRequest.d.ts +3 -0
- package/lib/src/generated/api/AuthInfo.d.ts +4 -0
- package/lib/src/generated/api/CallSessionInfo.d.ts +23 -0
- package/lib/src/generated/api/DiscardBatchRequest.d.ts +3 -0
- package/lib/src/generated/api/Events.d.ts +13 -3
- package/lib/src/generated/api/Events.js +1 -0
- package/lib/src/generated/api/FlowStateChangedEvent.d.ts +38 -0
- package/lib/src/generated/api/FlowStateEntry.d.ts +18 -0
- package/lib/src/generated/api/FlowStateEntry.js +2 -0
- package/lib/src/generated/api/IceServer.d.ts +18 -0
- package/lib/src/generated/api/IceServer.js +2 -0
- package/lib/src/generated/api/OnlineAgent.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveDiscardBatchParams.d.ts +4 -0
- package/lib/src/generated/api/PerspectiveDiscardBatchParams.js +2 -0
- package/lib/src/generated/api/PerspectiveFlowFiredParams.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveFlowFiredParams.js +2 -0
- package/lib/src/generated/api/PerspectiveFlowStatesParams.d.ts +11 -0
- package/lib/src/generated/api/PerspectiveFlowStatesParams.js +2 -0
- package/lib/src/generated/api/PerspectiveGetAllShaclParams.d.ts +7 -0
- package/lib/src/generated/api/PerspectiveGetAllShaclParams.js +2 -0
- package/lib/src/generated/api/PerspectiveModelQueryParams.d.ts +6 -1
- package/lib/src/generated/api/PerspectiveRemoveSubjectParams.d.ts +6 -0
- package/lib/src/generated/api/PerspectiveRemoveSubjectParams.js +2 -0
- package/lib/src/generated/api/PerspectiveResynced.d.ts +8 -0
- package/lib/src/generated/api/PerspectiveResynced.js +2 -0
- package/lib/src/generated/api/PerspectiveSubscribed.d.ts +10 -0
- package/lib/src/generated/api/PerspectiveSubscribed.js +2 -0
- package/lib/src/generated/api/PerspectiveUpdateSubjectParams.d.ts +10 -0
- package/lib/src/generated/api/PerspectiveUpdateSubjectParams.js +2 -0
- package/lib/src/generated/api/QuerySubscriptionUpdate.d.ts +19 -0
- package/lib/src/generated/api/QuerySubscriptionUpdate.js +2 -0
- package/lib/src/generated/api/QuerySubscriptionUpdateEvent.d.ts +7 -0
- package/lib/src/generated/api/QuerySubscriptionUpdateEvent.js +1 -0
- package/lib/src/generated/api/QueryUpdatesLagged.d.ts +7 -0
- package/lib/src/generated/api/QueryUpdatesLagged.js +2 -0
- package/lib/src/generated/api/RemoveSubjectRequest.d.ts +9 -0
- package/lib/src/generated/api/RemoveSubjectRequest.js +2 -0
- package/lib/src/generated/api/ResyncSubscriptionRequest.d.ts +3 -0
- package/lib/src/generated/api/ResyncSubscriptionRequest.js +2 -0
- package/lib/src/generated/api/RpcMethods.d.ts +134 -14
- package/lib/src/generated/api/RpcMethods.js +12 -0
- package/lib/src/generated/api/RuntimeInfo.d.ts +5 -0
- package/lib/src/generated/api/SfuAddIceCandidateParams.d.ts +8 -0
- package/lib/src/generated/api/SfuAddIceCandidateParams.js +2 -0
- package/lib/src/generated/api/SfuAnswerServerOfferParams.d.ts +8 -0
- package/lib/src/generated/api/SfuAnswerServerOfferParams.js +2 -0
- package/lib/src/generated/api/SfuCallJoinParams.d.ts +14 -0
- package/lib/src/generated/api/SfuCallJoinParams.js +2 -0
- package/lib/src/generated/api/SfuCallRenegotiationOffer.d.ts +30 -0
- package/lib/src/generated/api/SfuCallRenegotiationOffer.js +1 -0
- package/lib/src/generated/api/SfuCascadePipe.d.ts +4 -0
- package/lib/src/generated/api/SfuCascadePipe.js +2 -0
- package/lib/src/generated/api/SfuCascadeStatus.d.ts +8 -0
- package/lib/src/generated/api/SfuCascadeStatus.js +1 -0
- package/lib/src/generated/api/SfuConfig.d.ts +52 -0
- package/lib/src/generated/api/SfuConfig.js +1 -0
- package/lib/src/generated/api/SfuDataMessage.d.ts +24 -0
- package/lib/src/generated/api/SfuDataMessage.js +2 -0
- package/lib/src/generated/api/SfuEnsureMembershipParams.d.ts +4 -0
- package/lib/src/generated/api/SfuEnsureMembershipParams.js +2 -0
- package/lib/src/generated/api/SfuMigrateEvent.d.ts +21 -0
- package/lib/src/generated/api/SfuMigrateEvent.js +2 -0
- package/lib/src/generated/api/SfuNeighbourhoodParams.d.ts +3 -0
- package/lib/src/generated/api/SfuNeighbourhoodParams.js +2 -0
- package/lib/src/generated/api/SfuParticipantQualityPreference.d.ts +7 -0
- package/lib/src/generated/api/SfuParticipantQualityPreference.js +2 -0
- package/lib/src/generated/api/SfuPerspectiveParams.d.ts +6 -0
- package/lib/src/generated/api/SfuPerspectiveParams.js +2 -0
- package/lib/src/generated/api/SfuQualityPreferenceParams.d.ts +8 -0
- package/lib/src/generated/api/SfuQualityPreferenceParams.js +2 -0
- package/lib/src/generated/api/SfuRoomInfo.d.ts +11 -0
- package/lib/src/generated/api/SfuRoomInfo.js +1 -0
- package/lib/src/generated/api/SfuRoomParams.d.ts +4 -0
- package/lib/src/generated/api/SfuRoomParams.js +2 -0
- package/lib/src/generated/api/SfuRoomParticipantInfo.d.ts +11 -0
- package/lib/src/generated/api/SfuRoomParticipantInfo.js +2 -0
- package/lib/src/generated/api/SfuRoomRoster.d.ts +13 -0
- package/lib/src/generated/api/SfuRoomRoster.js +2 -0
- package/lib/src/generated/api/SfuSendDataParams.d.ts +10 -0
- package/lib/src/generated/api/SfuSendDataParams.js +2 -0
- package/lib/src/generated/api/SfuSetConfigParams.d.ts +5 -0
- package/lib/src/generated/api/SfuSetConfigParams.js +1 -0
- package/lib/src/generated/api/SfuStatus.d.ts +24 -0
- package/lib/src/generated/api/SfuStatus.js +2 -0
- package/lib/src/generated/api/TrackMapEntry.d.ts +17 -0
- package/lib/src/generated/api/TrackMapEntry.js +2 -0
- package/lib/src/generated/api/UpdateSubjectRequest.d.ts +12 -0
- package/lib/src/generated/api/UpdateSubjectRequest.js +2 -0
- package/lib/src/generated/api/index.d.ts +3 -0
- package/lib/src/index.d.ts +8 -0
- package/lib/src/index.js +5 -0
- package/lib/src/model/Ad4mModel.d.ts +84 -0
- package/lib/src/model/Ad4mModel.js +279 -22
- package/lib/src/model/ModelQueryBuilder.d.ts +23 -38
- package/lib/src/model/ModelQueryBuilder.js +97 -274
- package/lib/src/model/decorators.d.ts +32 -0
- package/lib/src/model/decorators.js +40 -1
- package/lib/src/model/query-common.js +7 -1
- package/lib/src/model/shacl-gen.d.ts +3 -1
- package/lib/src/model/shacl-gen.js +13 -1
- package/lib/src/model/types.d.ts +52 -2
- package/lib/src/model/types.js +8 -0
- package/lib/src/neighbourhood/MeshManager.d.ts +384 -0
- package/lib/src/neighbourhood/MeshManager.js +1144 -0
- package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +91 -0
- package/lib/src/neighbourhood/NeighbourhoodClient.js +196 -0
- package/lib/src/neighbourhood/NeighbourhoodProxy.d.ts +55 -1
- package/lib/src/neighbourhood/NeighbourhoodProxy.js +170 -3
- package/lib/src/neighbourhood/Session.d.ts +105 -0
- package/lib/src/neighbourhood/Session.js +412 -0
- package/lib/src/neighbourhood/SfuManager.d.ts +174 -0
- package/lib/src/neighbourhood/SfuManager.js +619 -0
- package/lib/src/neighbourhood/SfuTypes.d.ts +35 -0
- package/lib/src/neighbourhood/SfuTypes.js +8 -0
- package/lib/src/perspectives/Container.d.ts +41 -0
- package/lib/src/perspectives/Container.js +62 -0
- package/lib/src/perspectives/FlowInstance.d.ts +63 -24
- package/lib/src/perspectives/FlowInstance.js +74 -31
- package/lib/src/perspectives/FlowModels.d.ts +0 -16
- package/lib/src/perspectives/FlowModels.js +8 -16
- package/lib/src/perspectives/LiveQuery.d.ts +49 -0
- package/lib/src/perspectives/LiveQuery.js +169 -0
- package/lib/src/perspectives/PerspectiveClient.d.ts +24 -15
- package/lib/src/perspectives/PerspectiveClient.js +33 -36
- package/lib/src/perspectives/PerspectiveProxy.d.ts +71 -168
- package/lib/src/perspectives/PerspectiveProxy.js +128 -476
- package/lib/src/perspectives/TextContent.d.ts +31 -0
- package/lib/src/perspectives/TextContent.js +52 -0
- package/lib/src/perspectives/WakerSubscriptionManager.d.ts +111 -6
- package/lib/src/perspectives/WakerSubscriptionManager.js +290 -48
- package/lib/src/runtime/RuntimeTypes.d.ts +2 -0
- package/lib/src/shacl/SHACLFlow.d.ts +7 -4
- package/lib/src/shacl/SHACLFlow.js +7 -4
- package/lib/src/shacl/SHACLShape.d.ts +9 -0
- package/lib/src/shacl/SHACLShape.js +37 -0
- package/package.json +2 -2
- package/pnpm-workspace.yaml +4 -1
- package/src/Ad4mClient.test.ts +90 -18
- package/src/Ad4mClient.ts +10 -0
- package/src/apiClient.test.ts +128 -2
- package/src/apiClient.ts +64 -11
- package/src/generated/api/AgentsByDidsRequest.ts +3 -0
- package/src/generated/api/AuthInfo.ts +6 -1
- package/src/generated/api/CallSessionInfo.ts +20 -0
- package/src/generated/api/DiscardBatchRequest.ts +3 -0
- package/src/generated/api/Events.ts +14 -3
- package/src/generated/api/FlowStateChangedEvent.ts +36 -0
- package/src/generated/api/FlowStateEntry.ts +18 -0
- package/src/generated/api/IceServer.ts +19 -0
- package/src/generated/api/OnlineAgent.ts +6 -1
- package/src/generated/api/PerspectiveDiscardBatchParams.ts +3 -0
- package/src/generated/api/PerspectiveFlowFiredParams.ts +7 -0
- package/src/generated/api/PerspectiveFlowStatesParams.ts +11 -0
- package/src/generated/api/PerspectiveGetAllShaclParams.ts +6 -0
- package/src/generated/api/PerspectiveModelQueryParams.ts +5 -1
- package/src/generated/api/PerspectiveRemoveSubjectParams.ts +3 -0
- package/src/generated/api/PerspectiveResynced.ts +7 -0
- package/src/generated/api/PerspectiveSubscribed.ts +8 -0
- package/src/generated/api/PerspectiveUpdateSubjectParams.ts +7 -0
- package/src/generated/api/QuerySubscriptionUpdate.ts +10 -0
- package/src/generated/api/QuerySubscriptionUpdateEvent.ts +9 -0
- package/src/generated/api/QueryUpdatesLagged.ts +7 -0
- package/src/generated/api/RemoveSubjectRequest.ts +7 -0
- package/src/generated/api/ResyncSubscriptionRequest.ts +3 -0
- package/src/generated/api/RpcMethods.ts +68 -8
- package/src/generated/api/RuntimeInfo.ts +6 -1
- package/src/generated/api/SfuAddIceCandidateParams.ts +7 -0
- package/src/generated/api/SfuAnswerServerOfferParams.ts +7 -0
- package/src/generated/api/SfuCallJoinParams.ts +13 -0
- package/src/generated/api/SfuCallRenegotiationOffer.ts +29 -0
- package/src/generated/api/SfuCascadePipe.ts +3 -0
- package/src/generated/api/SfuCascadeStatus.ts +7 -0
- package/src/generated/api/SfuConfig.ts +53 -0
- package/src/generated/api/SfuDataMessage.ts +23 -0
- package/src/generated/api/SfuEnsureMembershipParams.ts +3 -0
- package/src/generated/api/SfuMigrateEvent.ts +20 -0
- package/src/generated/api/{KeepAliveQueryRequest.ts → SfuNeighbourhoodParams.ts} +1 -1
- package/src/generated/api/SfuParticipantQualityPreference.ts +6 -0
- package/src/generated/api/{PerspectiveSubscribeQueryResult.ts → SfuPerspectiveParams.ts} +4 -1
- package/src/generated/api/SfuQualityPreferenceParams.ts +7 -0
- package/src/generated/api/SfuRoomInfo.ts +7 -0
- package/src/generated/api/SfuRoomParams.ts +3 -0
- package/src/generated/api/SfuRoomParticipantInfo.ts +8 -0
- package/src/generated/api/SfuRoomRoster.ts +12 -0
- package/src/generated/api/SfuSendDataParams.ts +7 -0
- package/src/generated/api/SfuSetConfigParams.ts +4 -0
- package/src/generated/api/SfuStatus.ts +24 -0
- package/src/generated/api/TrackMapEntry.ts +18 -0
- package/src/generated/api/UpdateSubjectRequest.ts +10 -0
- package/src/generated/api/index.ts +3 -0
- package/src/index.ts +8 -0
- package/src/model/Ad4mModel.test.ts +255 -231
- package/src/model/Ad4mModel.ts +322 -23
- package/src/model/ModelQueryBuilder.ts +112 -316
- package/src/model/abstract-classes.test.ts +225 -0
- package/src/model/containment-scope.test.ts +104 -0
- package/src/model/decorators.ts +81 -0
- package/src/model/query-common.ts +10 -1
- package/src/model/shacl-gen.ts +13 -0
- package/src/model/types.ts +63 -2
- package/src/neighbourhood/MeshManager.test.ts +2640 -0
- package/src/neighbourhood/MeshManager.ts +1350 -0
- package/src/neighbourhood/NeighbourhoodClient.ts +271 -0
- package/src/neighbourhood/NeighbourhoodProxy.test.ts +23 -0
- package/src/neighbourhood/NeighbourhoodProxy.ts +247 -1
- package/src/neighbourhood/Session.test.ts +800 -0
- package/src/neighbourhood/Session.ts +525 -0
- package/src/neighbourhood/SfuManager.test.ts +677 -0
- package/src/neighbourhood/SfuManager.ts +803 -0
- package/src/neighbourhood/SfuTypes.ts +40 -0
- package/src/perspectives/Container.test.ts +65 -0
- package/src/perspectives/Container.ts +46 -0
- package/src/perspectives/FlowInstance.ts +108 -31
- package/src/perspectives/FlowModels.ts +8 -18
- package/src/perspectives/LiveQuery.test.ts +197 -0
- package/src/perspectives/LiveQuery.ts +189 -0
- package/src/perspectives/PerspectiveClient.ts +51 -51
- package/src/perspectives/PerspectiveProxy.test.ts +93 -398
- package/src/perspectives/PerspectiveProxy.ts +133 -537
- package/src/perspectives/TextContent.test.ts +123 -0
- package/src/perspectives/TextContent.ts +36 -0
- package/src/perspectives/WakerSubscriptionManager.test.ts +421 -21
- package/src/perspectives/WakerSubscriptionManager.ts +349 -62
- package/src/runtime/RuntimeTypes.ts +2 -0
- package/src/shacl/SHACLFlow.ts +7 -4
- package/src/shacl/SHACLShape.test.ts +2 -1
- package/src/shacl/SHACLShape.ts +49 -0
- package/lib/src/generated/api/KeepAliveQueryRequest.d.ts +0 -3
- package/lib/src/generated/api/PerspectiveModelSubscribeResult.d.ts +0 -7
- package/lib/src/generated/api/PerspectiveQuerySubscriptionFilter.d.ts +0 -6
- package/lib/src/generated/api/PerspectiveSubscribeQueryResult.d.ts +0 -4
- package/src/generated/api/PerspectiveModelSubscribeResult.ts +0 -6
- package/src/generated/api/PerspectiveQuerySubscriptionFilter.ts +0 -3
- /package/lib/src/generated/api/{KeepAliveQueryRequest.js → AgentsByDidsRequest.js} +0 -0
- /package/lib/src/generated/api/{PerspectiveModelSubscribeResult.js → CallSessionInfo.js} +0 -0
- /package/lib/src/generated/api/{PerspectiveQuerySubscriptionFilter.js → DiscardBatchRequest.js} +0 -0
- /package/lib/src/generated/api/{PerspectiveSubscribeQueryResult.js → FlowStateChangedEvent.js} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who is in a call room now. Published whenever the room's participants
|
|
3
|
+
* change, and delivered to each of them, so a client knows who joined and
|
|
4
|
+
* who left without waiting on media.
|
|
5
|
+
*/
|
|
6
|
+
export type SfuRoomRoster = {
|
|
7
|
+
neighbourhoodUrl: string;
|
|
8
|
+
roomName: string;
|
|
9
|
+
/**
|
|
10
|
+
* DIDs of the room's participants on this node, sorted.
|
|
11
|
+
*/
|
|
12
|
+
participants: Array<string>;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `sfu.status`: whether this executor can relay media to remote
|
|
3
|
+
* participants.
|
|
4
|
+
*/
|
|
5
|
+
export type SfuStatus = {
|
|
6
|
+
reachability: "public" | "nat" | "unknown";
|
|
7
|
+
/**
|
|
8
|
+
* True when the SFU accepts inbound connections from the internet.
|
|
9
|
+
*/
|
|
10
|
+
isPublic: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The SFU server's bound UDP address (`ip:port`).
|
|
13
|
+
*/
|
|
14
|
+
bindAddress: string;
|
|
15
|
+
/**
|
|
16
|
+
* The public address (`ip:port`) offered next to the bind address
|
|
17
|
+
* behind NAT, when there is one.
|
|
18
|
+
*/
|
|
19
|
+
advertisedAddress?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Human-readable reachability detail.
|
|
22
|
+
*/
|
|
23
|
+
detail: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps one outbound SDP m-line to the originating participant's DID.
|
|
3
|
+
*/
|
|
4
|
+
export type TrackMapEntry = {
|
|
5
|
+
/**
|
|
6
|
+
* The SDP mid (media-line identifier) in the offer.
|
|
7
|
+
*/
|
|
8
|
+
mid: string;
|
|
9
|
+
/**
|
|
10
|
+
* DID of the participant whose media this m-line carries.
|
|
11
|
+
*/
|
|
12
|
+
agentDid: string;
|
|
13
|
+
/**
|
|
14
|
+
* `"audio"` or `"video"`.
|
|
15
|
+
*/
|
|
16
|
+
mediaKind: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Through an abstract class (#1435), dispatched to the record's own classes.
|
|
3
|
+
*/
|
|
4
|
+
export type UpdateSubjectRequest = {
|
|
5
|
+
subjectClass: string;
|
|
6
|
+
expressionAddress: string;
|
|
7
|
+
/**
|
|
8
|
+
* A JSON object: property name → value.
|
|
9
|
+
*/
|
|
10
|
+
values: string;
|
|
11
|
+
batchId?: string;
|
|
12
|
+
};
|
|
@@ -2,11 +2,13 @@ export type { AddLinkExpressionRequest } from "./AddLinkExpressionRequest";
|
|
|
2
2
|
export type { AddLinkRequest } from "./AddLinkRequest";
|
|
3
3
|
export type { AddLinksBulkRequest } from "./AddLinksBulkRequest";
|
|
4
4
|
export type { AddSdnaRequest } from "./AddSdnaRequest";
|
|
5
|
+
export type { AgentsByDidsRequest } from "./AgentsByDidsRequest";
|
|
5
6
|
export type { ApplyTemplateRequest } from "./ApplyTemplateRequest";
|
|
6
7
|
export type { CommitBatchRequest } from "./CommitBatchRequest";
|
|
7
8
|
export type { CreateExpressionRequest } from "./CreateExpressionRequest";
|
|
8
9
|
export type { CreatePerspectiveRequest } from "./CreatePerspectiveRequest";
|
|
9
10
|
export type { CreateSubjectRequest } from "./CreateSubjectRequest";
|
|
11
|
+
export type { DiscardBatchRequest } from "./DiscardBatchRequest";
|
|
10
12
|
export type { EmbedRequest } from "./EmbedRequest";
|
|
11
13
|
export type { ExecuteCommandsRequest } from "./ExecuteCommandsRequest";
|
|
12
14
|
export type { ExportRequest } from "./ExportRequest";
|
|
@@ -30,6 +32,7 @@ export type { PublishNeighbourhoodRequest } from "./PublishNeighbourhoodRequest"
|
|
|
30
32
|
export type { QueryRequest } from "./QueryRequest";
|
|
31
33
|
export type { RemoveLinkRequest } from "./RemoveLinkRequest";
|
|
32
34
|
export type { RemoveLinksBulkRequest } from "./RemoveLinksBulkRequest";
|
|
35
|
+
export type { ResyncSubscriptionRequest } from "./ResyncSubscriptionRequest";
|
|
33
36
|
export type { RunInterpretationRequest } from "./RunInterpretationRequest";
|
|
34
37
|
export type { SetDefaultModelRequest } from "./SetDefaultModelRequest";
|
|
35
38
|
export type { SetFreeHostingEnabledRequest } from "./SetFreeHostingEnabledRequest";
|
package/lib/src/index.d.ts
CHANGED
|
@@ -16,9 +16,12 @@ export * from "./Literal";
|
|
|
16
16
|
export * from "./perspectives/Perspective";
|
|
17
17
|
export * from "./perspectives/PerspectiveHandle";
|
|
18
18
|
export * from "./perspectives/PerspectiveProxy";
|
|
19
|
+
export * from "./perspectives/LiveQuery";
|
|
19
20
|
export * from "./perspectives/AutoProcessor";
|
|
20
21
|
export * from "./perspectives/InterpretationModels";
|
|
21
22
|
export * from "./perspectives/FlowModels";
|
|
23
|
+
export * from "./perspectives/TextContent";
|
|
24
|
+
export * from "./perspectives/Container";
|
|
22
25
|
export * from "./perspectives/FlowInstance";
|
|
23
26
|
export * from "./perspectives/SparqlBindings";
|
|
24
27
|
export * from "./perspectives/WakerSubscriptionManager";
|
|
@@ -28,6 +31,11 @@ export * from "./SmartLiteral";
|
|
|
28
31
|
export * from "./model";
|
|
29
32
|
export * from "./neighbourhood/Neighbourhood";
|
|
30
33
|
export * from "./neighbourhood/NeighbourhoodProxy";
|
|
34
|
+
export * from "./neighbourhood/SfuTypes";
|
|
35
|
+
export type { SfuNeighbourhoodApi } from "./neighbourhood/SfuManager";
|
|
36
|
+
export type { Session, SessionTopology, SessionState, SessionEvent, SessionEventCallback, SessionCreateOptions } from "./neighbourhood/Session";
|
|
37
|
+
export { MeshManager, createTelepresenceChannel, parseCallMessage, CALL_PROTOCOL_VERSION, DEFAULT_ICE_SERVERS } from "./neighbourhood/MeshManager";
|
|
38
|
+
export type { SignallingChannel, TelepresenceProxy, MeshManagerOptions, MeshEvent, MeshEventCallback, MeshParticipant, RecoveryRung, CallBody, CallMessage, CallEnvelope, CallGenerations } from "./neighbourhood/MeshManager";
|
|
31
39
|
export * from "./typeDefs";
|
|
32
40
|
export * from "./DID";
|
|
33
41
|
export * from "./utils";
|
package/lib/src/index.js
CHANGED
|
@@ -16,9 +16,12 @@ export * from "./Literal";
|
|
|
16
16
|
export * from "./perspectives/Perspective";
|
|
17
17
|
export * from "./perspectives/PerspectiveHandle";
|
|
18
18
|
export * from "./perspectives/PerspectiveProxy";
|
|
19
|
+
export * from "./perspectives/LiveQuery";
|
|
19
20
|
export * from "./perspectives/AutoProcessor";
|
|
20
21
|
export * from "./perspectives/InterpretationModels";
|
|
21
22
|
export * from "./perspectives/FlowModels";
|
|
23
|
+
export * from "./perspectives/TextContent";
|
|
24
|
+
export * from "./perspectives/Container";
|
|
22
25
|
// Also exports FlowFireOutcome / FlowProposeResult, the result shapes of the
|
|
23
26
|
// flow write API — they live beside the `proposeTransition()` surface.
|
|
24
27
|
export * from "./perspectives/FlowInstance";
|
|
@@ -30,6 +33,8 @@ export * from "./SmartLiteral";
|
|
|
30
33
|
export * from "./model";
|
|
31
34
|
export * from "./neighbourhood/Neighbourhood";
|
|
32
35
|
export * from "./neighbourhood/NeighbourhoodProxy";
|
|
36
|
+
export * from "./neighbourhood/SfuTypes";
|
|
37
|
+
export { MeshManager, createTelepresenceChannel, parseCallMessage, CALL_PROTOCOL_VERSION, DEFAULT_ICE_SERVERS } from "./neighbourhood/MeshManager";
|
|
33
38
|
export * from "./typeDefs";
|
|
34
39
|
export * from "./DID";
|
|
35
40
|
export * from "./utils";
|
|
@@ -328,6 +328,13 @@ export declare class Ad4mModel {
|
|
|
328
328
|
* Shape resolution happens server-side from the perspective's SHACL triples.
|
|
329
329
|
* @internal
|
|
330
330
|
*/
|
|
331
|
+
/**
|
|
332
|
+
* The name the executor knows this class by: its class name, or a
|
|
333
|
+
* built-in abstract class's URI (`ad4m://TextContent`, #1446). The URI is
|
|
334
|
+
* the class's own static only: a subclass is a class of its own.
|
|
335
|
+
* @internal
|
|
336
|
+
*/
|
|
337
|
+
static queriedAs(): string;
|
|
331
338
|
static prepareModelQueryParams(query?: Query, classNameOverride?: string | null): {
|
|
332
339
|
className: string;
|
|
333
340
|
queryJson: string;
|
|
@@ -339,6 +346,68 @@ export declare class Ad4mModel {
|
|
|
339
346
|
* @internal
|
|
340
347
|
*/
|
|
341
348
|
static parseModelResult<T extends Ad4mModel>(this: typeof Ad4mModel & (new (...args: any[]) => T), perspective: PerspectiveProxy, raw: any, include?: IncludeMap, properties?: string[]): T[];
|
|
349
|
+
/**
|
|
350
|
+
* Build the wire parameters for one query over several classes.
|
|
351
|
+
*
|
|
352
|
+
* Each class normalises the query as it would for itself — its polymorphic
|
|
353
|
+
* include defaults, its `$` projections, its parent predicate — and the
|
|
354
|
+
* results are merged: includes and projections by key (the first class that
|
|
355
|
+
* declares a key decides its form; a projection two classes tag with
|
|
356
|
+
* different target classes is refused), the parent scope only when every
|
|
357
|
+
* class that can resolve it resolves it to the same predicate.
|
|
358
|
+
* @internal
|
|
359
|
+
*/
|
|
360
|
+
static prepareUnionQueryParams(classes: (typeof Ad4mModel)[], query?: Query): {
|
|
361
|
+
classNames: string[];
|
|
362
|
+
queryJson: string;
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* Build each row of a union result as the class the executor hydrated it as
|
|
366
|
+
* (`__subjectClass`). A row of a class not in `classes` stays plain JSON.
|
|
367
|
+
* @internal
|
|
368
|
+
*/
|
|
369
|
+
static parseUnionResult(classes: (typeof Ad4mModel)[], perspective: PerspectiveProxy, raw: any, include?: IncludeMap, properties?: string[]): Ad4mModel[];
|
|
370
|
+
/** @internal */
|
|
371
|
+
static executeUnionQuery(perspective: PerspectiveProxy, classes: (typeof Ad4mModel)[], query?: Query, options?: CallOptions): Promise<ResultsWithTotalCount<Ad4mModel>>;
|
|
372
|
+
/**
|
|
373
|
+
* One query over several model classes (#1238).
|
|
374
|
+
*
|
|
375
|
+
* `where`, `order`, `limit` and `offset` apply once, over the union. Each
|
|
376
|
+
* result is an instance of the class the executor hydrated it as: the first
|
|
377
|
+
* `preferClasses` entry it conforms to, otherwise the most specific of
|
|
378
|
+
* `classes` it conforms to. A record that is several of them is returned
|
|
379
|
+
* once; `__subjectClasses` on it names every class it conforms to.
|
|
380
|
+
*
|
|
381
|
+
* - `where` on a property a class does not declare excludes that class's rows.
|
|
382
|
+
* - `order` on such a property sorts those rows last, in both directions,
|
|
383
|
+
* then by id.
|
|
384
|
+
*
|
|
385
|
+
* @example
|
|
386
|
+
* ```typescript
|
|
387
|
+
* const items = await Ad4mModel.findAllOf(perspective, [Placement, EdgeRoute], {
|
|
388
|
+
* parent: { id: canvas.id, predicate: "canvas://item" },
|
|
389
|
+
* order: { zIndex: "ASC" },
|
|
390
|
+
* limit: 50,
|
|
391
|
+
* });
|
|
392
|
+
* for (const item of items) {
|
|
393
|
+
* if (item instanceof Placement) { ... }
|
|
394
|
+
* }
|
|
395
|
+
* ```
|
|
396
|
+
*/
|
|
397
|
+
static findAllOf<C extends (typeof Ad4mModel)[]>(perspective: PerspectiveProxy, classes: [...C], query?: Query, options?: CallOptions): Promise<InstanceType<C[number]>[]>;
|
|
398
|
+
/**
|
|
399
|
+
* A {@link ModelQueryBuilder} over several model classes: the builder form of
|
|
400
|
+
* {@link findAllOf}. `subscribe()` registers one subscription, which re-runs
|
|
401
|
+
* when any of the classes changes.
|
|
402
|
+
*
|
|
403
|
+
* @example
|
|
404
|
+
* ```typescript
|
|
405
|
+
* const builder = Ad4mModel.queryOf(perspective, [Placement, EdgeRoute])
|
|
406
|
+
* .parent(canvas.id, "canvas://item");
|
|
407
|
+
* await builder.subscribe((items) => render(items));
|
|
408
|
+
* ```
|
|
409
|
+
*/
|
|
410
|
+
static queryOf<C extends (typeof Ad4mModel)[]>(perspective: PerspectiveProxy, classes: [...C], query?: Query): ModelQueryBuilder<InstanceType<C[number]>>;
|
|
342
411
|
/**
|
|
343
412
|
* Execute a model query via the executor-side endpoint.
|
|
344
413
|
*
|
|
@@ -458,6 +527,11 @@ export declare class Ad4mModel {
|
|
|
458
527
|
/** Resolve a relation argument to a plain string ID. Accepts either a raw
|
|
459
528
|
* string ID or an Ad4mModel instance (in which case `.id` is used). */
|
|
460
529
|
private resolveRelationId;
|
|
530
|
+
/** A relation write on a row read through an abstract class (#1435). The
|
|
531
|
+
* relation's predicate is the abstract class's, which no record's class
|
|
532
|
+
* reads: the executor runs the adder, remover or setter of each of the
|
|
533
|
+
* record's classes for the relation answering to `key`. */
|
|
534
|
+
private relationThroughAbstract;
|
|
461
535
|
private setRelationValues;
|
|
462
536
|
private addRelationValue;
|
|
463
537
|
private removeRelationValue;
|
|
@@ -488,6 +562,16 @@ export declare class Ad4mModel {
|
|
|
488
562
|
* ```
|
|
489
563
|
*/
|
|
490
564
|
save(batchId?: string): Promise<void>;
|
|
565
|
+
/** The name the executor knows the class by when it is abstract (#1435):
|
|
566
|
+
* a built-in's URI (#1446). Through an abstract class, the executor
|
|
567
|
+
* writes to the record's own classes. */
|
|
568
|
+
private abstractName;
|
|
569
|
+
private changedValues;
|
|
570
|
+
/** `changedValues()` with each relation's members as IDs, as the relation
|
|
571
|
+
* helpers send them: a member may be a model instance. An action envelope
|
|
572
|
+
* (`{ action: "adder", value }`) keeps its action, as `innerUpdate()` runs
|
|
573
|
+
* it; an action it does not know is a setter there, so it is one here. */
|
|
574
|
+
private changedValuesForDispatch;
|
|
491
575
|
private cleanCopy;
|
|
492
576
|
private innerUpdate;
|
|
493
577
|
/**
|