@reactoo/watchtogether-sdk-js 2.5.74 → 2.5.75

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.74
3
+ * @version 2.5.75
4
4
  */
5
5
  (function webpackUniversalModuleDefinition(root, factory) {
6
6
  if(typeof exports === 'object' && typeof module === 'object')
@@ -9127,7 +9127,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _mod
9127
9127
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
9128
9128
 
9129
9129
  "use strict";
9130
- 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\n\nlet auth = function () {\n var _this = this;\n\n return {\n login: (username, password) => {\n return this.__privates.auth.__client.then(client => client.apis.auth.signIn({}, {\n requestBody: {\n username,\n password\n }\n })).then(response => {\n this.userId = response.data.userId;\n this.username = response.data.username;\n return this.__privates.auth.login(response.data.idToken, response.data.accessToken, response.data.refreshToken);\n });\n },\n providerLogin: (domain, token, displayname, deviceId) => {\n if (!token && typeof this.__privates.providerAuth === 'function') {\n ({\n token,\n displayname\n } = this.__privates.providerAuth());\n }\n\n return this.__privates.auth.__client.then(client => client.apis.auth.providerSignIn({}, {\n requestBody: {\n domain,\n token,\n ...(displayname && {\n displayname\n }),\n ...(deviceId && {\n deviceId\n })\n }\n })).then(response => {\n this.userId = response.data.userId;\n this.username = response.data.username;\n return this.__privates.auth.login(response.data.idToken, response.data.accessToken, response.data.refreshToken);\n });\n },\n getProviderAuth: () => {\n return this.__privates.providerAuth;\n },\n deviceLogin: function () {\n let usePrecise = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n let salt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ThisIsSaltyAF';\n return Object(_modules_wt_utils__WEBPACK_IMPORTED_MODULE_0__[\"getBrowserFingerprint\"])(_this.__instanceType, usePrecise, salt).then(deviceId => Promise.all([deviceId, _this.__privates.auth.__client])).then(_ref => {\n let [deviceId, client] = _ref;\n return client.apis.auth.deviceSignIn({}, {\n requestBody: {\n deviceId,\n domain: location.hostname\n }\n });\n }).then(response => {\n _this.userId = response.data.userId;\n _this.username = response.data.username;\n return _this.__privates.auth.login(response.data.idToken, response.data.accessToken, response.data.refreshToken);\n });\n },\n logout: () => {\n return this.__privates.auth.logout();\n },\n isLoggedIn: () => {\n return this.__privates.auth.isLoggedIn();\n },\n setLanguage: language => {\n return this.__privates.auth.setLanguage(language);\n },\n getLanguage: () => {\n return this.__privates.auth.__language;\n },\n signUp: (username, password, email, phone) => {\n return this.__privates.auth.__client.then(client => client.apis.auth.signUp({}, {\n requestBody: {\n username,\n password,\n email,\n phone\n }\n }));\n },\n confirmSignUp: function (confirmationCode, username, displayname) {\n let isPublic = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n return _this.__privates.auth.__client.then(client => client.apis.auth.confirmSignUp({}, {\n requestBody: {\n confirmationCode,\n username,\n displayname,\n isPublic\n }\n })).then(response => {\n _this.userId = response.data.userId;\n _this.username = response.data.username;\n return _this.__privates.auth.login(response.data.idToken, response.data.accessToken, response.data.refreshToken);\n });\n },\n resendConfirmationCode: username => {\n return this.__privates.auth.__client.then(client => client.apis.auth.resendConfirmationCode({}, {\n requestBody: {\n username\n }\n }));\n },\n forgotPassword: username => {\n return this.__privates.auth.__client.then(client => client.apis.auth.forgotPassword({}, {\n requestBody: {\n username\n }\n }));\n },\n confirmForgotPassword: (username, confirmationCode, password) => {\n return this.__privates.auth.__client.then(client => client.apis.auth.confirmForgotPassword({}, {\n requestBody: {\n password,\n confirmationCode,\n username\n }\n }));\n },\n $on: (key, callback, that) => {\n return this.__privates.auth.on(key, callback, that || this);\n },\n $off: (key, callback, that) => {\n return this.__privates.auth.off(key, callback, that || this);\n },\n $clear: () => {\n return this.__privates.auth.clear();\n }\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (auth);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/models/auth.js?");
9130
+ 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\n\nlet auth = function () {\n var _this = this;\n\n return {\n login: (username, password) => {\n return this.__privates.auth.__client.then(client => client.apis.auth.signIn({}, {\n requestBody: {\n username,\n password\n }\n })).then(response => {\n this.userId = response.data.userId;\n this.username = response.data.username;\n return this.__privates.auth.login(response.data.idToken, response.data.accessToken, response.data.refreshToken);\n });\n },\n providerLogin: (domain, token, displayname, deviceId) => {\n if (!token && typeof this.__privates.providerAuth === 'function') {\n ({\n token,\n displayname\n } = this.__privates.providerAuth());\n }\n\n return this.__privates.auth.__client.then(client => client.apis.auth.providerSignIn({}, {\n requestBody: {\n domain,\n token,\n ...(displayname && {\n displayname\n }),\n ...(deviceId && {\n deviceId\n })\n }\n })).then(response => {\n this.userId = response.data.userId;\n this.username = response.data.username;\n return this.__privates.auth.login(response.data.idToken, response.data.accessToken, response.data.refreshToken);\n });\n },\n getProviderAuth: () => {\n return this.__privates.providerAuth;\n },\n deviceLogin: function () {\n let usePrecise = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n let salt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ThisIsSaltyAF';\n return Object(_modules_wt_utils__WEBPACK_IMPORTED_MODULE_0__[\"getBrowserFingerprint\"])(_this.__instanceType, usePrecise, salt).then(deviceId => Promise.all([deviceId, _this.__privates.auth.__client])).then(_ref => {\n let [deviceId, client] = _ref;\n return client.apis.auth.deviceSignIn({}, {\n requestBody: {\n deviceId,\n domain: location.hostname\n }\n });\n }).then(response => {\n _this.userId = response.data.userId;\n _this.username = response.data.username;\n return _this.__privates.auth.login(response.data.idToken, response.data.accessToken, response.data.refreshToken);\n });\n },\n logout: () => {\n return this.__privates.auth.logout();\n },\n isLoggedIn: () => {\n return this.__privates.auth.isLoggedIn();\n },\n setLanguage: language => {\n return this.__privates.auth.setLanguage(language);\n },\n getLanguage: () => {\n return this.__privates.auth.__language;\n },\n signUp: (username, password, email, phone) => {\n return this.__privates.auth.__client.then(client => client.apis.auth.signUp({}, {\n requestBody: {\n username,\n password,\n email,\n phone\n }\n }));\n },\n confirmSignUp: function (confirmationCode, username, displayname) {\n let isPublic = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n return _this.__privates.auth.__client.then(client => client.apis.auth.confirmSignUp({}, {\n requestBody: {\n confirmationCode,\n username,\n displayname,\n isPublic\n }\n })).then(response => {\n _this.userId = response.data.userId;\n _this.username = response.data.username;\n return _this.__privates.auth.login(response.data.idToken, response.data.accessToken, response.data.refreshToken);\n });\n },\n resendConfirmationCode: username => {\n return this.__privates.auth.__client.then(client => client.apis.auth.resendConfirmationCode({}, {\n requestBody: {\n username\n }\n }));\n },\n forgotPassword: username => {\n return this.__privates.auth.__client.then(client => client.apis.auth.forgotPassword({}, {\n requestBody: {\n username\n }\n }));\n },\n confirmForgotPassword: (username, confirmationCode, password) => {\n return this.__privates.auth.__client.then(client => client.apis.auth.confirmForgotPassword({}, {\n requestBody: {\n password,\n confirmationCode,\n username\n }\n }));\n },\n socialAuth: function () {\n let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return _this.__privates.auth.__client.then(client => client.apis.auth.socialAuth(data));\n },\n $on: (key, callback, that) => {\n return this.__privates.auth.on(key, callback, that || this);\n },\n $off: (key, callback, that) => {\n return this.__privates.auth.off(key, callback, that || this);\n },\n $clear: () => {\n return this.__privates.auth.clear();\n }\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (auth);\n\n//# sourceURL=webpack://WatchTogetherSDK/./src/models/auth.js?");
9131
9131
 
9132
9132
  /***/ }),
9133
9133