@orbis-systems/orbis-api-client
Advanced tools
Comparing version 5.5.1 to 5.6.0
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_createClass=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_axios=require("axios"),_axios2=_interopRequireDefault(_axios),_base=require("base-64"),_base2=_interopRequireDefault(_base),_jsonwebtoken=require("jsonwebtoken"),_jsonwebtoken2=_interopRequireDefault(_jsonwebtoken),_LocalStorage=require("./session_stores/LocalStorage"),_LocalStorage2=_interopRequireDefault(_LocalStorage),_WSWrapper=require("./WSWrapper"),_WSWrapper2=_interopRequireDefault(_WSWrapper);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _objectWithoutProperties(a,b){var c={};for(var d in a)0<=b.indexOf(d)||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d("next",a)},function(a){d("throw",a)})}return d("next")})}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}require("babel-core/register"),require("babel-polyfill");var APIClient=function(){function a(b){_classCallCheck(this,a),this.config=b,this.config.session_store||(this.config.session_store=_LocalStorage2.default)}return _createClass(a,[{key:"login",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f,g,h,i,j,k,l,m,n;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,d=this.config,e=d.domain,f=d.sign_url,g=d.base_url,h=d.session_store,i=e&&{Referer:e}||void 0,a.next=5,_axios2.default.post(f,{},{headers:i});case 5:return j=a.sent,k=j.data.signature,l={username:b,password:c,signature:k},a.next=10,_axios2.default.post(g+"/auth/v1/login",l,{headers:i});case 10:return m=a.sent,n=m.data.sessionId,a.next=14,h.set("sessionId",n,60);case 14:return a.abrupt("return",!0);case 17:throw a.prev=17,a.t0=a["catch"](0),this.logError(a.t0),a.t0;case 21:case"end":return a.stop();}},a,this,[[0,17]])}));return function(){return a.apply(this,arguments)}}()},{key:"logout",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(){return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,this.get("auth/v1/logout");case 3:return this.expireSession(),a.abrupt("return",!0);case 7:throw a.prev=7,a.t0=a["catch"](0),this.logError(a.t0),a.t0;case 11:case"end":return a.stop();}},a,this,[[0,7]])}));return function(){return a.apply(this,arguments)}}()},{key:"changePassword",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f,g,h;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,d=this.config,e=d.domain,f=d.base_url,g={currentPassword:b,newPassword:c},h=this.getHeaders(),e&&(h.Referer=e),a.next=7,_axios2.default.post(f+"/auth/v1/password/change",g,{headers:h});case 7:return a.abrupt("return",!0);case 10:throw a.prev=10,a.t0=a["catch"](0),this.logError(a.t0),a.t0;case 14:case"end":return a.stop();}},a,this,[[0,10]])}));return function(){return a.apply(this,arguments)}}()},{key:"getHeaders",value:function(){return this.hasSession()?{Authorization:"Session "+this.getToken()}:{}}},{key:"getToken",value:function(){var a=this.config.session_store,b=a.get("sessionId"),c=_jsonwebtoken2.default.sign({sub:b},"test",{expiresIn:"5s"});return _base2.default.encode(c)}},{key:"hasSession",value:function(){return this.config.session_store.has("sessionId")}},{key:"expireSession",value:function(){var a=this.config.session_store;a.set("sessionId",null,0)}},{key:"logError",value:function(a){console.error(a.name+": "+a.message,"\nResponse:",a.response,"\nRequest:",a.request)}},{key:"get",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c,d){return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.request(_extends({method:"GET",endpoint:b,params:c},d));case 2:return a.abrupt("return",a.sent);case 3:case"end":return a.stop();}},a,this)}));return function(){return a.apply(this,arguments)}}()},{key:"post",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c,d){return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.request(_extends({method:"POST",endpoint:b,data:c},d));case 2:return a.abrupt("return",a.sent);case 3:case"end":return a.stop();}},a,this)}));return function(){return a.apply(this,arguments)}}()},{key:"request",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b){var c,d,e,f,g=b.endpoint,h=_objectWithoutProperties(b,["endpoint"]);return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return h.headers=_extends({},h.headers,this.getHeaders()),c=this.config,d=c.base_url,e=c.onUnauthorized,a.prev=2,a.next=5,(0,_axios2.default)(d+"/"+g,h);case 5:return a.abrupt("return",a.sent.data);case 8:throw a.prev=8,a.t0=a["catch"](2),this.logError(a.t0),f=a.t0.response,f&&401===f.status&&e&&e(),a.t0;case 14:case"end":return a.stop();}},a,this,[[2,8]])}));return function(){return a.apply(this,arguments)}}()},{key:"websocket",value:function(a,b){var c=this,d=b.timeout,e=b.maxAttempts,f=b.onOpen,g=b.onMessage,h=b.onReconnect,i=b.onMaximum,j=b.onClose,k=b.onError,l=function(){return c.config.streaming_url+"/"+a+"?auth="+escape("Session "+c.getToken())},m=new _WSWrapper2.default(l(),{maxAttempts:e,timeout:d||5e3,onopen:f,onmessage:g,onmaximum:i,onerror:k,onclose:j,onreconnect:function(a){m.updateUrl(l()),h&&h(a)}});return m}}]),a}();exports.default=APIClient; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_createClass=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_axios=require("axios"),_axios2=_interopRequireDefault(_axios),_base=require("base-64"),_base2=_interopRequireDefault(_base),_jsonwebtoken=require("jsonwebtoken"),_jsonwebtoken2=_interopRequireDefault(_jsonwebtoken),_LocalStorage=require("./session_stores/LocalStorage"),_LocalStorage2=_interopRequireDefault(_LocalStorage),_WSWrapper=require("./WSWrapper"),_WSWrapper2=_interopRequireDefault(_WSWrapper);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _objectWithoutProperties(a,b){var c={};for(var d in a)0<=b.indexOf(d)||Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);return c}function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d("next",a)},function(a){d("throw",a)})}return d("next")})}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}require("babel-core/register"),require("babel-polyfill");var APIClient=function(){function a(b){var c=this;_classCallCheck(this,a),this.getWebSocketUrl=function(a){return c.config.streaming_url+"/"+a+"?auth="+escape("Session "+c.getToken())},this.config=b,this.config.session_store||(this.config.session_store=_LocalStorage2.default)}return _createClass(a,[{key:"login",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f,g,h,i,j,k,l,m,n;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,d=this.config,e=d.domain,f=d.sign_url,g=d.base_url,h=d.session_store,i=e&&{Referer:e}||void 0,a.next=5,_axios2.default.post(f,{},{headers:i});case 5:return j=a.sent,k=j.data.signature,l={username:b,password:c,signature:k},a.next=10,_axios2.default.post(g+"/auth/v1/login",l,{headers:i});case 10:return m=a.sent,n=m.data.sessionId,a.next=14,h.set("sessionId",n,60);case 14:return a.abrupt("return",!0);case 17:throw a.prev=17,a.t0=a["catch"](0),this.logError(a.t0),a.t0;case 21:case"end":return a.stop();}},a,this,[[0,17]])}));return function(){return a.apply(this,arguments)}}()},{key:"logout",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(){return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,this.get("auth/v1/logout");case 3:return this.expireSession(),a.abrupt("return",!0);case 7:throw a.prev=7,a.t0=a["catch"](0),this.logError(a.t0),a.t0;case 11:case"end":return a.stop();}},a,this,[[0,7]])}));return function(){return a.apply(this,arguments)}}()},{key:"changePassword",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f,g,h;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,d=this.config,e=d.domain,f=d.base_url,g={currentPassword:b,newPassword:c},h=this.getHeaders(),e&&(h.Referer=e),a.next=7,_axios2.default.post(f+"/auth/v1/password/change",g,{headers:h});case 7:return a.abrupt("return",!0);case 10:throw a.prev=10,a.t0=a["catch"](0),this.logError(a.t0),a.t0;case 14:case"end":return a.stop();}},a,this,[[0,10]])}));return function(){return a.apply(this,arguments)}}()},{key:"getHeaders",value:function(){return this.hasSession()?{Authorization:"Session "+this.getToken()}:{}}},{key:"getToken",value:function(){var a=this.config.session_store,b=a.get("sessionId"),c=_jsonwebtoken2.default.sign({sub:b},"test",{expiresIn:"5s"});return _base2.default.encode(c)}},{key:"hasSession",value:function(){return this.config.session_store.has("sessionId")}},{key:"expireSession",value:function(){var a=this.config.session_store;a.set("sessionId",null,0)}},{key:"logError",value:function(a){console.error(a.name+": "+a.message,"\nResponse:",a.response,"\nRequest:",a.request)}},{key:"get",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c,d){return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.request(_extends({method:"GET",endpoint:b,params:c},d));case 2:return a.abrupt("return",a.sent);case 3:case"end":return a.stop();}},a,this)}));return function(){return a.apply(this,arguments)}}()},{key:"post",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c,d){return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.request(_extends({method:"POST",endpoint:b,data:c},d));case 2:return a.abrupt("return",a.sent);case 3:case"end":return a.stop();}},a,this)}));return function(){return a.apply(this,arguments)}}()},{key:"request",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b){var c,d,e,f,g=b.endpoint,h=_objectWithoutProperties(b,["endpoint"]);return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return h.headers=_extends({},h.headers,this.getHeaders()),c=this.config,d=c.base_url,e=c.onUnauthorized,a.prev=2,a.next=5,(0,_axios2.default)(d+"/"+g,h);case 5:return a.abrupt("return",a.sent.data);case 8:throw a.prev=8,a.t0=a["catch"](2),this.logError(a.t0),f=a.t0.response,f&&401===f.status&&e&&e(),a.t0;case 14:case"end":return a.stop();}},a,this,[[2,8]])}));return function(){return a.apply(this,arguments)}}()},{key:"websocket",value:function(a){var b=this,c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},d=c.timeout,e=c.maxAttempts,f=c.onOpen,g=c.onMessage,h=c.onReconnect,i=c.onMaximum,j=c.onClose,k=c.onError,l=new _WSWrapper2.default(this.getWebSocketUrl(a),{maxAttempts:e,timeout:d||1e4,onopen:f,onmessage:g,onmaximum:i,onerror:k,onclose:j,onreconnect:function(c){l.updateUrl(b.getWebSocketUrl(a)),h&&h(c)}});return l}}]),a}();exports.default=APIClient; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _APICategory2=require("../APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var Allocations=function(a){function b(a){_classCallCheck(this,b);var c=_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.cancel=c.request.bind(c,{url:"v2/allocations/cancel",method:"POST"}),c.details=c.request.bind(c,{url:"v2/allocations/details",method:"GET"}),c.preallocate=c.request.bind(c,{url:"v2/allocations/preallocate",method:"POST"}),c.search=c.request.bind(c,{url:"v2/allocations/search",method:"GET"}),c.trigger=c.request.bind(c,{url:"v2/allocations/trigger",method:"POST"}),c.validate=c.request.bind(c,{url:"v2/allocations/validate",method:"POST"}),c}return _inherits(b,a),b}(_APICategory3.default);exports.default=Allocations; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _APICategory2=require("../APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var Allocations=function(a){function b(a){_classCallCheck(this,b);var c=_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.cancel=c.request.bind(c,{url:"allocations/cancel",method:"POST"}),c.details=c.request.bind(c,{url:"allocations/details",method:"GET"}),c.preallocate=c.request.bind(c,{url:"allocations/preallocate",method:"POST"}),c.search=c.request.bind(c,{url:"allocations/search",method:"GET"}),c.trigger=c.request.bind(c,{url:"allocations/trigger",method:"POST"}),c.validate=c.request.bind(c,{url:"allocations/validate",method:"POST"}),c}return _inherits(b,a),b}(_APICategory3.default);exports.default=Allocations; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _APICategory2=require("../APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var Research=function(a){function b(a){_classCallCheck(this,b);var c=_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.research=c.request.bind(c,{url:"research",method:"GET"}),c.actions={search:c.request.bind(c,{url:"research/actions/search",method:"GET"}),types:c.request.bind(c,{url:"research/actions/types",method:"GET"})},c.adrs={base:c.request.bind(c,{url:"research/adrs",method:"GET"}),top10:{base:c.request.bind(c,{url:"research/adrs/top10",method:"GET"}),defaults:c.request.bind(c,{url:"research/adrs/top10/defaults",method:"GET"})}},c.dates={lastOpen:c.request.bind(c,{url:"research/dates/lastOpen",method:"GET"}),markets:c.request.bind(c,{url:"research/dates/markets",method:"GET"})},c.earnings=c.request.bind(c,{url:"research/earnings",method:"GET"}),c.etf={breakdown:c.request.bind(c,{url:"research/etf/breakdown",method:"GET"}),details:c.request.bind(c,{url:"research/etf/details",method:"GET"}),init:c.request.bind(c,{url:"research/etf/init",method:"GET"}),screener:c.request.bind(c,{url:"research/etf/screener",method:"GET"}),top10:c.request.bind(c,{url:"research/etf/top10",method:"GET"})},c.fundamentals={base:c.request.bind(c,{url:"research/fundamentals",method:"GET"}),types:c.request.bind(c,{url:"research/fundamentals/types",method:"GET"})},c.heatMap={industryRanking:c.request.bind(c,{url:"research/heatMap/industryRanking",method:"GET"}),symbols:c.request.bind(c,{url:"research/heatMap/symbols",method:"GET"})},c.historicalPrices=c.request.bind(c,{url:"research/historicalPrices",method:"GET"}),c.index={components:c.request.bind(c,{url:"research/index/components",method:"GET"})},c.ipo=c.request.bind(c,{url:"research/ipo",method:"GET"}),c.marketDate=c.request.bind(c,{url:"research/marketDate",method:"GET"}),c.marketOverview=c.request.bind(c,{url:"research/marketOverview",method:"GET"}),c.news={base:c.request.bind(c,{url:"research/news",method:"GET"}),ticker:c.request.bind(c,{url:"research/news/ticker",method:"GET"})},c.option={radar:c.request.bind(c,{url:"research/option/radar",method:"GET"}),ratios:c.request.bind(c,{url:"research/option/ratios",method:"GET"})},c.owner={details:c.request.bind(c,{url:"research/owner/details",method:"GET"})},c.ownerships={details:c.request.bind(c,{url:"research/ownerships/details",method:"GET"})},c.screener=c.request.bind(c,{url:"research/screener",method:"POST"}),c.sec=c.request.bind(c,{url:"research/sec",method:"GET"}),c.tipranks={analyst:{base:c.request.bind(c,{url:"research/tipranks/analyst",method:"GET"}),portfolio:c.request.bind(c,{url:"research/tipranks/analyst/portfolio",method:"GET"}),profile:c.request.bind(c,{url:"research/tipranks/analyst/profile",method:"GET"}),top:c.request.bind(c,{url:"research/tipranks/analyst/top",method:"GET"})},consensus:{blogger:c.request.bind(c,{url:"research/tipranks/consensus/blogger",method:"GET"}),sector:c.request.bind(c,{url:"research/tipranks/consensus/sector",method:"GET"})},hedgefunds:c.request.bind(c,{url:"research/tipranks/hedgefunds",method:"GET"}),insiders:{base:c.request.bind(c,{url:"research/tipranks/insiders",method:"GET"}),transactions:c.request.bind(c,{url:"research/tipranks/insiders/transactions",method:"GET"})},livefeed:c.request.bind(c,{url:"research/tipranks/livefeed",method:"GET"}),rating:{blogger:c.request.bind(c,{url:"research/tipranks/rating/blogger",method:"GET"})},stocks:{overview:c.request.bind(c,{url:"research/tipranks/stocks/overview",method:"GET"}),similar:c.request.bind(c,{url:"research/tipranks/stocks/similar",method:"GET"})},trending:c.request.bind(c,{url:"research/tipranks/trending",method:"GET"})},c.upgrades=c.request.bind(c,{url:"research/upgrades",method:"GET"}),c}return _inherits(b,a),b}(_APICategory3.default);exports.default=Research; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _APICategory2=require("../APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var Research=function(a){function b(a){_classCallCheck(this,b);var c=_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.research=c.request.bind(c,{url:"research",method:"GET"}),c.actions={search:c.request.bind(c,{url:"research/actions/search",method:"GET"}),types:c.request.bind(c,{url:"research/actions/types",method:"GET"})},c.adrs={base:c.request.bind(c,{url:"research/adrs",method:"GET"}),top10:{base:c.request.bind(c,{url:"research/adrs/top10",method:"GET"}),defaults:c.request.bind(c,{url:"research/adrs/top10/defaults",method:"GET"})}},c.dates={lastOpen:c.request.bind(c,{url:"research/dates/lastOpen",method:"GET"}),markets:c.request.bind(c,{url:"research/dates/markets",method:"GET"})},c.earnings=c.request.bind(c,{url:"research/earnings",method:"GET"}),c.etf={breakdown:c.request.bind(c,{url:"research/etf/breakdown",method:"GET"}),details:c.request.bind(c,{url:"research/etf/details",method:"GET"}),init:c.request.bind(c,{url:"research/etf/init",method:"GET"}),screener:c.request.bind(c,{url:"research/etf/screener",method:"GET"}),top10:c.request.bind(c,{url:"research/etf/top10",method:"GET"})},c.fundamentals={base:c.request.bind(c,{url:"research/fundamentals",method:"GET"}),types:c.request.bind(c,{url:"research/fundamentals/types",method:"GET"})},c.heatMap={industryRanking:c.request.bind(c,{url:"research/heatMap/industryRanking",method:"GET"}),symbols:c.request.bind(c,{url:"research/heatMap/symbols",method:"GET"})},c.historicalPrices=c.request.bind(c,{url:"research/historicalPrices",method:"GET"}),c.index={components:c.request.bind(c,{url:"research/index/components",method:"GET"})},c.ipo={performance:c.request.bind(c,{url:"research/ipo/performance",method:"GET"}),recent:c.request.bind(c,{url:"research/ipo/recent",method:"GET"}),upcoming:c.request.bind(c,{url:"research/ipo/upcoming",method:"GET"})},c.marketDate=c.request.bind(c,{url:"research/marketDate",method:"GET"}),c.marketOverview=c.request.bind(c,{url:"research/marketOverview",method:"GET"}),c.news={base:c.request.bind(c,{url:"research/news",method:"GET"}),ticker:c.request.bind(c,{url:"research/news/ticker",method:"GET"})},c.option={radar:c.request.bind(c,{url:"research/option/radar",method:"GET"}),ratios:c.request.bind(c,{url:"research/option/ratios",method:"GET"})},c.owner={details:c.request.bind(c,{url:"research/owner/details",method:"GET"})},c.ownerships={details:c.request.bind(c,{url:"research/ownerships/details",method:"GET"})},c.screener=c.request.bind(c,{url:"research/screener",method:"POST"}),c.sec=c.request.bind(c,{url:"research/sec",method:"GET"}),c.tipranks={analyst:{base:c.request.bind(c,{url:"research/tipranks/analyst",method:"GET"}),portfolio:c.request.bind(c,{url:"research/tipranks/analyst/portfolio",method:"GET"}),profile:c.request.bind(c,{url:"research/tipranks/analyst/profile",method:"GET"}),top:c.request.bind(c,{url:"research/tipranks/analyst/top",method:"GET"})},consensus:{blogger:c.request.bind(c,{url:"research/tipranks/consensus/blogger",method:"GET"}),sector:c.request.bind(c,{url:"research/tipranks/consensus/sector",method:"GET"})},hedgefunds:c.request.bind(c,{url:"research/tipranks/hedgefunds",method:"GET"}),insiders:{base:c.request.bind(c,{url:"research/tipranks/insiders",method:"GET"}),transactions:c.request.bind(c,{url:"research/tipranks/insiders/transactions",method:"GET"})},livefeed:c.request.bind(c,{url:"research/tipranks/livefeed",method:"GET"}),rating:{blogger:c.request.bind(c,{url:"research/tipranks/rating/blogger",method:"GET"})},stocks:{overview:c.request.bind(c,{url:"research/tipranks/stocks/overview",method:"GET"}),similar:c.request.bind(c,{url:"research/tipranks/stocks/similar",method:"GET"})},trending:c.request.bind(c,{url:"research/tipranks/trending",method:"GET"})},c.upgrades=c.request.bind(c,{url:"research/upgrades",method:"GET"}),c}return _inherits(b,a),b}(_APICategory3.default);exports.default=Research; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _APICategory2=require("../APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var User=function(a){function b(a){_classCallCheck(this,b);var c=_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.account={base:c.request.bind(c,{url:"user/account",method:"GET"}),history:c.request.bind(c,{url:"user/account/history",method:"GET"})},c.agreements={all:{active:c.request.bind(c,{url:"user/agreements/all/active",method:"GET"})},sign:c.request.bind(c,{url:"user/agreements/sign",method:"POST"}),unsigned:c.request.bind(c,{url:"user/agreements/unsigned",method:"GET"})},c.balance=c.request.bind(c,{url:"user/balance",method:"GET"}),c.device={deregister:c.request.bind(c,{url:"user/device/deregister",method:"GET"}),firebase:{register:c.request.bind(c,{url:"user/device/firebase/register",method:"POST"})},register:c.request.bind(c,{url:"user/device/register",method:"GET"})},c.droid={register:c.request.bind(c,{url:"user/droid/register",method:"POST"})},c.info=c.request.bind(c,{url:"user/info",method:"GET"}),c.portfolio={base:c.request.bind(c,{url:"user/portfolio",method:"GET"}),earnings:c.request.bind(c,{url:"user/portfolio/earnings",method:"GET"}),full:c.request.bind(c,{url:"user/portfolio/full",method:"GET"})},c.position={base:c.request.bind(c,{url:"user/position",method:"GET"}),history:c.request.bind(c,{url:"user/position/history",method:"GET"}),search:c.request.bind(c,{url:"user/position/search",method:"GET"})},c.preferences=c.request.bind(c,{url:"user/preferences",method:"GET"}),c.professional={attest:c.request.bind(c,{url:"user/professional/attest",method:"POST"})},c.rtb={base:c.request.bind(c,{url:"user/rtb",method:"GET"}),history:c.request.bind(c,{url:"user/rtb/history",method:"GET"})},c.v2={watchlist:{addEntry:c.request.bind(c,{url:"user/v2/watchlist/addEntry",method:"POST"}),create:c.request.bind(c,{url:"user/v2/watchlist/create",method:"POST"}),delete:c.request.bind(c,{url:"user/v2/watchlist/delete",method:"POST"}),removeEntry:c.request.bind(c,{url:"user/v2/watchlist/removeEntry",method:"POST"}),rename:c.request.bind(c,{url:"user/v2/watchlist/rename",method:"POST"})}},c.watchlist={base:c.request.bind(c,{url:"user/watchlist",method:"GET"}),addEntry:c.request.bind(c,{url:"user/watchlist/addEntry",method:"POST"}),create:c.request.bind(c,{url:"user/watchlist/create",method:"POST"}),delete:c.request.bind(c,{url:"user/watchlist/delete",method:"POST"}),removeEntry:c.request.bind(c,{url:"user/watchlist/removeEntry",method:"POST"}),rename:c.request.bind(c,{url:"user/watchlist/rename",method:"POST"})},c}return _inherits(b,a),b}(_APICategory3.default);exports.default=User; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _APICategory2=require("../APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var User=function(a){function b(a){_classCallCheck(this,b);var c=_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.account={base:c.request.bind(c,{url:"user/account",method:"GET"}),history:c.request.bind(c,{url:"user/account/history",method:"GET"})},c.agreements={all:{active:c.request.bind(c,{url:"user/agreements/all/active",method:"GET"})},sign:c.request.bind(c,{url:"user/agreements/sign",method:"POST"}),unsigned:c.request.bind(c,{url:"user/agreements/unsigned",method:"GET"})},c.balance=c.request.bind(c,{url:"user/balance",method:"GET"}),c.device={deregister:c.request.bind(c,{url:"user/device/deregister",method:"GET"}),firebase:{register:c.request.bind(c,{url:"user/device/firebase/register",method:"POST"})},register:c.request.bind(c,{url:"user/device/register",method:"GET"})},c.droid={register:c.request.bind(c,{url:"user/droid/register",method:"POST"})},c.info=c.request.bind(c,{url:"user/info",method:"GET"}),c.portfolio={base:c.request.bind(c,{url:"user/portfolio",method:"GET"}),earnings:c.request.bind(c,{url:"user/portfolio/earnings",method:"GET"}),full:c.request.bind(c,{url:"user/portfolio/full",method:"GET"})},c.position={base:c.request.bind(c,{url:"user/position",method:"GET"}),history:{base:c.request.bind(c,{url:"user/position/history",method:"GET"}),mapped:c.request.bind(c,{url:"user/position/history/mapped",method:"GET"})},search:c.request.bind(c,{url:"user/position/search",method:"GET"})},c.preferences=c.request.bind(c,{url:"user/preferences",method:"GET"}),c.professional={attest:c.request.bind(c,{url:"user/professional/attest",method:"POST"})},c.rtb={base:c.request.bind(c,{url:"user/rtb",method:"GET"}),history:c.request.bind(c,{url:"user/rtb/history",method:"GET"})},c.v2={watchlist:{addEntry:c.request.bind(c,{url:"user/v2/watchlist/addEntry",method:"POST"}),create:c.request.bind(c,{url:"user/v2/watchlist/create",method:"POST"}),delete:c.request.bind(c,{url:"user/v2/watchlist/delete",method:"POST"}),removeEntry:c.request.bind(c,{url:"user/v2/watchlist/removeEntry",method:"POST"}),rename:c.request.bind(c,{url:"user/v2/watchlist/rename",method:"POST"})}},c.watchlist={base:c.request.bind(c,{url:"user/watchlist",method:"GET"}),addEntry:c.request.bind(c,{url:"user/watchlist/addEntry",method:"POST"}),create:c.request.bind(c,{url:"user/watchlist/create",method:"POST"}),delete:c.request.bind(c,{url:"user/watchlist/delete",method:"POST"}),removeEntry:c.request.bind(c,{url:"user/watchlist/removeEntry",method:"POST"}),rename:c.request.bind(c,{url:"user/watchlist/rename",method:"POST"})},c}return _inherits(b,a),b}(_APICategory3.default);exports.default=User; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _APIClient=require("./APIClient"),_APIClient2=_interopRequireDefault(_APIClient),_Option=require("./categories/Option"),_Option2=_interopRequireDefault(_Option),_Orders=require("./categories/Orders"),_Orders2=_interopRequireDefault(_Orders),_Quotes=require("./categories/Quotes"),_Quotes2=_interopRequireDefault(_Quotes),_Research=require("./categories/Research"),_Research2=_interopRequireDefault(_Research),_User=require("./categories/User"),_User2=_interopRequireDefault(_User),_Charges=require("./categories/Charges"),_Charges2=_interopRequireDefault(_Charges),_Advisory=require("./categories/Advisory"),_Advisory2=_interopRequireDefault(_Advisory),_Groups=require("./categories/Groups"),_Groups2=_interopRequireDefault(_Groups),_Allocations=require("./categories/Allocations"),_Allocations2=_interopRequireDefault(_Allocations),_Device=require("./categories/Device"),_Device2=_interopRequireDefault(_Device),_Transfer=require("./categories/Transfer"),_Transfer2=_interopRequireDefault(_Transfer),_Iav=require("./categories/Iav"),_Iav2=_interopRequireDefault(_Iav),_Documents=require("./categories/Documents"),_Documents2=_interopRequireDefault(_Documents),_Files=require("./categories/Files"),_Files2=_interopRequireDefault(_Files),_Branch=require("./categories/Branch"),_Branch2=_interopRequireDefault(_Branch);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var OrbisApi=function a(b){_classCallCheck(this,a),this.client=new _APIClient2.default(b),this.option=new _Option2.default(this.client),this.orders=new _Orders2.default(this.client),this.quotes=new _Quotes2.default(this.client),this.research=new _Research2.default(this.client),this.user=new _User2.default(this.client),this.charges=new _Charges2.default(this.client),this.advisory=new _Advisory2.default(this.client),this.groups=new _Groups2.default(this.client),this.allocations=new _Allocations2.default(this.client),this.device=new _Device2.default(this.client),this.transfer=new _Transfer2.default(this.client),this.iav=new _Iav2.default(this.client),this.documents=new _Documents2.default(this.client),this.files=new _Files2.default(this.client),this.branch=new _Branch2.default(this.client)};exports.default=OrbisApi; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _APIClient=require("./APIClient"),_APIClient2=_interopRequireDefault(_APIClient),_Option=require("./categories/Option"),_Option2=_interopRequireDefault(_Option),_Orders=require("./categories/Orders"),_Orders2=_interopRequireDefault(_Orders),_Quotes=require("./categories/Quotes"),_Quotes2=_interopRequireDefault(_Quotes),_Research=require("./categories/Research"),_Research2=_interopRequireDefault(_Research),_User=require("./categories/User"),_User2=_interopRequireDefault(_User),_Charges=require("./categories/Charges"),_Charges2=_interopRequireDefault(_Charges),_Advisory=require("./categories/Advisory"),_Advisory2=_interopRequireDefault(_Advisory),_Groups=require("./categories/Groups"),_Groups2=_interopRequireDefault(_Groups),_Allocations=require("./categories/Allocations"),_Allocations2=_interopRequireDefault(_Allocations),_Device=require("./categories/Device"),_Device2=_interopRequireDefault(_Device),_Transfer=require("./categories/Transfer"),_Transfer2=_interopRequireDefault(_Transfer),_Iav=require("./categories/Iav"),_Iav2=_interopRequireDefault(_Iav),_Documents=require("./categories/Documents"),_Documents2=_interopRequireDefault(_Documents),_Files=require("./categories/Files"),_Files2=_interopRequireDefault(_Files),_Branch=require("./categories/Branch"),_Branch2=_interopRequireDefault(_Branch),_Streaming=require("./categories/Streaming"),_Streaming2=_interopRequireDefault(_Streaming);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var OrbisApi=function a(b){_classCallCheck(this,a),this.client=new _APIClient2.default(b),this.option=new _Option2.default(this.client),this.orders=new _Orders2.default(this.client),this.quotes=new _Quotes2.default(this.client),this.research=new _Research2.default(this.client),this.user=new _User2.default(this.client),this.charges=new _Charges2.default(this.client),this.advisory=new _Advisory2.default(this.client),this.groups=new _Groups2.default(this.client),this.allocations=new _Allocations2.default(this.client),this.device=new _Device2.default(this.client),this.transfer=new _Transfer2.default(this.client),this.iav=new _Iav2.default(this.client),this.documents=new _Documents2.default(this.client),this.files=new _Files2.default(this.client),this.branch=new _Branch2.default(this.client),this.streaming=new _Streaming2.default(this.client)};exports.default=OrbisApi; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(a,b){b=b||{};var c,d=0,f={},g=b.maxAttempts||1/0;return f.open=function(){c=new WebSocket(a,b.protocols||[]),c.onmessage=b.onmessage||noop,c.onopen=function(a){(b.onopen||noop)(a),d=0},c.onclose=function(a){1e3===a.code||1005===a.code||f.reconnect(a),(b.onclose||noop)(a)},c.onerror=function(a){a&&"ECONNREFUSED"===a.code?f.reconnect(a):(b.onerror||noop)(a)}},f.reconnect=function(a){d++<g?setTimeout(function(){(b.onreconnect||noop)(a),f.open()},b.timeout||1e3):(b.onmaximum||noop)(a)},f.json=function(a){c.send(JSON.stringify(a))},f.send=function(a){c.send(a)},f.close=function(a,b){c.close(a||1e3,b)},f.open(),f.updateUrl=function(b){a=b},f};function noop(){} | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(a,b){b=b||{};var c,d=0,f=1,g={},h=b.maxAttempts||1/0;return g.open=function(){c=new WebSocket(a,b.protocols||[]),c.onmessage=b.onmessage||noop,c.onopen=function(a){(b.onopen||noop)(a),d=0},c.onclose=function(a){1e3===a.code||1001===a.code||1005===a.code||g.reconnect(a),(b.onclose||noop)(a)},c.onerror=function(a){a&&"ECONNREFUSED"===a.code?g.reconnect(a):(b.onerror||noop)(a)}},g.reconnect=function(a){f&&d++<h?f=setTimeout(function(){(b.onreconnect||noop)(a),g.open()},b.timeout||1e3):(b.onmaximum||noop)(a)},g.json=function(a){c.send(JSON.stringify(a))},g.send=function(a){c.send(a)},g.close=function(a,b){f=clearTimeout(f),c.close(a||1e3,b)},g.open(),g.updateUrl=function(b){a=b},g.updateCallback=function(a){c&&(c.onmessage=a||noop)},g};function noop(){} |
{ | ||
"name": "@orbis-systems/orbis-api-client", | ||
"version": "5.5.1", | ||
"version": "5.6.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/lib/index.js", |
@@ -11,4 +11,3 @@ const parser = require('./parse'); | ||
if (url.startsWith('/advisory') | ||
|| url.startsWith('/charges') | ||
|| url.startsWith('/allocations')) | ||
|| url.startsWith('/charges')) | ||
{ | ||
@@ -164,2 +163,3 @@ return '/v2' + url; | ||
${imports.join('\n')} | ||
import Streaming from './categories/Streaming'; | ||
@@ -170,2 +170,3 @@ class OrbisApi { | ||
${initializations.join('\n')} | ||
this.streaming = new Streaming(this.client); | ||
} | ||
@@ -205,2 +206,3 @@ } | ||
${imports.join('\n')} | ||
import Streaming from './categories/Streaming'; | ||
@@ -212,2 +214,3 @@ declare module "@orbis-systems/orbis-api-client" { | ||
${initializations.join('\n')} | ||
streaming: Streaming; | ||
} | ||
@@ -214,0 +217,0 @@ }`; |
const fs = require('fs'); | ||
const path = require('path'); | ||
const blacklist = []; | ||
const blacklist = ['Streaming.js', 'Streaming.d.ts']; | ||
@@ -6,0 +6,0 @@ const directory = path.resolve(__dirname, '../src/categories'); |
@@ -26,8 +26,8 @@ import { AxiosRequestConfig } from "axios"; | ||
maxAttempts?: number; | ||
onopen?: (this: WSWrapper, ev: Event) => any; | ||
onmessage?: (this: WSWrapper, ev: MessageEvent) => any; | ||
onreconnect?: (this: WSWrapper, ev: Event | CloseEvent) => any; | ||
onmaximum?: (this: WSWrapper, ev: CloseEvent) => any; | ||
onclose?: (this: WSWrapper, ev: CloseEvent) => any; | ||
onerror?: (this: WSWrapper, ev: Event) => any; | ||
onOpen?: (this: WSWrapper, ev: Event) => any; | ||
onMessage?: (this: WSWrapper, ev: MessageEvent) => any; | ||
onReconnect?: (this: WSWrapper, ev: Event | CloseEvent) => any; | ||
onMaximum?: (this: WSWrapper, ev: CloseEvent) => any; | ||
onClose?: (this: WSWrapper, ev: CloseEvent) => any; | ||
onError?: (this: WSWrapper, ev: Event) => any; | ||
} | ||
@@ -34,0 +34,0 @@ |
@@ -42,3 +42,7 @@ import { | ||
}; | ||
ipo: (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > ; | ||
ipo: { | ||
"performance": (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > , | ||
"recent": (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > , | ||
"upcoming": (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > | ||
}; | ||
marketDate: (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > ; | ||
@@ -45,0 +49,0 @@ marketOverview: (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > ; |
@@ -36,3 +36,6 @@ import { | ||
"base": (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > , | ||
"history": (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > , | ||
"history": { | ||
"base": (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > , | ||
"mapped": (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > | ||
}, | ||
"search": (urlQueryOrBody ? : any, body ? : any, config ? : AxiosRequestConfig) => Promise < any > | ||
@@ -39,0 +42,0 @@ }; |
@@ -19,2 +19,3 @@ import APIClient, { | ||
import Branch from './categories/Branch'; | ||
import Streaming from './categories/Streaming'; | ||
@@ -40,3 +41,4 @@ declare module "@orbis-systems/orbis-api-client" { | ||
branch: Branch; | ||
streaming: Streaming; | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1694600
49
3032
10
8