@reactoo/watchtogether-sdk-js 2.7.94 → 2.7.96

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.
@@ -22,6 +22,7 @@
22
22
  <button onclick="window.toggleVideo()">toggle video</button>
23
23
  <button onclick="window.toggleAudio()">toggle audio</button>
24
24
  <button onclick="window.hento()">get client</button>
25
+ <button onclick="window.asset()">assets</button>
25
26
  </div>
26
27
 
27
28
  </div>
@@ -527,6 +528,17 @@
527
528
  sess.sendSystemMessage('customData', {some: 'data'})
528
529
  }
529
530
 
531
+ window.asset = function () {
532
+ const test = Instance.asset.getAssetList({ ids: ['6304b890-321a-494b-b0e6-b0cee48026cd'], instanceType: 'reactooBackup', type:'ids'})
533
+ .then(r => {
534
+ console.log(r);
535
+ return r;
536
+ })
537
+ test.then(r => {
538
+ console.log(r);
539
+ })
540
+ }
541
+
530
542
  </script>
531
543
 
532
544
  </body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactoo/watchtogether-sdk-js",
3
- "version": "2.7.94",
3
+ "version": "2.7.96",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "dist/watchtogether-sdk.min.js",
6
6
  "module": "dist/watchtogether-sdk.min.js",
@@ -19,13 +19,13 @@ let asset = function() {
19
19
  };
20
20
  return this.__privates.auth.__client
21
21
  .then(client => client.apis.asset.getAssetList(apiParams))
22
- .then(response => type === 'ids' ? {
22
+ .then(response => type === 'ids' ? ({
23
23
  data: {
24
24
  items: [...chainResponse.data.items, ...response.data.items],
25
25
  size: chainResponse.data.size + response.data.size,
26
26
  startKey: null,
27
27
  },
28
- } : response);
28
+ }) : response);
29
29
  });
30
30
  }, Promise.resolve({data: {items: [], size: 0, startKey: null}}));
31
31
  },
@@ -151,11 +151,12 @@ let room = function () {
151
151
  }))
152
152
  },
153
153
 
154
- updateAttribute: ({roomId, id, operation, attributeName, value}) => {
154
+ updateAttribute: ({roomId, id, deviceId, operation, attributeName, value}) => {
155
155
  return this.__privates.auth.__client
156
156
  .then(client => client.apis.wt.updateAttribute({}, {
157
157
  requestBody: {
158
158
  id,
159
+ deviceId,
159
160
  roomId,
160
161
  operation,
161
162
  attributeName,
@@ -44,9 +44,9 @@ let user = function () {
44
44
  .then(([client]) => client.apis.video.publishVideo({_id:id, roomId, customPrice}, {requestBody:{_id:id, roomId, privateAttributes, customAttributes, customPrice}}))
45
45
  },
46
46
 
47
- publishVideo: (roomId, id, privateAttributes = {}, customPrice) => {
47
+ publishVideo: (roomId, id, privateAttributes = {}, customAttributes = {}, customPrice) => {
48
48
  return this.__privates.auth.__client
49
- .then(client => client.apis.video.publishVideo({_id:id, roomId, customPrice}, {requestBody:{_id:id, roomId, privateAttributes}}))
49
+ .then(client => client.apis.video.publishVideo({_id:id, roomId, customPrice}, {requestBody:{_id:id, roomId, privateAttributes, customAttributes, customPrice}}))
50
50
  },
51
51
 
52
52
  getReactionById: (id) => {