@reactoo/watchtogether-sdk-js 2.5.82 → 2.5.83
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @reactoo/watchtogether-sdk-js
|
|
3
|
-
* @version 2.5.
|
|
3
|
+
* @version 2.5.83
|
|
4
4
|
*/
|
|
5
5
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
6
6
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -9183,7 +9183,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _mod
|
|
|
9183
9183
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9184
9184
|
|
|
9185
9185
|
"use strict";
|
|
9186
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_wt_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/wt-utils */ \"./src/modules/wt-utils.js\");\n\n\n\nlet asset = function () {\n var _this = this;\n return {\n getAssetList: _ref => {\n let {\n type = 'instanceType',\n instanceType,\n size = 20,\n startKey = null,\n roomId\n } = _ref;\n let apiParams = {\n ...(instanceType && {\n instanceType: instanceType === true ? this.__instanceType : instanceType\n }),\n
|
|
9186
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modules_wt_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/wt-utils */ \"./src/modules/wt-utils.js\");\n\n\n\nlet asset = function () {\n var _this = this;\n return {\n getAssetList: _ref => {\n let {\n type = 'instanceType',\n instanceType,\n size = 20,\n startKey = null,\n roomId,\n ids\n } = _ref;\n let apiParams = {\n type,\n ...(instanceType && {\n instanceType: instanceType === true ? this.__instanceType : instanceType\n }),\n ...(size && !ids && {\n size\n }),\n ...(ids && {\n ids: ids.join(',')\n }),\n ...(roomId && {\n roomId\n }),\n ...(startKey && {\n startKey\n })\n };\n return this.__privates.auth.__client.then(client => client.apis.asset.getAssetList(apiParams));\n },\n updateAsset: function () {\n let {\n id,\n assetType,\n title,\n roomIds\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return _this.__privates.auth.__client.then(client => client.apis.asset.updateAsset({\n id\n }, {\n requestBody: {\n assetType,\n title,\n roomIds\n }\n }));\n },\n deleteAsset: id => {\n return this.__privates.auth.__client.then(client => client.apis.asset.deleteAsset({\n id\n }));\n },\n uploadAsset: (file, roomIds) => {\n let id = Object(_modules_wt_utils__WEBPACK_IMPORTED_MODULE_0__[\"generateUUID\"])();\n return this.__privates.auth.__client.then(client => Promise.all([client, client.apis.asset.initiateAssetUpload({\n id\n })])).then(_ref2 => {\n let [client, response] = _ref2;\n return Promise.all([client, client.http({\n url: response.data.signedUrl,\n method: response.data.httpMethod,\n headers: {\n \"Content-Type\": file.type\n },\n body: file\n }), response.data.id]);\n }).then(_ref3 => {\n let [client, response, idn] = _ref3;\n return Promise.all([client.apis.asset.publishAsset({\n id: idn\n }, {\n requestBody: {\n title: file.name,\n ...(roomIds ? {\n roomIds\n } : {})\n }\n }), idn]);\n });\n },\n downloadAsset: function (url) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _this.__privates.auth.__client.then(client => client.http({\n url,\n method: 'GET',\n ...options\n }));\n }\n };\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (asset);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/models/asset.js?");
|
|
9187
9187
|
|
|
9188
9188
|
/***/ }),
|
|
9189
9189
|
|