@reactoo/watchtogether-sdk-js 2.7.75 → 2.7.76

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.75",
3
+ "version": "2.7.76",
4
4
  "description": "Javascript SDK for Reactoo",
5
5
  "main": "dist/watchtogether-sdk.min.js",
6
6
  "module": "dist/watchtogether-sdk.min.js",
@@ -36,12 +36,12 @@ let user = function () {
36
36
  .then(response => response.data.key)
37
37
  ;
38
38
  },
39
- uploadVideo: (roomId, files, privateAttributes = {}, customPrice) => {
39
+ uploadVideo: (roomId, files, privateAttributes = {}, customAttributes = {}, customPrice) => {
40
40
  let id = generateUUID();
41
41
  return this.__privates.auth.__client
42
42
  .then(client => Promise.all([client, client.apis.video.initiateVideoUpload({id, segmentCount: files.length || 0})]))
43
43
  .then(([client, response]) => Promise.all([client, response.data.signedUrlSegments.reduce((acc, url, index) => acc.then(() => client.http({url, method: response.data.httpMethod, headers: {"Content-Type":files[index].type}, body:files[index]})), Promise.resolve())]))
44
- .then(([client]) => client.apis.video.publishVideo({_id:id, roomId, customPrice}, {requestBody:{_id:id, roomId, privateAttributes, customPrice}}))
44
+ .then(([client]) => client.apis.video.publishVideo({_id:id, roomId, customPrice}, {requestBody:{_id:id, roomId, privateAttributes, customAttributes, customPrice}}))
45
45
  },
46
46
 
47
47
  publishVideo: (roomId, id, privateAttributes = {}, customPrice) => {
@@ -93,10 +93,11 @@ let user = function () {
93
93
  items: [...chainResponse.data.items, ...response.data.items],
94
94
  size: chainResponse.data.size + response.data.size,
95
95
  startKey: null,
96
+ users: [...chainResponse.data.users, ...(response.data.users ?? [])],
96
97
  },
97
98
  } : response);
98
99
  });
99
- }, Promise.resolve({data: {items: [], size: 0, startKey: null}}));
100
+ }, Promise.resolve({data: {items: [], size: 0, startKey: null, users: []}}));
100
101
  },
101
102
 
102
103
  deleteVideo: (id) => {