@reactoo/watchtogether-sdk-js 2.7.76 → 2.7.78

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.7.76",
3
+ "version": "2.7.78",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "dist/watchtogether-sdk.min.js",
6
6
  "module": "dist/watchtogether-sdk.min.js",
@@ -72,7 +72,7 @@ let user = function () {
72
72
  .then(client => client.apis.video.getVideoById({id}))
73
73
  },
74
74
 
75
- getVideos: ({roomId, userId, type, size, startKey, ids, includeUserModels = false, includeRoomQueueStatus} = {}) => {
75
+ getVideos: ({roomId, userId, type, size, startKey, ids, includeUserModels = false, includeRoomQueueStatus, filter} = {}) => {
76
76
  return chunkArray(ids, 50)
77
77
  .reduce((promiseChain, idsChunk) => {
78
78
  return promiseChain.then(chainResponse => {
@@ -83,6 +83,7 @@ let user = function () {
83
83
  ...(idsChunk?.length && {ids: idsChunk.join(',')}),
84
84
  ...(startKey && {startKey}),
85
85
  ...(includeRoomQueueStatus && {includeRoomQueueStatus}),
86
+ ...(filter && Object.keys(filter).length && {filter: JSON.stringify(filter)}),
86
87
  includeUserModels,
87
88
  type
88
89
  };
@@ -99,6 +100,11 @@ let user = function () {
99
100
  });
100
101
  }, Promise.resolve({data: {items: [], size: 0, startKey: null, users: []}}));
101
102
  },
103
+
104
+ getVideoListFilters: (roomId) => {
105
+ return this.__privates.auth.__client
106
+ .then(client => client.apis.video.getVideoListFilters({roomId}));
107
+ },
102
108
 
103
109
  deleteVideo: (id) => {
104
110
  return this.__privates.auth.__client
@@ -174,7 +174,6 @@ class Iot {
174
174
 
175
175
  this.off('worker:subscribe_result', handleSubscribeResult);
176
176
  if (event.success) {
177
-
178
177
  resolve();
179
178
  } else {
180
179
  reject(new Error(event.error));
@@ -318,7 +317,8 @@ class Iot {
318
317
  event === 'handLowered' ||
319
318
  event === 'handsCleared' ||
320
319
  event === 'volume_set' ||
321
- event === 'asset_created'
320
+ event === 'asset_created' ||
321
+ event === 'attribute_updated'
322
322
  ) {
323
323
  this.emit('message', {event, ...message, roomId})
324
324
  }