From 71ae4ce809914163747f780b146edc33330aa6e8 Mon Sep 17 00:00:00 2001 From: Mircea Cosbuc Date: Tue, 25 Jun 2019 17:25:30 +0200 Subject: [PATCH] 4.2.3 --- dist/js/getstream.js | 21 ++++++++++++--------- dist/js_min/getstream.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/dist/js/getstream.js b/dist/js/getstream.js index d9ad8eb2..5d72f7e5 100644 --- a/dist/js/getstream.js +++ b/dist/js/getstream.js @@ -4992,6 +4992,7 @@ StreamReaction.prototype = { var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, + id = _ref.id, _ref$targetFeeds = _ref.targetFeeds, targetFeeds = _ref$targetFeeds === void 0 ? [] : _ref$targetFeeds, userId = _ref.userId; @@ -5017,6 +5018,7 @@ StreamReaction.prototype = { targetFeeds = this._convertTargetFeeds(targetFeeds); var body = { + id: id, activity_id: activity, kind: kind, data: data, @@ -5468,6 +5470,7 @@ Collections.prototype = { * Update entry in the collection * @method update * @memberof Collections.prototype + * @param {string} collection collection name * @param {object} entryId Collection object id * @param {object} data ObjectStore data * @param {requestCallback} callback Callback to call on completion @@ -8119,25 +8122,25 @@ StreamFeed.prototype = { expireTokens: this.client.expireTokens }); }, - getActivityDetail: function getActivityDetail(activity_id, options, callback) { + getActivityDetail: function getActivityDetail(activityId, options, callback) { /** * Retrieves one activity from a feed and adds enrichment * @method getActivityDetail * @memberof StreamFeed.prototype - * @param {array} ids Additional options + * @param {string} activityId Identifier of activity to retrieve * @param {object} options Additional options * @param {requestCallback} callback Callback to call on completion * @return {Promise} Promise object - * @example feed.getActivityDetail(activity_id) - * @example feed.getActivityDetail(activity_id, {withRecentReactions: true}) - * @example feed.getActivityDetail(activity_id, {withReactionCounts: true}) - * @example feed.getActivityDetail(activity_id, {withOwnReactions: true, withReactionCounts: true}) + * @example feed.getActivityDetail(activityId) + * @example feed.getActivityDetail(activityId, {withRecentReactions: true}) + * @example feed.getActivityDetail(activityId, {withReactionCounts: true}) + * @example feed.getActivityDetail(activityId, {withOwnReactions: true, withReactionCounts: true}) */ return this.get(_extends({ - id_lte: activity_id, - id_gte: activity_id, + id_lte: activityId, + id_gte: activityId, limit: 1 - }, options), callback); + }, options || {}), callback); }, getFayeClient: function getFayeClient() { /** diff --git a/dist/js_min/getstream.js b/dist/js_min/getstream.js index 3a44fd7b..e152dea7 100644 --- a/dist/js_min/getstream.js +++ b/dist/js_min/getstream.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.stream=e():t.stream=e()}(window,function(){return function(n){var r={};function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}return i.m=n,i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="dist/",i(i.s=125)}([function(t,e,n){"use strict";t.exports=function(t,e,n){if(!e)return t;for(var r in e)e.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&!1===n||t[r]!==e[r]&&(t[r]=e[r]));return t}},function(t,e,n){"use strict";var i=n(0);t.exports=function(t,e){"function"!=typeof t&&(e=t,t=Object);var n=function(){return this.initialize&&this.initialize.apply(this,arguments)||this},r=function(){};return r.prototype=t.prototype,n.prototype=new r,i(n.prototype,e),n}},function(H,I){var J;J=function(){return this}();try{J=J||Function("return this")()||eval("this")}catch(t){"object"==typeof window&&(J=window)}H.exports=J},function(t,e,n){"use strict";t.exports={isURI:function(t){return t&&t.protocol&&t.host&&t.path},isSameOrigin:function(t){return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port},parse:function(n){if("string"!=typeof n)return n;var t,e,r,i,o,s,a={},c=function(e,t){n=n.replace(t,function(t){return a[e]=t,""}),a[e]=a[e]||""};for(c("protocol",/^[a-z]+\:/i),c("host",/^\/\/[^\/\?#]+/),/^\//.test(n)||a.host||(n=location.pathname.replace(/[^\/]*$/,"")+n),c("pathname",/^[^\?#]*/),c("search",/^\?[^#]*/),c("hash",/^#.*/),a.protocol=a.protocol||location.protocol,a.host?(a.host=a.host.substr(2),t=a.host.split(":"),a.hostname=t[0],a.port=t[1]||""):(a.host=location.host,a.hostname=location.hostname,a.port=location.port),a.pathname=a.pathname||"/",a.path=a.pathname+a.search,s={},i=0,o=(r=(e=a.search.replace(/^\?/,""))?e.split("&"):[]).length;i>18&63,o=c>>12&63,s=c>>6&63,a=63&c,d[l++]=u.charAt(i)+u.charAt(o)+u.charAt(s)+u.charAt(a),h>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s}},function(t,e,n){var r=n(82);t.exports=function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(r(e).replace(/(.)/g,function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(t){return r(e)}}},function(t,e,n){"use strict";var r=n(83);function i(t){this.message=t}(i.prototype=new Error).name="InvalidTokenError",t.exports=function(t,e){if("string"!=typeof t)throw new i("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(r(t.split(".")[n]))}catch(t){throw new i("Invalid token specified: "+t.message)}},t.exports.InvalidTokenError=i},function(t,e,n){var u=n(46),h=n(4),r=function(){this.initialize.apply(this,arguments)};r.prototype={initialize:function(t,e){this.client=t,this.token=e,this.signature=e},buildURL:function(){for(var t="reaction/",e=0;e=Math.pow(2,32)&&(this._messageId=0),this._messageId.toString(36)},_receiveMessage:function(t){var e,n=t.id;void 0!==t.successful&&(e=this._responseCallbacks[n],delete this._responseCallbacks[n]),this.pipeThroughExtensions("incoming",t,null,function(t){t&&(t.advice&&this._handleAdvice(t.advice),this._deliverMessage(t),e&&e[0].call(e[1],t))},this)},_handleAdvice:function(t){e(this._advice,t),this._dispatcher.timeout=this._advice.timeout/1e3,this._advice.reconnect===this.HANDSHAKE&&this._state!==this.DISCONNECTED&&(this._state=this.UNCONNECTED,this._dispatcher.clientId=null,this._cycleConnection())},_deliverMessage:function(t){t.channel&&void 0!==t.data&&(this.info("Client ? calling listeners for ? with ?",this._dispatcher.clientId,t.channel,t.data),this._channels.distributeMessage(t))},_cycleConnection:function(){this._connectRequest&&(this._connectRequest=null,this.info("Closed connection for ?",this._dispatcher.clientId));var t=this;i.setTimeout(function(){t.connect()},this._advice.interval)}});e(_.prototype,r),e(_.prototype,l),e(_.prototype,h),e(_.prototype,y),b.exports=_}).call(this,m(2))},function(t,e,n){"use strict";var r=n(40),i=n(8),o={VERSION:r.VERSION,Client:n(103),Scheduler:n(34)};i.wrapper=o,t.exports=o},function(t,e){},function(t,e){},function(f,t,e){"use strict";(function(t){function e(t){r.length||(n(),!0),r[r.length]=t}f.exports=e;var n,r=[],i=0;function o(){for(;i>8-i%1*8)){if(255<(n=r.charCodeAt(i+=.75)))throw new c("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return s}),t.atob||(t.atob=function(t){var e=String(t).replace(/[=]+$/,"");if(e.length%4==1)throw new c("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,s="";r=e.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?s+=String.fromCharCode(255&n>>(-2*i&6)):0)r=a.indexOf(r);return s})}()},function(t,e){},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var i=n(112);t.exports=function(e){for(var t=1;t>18&63,o=c>>12&63,s=c>>6&63,a=63&c,d[l++]=u.charAt(i)+u.charAt(o)+u.charAt(s)+u.charAt(a),h>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s}},function(t,e,n){var r=n(82);t.exports=function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(r(e).replace(/(.)/g,function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(t){return r(e)}}},function(t,e,n){"use strict";var r=n(83);function i(t){this.message=t}(i.prototype=new Error).name="InvalidTokenError",t.exports=function(t,e){if("string"!=typeof t)throw new i("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(r(t.split(".")[n]))}catch(t){throw new i("Invalid token specified: "+t.message)}},t.exports.InvalidTokenError=i},function(t,e,n){var u=n(46),h=n(4),r=function(){this.initialize.apply(this,arguments)};r.prototype={initialize:function(t,e){this.client=t,this.token=e,this.signature=e},buildURL:function(){for(var t="reaction/",e=0;e=Math.pow(2,32)&&(this._messageId=0),this._messageId.toString(36)},_receiveMessage:function(t){var e,n=t.id;void 0!==t.successful&&(e=this._responseCallbacks[n],delete this._responseCallbacks[n]),this.pipeThroughExtensions("incoming",t,null,function(t){t&&(t.advice&&this._handleAdvice(t.advice),this._deliverMessage(t),e&&e[0].call(e[1],t))},this)},_handleAdvice:function(t){e(this._advice,t),this._dispatcher.timeout=this._advice.timeout/1e3,this._advice.reconnect===this.HANDSHAKE&&this._state!==this.DISCONNECTED&&(this._state=this.UNCONNECTED,this._dispatcher.clientId=null,this._cycleConnection())},_deliverMessage:function(t){t.channel&&void 0!==t.data&&(this.info("Client ? calling listeners for ? with ?",this._dispatcher.clientId,t.channel,t.data),this._channels.distributeMessage(t))},_cycleConnection:function(){this._connectRequest&&(this._connectRequest=null,this.info("Closed connection for ?",this._dispatcher.clientId));var t=this;i.setTimeout(function(){t.connect()},this._advice.interval)}});e(_.prototype,r),e(_.prototype,l),e(_.prototype,h),e(_.prototype,y),b.exports=_}).call(this,m(2))},function(t,e,n){"use strict";var r=n(40),i=n(8),o={VERSION:r.VERSION,Client:n(103),Scheduler:n(34)};i.wrapper=o,t.exports=o},function(t,e){},function(t,e){},function(f,t,e){"use strict";(function(t){function e(t){r.length||(n(),!0),r[r.length]=t}f.exports=e;var n,r=[],i=0;function o(){for(;i>8-i%1*8)){if(255<(n=r.charCodeAt(i+=.75)))throw new c("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return s}),t.atob||(t.atob=function(t){var e=String(t).replace(/[=]+$/,"");if(e.length%4==1)throw new c("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,s="";r=e.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?s+=String.fromCharCode(255&n>>(-2*i&6)):0)r=a.indexOf(r);return s})}()},function(t,e){},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var i=n(112);t.exports=function(e){for(var t=1;t