From 5699e2f5204ab57fc4bd7ab9bebf60cd788f6e47 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Wed, 16 Dec 2015 15:54:58 +0000 Subject: [PATCH] Travis CI - [ci skip] - automatic dist folder --- dist/kuzzle.js | 32 ++++++++++++++++++++------------ dist/kuzzle.min.js | 4 ++-- dist/kuzzle.min.map | 2 +- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/dist/kuzzle.js b/dist/kuzzle.js index 51b6ffb71..76259d542 100644 --- a/dist/kuzzle.js +++ b/dist/kuzzle.js @@ -264,7 +264,7 @@ var * Kuzzle object constructor. * @param url - URL to the Kuzzle instance * @param [options] - Connection options - * @param {Kuzzle~constructorCallback} [cb] - Handles connection response + * @param {responseCallback} [cb] - Handles connection response * @constructor */ module.exports = Kuzzle = function (url, options, cb) { @@ -289,6 +289,9 @@ module.exports = Kuzzle = function (url, options, cb) { value: {}, writable: true }, + connectCB: { + value: cb + }, eventListeners: { value: { connected: [], @@ -465,7 +468,7 @@ module.exports = Kuzzle = function (url, options, cb) { if (!options || !options.connect || options.connect === 'auto') { - this.connect(cb); + this.connect(); } else { this.state = 'ready'; } @@ -474,7 +477,7 @@ module.exports = Kuzzle = function (url, options, cb) { return this.bluebird.promisifyAll(this, { suffix: 'Promise', filter: function (name, func, target, passes) { - var whitelist = ['connect', 'getAllStatistics', 'getStatistics', 'listCollections', 'now', 'query']; + var whitelist = ['getAllStatistics', 'getStatistics', 'listCollections', 'now', 'query']; return passes && whitelist.indexOf(name) !== -1; } @@ -487,15 +490,14 @@ module.exports = Kuzzle = function (url, options, cb) { /** * Connects to a Kuzzle instance using the provided URL. - * @param {responseCallback} [cb] * @returns {Object} this */ -Kuzzle.prototype.connect = function (cb) { +Kuzzle.prototype.connect = function () { var self = this; if (['initializing', 'ready', 'loggedOff', 'error', 'offline'].indexOf(this.state) === -1) { - if (cb) { - cb(null, self); + if (self.connectCB) { + self.connectCB(null, self); } return self; } @@ -524,8 +526,8 @@ Kuzzle.prototype.connect = function (cb) { listener.fn(); }); - if (cb) { - cb(null, self); + if (self.connectCB) { + self.connectCB(null, self); } }); @@ -536,8 +538,8 @@ Kuzzle.prototype.connect = function (cb) { listener.fn(); }); - if (cb) { - cb(error); + if (self.connectCB) { + self.connectCB(error); } }); @@ -806,6 +808,8 @@ Kuzzle.prototype.flushQueue = function () { * @returns {object} this */ Kuzzle.prototype.listCollections = function (options, cb) { + var collectionType = 'all'; + if (!cb && typeof options === 'function') { cb = options; options = null; @@ -813,7 +817,11 @@ Kuzzle.prototype.listCollections = function (options, cb) { this.callbackRequired('Kuzzle.listCollections', cb); - this.query(null, 'read', 'listCollections', {}, options, function (err, res) { + if (options && options.type) { + collectionType = options.type; + } + + this.query(null, 'read', 'listCollections', {body: {type: collectionType}}, options, function (err, res) { if (err) { return cb(err); } diff --git a/dist/kuzzle.min.js b/dist/kuzzle.min.js index fcf4563a9..0b6ef55ba 100644 --- a/dist/kuzzle.min.js +++ b/dist/kuzzle.min.js @@ -1,3 +1,3 @@ -// Official Javascript SDK for Kuzzle v1.0.9 - License: Apache-2.0 -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ge&&(b[d+e++]=n[a])});16>e;)b[d+e++]=0;return b}function c(a,b){var c=b||0,d=m;return d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]}function d(a,b,d){var e=b&&d||0,f=b||[];a=a||{};var g=null!=a.clockseq?a.clockseq:r,h=null!=a.msecs?a.msecs:(new Date).getTime(),i=null!=a.nsecs?a.nsecs:t+1,j=h-s+(i-t)/1e4;if(0>j&&null==a.clockseq&&(g=g+1&16383),(0>j||h>s)&&null==a.nsecs&&(i=0),i>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,t=i,r=g,h+=122192928e5;var k=(1e4*(268435455&h)+i)%4294967296;f[e++]=k>>>24&255,f[e++]=k>>>16&255,f[e++]=k>>>8&255,f[e++]=255&k;var l=h/4294967296*1e4&268435455;f[e++]=l>>>8&255,f[e++]=255&l,f[e++]=l>>>24&15|16,f[e++]=l>>>16&255,f[e++]=g>>>8|128,f[e++]=255&g;for(var m=a.node||q,n=0;6>n;n++)f[e+n]=m[n];return b?b:c(f)}function e(a,b,d){var e=b&&d||0;"string"==typeof a&&(b="binary"==a?new l(16):null,a=null),a=a||{};var g=a.random||(a.rng||f)();if(g[6]=15&g[6]|64,g[8]=63&g[8]|128,b)for(var h=0;16>h;h++)b[e+h]=g[h];return b||c(g)}var f,g=this;if("function"==typeof g.require)try{var h=g.require("crypto").randomBytes;f=h&&function(){return h(16)}}catch(i){}if(!f&&g.crypto&&crypto.getRandomValues){var j=new Uint8Array(16);f=function(){return crypto.getRandomValues(j),j}}if(!f){var k=new Array(16);f=function(){for(var a,b=0;16>b;b++)0===(3&b)&&(a=4294967296*Math.random()),k[b]=a>>>((3&b)<<3)&255;return k}}for(var l="function"==typeof g.Buffer?g.Buffer:Array,m=[],n={},o=0;256>o;o++)m[o]=(o+256).toString(16).substr(1),n[m[o]]=o;var p=f(),q=[1|p[0],p[1],p[2],p[3],p[4],p[5]],r=16383&(p[6]<<8|p[7]),s=0,t=0,u=e;if(u.v1=d,u.v4=e,u.parse=a,u.unparse=c,u.BufferClass=l,"undefined"!=typeof b&&b.exports)b.exports=u;else if("function"==typeof define&&define.amd)define(function(){return u});else{var v=g.uuid;u.noConflict=function(){return g.uuid=v,u},g.uuid=u}}).call(this)},{}],2:[function(a,b,c){function d(){var a=this,b=Date.now(),c=-1;a.queueTTL>0&&(a.offlineQueue.forEach(function(d,e){d.ts0&&a.offlineQueue.length>a.queueMaxSize&&a.offlineQueue.splice(0,a.offlineQueue.length-a.queueMaxSize)}function e(a,b){var c=Date.now(),d=this;b&&d.socket.once(a.requestId,function(a){b(a.error,a.result)}),d.socket.emit("kuzzle",a),d.requestHistory[a.requestId]=c,Object.keys(d.requestHistory).forEach(function(a){d.requestHistory[a]0?(e.call(a,a.offlineQueue[0].query,a.offlineQueue[0].cb),a.offlineQueue.shift(),setTimeout(function(){f.call(a)},Math.max(0,a.replayInterval))):a.queuing=!1}var g=a("node-uuid"),h=a("./kuzzleDataCollection");b.exports=Kuzzle=function(b,c,d){var e=this;if(!(this instanceof Kuzzle))return new Kuzzle(b,c,d);if(d||"function"!=typeof c||(d=c,c=null),!b||""===b)throw new Error("URL to Kuzzle can't be empty");return Object.defineProperties(this,{collections:{value:{},writable:!0},eventListeners:{value:{connected:[],error:[],disconnected:[],reconnected:[]}},io:{value:null,writable:!0},queuing:{value:!1,writable:!0},requestHistory:{value:{},writable:!0},socket:{value:null,writable:!0},state:{value:"initializing",writable:!0},subscriptions:{value:{pending:{}},writable:!0},autoReconnect:{value:c&&"boolean"==typeof c.autoReconnect?c.autoReconnect:!0,enumerable:!0},reconnectionDelay:{value:c&&"number"==typeof c.reconnectionDelay?c.reconnectionDelay:1e3,enumerable:!0},url:{value:b,enumerable:!0},autoQueue:{value:!1,enumerable:!0,writable:!0},autoReplay:{value:!1,enumerable:!0,writable:!0},autoResubscribe:{value:!0,enumerable:!0,writable:!0},headers:{value:{},enumerable:!0,writable:!0},metadata:{value:{},enumerable:!0,writable:!0},offlineQueue:{value:[],enumerable:!0,writable:!0},queueFilter:{value:null,enumerable:!0,writable:!0},queueMaxSize:{value:500,enumerable:!0,writable:!0},queueTTL:{value:12e4,enumerable:!0,writable:!0},replayInterval:{value:10,enumerable:!0,writable:!0}}),"undefined"!=typeof window&&window.io?this.io=window.io:this.io=a("socket.io-client"),c&&(Object.keys(c).forEach(function(a){e.hasOwnProperty(a)&&Object.getOwnPropertyDescriptor(e,a).writable&&(e[a]=c[a])}),"auto"===c.offlineMode&&this.autoReconnect&&(this.autoQueue=this.autoReplay=this.autoResubscribe=!0)),Object.defineProperty(this,"isValid",{value:function(){if("loggedOff"===this.state)throw new Error("This Kuzzle object has been invalidated. Did you try to access it after a logout call?")}}),Object.defineProperty(this,"addHeaders",{value:function(a,b){return Object.keys(b).forEach(function(c){a[c]||(a[c]=b[c])}),a}}),Object.defineProperty(this,"callbackRequired",{value:function(a,b){if(!b||"function"!=typeof b)throw new Error(a+": a callback argument is required for read queries")}}),c&&c.connect&&"auto"!==c.connect?this.state="ready":this.connect(d),this.bluebird?this.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["connect","getAllStatistics","getStatistics","listCollections","now","query"];return d&&-1!==e.indexOf(a)}}):this},Kuzzle.prototype.connect=function(a){var b=this;return-1===["initializing","ready","loggedOff","error","offline"].indexOf(this.state)?(a&&a(null,b),b):(b.state="connecting",b.socket=b.io(b.url,{reconnection:b.autoReconnect,reconnectionDelay:b.reconnectionDelay,"force new connection":!0}),b.socket.once("connect",function(){b.state="connected",Object.keys(b.subscriptions).forEach(function(a){Object.keys(b.subscriptions[a]).forEach(function(c){var d=b.subscriptions[a][c];d.renew(d.callback)})}),f.call(b),b.eventListeners.connected.forEach(function(a){a.fn()}),a&&a(null,b)}),b.socket.on("connect_error",function(c){b.state="error",b.eventListeners.error.forEach(function(a){a.fn()}),a&&a(c)}),b.socket.on("disconnect",function(){b.state="offline",b.autoReconnect||b.logout(),b.autoQueue&&(b.queuing=!0),b.eventListeners.disconnected.forEach(function(a){a.fn()})}),b.socket.on("reconnect",function(){b.state="connected",b.autoResubscribe&&Object.keys(b.subscriptions).forEach(function(a){Object.keys(b.subscriptions[a]).forEach(function(c){var d=b.subscriptions[a][c];d.renew(d.callback)})}),b.autoReplay&&(d.call(b),f.call(b)),b.eventListeners.reconnected.forEach(function(a){a.fn()})}),this)},Kuzzle.prototype.addListener=function(a,b){var c,d=Object.keys(this.eventListeners),e=typeof b;if(this.isValid(),-1===d.indexOf(a))throw new Error("["+a+"] is not a known event. Known events: "+d.toString());if("function"!==e)throw new Error("Invalid listener type: expected a function, got a "+e);return c=g.v1(),this.eventListeners[a].push({id:c,fn:b}),c},Kuzzle.prototype.getAllStatistics=function(a,b){return b||"function"!=typeof a||(b=a,a=null),this.callbackRequired("Kuzzle.getAllStatistics",b),this.query(null,"admin","getAllStats",{},a,function(a,c){return a?b(a):void b(null,c.statistics)}),this},Kuzzle.prototype.getStatistics=function(a,b,c){var d;return c||(1===arguments.length?(c=arguments[0],b=null,a=null):(c=arguments[1],"object"==typeof arguments[0]?(b=arguments[0],a=null):(a=arguments[0],b=null))),d=function(b,d){return b?c(b):void(a?c(null,d.statistics):c(null,[d.statistics]))},this.callbackRequired("Kuzzle.getStatistics",c),a?this.query(null,"admin","getStats",{body:{startTime:a}},b,d):this.query(null,"admin","getLastStats",{},b,d),this},Kuzzle.prototype.dataCollectionFactory=function(a,b){return this.isValid(),this.collections[a]||(this.collections[a]=new h(this,a,b)),this.collections[a]},Kuzzle.prototype.flushQueue=function(){return this.offlineQueue=[],this},Kuzzle.prototype.listCollections=function(a,b){return b||"function"!=typeof a||(b=a,a=null),this.callbackRequired("Kuzzle.listCollections",b),this.query(null,"read","listCollections",{},a,function(a,c){return a?b(a):b(null,c.collections)}),this},Kuzzle.prototype.logout=function(){var a;this.state="loggedOff",this.socket.close(),this.socket=null;for(a in this.collections)this.collections.hasOwnProperty(a)&&delete this.collections[a]},Kuzzle.prototype.now=function(a,b){return b||"function"!=typeof a||(b=a,a=null),this.callbackRequired("Kuzzle.now",b),this.query(null,"read","now",{},a,function(a,c){return a?b(a):void b(null,c.now)}),this},Kuzzle.prototype.query=function(a,b,c,f,h,i){var j,k={action:c,controller:b,metadata:this.metadata},l=this;if(this.isValid(),i||"function"!=typeof h||(i=h,h=null),h&&(h.metadata&&Object.keys(h.metadata).forEach(function(a){k.metadata[a]=h.metadata[a]}),h.queuable===!1&&"offline"===l.state))return l;f.metadata&&Object.keys(f.metadata).forEach(function(a){k.metadata[a]=f.metadata[a]});for(j in f)"metadata"!==j&&f.hasOwnProperty(j)&&(k[j]=f[j]);return k=l.addHeaders(k,this.headers),a&&(k.collection=a),k.requestId||(k.requestId=g.v4()),"connected"===l.state||h&&h.queuable===!1?e.call(this,k,i):(l.queuing||-1!==["initializing","connecting"].indexOf(l.state))&&(d.call(this,k,i),l.queueFilter?l.queueFilter(k)&&l.offlineQueue.push({ts:Date.now(),query:k,cb:i}):l.offlineQueue.push({ts:Date.now(),query:k,cb:i})),l},Kuzzle.prototype.removeAllListeners=function(a){var b=Object.keys(this.eventListeners),c=this;if(a){if(-1===b.indexOf(a))throw new Error("["+a+"] is not a known event. Known events: "+b.toString());this.eventListeners[a]=[]}else b.forEach(function(a){c.eventListeners[a]=[]})},Kuzzle.prototype.removeListener=function(a,b){var c=Object.keys(this.eventListeners),d=this;if(-1===c.indexOf(a))throw new Error("["+a+"] is not a known event. Known events: "+c.toString());this.eventListeners[a].forEach(function(c,e){c.id===b&&d.eventListeners[a].splice(e,1)})},Kuzzle.prototype.replayQueue=function(){return"offline"===this.state||this.autoReplay||(d.call(this),f.call(this)),this},Kuzzle.prototype.setHeaders=function(a,b){var c=this;if("object"!=typeof a||Array.isArray(a))throw new Error("Expected a content object, received a "+typeof a);return b?c.headers=a:Object.keys(a).forEach(function(b){c.headers[b]=a[b]}),c},Kuzzle.prototype.startQueuing=function(){return"offline"!==this.state||this.autoQueue||(this.queuing=!0),this},Kuzzle.prototype.stopQueuing=function(){return"offline"!==this.state||this.autoQueue||(this.queuing=!1),this}},{"./kuzzleDataCollection":3,"node-uuid":1,"socket.io-client":void 0}],3:[function(a,b,c){function d(a,b){return Object.defineProperties(this,{collection:{value:b,enumerable:!0},kuzzle:{value:a,enumerable:!0},headers:{value:JSON.parse(JSON.stringify(a.headers)),enumerable:!0,writable:!0}}),this.kuzzle.bluebird?this.kuzzle.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["publishMessage","setHeaders","subscribe"];return d&&-1===e.indexOf(a)}}):this}var e=a("./kuzzleDocument"),f=a("./kuzzleDataMapping"),g=a("./kuzzleRoom");d.prototype.advancedSearch=function(a,b,c){var d,e=this;return c||"function"!=typeof b||(c=b,b=null),e.kuzzle.callbackRequired("KuzzleDataCollection.advancedSearch",c),d=e.kuzzle.addHeaders({body:a},this.headers),e.kuzzle.query(this.collection,"read","search",d,b,function(a,b){var d=[];return a?c(a):(b.hits.hits.forEach(function(a){d.push(e.documentFactory(a._id,a))}),void c(null,{total:b.hits.total,documents:d}))}),this},d.prototype.count=function(a,b,c){var d;return c||"function"!=typeof b||(c=b,b=null),this.kuzzle.callbackRequired("KuzzleDataCollection.count",c),d=this.kuzzle.addHeaders({body:a},this.headers),this.kuzzle.query(this.collection,"read","count",d,b,function(a,b){return a?c(a):void c(null,b.count)}),this},d.prototype.create=function(a,b){var c={};return b||"function"!=typeof a||(b=a,a=null),c=this.kuzzle.addHeaders(c,this.headers),this.kuzzle.query(this.collection,"write","createCollection",c,a,b),this},d.prototype.createDocument=function(a,b,c,d){var f=this,g={},h="create";return"string"!=typeof a&&(d=c,c=b,b=a,a=null),d||"function"!=typeof c||(d=c,c=null),b instanceof e?g=b.toJSON():g.body=b,c&&(h=c.updateIfExist?"createOrUpdate":"create"),a&&(g._id=a),g.persist=!0,g=f.kuzzle.addHeaders(g,f.headers),d?f.kuzzle.query(this.collection,"write",h,g,c,function(a,b){return a?d(a):void d(null,f.documentFactory(b._id,b))}):this.kuzzle.query(this.collection,"write",h,g,c),this},d.prototype["delete"]=function(a,b){var c={};return b||"function"!=typeof a||(b=a,a=null),c=this.kuzzle.addHeaders(c,this.headers),this.kuzzle.query(this.collection,"admin","deleteCollection",c,a,b),this},d.prototype.deleteDocument=function(a,b,c){var d,e={};return"string"==typeof a?(e._id=a,d="delete"):(e.body=a,d="deleteByQuery"),c||"function"!=typeof b||(c=b,b=null),e=this.kuzzle.addHeaders(e,this.headers),c?this.kuzzle.query(this.collection,"write",d,e,b,function(a,b){return a?c(a):void("delete"===d?c(null,[e._id]):c(null,b.ids))}):this.kuzzle.query(this.collection,"write",d,e,b),this},d.prototype.fetchDocument=function(a,b,c){var d={_id:a},e=this;return c||"function"!=typeof b||(c=b,b=null),e.kuzzle.callbackRequired("KuzzleDataCollection.fetch",c),d=e.kuzzle.addHeaders(d,this.headers),e.kuzzle.query(this.collection,"read","get",d,b,function(a,b){return a?c(a):void c(null,e.documentFactory(b._id,b))}),this},d.prototype.fetchAllDocuments=function(a,b){return b||"function"!=typeof a||(b=a,a=null),this.kuzzle.callbackRequired("KuzzleDataCollection.fetchAll",b),this.advancedSearch({},a,b),this},d.prototype.getMapping=function(a,b){var c;return b||"function"!=typeof a||(b=a,a=null),this.kuzzle.callbackRequired("KuzzleDataCollection.getMapping",b),c=new f(this),c.refresh(a,b),this},d.prototype.publishMessage=function(a,b){var c={};return a instanceof e?c=a.toJSON():c.body=a,c.persist=!1,c=this.kuzzle.addHeaders(c,this.headers),this.kuzzle.query(this.collection,"write","publish",c,b),this},d.prototype.putMapping=function(a,b,c){var d;return c||"function"!=typeof b||(c=b,b=null),d=new f(this,a),d.apply(b,c),this},d.prototype.replaceDocument=function(a,b,c,d){var e=this,f={_id:a,body:b};return d||"function"!=typeof c||(d=c,c=null),f=e.kuzzle.addHeaders(f,this.headers),d?e.kuzzle.query(this.collection,"write","createOrUpdate",f,c,function(a,b){return a?d(a):void d(null,e.documentFactory(b._id,b))}):e.kuzzle.query(this.collection,"write","createOrUpdate",f,c),this},d.prototype.subscribe=function(a,b,c){var d;return c||"function"!=typeof b||(c=b,b=null),this.kuzzle.callbackRequired("KuzzleDataCollection.subscribe",c),d=new g(this,b),d.renew(a,c)},d.prototype.truncate=function(a,b){var c={};return b||"function"!=typeof a||(b=a,a=null),c=this.kuzzle.addHeaders(c,this.headers),this.kuzzle.query(this.collection,"admin","truncateCollection",c,a,b),this},d.prototype.updateDocument=function(a,b,c,d){var f={_id:a,body:b},g=this;return d||"function"!=typeof c||(d=c,c=null),f=g.kuzzle.addHeaders(f,this.headers),d?g.kuzzle.query(this.collection,"write","update",f,c,function(a,b){var c;return a?d(a):(c=new e(g,b._id),void d(null,c))}):g.kuzzle.query(this.collection,"write","update",f,c),g},d.prototype.documentFactory=function(a,b){var c=b._source?new e(this,a,b._source):new e(this,a,b);return c},d.prototype.roomFactory=function(a){return new g(this,a)},d.prototype.dataMappingFactory=function(a){return new f(this,a)},d.prototype.setHeaders=function(a,b){return this.kuzzle.setHeaders.call(this,a,b),this},b.exports=d},{"./kuzzleDataMapping":4,"./kuzzleDocument":5,"./kuzzleRoom":6}],4:[function(a,b,c){function d(a,b){return Object.defineProperties(this,{collection:{value:a.collection,eunmerable:!0},kuzzle:{value:a.kuzzle,enumerable:!0},headers:{value:JSON.parse(JSON.stringify(a.headers)),enumerable:!0,writable:!0},mapping:{value:b||{},enumerable:!0,writable:!0}}),this.kuzzle.bluebird?this.kuzzle.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["set","setHeaders"];return d&&-1===e.indexOf(a)}}):this}d.prototype.apply=function(a,b){var c=this,d=this.kuzzle.addHeaders({body:{properties:this.mapping}},this.headers);return b||"function"!=typeof a||(b=a,a=null),c.kuzzle.query(this.collection,"admin","putMapping",d,a,function(a,d){return a?b?b(a):!1:(c.mapping=d._source.properties,void(b&&b(null,c)))}),this},d.prototype.refresh=function(a,b){var c=this,d=this.kuzzle.addHeaders({},this.headers);return b||"function"!=typeof a||(b=a,a=null),this.kuzzle.query(this.collection,"admin","getMapping",d,a,function(a,d){return a?b?b(a):!1:(c.mapping=d.mainindex.mappings[c.collection].properties,void(b&&b(null,c)))}),this},d.prototype.set=function(a,b){return this.mapping[a]=b,this},d.prototype.setHeaders=function(a,b){return this.kuzzle.setHeaders.call(this,a,b),this},b.exports=d},{}],5:[function(a,b,c){function d(a,b,c){return Object.defineProperties(this,{queue:{value:[],writable:!0},refreshing:{value:!1,writable:!0},collection:{value:a.collection,enumerable:!0},dataCollection:{value:a,enumerable:!0},kuzzle:{value:a.kuzzle,enumerable:!0},id:{value:void 0,enumerable:!0,writable:!0},content:{value:{},writable:!0,enumerable:!0},headers:{value:JSON.parse(JSON.stringify(a.headers)),enumerable:!0,writable:!0},version:{value:void 0,enumerable:!0,writable:!0}}),!c&&b&&"object"==typeof b&&(c=b,b=null),c&&(c._version&&(this.version=c._version,delete c._version),this.setContent(c,!0)),b&&(Object.defineProperty(this,"id",{value:b,enumerable:!0}),c||this.refresh()),this.kuzzle.bluebird?this.kuzzle.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["delete","refresh","save"];return d&&-1!==e.indexOf(a)}}):this}function e(){for(var a;this.queue.length>0;)a=this.queue.shift(),this[a.action].apply(this,a.args)}d.prototype.toJSON=function(){var a={};return this.id&&(a._id=this.id),a.body=this.content,a._version=this.version,a=this.kuzzle.addHeaders(a,this.headers)},d.prototype.toString=function(){return JSON.stringify(this.toJSON())},d.prototype["delete"]=function(a,b){var c=this;if(b||"function"!=typeof a||(b=a,a=null),this.refreshing)return this.queue.push({action:"delete",args:[a,b]}),this;if(!this.id)throw new Error("KuzzleDocument.delete: cannot delete a document without a document ID");return b?this.kuzzle.query(this.collection,"write","delete",this.toJSON(),a,function(a){return a?b(a):void b(null,c)}):this.kuzzle.query(this.collection,"write","delete",this.toJSON(),a),this},d.prototype.refresh=function(a,b){var c=this;if(b||"function"!=typeof a||(b=a,a=null),this.refreshing)return this.queue.push({action:"refresh",args:[a,b]}),this;if(!c.id)throw new Error("KuzzleDocument.refresh: cannot retrieve a document if no ID has been provided");return c.refreshing=!0,c.kuzzle.query(c.collection,"read","get",{_id:c.id},a,function(a,d){return a?(c.refreshing=!1,c.queue=[],b?b(a):!1):(c.version=d._version,c.content=d._source,b&&b(null,c),c.refreshing=!1,void e.call(c))}),this},d.prototype.save=function(a,b){var c=this.toJSON(),d=this;return a&&void 0===b&&"function"==typeof a&&(b=a,a=null),d.refreshing?(d.queue.push({action:"save",args:[a,b]}),d):(c.persist=!0,d.kuzzle.query(this.collection,"write","createOrUpdate",c,a,function(a,c){return a?b?b(a):!1:(d.id=c._id,d.version=c._version,void(b&&b(null,d)))}),d)},d.prototype.publish=function(a){var b=this.toJSON();return this.refreshing?(this.queue.push({action:"publish",args:[a]}),this):(b.persist=!1,this.kuzzle.query(this.collection,"write","publish",b,a),this)},d.prototype.setContent=function(a,b){var c=this;return this.refreshing?(this.queue.push({action:"setContent",args:[a,b]}),this):(b?this.content=a:Object.keys(a).forEach(function(b){c.content[b]=a[b]}),this)},d.prototype.subscribe=function(a,b){var c;if(a&&!b&&"function"==typeof a&&(b=a,a=null),this.kuzzle.callbackRequired("KuzzleDocument.subscribe",b),!this.id)throw new Error("KuzzleDocument.subscribe: cannot subscribe to a document if no ID has been provided");return c={ids:{values:[this.id]}},this.dataCollection.subscribe(c,a,b)},d.prototype.setHeaders=function(a,b){return this.kuzzle.setHeaders.call(this,a,b),this},b.exports=d},{}],6:[function(a,b,c){function d(a,b){return Object.defineProperties(this,{callback:{value:null,writable:!0},channel:{value:null,writable:!0},id:{value:g.v4()},notifier:{value:null,writable:!0},queue:{value:[],writable:!0},scope:{value:b&&b.scope?b.scope:"all"},state:{value:b&&b.state?b.state:"done"},subscribing:{value:!1,writable:!0},users:{value:b&&b.users?b.users:"none"},collection:{value:a.collection,enumerable:!0},kuzzle:{value:a.kuzzle,enumerable:!0},filters:{value:null,enumerable:!0,writable:!0},headers:{value:JSON.parse(JSON.stringify(a.headers)),enumerable:!0,writable:!0},metadata:{value:b&&b.metadata?b.metadata:{},enumerable:!0,writable:!0},roomId:{value:null,enumerable:!0,writable:!0},subscribeToSelf:{value:b&&"boolean"==typeof b.subscribeToSelf?b.subscribeToSelf:!0,enumerable:!0,writable:!0}}),this.kuzzle.bluebird?this.kuzzle.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["count"];return d&&-1!==e.indexOf(a)}}):this}function e(a){return a.error?this.callback(a.error):void(this.kuzzle.requestHistory[a.result.requestId]?(this.subscribeToSelf&&this.callback(null,a.result),delete this.kuzzle.requestHistory[a.result.requestId]):this.callback(null,a.result))}function f(){for(var a;this.queue.length>0;)a=this.queue.shift(),this[a.action].apply(this,a.args)}var g=a("node-uuid");d.prototype.count=function(a){var b;return this.kuzzle.callbackRequired("KuzzleRoom.count",a),b=this.kuzzle.addHeaders({body:{roomId:this.roomId}},this.headers),this.subscribing?(this.queue.push({action:"count",args:[a]}),this):(this.kuzzle.query(this.collection,"subscribe","count",b,function(b,c){return b?a(b):void a(null,c.count)}),this)},d.prototype.renew=function(a,b){var c={scope:this.scope,state:this.state,users:this.users},d=this;return!b&&a&&"function"==typeof a&&(b=a,a=null),this.subscribing?(this.queue.push({action:"renew",args:[a,b]}),this):(this.kuzzle.callbackRequired("KuzzleRoom.renew",b),this.unsubscribe(),this.roomId=null,this.subscribing=!0,this.callback=b,this.kuzzle.subscriptions.pending[d.id]=d,a&&(this.filters=a),c.body=this.filters,c=this.kuzzle.addHeaders(c,this.headers),d.kuzzle.query(this.collection,"subscribe","on",c,{metadata:this.metadata},function(a,b){if(delete d.kuzzle.subscriptions.pending[d.id],d.subscribing=!1,a)throw d.queue=[],new Error("Error during Kuzzle subscription: "+a.message);d.roomId=b.roomId,d.channel=b.channel,d.kuzzle.subscriptions[d.roomId]||(d.kuzzle.subscriptions[d.roomId]={}),d.kuzzle.subscriptions[d.roomId][d.id]=d,d.notifier=e.bind(d),d.kuzzle.socket.on(d.channel,d.notifier),f.call(d)}),this)},d.prototype.unsubscribe=function(){var a,b=this,c=b.roomId;return b.subscribing?(b.queue.push({action:"unsubscribe",args:[]}),b):(c&&(b.kuzzle.socket.off(b.channel,this.notifier),1===Object.keys(b.kuzzle.subscriptions[c]).length?(delete b.kuzzle.subscriptions[c],0===Object.keys(b.kuzzle.subscriptions.pending).length?b.kuzzle.query(this.collection,"subscribe","off",{body:{roomId:c}}):a=setInterval(function(){0===Object.keys(b.kuzzle.subscriptions.pending).length&&(b.kuzzle.subscriptions[c]||b.kuzzle.query(b.collection,"subscribe","off",{body:{roomId:c}}),clearInterval(a))},100)):delete b.kuzzle.subscriptions[c][b.id],b.roomId=null),b)},d.prototype.setHeaders=function(a,b){return this.kuzzle.setHeaders.call(this,a,b),this},b.exports=d},{"node-uuid":1}]},{},[2]); +// Official Javascript SDK for Kuzzle v1.1.0 - License: Apache-2.0 +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ge&&(b[d+e++]=n[a])});16>e;)b[d+e++]=0;return b}function c(a,b){var c=b||0,d=m;return d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+"-"+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]+d[a[c++]]}function d(a,b,d){var e=b&&d||0,f=b||[];a=a||{};var g=null!=a.clockseq?a.clockseq:r,h=null!=a.msecs?a.msecs:(new Date).getTime(),i=null!=a.nsecs?a.nsecs:t+1,j=h-s+(i-t)/1e4;if(0>j&&null==a.clockseq&&(g=g+1&16383),(0>j||h>s)&&null==a.nsecs&&(i=0),i>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,t=i,r=g,h+=122192928e5;var k=(1e4*(268435455&h)+i)%4294967296;f[e++]=k>>>24&255,f[e++]=k>>>16&255,f[e++]=k>>>8&255,f[e++]=255&k;var l=h/4294967296*1e4&268435455;f[e++]=l>>>8&255,f[e++]=255&l,f[e++]=l>>>24&15|16,f[e++]=l>>>16&255,f[e++]=g>>>8|128,f[e++]=255&g;for(var m=a.node||q,n=0;6>n;n++)f[e+n]=m[n];return b?b:c(f)}function e(a,b,d){var e=b&&d||0;"string"==typeof a&&(b="binary"==a?new l(16):null,a=null),a=a||{};var g=a.random||(a.rng||f)();if(g[6]=15&g[6]|64,g[8]=63&g[8]|128,b)for(var h=0;16>h;h++)b[e+h]=g[h];return b||c(g)}var f,g=this;if("function"==typeof g.require)try{var h=g.require("crypto").randomBytes;f=h&&function(){return h(16)}}catch(i){}if(!f&&g.crypto&&crypto.getRandomValues){var j=new Uint8Array(16);f=function(){return crypto.getRandomValues(j),j}}if(!f){var k=new Array(16);f=function(){for(var a,b=0;16>b;b++)0===(3&b)&&(a=4294967296*Math.random()),k[b]=a>>>((3&b)<<3)&255;return k}}for(var l="function"==typeof g.Buffer?g.Buffer:Array,m=[],n={},o=0;256>o;o++)m[o]=(o+256).toString(16).substr(1),n[m[o]]=o;var p=f(),q=[1|p[0],p[1],p[2],p[3],p[4],p[5]],r=16383&(p[6]<<8|p[7]),s=0,t=0,u=e;if(u.v1=d,u.v4=e,u.parse=a,u.unparse=c,u.BufferClass=l,"undefined"!=typeof b&&b.exports)b.exports=u;else if("function"==typeof define&&define.amd)define(function(){return u});else{var v=g.uuid;u.noConflict=function(){return g.uuid=v,u},g.uuid=u}}).call(this)},{}],2:[function(a,b,c){function d(){var a=this,b=Date.now(),c=-1;a.queueTTL>0&&(a.offlineQueue.forEach(function(d,e){d.ts0&&a.offlineQueue.length>a.queueMaxSize&&a.offlineQueue.splice(0,a.offlineQueue.length-a.queueMaxSize)}function e(a,b){var c=Date.now(),d=this;b&&d.socket.once(a.requestId,function(a){b(a.error,a.result)}),d.socket.emit("kuzzle",a),d.requestHistory[a.requestId]=c,Object.keys(d.requestHistory).forEach(function(a){d.requestHistory[a]0?(e.call(a,a.offlineQueue[0].query,a.offlineQueue[0].cb),a.offlineQueue.shift(),setTimeout(function(){f.call(a)},Math.max(0,a.replayInterval))):a.queuing=!1}var g=a("node-uuid"),h=a("./kuzzleDataCollection");b.exports=Kuzzle=function(b,c,d){var e=this;if(!(this instanceof Kuzzle))return new Kuzzle(b,c,d);if(d||"function"!=typeof c||(d=c,c=null),!b||""===b)throw new Error("URL to Kuzzle can't be empty");return Object.defineProperties(this,{collections:{value:{},writable:!0},connectCB:{value:d},eventListeners:{value:{connected:[],error:[],disconnected:[],reconnected:[]}},io:{value:null,writable:!0},queuing:{value:!1,writable:!0},requestHistory:{value:{},writable:!0},socket:{value:null,writable:!0},state:{value:"initializing",writable:!0},subscriptions:{value:{pending:{}},writable:!0},autoReconnect:{value:c&&"boolean"==typeof c.autoReconnect?c.autoReconnect:!0,enumerable:!0},reconnectionDelay:{value:c&&"number"==typeof c.reconnectionDelay?c.reconnectionDelay:1e3,enumerable:!0},url:{value:b,enumerable:!0},autoQueue:{value:!1,enumerable:!0,writable:!0},autoReplay:{value:!1,enumerable:!0,writable:!0},autoResubscribe:{value:!0,enumerable:!0,writable:!0},headers:{value:{},enumerable:!0,writable:!0},metadata:{value:{},enumerable:!0,writable:!0},offlineQueue:{value:[],enumerable:!0,writable:!0},queueFilter:{value:null,enumerable:!0,writable:!0},queueMaxSize:{value:500,enumerable:!0,writable:!0},queueTTL:{value:12e4,enumerable:!0,writable:!0},replayInterval:{value:10,enumerable:!0,writable:!0}}),"undefined"!=typeof window&&window.io?this.io=window.io:this.io=a("socket.io-client"),c&&(Object.keys(c).forEach(function(a){e.hasOwnProperty(a)&&Object.getOwnPropertyDescriptor(e,a).writable&&(e[a]=c[a])}),"auto"===c.offlineMode&&this.autoReconnect&&(this.autoQueue=this.autoReplay=this.autoResubscribe=!0)),Object.defineProperty(this,"isValid",{value:function(){if("loggedOff"===this.state)throw new Error("This Kuzzle object has been invalidated. Did you try to access it after a logout call?")}}),Object.defineProperty(this,"addHeaders",{value:function(a,b){return Object.keys(b).forEach(function(c){a[c]||(a[c]=b[c])}),a}}),Object.defineProperty(this,"callbackRequired",{value:function(a,b){if(!b||"function"!=typeof b)throw new Error(a+": a callback argument is required for read queries")}}),c&&c.connect&&"auto"!==c.connect?this.state="ready":this.connect(),this.bluebird?this.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["getAllStatistics","getStatistics","listCollections","now","query"];return d&&-1!==e.indexOf(a)}}):this},Kuzzle.prototype.connect=function(){var a=this;return-1===["initializing","ready","loggedOff","error","offline"].indexOf(this.state)?(a.connectCB&&a.connectCB(null,a),a):(a.state="connecting",a.socket=a.io(a.url,{reconnection:a.autoReconnect,reconnectionDelay:a.reconnectionDelay,"force new connection":!0}),a.socket.once("connect",function(){a.state="connected",Object.keys(a.subscriptions).forEach(function(b){Object.keys(a.subscriptions[b]).forEach(function(c){var d=a.subscriptions[b][c];d.renew(d.callback)})}),f.call(a),a.eventListeners.connected.forEach(function(a){a.fn()}),a.connectCB&&a.connectCB(null,a)}),a.socket.on("connect_error",function(b){a.state="error",a.eventListeners.error.forEach(function(a){a.fn()}),a.connectCB&&a.connectCB(b)}),a.socket.on("disconnect",function(){a.state="offline",a.autoReconnect||a.logout(),a.autoQueue&&(a.queuing=!0),a.eventListeners.disconnected.forEach(function(a){a.fn()})}),a.socket.on("reconnect",function(){a.state="connected",a.autoResubscribe&&Object.keys(a.subscriptions).forEach(function(b){Object.keys(a.subscriptions[b]).forEach(function(c){var d=a.subscriptions[b][c];d.renew(d.callback)})}),a.autoReplay&&(d.call(a),f.call(a)),a.eventListeners.reconnected.forEach(function(a){a.fn()})}),this)},Kuzzle.prototype.addListener=function(a,b){var c,d=Object.keys(this.eventListeners),e=typeof b;if(this.isValid(),-1===d.indexOf(a))throw new Error("["+a+"] is not a known event. Known events: "+d.toString());if("function"!==e)throw new Error("Invalid listener type: expected a function, got a "+e);return c=g.v1(),this.eventListeners[a].push({id:c,fn:b}),c},Kuzzle.prototype.getAllStatistics=function(a,b){return b||"function"!=typeof a||(b=a,a=null),this.callbackRequired("Kuzzle.getAllStatistics",b),this.query(null,"admin","getAllStats",{},a,function(a,c){return a?b(a):void b(null,c.statistics)}),this},Kuzzle.prototype.getStatistics=function(a,b,c){var d;return c||(1===arguments.length?(c=arguments[0],b=null,a=null):(c=arguments[1],"object"==typeof arguments[0]?(b=arguments[0],a=null):(a=arguments[0],b=null))),d=function(b,d){return b?c(b):void(a?c(null,d.statistics):c(null,[d.statistics]))},this.callbackRequired("Kuzzle.getStatistics",c),a?this.query(null,"admin","getStats",{body:{startTime:a}},b,d):this.query(null,"admin","getLastStats",{},b,d),this},Kuzzle.prototype.dataCollectionFactory=function(a,b){return this.isValid(),this.collections[a]||(this.collections[a]=new h(this,a,b)),this.collections[a]},Kuzzle.prototype.flushQueue=function(){return this.offlineQueue=[],this},Kuzzle.prototype.listCollections=function(a,b){var c="all";return b||"function"!=typeof a||(b=a,a=null),this.callbackRequired("Kuzzle.listCollections",b),a&&a.type&&(c=a.type),this.query(null,"read","listCollections",{body:{type:c}},a,function(a,c){return a?b(a):b(null,c.collections)}),this},Kuzzle.prototype.logout=function(){var a;this.state="loggedOff",this.socket.close(),this.socket=null;for(a in this.collections)this.collections.hasOwnProperty(a)&&delete this.collections[a]},Kuzzle.prototype.now=function(a,b){return b||"function"!=typeof a||(b=a,a=null),this.callbackRequired("Kuzzle.now",b),this.query(null,"read","now",{},a,function(a,c){return a?b(a):void b(null,c.now)}),this},Kuzzle.prototype.query=function(a,b,c,f,h,i){var j,k={action:c,controller:b,metadata:this.metadata},l=this;if(this.isValid(),i||"function"!=typeof h||(i=h,h=null),h&&(h.metadata&&Object.keys(h.metadata).forEach(function(a){k.metadata[a]=h.metadata[a]}),h.queuable===!1&&"offline"===l.state))return l;f.metadata&&Object.keys(f.metadata).forEach(function(a){k.metadata[a]=f.metadata[a]});for(j in f)"metadata"!==j&&f.hasOwnProperty(j)&&(k[j]=f[j]);return k=l.addHeaders(k,this.headers),a&&(k.collection=a),k.requestId||(k.requestId=g.v4()),"connected"===l.state||h&&h.queuable===!1?e.call(this,k,i):(l.queuing||-1!==["initializing","connecting"].indexOf(l.state))&&(d.call(this,k,i),l.queueFilter?l.queueFilter(k)&&l.offlineQueue.push({ts:Date.now(),query:k,cb:i}):l.offlineQueue.push({ts:Date.now(),query:k,cb:i})),l},Kuzzle.prototype.removeAllListeners=function(a){var b=Object.keys(this.eventListeners),c=this;if(a){if(-1===b.indexOf(a))throw new Error("["+a+"] is not a known event. Known events: "+b.toString());this.eventListeners[a]=[]}else b.forEach(function(a){c.eventListeners[a]=[]})},Kuzzle.prototype.removeListener=function(a,b){var c=Object.keys(this.eventListeners),d=this;if(-1===c.indexOf(a))throw new Error("["+a+"] is not a known event. Known events: "+c.toString());this.eventListeners[a].forEach(function(c,e){c.id===b&&d.eventListeners[a].splice(e,1)})},Kuzzle.prototype.replayQueue=function(){return"offline"===this.state||this.autoReplay||(d.call(this),f.call(this)),this},Kuzzle.prototype.setHeaders=function(a,b){var c=this;if("object"!=typeof a||Array.isArray(a))throw new Error("Expected a content object, received a "+typeof a);return b?c.headers=a:Object.keys(a).forEach(function(b){c.headers[b]=a[b]}),c},Kuzzle.prototype.startQueuing=function(){return"offline"!==this.state||this.autoQueue||(this.queuing=!0),this},Kuzzle.prototype.stopQueuing=function(){return"offline"!==this.state||this.autoQueue||(this.queuing=!1),this}},{"./kuzzleDataCollection":3,"node-uuid":1,"socket.io-client":void 0}],3:[function(a,b,c){function d(a,b){return Object.defineProperties(this,{collection:{value:b,enumerable:!0},kuzzle:{value:a,enumerable:!0},headers:{value:JSON.parse(JSON.stringify(a.headers)),enumerable:!0,writable:!0}}),this.kuzzle.bluebird?this.kuzzle.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["publishMessage","setHeaders","subscribe"];return d&&-1===e.indexOf(a)}}):this}var e=a("./kuzzleDocument"),f=a("./kuzzleDataMapping"),g=a("./kuzzleRoom");d.prototype.advancedSearch=function(a,b,c){var d,e=this;return c||"function"!=typeof b||(c=b,b=null),e.kuzzle.callbackRequired("KuzzleDataCollection.advancedSearch",c),d=e.kuzzle.addHeaders({body:a},this.headers),e.kuzzle.query(this.collection,"read","search",d,b,function(a,b){var d=[];return a?c(a):(b.hits.hits.forEach(function(a){d.push(e.documentFactory(a._id,a))}),void c(null,{total:b.hits.total,documents:d}))}),this},d.prototype.count=function(a,b,c){var d;return c||"function"!=typeof b||(c=b,b=null),this.kuzzle.callbackRequired("KuzzleDataCollection.count",c),d=this.kuzzle.addHeaders({body:a},this.headers),this.kuzzle.query(this.collection,"read","count",d,b,function(a,b){return a?c(a):void c(null,b.count)}),this},d.prototype.create=function(a,b){var c={};return b||"function"!=typeof a||(b=a,a=null),c=this.kuzzle.addHeaders(c,this.headers),this.kuzzle.query(this.collection,"write","createCollection",c,a,b),this},d.prototype.createDocument=function(a,b,c,d){var f=this,g={},h="create";return"string"!=typeof a&&(d=c,c=b,b=a,a=null),d||"function"!=typeof c||(d=c,c=null),b instanceof e?g=b.toJSON():g.body=b,c&&(h=c.updateIfExist?"createOrUpdate":"create"),a&&(g._id=a),g.persist=!0,g=f.kuzzle.addHeaders(g,f.headers),d?f.kuzzle.query(this.collection,"write",h,g,c,function(a,b){return a?d(a):void d(null,f.documentFactory(b._id,b))}):this.kuzzle.query(this.collection,"write",h,g,c),this},d.prototype["delete"]=function(a,b){var c={};return b||"function"!=typeof a||(b=a,a=null),c=this.kuzzle.addHeaders(c,this.headers),this.kuzzle.query(this.collection,"admin","deleteCollection",c,a,b),this},d.prototype.deleteDocument=function(a,b,c){var d,e={};return"string"==typeof a?(e._id=a,d="delete"):(e.body=a,d="deleteByQuery"),c||"function"!=typeof b||(c=b,b=null),e=this.kuzzle.addHeaders(e,this.headers),c?this.kuzzle.query(this.collection,"write",d,e,b,function(a,b){return a?c(a):void("delete"===d?c(null,[e._id]):c(null,b.ids))}):this.kuzzle.query(this.collection,"write",d,e,b),this},d.prototype.fetchDocument=function(a,b,c){var d={_id:a},e=this;return c||"function"!=typeof b||(c=b,b=null),e.kuzzle.callbackRequired("KuzzleDataCollection.fetch",c),d=e.kuzzle.addHeaders(d,this.headers),e.kuzzle.query(this.collection,"read","get",d,b,function(a,b){return a?c(a):void c(null,e.documentFactory(b._id,b))}),this},d.prototype.fetchAllDocuments=function(a,b){return b||"function"!=typeof a||(b=a,a=null),this.kuzzle.callbackRequired("KuzzleDataCollection.fetchAll",b),this.advancedSearch({},a,b),this},d.prototype.getMapping=function(a,b){var c;return b||"function"!=typeof a||(b=a,a=null),this.kuzzle.callbackRequired("KuzzleDataCollection.getMapping",b),c=new f(this),c.refresh(a,b),this},d.prototype.publishMessage=function(a,b){var c={};return a instanceof e?c=a.toJSON():c.body=a,c.persist=!1,c=this.kuzzle.addHeaders(c,this.headers),this.kuzzle.query(this.collection,"write","publish",c,b),this},d.prototype.putMapping=function(a,b,c){var d;return c||"function"!=typeof b||(c=b,b=null),d=new f(this,a),d.apply(b,c),this},d.prototype.replaceDocument=function(a,b,c,d){var e=this,f={_id:a,body:b};return d||"function"!=typeof c||(d=c,c=null),f=e.kuzzle.addHeaders(f,this.headers),d?e.kuzzle.query(this.collection,"write","createOrUpdate",f,c,function(a,b){return a?d(a):void d(null,e.documentFactory(b._id,b))}):e.kuzzle.query(this.collection,"write","createOrUpdate",f,c),this},d.prototype.subscribe=function(a,b,c){var d;return c||"function"!=typeof b||(c=b,b=null),this.kuzzle.callbackRequired("KuzzleDataCollection.subscribe",c),d=new g(this,b),d.renew(a,c)},d.prototype.truncate=function(a,b){var c={};return b||"function"!=typeof a||(b=a,a=null),c=this.kuzzle.addHeaders(c,this.headers),this.kuzzle.query(this.collection,"admin","truncateCollection",c,a,b),this},d.prototype.updateDocument=function(a,b,c,d){var f={_id:a,body:b},g=this;return d||"function"!=typeof c||(d=c,c=null),f=g.kuzzle.addHeaders(f,this.headers),d?g.kuzzle.query(this.collection,"write","update",f,c,function(a,b){var c;return a?d(a):(c=new e(g,b._id),void d(null,c))}):g.kuzzle.query(this.collection,"write","update",f,c),g},d.prototype.documentFactory=function(a,b){var c=b._source?new e(this,a,b._source):new e(this,a,b);return c},d.prototype.roomFactory=function(a){return new g(this,a)},d.prototype.dataMappingFactory=function(a){return new f(this,a)},d.prototype.setHeaders=function(a,b){return this.kuzzle.setHeaders.call(this,a,b),this},b.exports=d},{"./kuzzleDataMapping":4,"./kuzzleDocument":5,"./kuzzleRoom":6}],4:[function(a,b,c){function d(a,b){return Object.defineProperties(this,{collection:{value:a.collection,eunmerable:!0},kuzzle:{value:a.kuzzle,enumerable:!0},headers:{value:JSON.parse(JSON.stringify(a.headers)),enumerable:!0,writable:!0},mapping:{value:b||{},enumerable:!0,writable:!0}}),this.kuzzle.bluebird?this.kuzzle.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["set","setHeaders"];return d&&-1===e.indexOf(a)}}):this}d.prototype.apply=function(a,b){var c=this,d=this.kuzzle.addHeaders({body:{properties:this.mapping}},this.headers);return b||"function"!=typeof a||(b=a,a=null),c.kuzzle.query(this.collection,"admin","putMapping",d,a,function(a,d){return a?b?b(a):!1:(c.mapping=d._source.properties,void(b&&b(null,c)))}),this},d.prototype.refresh=function(a,b){var c=this,d=this.kuzzle.addHeaders({},this.headers);return b||"function"!=typeof a||(b=a,a=null),this.kuzzle.query(this.collection,"admin","getMapping",d,a,function(a,d){return a?b?b(a):!1:(c.mapping=d.mainindex.mappings[c.collection].properties,void(b&&b(null,c)))}),this},d.prototype.set=function(a,b){return this.mapping[a]=b,this},d.prototype.setHeaders=function(a,b){return this.kuzzle.setHeaders.call(this,a,b),this},b.exports=d},{}],5:[function(a,b,c){function d(a,b,c){return Object.defineProperties(this,{queue:{value:[],writable:!0},refreshing:{value:!1,writable:!0},collection:{value:a.collection,enumerable:!0},dataCollection:{value:a,enumerable:!0},kuzzle:{value:a.kuzzle,enumerable:!0},id:{value:void 0,enumerable:!0,writable:!0},content:{value:{},writable:!0,enumerable:!0},headers:{value:JSON.parse(JSON.stringify(a.headers)),enumerable:!0,writable:!0},version:{value:void 0,enumerable:!0,writable:!0}}),!c&&b&&"object"==typeof b&&(c=b,b=null),c&&(c._version&&(this.version=c._version,delete c._version),this.setContent(c,!0)),b&&(Object.defineProperty(this,"id",{value:b,enumerable:!0}),c||this.refresh()),this.kuzzle.bluebird?this.kuzzle.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["delete","refresh","save"];return d&&-1!==e.indexOf(a)}}):this}function e(){for(var a;this.queue.length>0;)a=this.queue.shift(),this[a.action].apply(this,a.args)}d.prototype.toJSON=function(){var a={};return this.id&&(a._id=this.id),a.body=this.content,a._version=this.version,a=this.kuzzle.addHeaders(a,this.headers)},d.prototype.toString=function(){return JSON.stringify(this.toJSON())},d.prototype["delete"]=function(a,b){var c=this;if(b||"function"!=typeof a||(b=a,a=null),this.refreshing)return this.queue.push({action:"delete",args:[a,b]}),this;if(!this.id)throw new Error("KuzzleDocument.delete: cannot delete a document without a document ID");return b?this.kuzzle.query(this.collection,"write","delete",this.toJSON(),a,function(a){return a?b(a):void b(null,c)}):this.kuzzle.query(this.collection,"write","delete",this.toJSON(),a),this},d.prototype.refresh=function(a,b){var c=this;if(b||"function"!=typeof a||(b=a,a=null),this.refreshing)return this.queue.push({action:"refresh",args:[a,b]}),this;if(!c.id)throw new Error("KuzzleDocument.refresh: cannot retrieve a document if no ID has been provided");return c.refreshing=!0,c.kuzzle.query(c.collection,"read","get",{_id:c.id},a,function(a,d){return a?(c.refreshing=!1,c.queue=[],b?b(a):!1):(c.version=d._version,c.content=d._source,b&&b(null,c),c.refreshing=!1,void e.call(c))}),this},d.prototype.save=function(a,b){var c=this.toJSON(),d=this;return a&&void 0===b&&"function"==typeof a&&(b=a,a=null),d.refreshing?(d.queue.push({action:"save",args:[a,b]}),d):(c.persist=!0,d.kuzzle.query(this.collection,"write","createOrUpdate",c,a,function(a,c){return a?b?b(a):!1:(d.id=c._id,d.version=c._version,void(b&&b(null,d)))}),d)},d.prototype.publish=function(a){var b=this.toJSON();return this.refreshing?(this.queue.push({action:"publish",args:[a]}),this):(b.persist=!1,this.kuzzle.query(this.collection,"write","publish",b,a),this)},d.prototype.setContent=function(a,b){var c=this;return this.refreshing?(this.queue.push({action:"setContent",args:[a,b]}),this):(b?this.content=a:Object.keys(a).forEach(function(b){c.content[b]=a[b]}),this)},d.prototype.subscribe=function(a,b){var c;if(a&&!b&&"function"==typeof a&&(b=a,a=null),this.kuzzle.callbackRequired("KuzzleDocument.subscribe",b),!this.id)throw new Error("KuzzleDocument.subscribe: cannot subscribe to a document if no ID has been provided");return c={ids:{values:[this.id]}},this.dataCollection.subscribe(c,a,b)},d.prototype.setHeaders=function(a,b){return this.kuzzle.setHeaders.call(this,a,b),this},b.exports=d},{}],6:[function(a,b,c){function d(a,b){return Object.defineProperties(this,{callback:{value:null,writable:!0},channel:{value:null,writable:!0},id:{value:g.v4()},notifier:{value:null,writable:!0},queue:{value:[],writable:!0},scope:{value:b&&b.scope?b.scope:"all"},state:{value:b&&b.state?b.state:"done"},subscribing:{value:!1,writable:!0},users:{value:b&&b.users?b.users:"none"},collection:{value:a.collection,enumerable:!0},kuzzle:{value:a.kuzzle,enumerable:!0},filters:{value:null,enumerable:!0,writable:!0},headers:{value:JSON.parse(JSON.stringify(a.headers)),enumerable:!0,writable:!0},metadata:{value:b&&b.metadata?b.metadata:{},enumerable:!0,writable:!0},roomId:{value:null,enumerable:!0,writable:!0},subscribeToSelf:{value:b&&"boolean"==typeof b.subscribeToSelf?b.subscribeToSelf:!0,enumerable:!0,writable:!0}}),this.kuzzle.bluebird?this.kuzzle.bluebird.promisifyAll(this,{suffix:"Promise",filter:function(a,b,c,d){var e=["count"];return d&&-1!==e.indexOf(a)}}):this}function e(a){return a.error?this.callback(a.error):void(this.kuzzle.requestHistory[a.result.requestId]?(this.subscribeToSelf&&this.callback(null,a.result),delete this.kuzzle.requestHistory[a.result.requestId]):this.callback(null,a.result))}function f(){for(var a;this.queue.length>0;)a=this.queue.shift(),this[a.action].apply(this,a.args)}var g=a("node-uuid");d.prototype.count=function(a){var b;return this.kuzzle.callbackRequired("KuzzleRoom.count",a),b=this.kuzzle.addHeaders({body:{roomId:this.roomId}},this.headers),this.subscribing?(this.queue.push({action:"count",args:[a]}),this):(this.kuzzle.query(this.collection,"subscribe","count",b,function(b,c){return b?a(b):void a(null,c.count)}),this)},d.prototype.renew=function(a,b){var c={scope:this.scope,state:this.state,users:this.users},d=this;return!b&&a&&"function"==typeof a&&(b=a,a=null),this.subscribing?(this.queue.push({action:"renew",args:[a,b]}),this):(this.kuzzle.callbackRequired("KuzzleRoom.renew",b),this.unsubscribe(),this.roomId=null,this.subscribing=!0,this.callback=b,this.kuzzle.subscriptions.pending[d.id]=d,a&&(this.filters=a),c.body=this.filters,c=this.kuzzle.addHeaders(c,this.headers),d.kuzzle.query(this.collection,"subscribe","on",c,{metadata:this.metadata},function(a,b){if(delete d.kuzzle.subscriptions.pending[d.id],d.subscribing=!1,a)throw d.queue=[],new Error("Error during Kuzzle subscription: "+a.message);d.roomId=b.roomId,d.channel=b.channel,d.kuzzle.subscriptions[d.roomId]||(d.kuzzle.subscriptions[d.roomId]={}),d.kuzzle.subscriptions[d.roomId][d.id]=d,d.notifier=e.bind(d),d.kuzzle.socket.on(d.channel,d.notifier),f.call(d)}),this)},d.prototype.unsubscribe=function(){var a,b=this,c=b.roomId;return b.subscribing?(b.queue.push({action:"unsubscribe",args:[]}),b):(c&&(b.kuzzle.socket.off(b.channel,this.notifier),1===Object.keys(b.kuzzle.subscriptions[c]).length?(delete b.kuzzle.subscriptions[c],0===Object.keys(b.kuzzle.subscriptions.pending).length?b.kuzzle.query(this.collection,"subscribe","off",{body:{roomId:c}}):a=setInterval(function(){0===Object.keys(b.kuzzle.subscriptions.pending).length&&(b.kuzzle.subscriptions[c]||b.kuzzle.query(b.collection,"subscribe","off",{body:{roomId:c}}),clearInterval(a))},100)):delete b.kuzzle.subscriptions[c][b.id],b.roomId=null),b)},d.prototype.setHeaders=function(a,b){return this.kuzzle.setHeaders.call(this,a,b),this},b.exports=d},{"node-uuid":1}]},{},[2]); //# sourceMappingURL=kuzzle.min.map \ No newline at end of file diff --git a/dist/kuzzle.min.map b/dist/kuzzle.min.map index 7d8cfdf76..7c78eea91 100644 --- a/dist/kuzzle.min.map +++ b/dist/kuzzle.min.map @@ -1 +1 @@ -{"version":3,"sources":["kuzzle.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length",1,"module","parse","buf","offset","ii","toLowerCase","replace","oct","_hexToByte","unparse","bth","_byteToHex","v1","options","b","clockseq","_clockseq","msecs","Date","getTime","nsecs","_lastNSecs","dt","_lastMSecs","tl","tmh","node","_nodeId","v4","BufferClass","rnds","random","rng","_rng","_global","this","_rb","randomBytes","crypto","getRandomValues","_rnds8","Uint8Array","_rnds","Array","Math","Buffer","toString","substr","_seedBytes","uuid","define","amd","_previousRoot","noConflict",2,"cleanQueue","self","now","lastDocumentIndex","queueTTL","offlineQueue","forEach","query","index","ts","splice","queueMaxSize","emitRequest","request","cb","socket","once","requestId","response","error","result","emit","requestHistory","Object","keys","key","dequeue","shift","setTimeout","max","replayInterval","queuing","KuzzleDataCollection","Kuzzle","url","defineProperties","collections","value","writable","eventListeners","connected","disconnected","reconnected","io","state","subscriptions","pending","autoReconnect","enumerable","reconnectionDelay","autoQueue","autoReplay","autoResubscribe","headers","metadata","queueFilter","window","opt","hasOwnProperty","getOwnPropertyDescriptor","offlineMode","defineProperty","header","errorMessagePrefix","callback","connect","bluebird","promisifyAll","suffix","filter","name","func","target","passes","whitelist","indexOf","prototype","reconnection","force new connection","roomId","subscriptionId","subscription","renew","listener","fn","on","logout","addListener","event","listenerId","knownEvents","listenerType","isValid","push","id","getAllStatistics","callbackRequired","err","res","statistics","getStatistics","timestamp","queryCB","arguments","body","startTime","dataCollectionFactory","collection","flushQueue","listCollections","close","controller","action","attr","object","meta","queuable","addHeaders","removeAllListeners","eventName","removeListener","replayQueue","setHeaders","content","isArray","startQueuing","stopQueuing","./kuzzleDataCollection","node-uuid","socket.io-client","undefined",3,"kuzzle","JSON","stringify","blacklist","KuzzleDocument","KuzzleDataMapping","KuzzleRoom","advancedSearch","filters","documents","hits","doc","documentFactory","_id","total","count","create","data","createDocument","document","toJSON","updateIfExist","persist","deleteDocument","arg","ids","fetchDocument","documentId","fetchAllDocuments","getMapping","kuzzleMapping","refresh","publishMessage","putMapping","mapping","dataMapping","apply","replaceDocument","subscribe","room","truncate","updateDocument","_source","roomFactory","dataMappingFactory","./kuzzleDataMapping","./kuzzleDocument","./kuzzleRoom",4,"kuzzleDataCollection","eunmerable","properties","mainindex","mappings","set","field",5,"queue","refreshing","dataCollection","version","_version","setContent","element","args","save","publish","values",6,"channel","notifier","scope","subscribing","users","subscribeToSelf","notificationCallback","subscribeQuery","unsubscribe","message","bind","interval","off","setInterval","clearInterval"],"mappings":";CAAA,QAAUA,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATC,UAAqBA,OAAQ,KAAIF,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGI,EAAE,MAAOA,GAAEJ,GAAE,EAAI,IAAIK,GAAE,GAAIC,OAAM,uBAAuBN,EAAE,IAAK,MAAMK,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEX,EAAEG,IAAIS,WAAYb,GAAEI,GAAG,GAAGU,KAAKF,EAAEC,QAAQ,SAASd,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,EAAEA,EAAEF,IAAIa,EAAEA,EAAEC,QAAQd,EAAEC,EAAEC,EAAEC,GAAG,MAAOD,GAAEG,GAAGS,QAAkD,IAAI,GAA1CL,GAAkB,kBAATD,UAAqBA,QAAgBH,EAAE,EAAEA,EAAE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,IAGL0K,IACF1K,EAAKmI,OAAOrH,OAAOsM,IAAIpN,EAAKwM,QAAS7N,KAAK8N,UAEkB,IAAxDnL,OAAOC,KAAKvB,EAAKmI,OAAOvF,cAAc8H,IAAOpO,cACxC0D,GAAKmI,OAAOvF,cAAc8H,GAE6B,IAA1DpJ,OAAOC,KAAKvB,EAAKmI,OAAOvF,cAAcC,SAASvG,OACjD0D,EAAKmI,OAAO7H,MAAM3B,KAAK+H,WAAY,YAAa,OAAQH,MAAOzB,OAAQ4F,KAEvEyC,EAAWE,YAAY,WACyC,IAA1D/L,OAAOC,KAAKvB,EAAKmI,OAAOvF,cAAcC,SAASvG,SAC5C0D,EAAKmI,OAAOvF,cAAc8H,IAC7B1K,EAAKmI,OAAO7H,MAAMN,EAAK0G,WAAY,YAAa,OAAQH,MAAOzB,OAAQ4F,KAEzE4C,cAAcH,KAEf,YAGEnN,GAAKmI,OAAOvF,cAAc8H,GAAM1K,EAAK6F,IAG9C7F,EAAK8E,OAAS,MAGT9E,IAYTyI,EAAW9D,UAAU8C,WAAa,SAAUC,EAAS5K,GAEnD,MADA6B,MAAKwJ,OAAOV,WAAWpL,KAAKsC,KAAM+I,EAAS5K,GACpC6B,MAuCTnC,EAAOJ,QAAUqM,IAEdV,YAAY,SAAS","file":"kuzzle.min.js"} \ No newline at end of file +{"version":3,"sources":["kuzzle.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length",1,"module","parse","buf","offset","ii","toLowerCase","replace","oct","_hexToByte","unparse","bth","_byteToHex","v1","options","b","clockseq","_clockseq","msecs","Date","getTime","nsecs","_lastNSecs","dt","_lastMSecs","tl","tmh","node","_nodeId","v4","BufferClass","rnds","random","rng","_rng","_global","this","_rb","randomBytes","crypto","getRandomValues","_rnds8","Uint8Array","_rnds","Array","Math","Buffer","toString","substr","_seedBytes","uuid","define","amd","_previousRoot","noConflict",2,"cleanQueue","self","now","lastDocumentIndex","queueTTL","offlineQueue","forEach","query","index","ts","splice","queueMaxSize","emitRequest","request","cb","socket","once","requestId","response","error","result","emit","requestHistory","Object","keys","key","dequeue","shift","setTimeout","max","replayInterval","queuing","KuzzleDataCollection","Kuzzle","url","defineProperties","collections","value","writable","connectCB","eventListeners","connected","disconnected","reconnected","io","state","subscriptions","pending","autoReconnect","enumerable","reconnectionDelay","autoQueue","autoReplay","autoResubscribe","headers","metadata","queueFilter","window","opt","hasOwnProperty","getOwnPropertyDescriptor","offlineMode","defineProperty","header","errorMessagePrefix","callback","connect","bluebird","promisifyAll","suffix","filter","name","func","target","passes","whitelist","indexOf","prototype","reconnection","force new connection","roomId","subscriptionId","subscription","renew","listener","fn","on","logout","addListener","event","listenerId","knownEvents","listenerType","isValid","push","id","getAllStatistics","callbackRequired","err","res","statistics","getStatistics","timestamp","queryCB","arguments","body","startTime","dataCollectionFactory","collection","flushQueue","listCollections","collectionType","type","close","controller","action","attr","object","meta","queuable","addHeaders","removeAllListeners","eventName","removeListener","replayQueue","setHeaders","content","isArray","startQueuing","stopQueuing","./kuzzleDataCollection","node-uuid","socket.io-client","undefined",3,"kuzzle","JSON","stringify","blacklist","KuzzleDocument","KuzzleDataMapping","KuzzleRoom","advancedSearch","filters","documents","hits","doc","documentFactory","_id","total","count","create","data","createDocument","document","toJSON","updateIfExist","persist","deleteDocument","arg","ids","fetchDocument","documentId","fetchAllDocuments","getMapping","kuzzleMapping","refresh","publishMessage","putMapping","mapping","dataMapping","apply","replaceDocument","subscribe","room","truncate","updateDocument","_source","roomFactory","dataMappingFactory","./kuzzleDataMapping","./kuzzleDocument","./kuzzleRoom",4,"kuzzleDataCollection","eunmerable","properties","mainindex","mappings","set","field",5,"queue","refreshing","dataCollection","version","_version","setContent","element","args","save","publish","values",6,"channel","notifier","scope","subscribing","users","subscribeToSelf","notificationCallback","subscribeQuery","unsubscribe","message","bind","interval","off","setInterval","clearInterval"],"mappings":";CAAA,QAAUA,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ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