@inditextech/weave-store-azure-web-pubsub 2.15.3 → 2.17.0

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/dist/server.d.ts CHANGED
@@ -1058,6 +1058,7 @@ declare class WeaveAzureWebPubsubSyncHandler extends WebPubSubEventHandler {
1058
1058
  private getHostConnection;
1059
1059
  getRoomsLoaded(): string[];
1060
1060
  getRoomSyncHost(roomId: string): WeaveStoreAzureWebPubSubSyncHost | undefined;
1061
+ getRoomDocument(roomId: string): Promise<Y.Doc>;
1061
1062
  clientConnect(roomId: string, connectionOptions?: WeaveStoreAzureWebPubSubSyncHostClientConnectOptions): Promise<string>;
1062
1063
  }
1063
1064
 
@@ -1088,6 +1089,7 @@ declare class WeaveAzureWebPubsubServer extends Emittery {
1088
1089
  emitEvent<T>(event: string, payload?: T): void;
1089
1090
  addEventListener<T>(event: string, callback: (payload: T) => void): void;
1090
1091
  removeEventListener<T>(event: string, callback: (payload: T) => void): void;
1092
+ getRoomDocument(roomId: string): Promise<Y.Doc>;
1091
1093
  clientConnect(roomId: string, connectionOptions?: WeaveStoreAzureWebPubSubSyncHostClientConnectOptions): Promise<string | null>;
1092
1094
  }
1093
1095
 
package/dist/server.js CHANGED
@@ -23289,6 +23289,10 @@ var WeaveAzureWebPubsubSyncHandler = class extends WebPubSubEventHandler {
23289
23289
  getRoomSyncHost(roomId) {
23290
23290
  return this._roomsSyncHost.get(roomId);
23291
23291
  }
23292
+ async getRoomDocument(roomId) {
23293
+ await this.getHostConnection(roomId);
23294
+ return this._rooms.get(roomId);
23295
+ }
23292
23296
  async clientConnect(roomId, connectionOptions) {
23293
23297
  await this.getHostConnection(roomId);
23294
23298
  const token = await this._client.getClientAccessToken({
@@ -23341,6 +23345,9 @@ var WeaveAzureWebPubsubServer = class extends Emittery {
23341
23345
  removeEventListener(event, callback) {
23342
23346
  this.off(event, callback);
23343
23347
  }
23348
+ async getRoomDocument(roomId) {
23349
+ return await this.syncHandler.getRoomDocument(roomId);
23350
+ }
23344
23351
  async clientConnect(roomId, connectionOptions) {
23345
23352
  return await this.syncHandler.clientConnect(roomId, connectionOptions);
23346
23353
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inditextech/weave-store-azure-web-pubsub",
3
- "version": "2.15.3",
3
+ "version": "2.17.0",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Jesus Manuel Piñeiro Cid <jesusmpc@inditex.com>",
@@ -57,8 +57,8 @@
57
57
  "dependencies": {
58
58
  "@azure/identity": "4.10.2",
59
59
  "@azure/web-pubsub": "1.2.0",
60
- "@inditextech/weave-types": "2.15.3",
61
- "@inditextech/weave-sdk": "2.15.3",
60
+ "@inditextech/weave-types": "2.17.0",
61
+ "@inditextech/weave-sdk": "2.17.0",
62
62
  "@syncedstore/core": "0.6.0",
63
63
  "buffer": "6.0.3",
64
64
  "reconnecting-websocket": "4.4.0",