@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.
Files changed (243) hide show
  1. package/lib/index.cjs +4199 -1221
  2. package/lib/index.js +4189 -1222
  3. package/lib/src/Ad4mClient.d.ts +7 -0
  4. package/lib/src/Ad4mClient.js +9 -0
  5. package/lib/src/apiClient.d.ts +13 -0
  6. package/lib/src/apiClient.js +67 -12
  7. package/lib/src/generated/api/AgentsByDidsRequest.d.ts +3 -0
  8. package/lib/src/generated/api/AuthInfo.d.ts +4 -0
  9. package/lib/src/generated/api/CallSessionInfo.d.ts +23 -0
  10. package/lib/src/generated/api/DiscardBatchRequest.d.ts +3 -0
  11. package/lib/src/generated/api/Events.d.ts +13 -3
  12. package/lib/src/generated/api/Events.js +1 -0
  13. package/lib/src/generated/api/FlowStateChangedEvent.d.ts +38 -0
  14. package/lib/src/generated/api/FlowStateEntry.d.ts +18 -0
  15. package/lib/src/generated/api/FlowStateEntry.js +2 -0
  16. package/lib/src/generated/api/IceServer.d.ts +18 -0
  17. package/lib/src/generated/api/IceServer.js +2 -0
  18. package/lib/src/generated/api/OnlineAgent.d.ts +4 -0
  19. package/lib/src/generated/api/PerspectiveDiscardBatchParams.d.ts +4 -0
  20. package/lib/src/generated/api/PerspectiveDiscardBatchParams.js +2 -0
  21. package/lib/src/generated/api/PerspectiveFlowFiredParams.d.ts +8 -0
  22. package/lib/src/generated/api/PerspectiveFlowFiredParams.js +2 -0
  23. package/lib/src/generated/api/PerspectiveFlowStatesParams.d.ts +11 -0
  24. package/lib/src/generated/api/PerspectiveFlowStatesParams.js +2 -0
  25. package/lib/src/generated/api/PerspectiveGetAllShaclParams.d.ts +7 -0
  26. package/lib/src/generated/api/PerspectiveGetAllShaclParams.js +2 -0
  27. package/lib/src/generated/api/PerspectiveModelQueryParams.d.ts +6 -1
  28. package/lib/src/generated/api/PerspectiveRemoveSubjectParams.d.ts +6 -0
  29. package/lib/src/generated/api/PerspectiveRemoveSubjectParams.js +2 -0
  30. package/lib/src/generated/api/PerspectiveResynced.d.ts +8 -0
  31. package/lib/src/generated/api/PerspectiveResynced.js +2 -0
  32. package/lib/src/generated/api/PerspectiveSubscribed.d.ts +10 -0
  33. package/lib/src/generated/api/PerspectiveSubscribed.js +2 -0
  34. package/lib/src/generated/api/PerspectiveUpdateSubjectParams.d.ts +10 -0
  35. package/lib/src/generated/api/PerspectiveUpdateSubjectParams.js +2 -0
  36. package/lib/src/generated/api/QuerySubscriptionUpdate.d.ts +19 -0
  37. package/lib/src/generated/api/QuerySubscriptionUpdate.js +2 -0
  38. package/lib/src/generated/api/QuerySubscriptionUpdateEvent.d.ts +7 -0
  39. package/lib/src/generated/api/QuerySubscriptionUpdateEvent.js +1 -0
  40. package/lib/src/generated/api/QueryUpdatesLagged.d.ts +7 -0
  41. package/lib/src/generated/api/QueryUpdatesLagged.js +2 -0
  42. package/lib/src/generated/api/RemoveSubjectRequest.d.ts +9 -0
  43. package/lib/src/generated/api/RemoveSubjectRequest.js +2 -0
  44. package/lib/src/generated/api/ResyncSubscriptionRequest.d.ts +3 -0
  45. package/lib/src/generated/api/ResyncSubscriptionRequest.js +2 -0
  46. package/lib/src/generated/api/RpcMethods.d.ts +134 -14
  47. package/lib/src/generated/api/RpcMethods.js +12 -0
  48. package/lib/src/generated/api/RuntimeInfo.d.ts +5 -0
  49. package/lib/src/generated/api/SfuAddIceCandidateParams.d.ts +8 -0
  50. package/lib/src/generated/api/SfuAddIceCandidateParams.js +2 -0
  51. package/lib/src/generated/api/SfuAnswerServerOfferParams.d.ts +8 -0
  52. package/lib/src/generated/api/SfuAnswerServerOfferParams.js +2 -0
  53. package/lib/src/generated/api/SfuCallJoinParams.d.ts +14 -0
  54. package/lib/src/generated/api/SfuCallJoinParams.js +2 -0
  55. package/lib/src/generated/api/SfuCallRenegotiationOffer.d.ts +30 -0
  56. package/lib/src/generated/api/SfuCallRenegotiationOffer.js +1 -0
  57. package/lib/src/generated/api/SfuCascadePipe.d.ts +4 -0
  58. package/lib/src/generated/api/SfuCascadePipe.js +2 -0
  59. package/lib/src/generated/api/SfuCascadeStatus.d.ts +8 -0
  60. package/lib/src/generated/api/SfuCascadeStatus.js +1 -0
  61. package/lib/src/generated/api/SfuConfig.d.ts +52 -0
  62. package/lib/src/generated/api/SfuConfig.js +1 -0
  63. package/lib/src/generated/api/SfuDataMessage.d.ts +24 -0
  64. package/lib/src/generated/api/SfuDataMessage.js +2 -0
  65. package/lib/src/generated/api/SfuEnsureMembershipParams.d.ts +4 -0
  66. package/lib/src/generated/api/SfuEnsureMembershipParams.js +2 -0
  67. package/lib/src/generated/api/SfuMigrateEvent.d.ts +21 -0
  68. package/lib/src/generated/api/SfuMigrateEvent.js +2 -0
  69. package/lib/src/generated/api/SfuNeighbourhoodParams.d.ts +3 -0
  70. package/lib/src/generated/api/SfuNeighbourhoodParams.js +2 -0
  71. package/lib/src/generated/api/SfuParticipantQualityPreference.d.ts +7 -0
  72. package/lib/src/generated/api/SfuParticipantQualityPreference.js +2 -0
  73. package/lib/src/generated/api/SfuPerspectiveParams.d.ts +6 -0
  74. package/lib/src/generated/api/SfuPerspectiveParams.js +2 -0
  75. package/lib/src/generated/api/SfuQualityPreferenceParams.d.ts +8 -0
  76. package/lib/src/generated/api/SfuQualityPreferenceParams.js +2 -0
  77. package/lib/src/generated/api/SfuRoomInfo.d.ts +11 -0
  78. package/lib/src/generated/api/SfuRoomInfo.js +1 -0
  79. package/lib/src/generated/api/SfuRoomParams.d.ts +4 -0
  80. package/lib/src/generated/api/SfuRoomParams.js +2 -0
  81. package/lib/src/generated/api/SfuRoomParticipantInfo.d.ts +11 -0
  82. package/lib/src/generated/api/SfuRoomParticipantInfo.js +2 -0
  83. package/lib/src/generated/api/SfuRoomRoster.d.ts +13 -0
  84. package/lib/src/generated/api/SfuRoomRoster.js +2 -0
  85. package/lib/src/generated/api/SfuSendDataParams.d.ts +10 -0
  86. package/lib/src/generated/api/SfuSendDataParams.js +2 -0
  87. package/lib/src/generated/api/SfuSetConfigParams.d.ts +5 -0
  88. package/lib/src/generated/api/SfuSetConfigParams.js +1 -0
  89. package/lib/src/generated/api/SfuStatus.d.ts +24 -0
  90. package/lib/src/generated/api/SfuStatus.js +2 -0
  91. package/lib/src/generated/api/TrackMapEntry.d.ts +17 -0
  92. package/lib/src/generated/api/TrackMapEntry.js +2 -0
  93. package/lib/src/generated/api/UpdateSubjectRequest.d.ts +12 -0
  94. package/lib/src/generated/api/UpdateSubjectRequest.js +2 -0
  95. package/lib/src/generated/api/index.d.ts +3 -0
  96. package/lib/src/index.d.ts +8 -0
  97. package/lib/src/index.js +5 -0
  98. package/lib/src/model/Ad4mModel.d.ts +84 -0
  99. package/lib/src/model/Ad4mModel.js +279 -22
  100. package/lib/src/model/ModelQueryBuilder.d.ts +23 -38
  101. package/lib/src/model/ModelQueryBuilder.js +97 -274
  102. package/lib/src/model/decorators.d.ts +32 -0
  103. package/lib/src/model/decorators.js +40 -1
  104. package/lib/src/model/query-common.js +7 -1
  105. package/lib/src/model/shacl-gen.d.ts +3 -1
  106. package/lib/src/model/shacl-gen.js +13 -1
  107. package/lib/src/model/types.d.ts +52 -2
  108. package/lib/src/model/types.js +8 -0
  109. package/lib/src/neighbourhood/MeshManager.d.ts +384 -0
  110. package/lib/src/neighbourhood/MeshManager.js +1144 -0
  111. package/lib/src/neighbourhood/NeighbourhoodClient.d.ts +91 -0
  112. package/lib/src/neighbourhood/NeighbourhoodClient.js +196 -0
  113. package/lib/src/neighbourhood/NeighbourhoodProxy.d.ts +55 -1
  114. package/lib/src/neighbourhood/NeighbourhoodProxy.js +170 -3
  115. package/lib/src/neighbourhood/Session.d.ts +105 -0
  116. package/lib/src/neighbourhood/Session.js +412 -0
  117. package/lib/src/neighbourhood/SfuManager.d.ts +174 -0
  118. package/lib/src/neighbourhood/SfuManager.js +619 -0
  119. package/lib/src/neighbourhood/SfuTypes.d.ts +35 -0
  120. package/lib/src/neighbourhood/SfuTypes.js +8 -0
  121. package/lib/src/perspectives/Container.d.ts +41 -0
  122. package/lib/src/perspectives/Container.js +62 -0
  123. package/lib/src/perspectives/FlowInstance.d.ts +63 -24
  124. package/lib/src/perspectives/FlowInstance.js +74 -31
  125. package/lib/src/perspectives/FlowModels.d.ts +0 -16
  126. package/lib/src/perspectives/FlowModels.js +8 -16
  127. package/lib/src/perspectives/LiveQuery.d.ts +49 -0
  128. package/lib/src/perspectives/LiveQuery.js +169 -0
  129. package/lib/src/perspectives/PerspectiveClient.d.ts +24 -15
  130. package/lib/src/perspectives/PerspectiveClient.js +33 -36
  131. package/lib/src/perspectives/PerspectiveProxy.d.ts +71 -168
  132. package/lib/src/perspectives/PerspectiveProxy.js +128 -476
  133. package/lib/src/perspectives/TextContent.d.ts +31 -0
  134. package/lib/src/perspectives/TextContent.js +52 -0
  135. package/lib/src/perspectives/WakerSubscriptionManager.d.ts +111 -6
  136. package/lib/src/perspectives/WakerSubscriptionManager.js +290 -48
  137. package/lib/src/runtime/RuntimeTypes.d.ts +2 -0
  138. package/lib/src/shacl/SHACLFlow.d.ts +7 -4
  139. package/lib/src/shacl/SHACLFlow.js +7 -4
  140. package/lib/src/shacl/SHACLShape.d.ts +9 -0
  141. package/lib/src/shacl/SHACLShape.js +37 -0
  142. package/package.json +2 -2
  143. package/pnpm-workspace.yaml +4 -1
  144. package/src/Ad4mClient.test.ts +90 -18
  145. package/src/Ad4mClient.ts +10 -0
  146. package/src/apiClient.test.ts +128 -2
  147. package/src/apiClient.ts +64 -11
  148. package/src/generated/api/AgentsByDidsRequest.ts +3 -0
  149. package/src/generated/api/AuthInfo.ts +6 -1
  150. package/src/generated/api/CallSessionInfo.ts +20 -0
  151. package/src/generated/api/DiscardBatchRequest.ts +3 -0
  152. package/src/generated/api/Events.ts +14 -3
  153. package/src/generated/api/FlowStateChangedEvent.ts +36 -0
  154. package/src/generated/api/FlowStateEntry.ts +18 -0
  155. package/src/generated/api/IceServer.ts +19 -0
  156. package/src/generated/api/OnlineAgent.ts +6 -1
  157. package/src/generated/api/PerspectiveDiscardBatchParams.ts +3 -0
  158. package/src/generated/api/PerspectiveFlowFiredParams.ts +7 -0
  159. package/src/generated/api/PerspectiveFlowStatesParams.ts +11 -0
  160. package/src/generated/api/PerspectiveGetAllShaclParams.ts +6 -0
  161. package/src/generated/api/PerspectiveModelQueryParams.ts +5 -1
  162. package/src/generated/api/PerspectiveRemoveSubjectParams.ts +3 -0
  163. package/src/generated/api/PerspectiveResynced.ts +7 -0
  164. package/src/generated/api/PerspectiveSubscribed.ts +8 -0
  165. package/src/generated/api/PerspectiveUpdateSubjectParams.ts +7 -0
  166. package/src/generated/api/QuerySubscriptionUpdate.ts +10 -0
  167. package/src/generated/api/QuerySubscriptionUpdateEvent.ts +9 -0
  168. package/src/generated/api/QueryUpdatesLagged.ts +7 -0
  169. package/src/generated/api/RemoveSubjectRequest.ts +7 -0
  170. package/src/generated/api/ResyncSubscriptionRequest.ts +3 -0
  171. package/src/generated/api/RpcMethods.ts +68 -8
  172. package/src/generated/api/RuntimeInfo.ts +6 -1
  173. package/src/generated/api/SfuAddIceCandidateParams.ts +7 -0
  174. package/src/generated/api/SfuAnswerServerOfferParams.ts +7 -0
  175. package/src/generated/api/SfuCallJoinParams.ts +13 -0
  176. package/src/generated/api/SfuCallRenegotiationOffer.ts +29 -0
  177. package/src/generated/api/SfuCascadePipe.ts +3 -0
  178. package/src/generated/api/SfuCascadeStatus.ts +7 -0
  179. package/src/generated/api/SfuConfig.ts +53 -0
  180. package/src/generated/api/SfuDataMessage.ts +23 -0
  181. package/src/generated/api/SfuEnsureMembershipParams.ts +3 -0
  182. package/src/generated/api/SfuMigrateEvent.ts +20 -0
  183. package/src/generated/api/{KeepAliveQueryRequest.ts → SfuNeighbourhoodParams.ts} +1 -1
  184. package/src/generated/api/SfuParticipantQualityPreference.ts +6 -0
  185. package/src/generated/api/{PerspectiveSubscribeQueryResult.ts → SfuPerspectiveParams.ts} +4 -1
  186. package/src/generated/api/SfuQualityPreferenceParams.ts +7 -0
  187. package/src/generated/api/SfuRoomInfo.ts +7 -0
  188. package/src/generated/api/SfuRoomParams.ts +3 -0
  189. package/src/generated/api/SfuRoomParticipantInfo.ts +8 -0
  190. package/src/generated/api/SfuRoomRoster.ts +12 -0
  191. package/src/generated/api/SfuSendDataParams.ts +7 -0
  192. package/src/generated/api/SfuSetConfigParams.ts +4 -0
  193. package/src/generated/api/SfuStatus.ts +24 -0
  194. package/src/generated/api/TrackMapEntry.ts +18 -0
  195. package/src/generated/api/UpdateSubjectRequest.ts +10 -0
  196. package/src/generated/api/index.ts +3 -0
  197. package/src/index.ts +8 -0
  198. package/src/model/Ad4mModel.test.ts +255 -231
  199. package/src/model/Ad4mModel.ts +322 -23
  200. package/src/model/ModelQueryBuilder.ts +112 -316
  201. package/src/model/abstract-classes.test.ts +225 -0
  202. package/src/model/containment-scope.test.ts +104 -0
  203. package/src/model/decorators.ts +81 -0
  204. package/src/model/query-common.ts +10 -1
  205. package/src/model/shacl-gen.ts +13 -0
  206. package/src/model/types.ts +63 -2
  207. package/src/neighbourhood/MeshManager.test.ts +2640 -0
  208. package/src/neighbourhood/MeshManager.ts +1350 -0
  209. package/src/neighbourhood/NeighbourhoodClient.ts +271 -0
  210. package/src/neighbourhood/NeighbourhoodProxy.test.ts +23 -0
  211. package/src/neighbourhood/NeighbourhoodProxy.ts +247 -1
  212. package/src/neighbourhood/Session.test.ts +800 -0
  213. package/src/neighbourhood/Session.ts +525 -0
  214. package/src/neighbourhood/SfuManager.test.ts +677 -0
  215. package/src/neighbourhood/SfuManager.ts +803 -0
  216. package/src/neighbourhood/SfuTypes.ts +40 -0
  217. package/src/perspectives/Container.test.ts +65 -0
  218. package/src/perspectives/Container.ts +46 -0
  219. package/src/perspectives/FlowInstance.ts +108 -31
  220. package/src/perspectives/FlowModels.ts +8 -18
  221. package/src/perspectives/LiveQuery.test.ts +197 -0
  222. package/src/perspectives/LiveQuery.ts +189 -0
  223. package/src/perspectives/PerspectiveClient.ts +51 -51
  224. package/src/perspectives/PerspectiveProxy.test.ts +93 -398
  225. package/src/perspectives/PerspectiveProxy.ts +133 -537
  226. package/src/perspectives/TextContent.test.ts +123 -0
  227. package/src/perspectives/TextContent.ts +36 -0
  228. package/src/perspectives/WakerSubscriptionManager.test.ts +421 -21
  229. package/src/perspectives/WakerSubscriptionManager.ts +349 -62
  230. package/src/runtime/RuntimeTypes.ts +2 -0
  231. package/src/shacl/SHACLFlow.ts +7 -4
  232. package/src/shacl/SHACLShape.test.ts +2 -1
  233. package/src/shacl/SHACLShape.ts +49 -0
  234. package/lib/src/generated/api/KeepAliveQueryRequest.d.ts +0 -3
  235. package/lib/src/generated/api/PerspectiveModelSubscribeResult.d.ts +0 -7
  236. package/lib/src/generated/api/PerspectiveQuerySubscriptionFilter.d.ts +0 -6
  237. package/lib/src/generated/api/PerspectiveSubscribeQueryResult.d.ts +0 -4
  238. package/src/generated/api/PerspectiveModelSubscribeResult.ts +0 -6
  239. package/src/generated/api/PerspectiveQuerySubscriptionFilter.ts +0 -3
  240. /package/lib/src/generated/api/{KeepAliveQueryRequest.js → AgentsByDidsRequest.js} +0 -0
  241. /package/lib/src/generated/api/{PerspectiveModelSubscribeResult.js → CallSessionInfo.js} +0 -0
  242. /package/lib/src/generated/api/{PerspectiveQuerySubscriptionFilter.js → DiscardBatchRequest.js} +0 -0
  243. /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,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ export type SfuSendDataParams = {
2
+ neighbourhoodUrl: string;
3
+ roomName: string;
4
+ channelLabel: string;
5
+ /**
6
+ * UTF-8 text, or base64 when `binary` is true.
7
+ */
8
+ data: string;
9
+ binary?: boolean;
10
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { SfuConfig } from "./SfuConfig";
2
+ export type SfuSetConfigParams = {
3
+ neighbourhoodUrl: string;
4
+ config: SfuConfig;
5
+ };
@@ -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,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -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,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -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";
@@ -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
  /**