diff --git a/.releaserc b/.releaserc index 1f94c85..51ed8c3 100644 --- a/.releaserc +++ b/.releaserc @@ -6,8 +6,9 @@ {"type": "release", "release": "major"} ] }], - '@semantic-release/release-notes-generator', - '@semantic-release/npm', - '@semantic-release/github' + "@semantic-release/release-notes-generator", + ["@semantic-release/npm", { + "npmPublish": false + }] ] -} \ No newline at end of file +} diff --git a/lib/RealTimeAPI.js b/lib/RealTimeAPI.js index 00a0cfb..460ade1 100644 --- a/lib/RealTimeAPI.js +++ b/lib/RealTimeAPI.js @@ -1,202 +1,202 @@ -"use strict"; -/** - * Rocket.Chat RealTime API - */ -Object.defineProperty(exports, "__esModule", { value: true }); -var webSocket_1 = require("rxjs/webSocket"); -var operators_1 = require("rxjs/operators"); -var uuid_1 = require("uuid"); -var crypto_js_1 = require("crypto-js"); -var RealTimeAPI = /** @class */ (function () { - function RealTimeAPI(param) { - this.webSocket = webSocket_1.webSocket(param); - } - /** - * Returns the Observable to the RealTime API Socket - */ - RealTimeAPI.prototype.getObservable = function () { - return this.webSocket; - }; - /** - * Disconnect the WebSocket Connection between client and RealTime API - */ - RealTimeAPI.prototype.disconnect = function () { - return this.webSocket.unsubscribe(); - }; - /** - * onMessage - */ - RealTimeAPI.prototype.onMessage = function (messageHandler) { - this.subscribe(messageHandler, undefined, undefined); - }; - /** - * onError - */ - RealTimeAPI.prototype.onError = function (errorHandler) { - this.subscribe(undefined, errorHandler, undefined); - }; - /** - * onCompletion - */ - RealTimeAPI.prototype.onCompletion = function (completionHandler) { - this.subscribe(undefined, undefined, completionHandler); - }; - /** - * Subscribe to the WebSocket of the RealTime API - */ - RealTimeAPI.prototype.subscribe = function (messageHandler, errorHandler, completionHandler) { - this.getObservable().subscribe(messageHandler, errorHandler, completionHandler); - }; - /** - * sendMessage to Rocket.Chat Server - */ - RealTimeAPI.prototype.sendMessage = function (messageObject) { - this.webSocket.next(messageObject); - }; - /** - * getObservableFilteredByMessageType - */ - RealTimeAPI.prototype.getObservableFilteredByMessageType = function (messageType) { - return this.getObservable().pipe(operators_1.filter(function (message) { return message.msg === messageType; })); - }; - /** - * getObservableFilteredByID - */ - RealTimeAPI.prototype.getObservableFilteredByID = function (id) { - return this.getObservable().pipe(operators_1.filter(function (message) { return message.id === id; })); - }; - /** - * connectToServer - */ - RealTimeAPI.prototype.connectToServer = function () { - this.sendMessage({ - msg: "connect", - version: "1", - support: ["1", "pre2", "pre1"] - }); - return this.getObservableFilteredByMessageType("connected"); - }; - /** - * Returns an Observable to subscribe to keepAlive, Ping and Pong to the Rocket.Chat Server to Keep the Connection Alive. - */ - RealTimeAPI.prototype.keepAlive = function () { - var _this = this; - return this.getObservableFilteredByMessageType("ping").pipe(operators_1.tap(function () { return _this.sendMessage({ msg: "pong" }); })); - }; - /** - * Login with Username and Password - */ - RealTimeAPI.prototype.login = function (username, password) { - var _a; - var id = uuid_1.v4(); - var usernameType = username.indexOf("@") !== -1 ? "email" : "username"; - this.sendMessage({ - msg: "method", - method: "login", - id: id, - params: [ - { - user: (_a = {}, _a[usernameType] = username, _a), - password: { - digest: crypto_js_1.SHA256(password).toString(), - algorithm: "sha-256" - } - } - ] - }); - return this.getLoginObservable(id); - }; - /** - * Login with Authentication Token - */ - RealTimeAPI.prototype.loginWithAuthToken = function (authToken) { - var id = uuid_1.v4(); - this.sendMessage({ - msg: "method", - method: "login", - id: id, - params: [{ resume: authToken }] - }); - return this.getLoginObservable(id); - }; - /** - * Login with OAuth, with Client Token and Client Secret - */ - RealTimeAPI.prototype.loginWithOAuth = function (credToken, credSecret) { - var id = uuid_1.v4(); - this.sendMessage({ - msg: "method", - method: "login", - id: id, - params: [ - { - oauth: { - credentialToken: credToken, - credentialSecret: credSecret - } - } - ] - }); - return this.getLoginObservable(id); - }; - /** - * getLoginObservable - */ - RealTimeAPI.prototype.getLoginObservable = function (id) { - var resultObservable = this.getObservableFilteredByID(id); - var resultId; - var addedObservable = this.getObservable().pipe(operators_1.buffer(resultObservable.pipe(operators_1.map(function (_a) { - var msg = _a.msg, error = _a.error, result = _a.result; - if (msg === "result" && !error) - return (resultId = result.id); // Setting resultId to get Result from the buffer - }))), operators_1.flatMap(function (x) { return x; }), // Flattening the Buffered Messages - operators_1.filter(function (_a) { - var msgId = _a.id; - return resultId !== undefined && msgId === resultId; - }), //Filtering the "added" result message. - operators_1.merge(resultObservable) //Merging "result" and "added" messages. - ); - return addedObservable; - }; - /** - * Get Observalble to the Result of Method Call from Rocket.Chat Realtime API - */ - RealTimeAPI.prototype.callMethod = function (method) { - var params = []; - for (var _i = 1; _i < arguments.length; _i++) { - params[_i - 1] = arguments[_i]; - } - var id = uuid_1.v4(); - this.sendMessage({ - msg: "method", - method: method, - id: id, - params: params - }); - return this.getObservableFilteredByID(id); - }; - /** - * getSubscription - */ - RealTimeAPI.prototype.getSubscription = function (streamName, streamParam, addEvent) { - var id = uuid_1.v4(); - var subscription = this.webSocket.multiplex(function () { return ({ - msg: "sub", - id: id, - name: streamName, - params: [streamParam, addEvent] - }); }, function () { return ({ - msg: "unsub", - id: id - }); }, function (message) { - return typeof message.collection === "string" && - message.collection === streamName && - message.fields.eventName === streamParam; - } // Proper Filtering to be done. This is temporary filter just for the stream-room-messages subscription - ); - return subscription; - }; - return RealTimeAPI; -}()); -exports.RealTimeAPI = RealTimeAPI; +"use strict"; +/** + * Rocket.Chat RealTime API + */ +Object.defineProperty(exports, "__esModule", { value: true }); +var webSocket_1 = require("rxjs/webSocket"); +var operators_1 = require("rxjs/operators"); +var uuid_1 = require("uuid"); +var crypto_js_1 = require("crypto-js"); +var RealTimeAPI = (function () { + function RealTimeAPI(param) { + this.webSocket = webSocket_1.webSocket(param); + } + /** + * Returns the Observable to the RealTime API Socket + */ + RealTimeAPI.prototype.getObservable = function () { + return this.webSocket; + }; + /** + * Disconnect the WebSocket Connection between client and RealTime API + */ + RealTimeAPI.prototype.disconnect = function () { + return this.webSocket.unsubscribe(); + }; + /** + * onMessage + */ + RealTimeAPI.prototype.onMessage = function (messageHandler) { + this.subscribe(messageHandler, undefined, undefined); + }; + /** + * onError + */ + RealTimeAPI.prototype.onError = function (errorHandler) { + this.subscribe(undefined, errorHandler, undefined); + }; + /** + * onCompletion + */ + RealTimeAPI.prototype.onCompletion = function (completionHandler) { + this.subscribe(undefined, undefined, completionHandler); + }; + /** + * Subscribe to the WebSocket of the RealTime API + */ + RealTimeAPI.prototype.subscribe = function (messageHandler, errorHandler, completionHandler) { + this.getObservable().subscribe(messageHandler, errorHandler, completionHandler); + }; + /** + * sendMessage to Rocket.Chat Server + */ + RealTimeAPI.prototype.sendMessage = function (messageObject) { + this.webSocket.next(messageObject); + }; + /** + * getObservableFilteredByMessageType + */ + RealTimeAPI.prototype.getObservableFilteredByMessageType = function (messageType) { + return this.getObservable().pipe(operators_1.filter(function (message) { return message.msg === messageType; })); + }; + /** + * getObservableFilteredByID + */ + RealTimeAPI.prototype.getObservableFilteredByID = function (id) { + return this.getObservable().pipe(operators_1.filter(function (message) { return message.id === id; })); + }; + /** + * connectToServer + */ + RealTimeAPI.prototype.connectToServer = function () { + this.sendMessage({ + msg: "connect", + version: "1", + support: ["1", "pre2", "pre1"] + }); + return this.getObservableFilteredByMessageType("connected"); + }; + /** + * Returns an Observable to subscribe to keepAlive, Ping and Pong to the Rocket.Chat Server to Keep the Connection Alive. + */ + RealTimeAPI.prototype.keepAlive = function () { + var _this = this; + return this.getObservableFilteredByMessageType("ping").pipe(operators_1.tap(function () { return _this.sendMessage({ msg: "pong" }); })); + }; + /** + * Login with Username and Password + */ + RealTimeAPI.prototype.login = function (username, password) { + var id = uuid_1.v4(); + var usernameType = username.indexOf("@") !== -1 ? "email" : "username"; + this.sendMessage({ + msg: "method", + method: "login", + id: id, + params: [ + { + user: (_a = {}, _a[usernameType] = username, _a), + password: { + digest: crypto_js_1.SHA256(password).toString(), + algorithm: "sha-256" + } + } + ] + }); + return this.getLoginObservable(id); + var _a; + }; + /** + * Login with Authentication Token + */ + RealTimeAPI.prototype.loginWithAuthToken = function (authToken) { + var id = uuid_1.v4(); + this.sendMessage({ + msg: "method", + method: "login", + id: id, + params: [{ resume: authToken }] + }); + return this.getLoginObservable(id); + }; + /** + * Login with OAuth, with Client Token and Client Secret + */ + RealTimeAPI.prototype.loginWithOAuth = function (credToken, credSecret) { + var id = uuid_1.v4(); + this.sendMessage({ + msg: "method", + method: "login", + id: id, + params: [ + { + oauth: { + credentialToken: credToken, + credentialSecret: credSecret + } + } + ] + }); + return this.getLoginObservable(id); + }; + /** + * getLoginObservable + */ + RealTimeAPI.prototype.getLoginObservable = function (id) { + var resultObservable = this.getObservableFilteredByID(id); + var resultId; + var addedObservable = this.getObservable().pipe(operators_1.buffer(resultObservable.pipe(operators_1.map(function (_a) { + var msg = _a.msg, error = _a.error, result = _a.result; + if (msg === "result" && !error) + return (resultId = result.id); // Setting resultId to get Result from the buffer + }))), operators_1.flatMap(function (x) { return x; }), // Flattening the Buffered Messages + operators_1.filter(function (_a) { + var msgId = _a.id; + return resultId !== undefined && msgId === resultId; + }), //Filtering the "added" result message. + operators_1.merge(resultObservable) //Merging "result" and "added" messages. + ); + return addedObservable; + }; + /** + * Get Observalble to the Result of Method Call from Rocket.Chat Realtime API + */ + RealTimeAPI.prototype.callMethod = function (method) { + var params = []; + for (var _i = 1; _i < arguments.length; _i++) { + params[_i - 1] = arguments[_i]; + } + var id = uuid_1.v4(); + this.sendMessage({ + msg: "method", + method: method, + id: id, + params: params + }); + return this.getObservableFilteredByID(id); + }; + /** + * getSubscription + */ + RealTimeAPI.prototype.getSubscription = function (streamName, streamParam, addEvent) { + var id = uuid_1.v4(); + var subscription = this.webSocket.multiplex(function () { return ({ + msg: "sub", + id: id, + name: streamName, + params: [streamParam, addEvent] + }); }, function () { return ({ + msg: "unsub", + id: id + }); }, function (message) { + return typeof message.collection === "string" && + message.collection === streamName && + message.fields.eventName === streamParam; + } // Proper Filtering to be done. This is temporary filter just for the stream-room-messages subscription + ); + return subscription; + }; + return RealTimeAPI; +}()); +exports.RealTimeAPI = RealTimeAPI; //# sourceMappingURL=RealTimeAPI.js.map \ No newline at end of file diff --git a/lib/RealTimeAPI.js.map b/lib/RealTimeAPI.js.map index fa62fad..4729201 100644 --- a/lib/RealTimeAPI.js.map +++ b/lib/RealTimeAPI.js.map @@ -1 +1 @@ -{"version":3,"file":"RealTimeAPI.js","sourceRoot":"","sources":["../src/RealTimeAPI.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,4CAAqF;AACrF,4CAA0E;AAC1E,6BAAkC;AAClC,uCAAmC;AAEnC;IAGE,qBAAY,KAA2C;QACrD,IAAI,CAAC,SAAS,GAAG,qBAAS,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACI,mCAAa,GAApB;QACE,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,gCAAU,GAAjB;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,+BAAS,GAAhB,UAAiB,cAAkD;QACjE,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACI,6BAAO,GAAd,UAAe,YAAiD;QAC9D,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACI,kCAAY,GAAnB,UAAoB,iBAA4C;QAC9D,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACI,+BAAS,GAAhB,UACE,cAAkD,EAClD,YAAiD,EACjD,iBAA4C;QAE5C,IAAI,CAAC,aAAa,EAAE,CAAC,SAAS,CAC5B,cAAc,EACd,YAAY,EACZ,iBAAiB,CAClB,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,iCAAW,GAAlB,UAAmB,aAAkB;QACnC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC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;YAChB,MAAM,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC;SAChC,CAAC,EALI,CAKJ,EACF,cAAM,OAAA,CAAC;YACL,GAAG,EAAE,OAAO;YACZ,EAAE,EAAE,EAAE;SACP,CAAC,EAHI,CAGJ,EACF,UAAC,OAAY;YACX,OAAA,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ;gBACtC,OAAO,CAAC,UAAU,KAAK,UAAU;gBACjC,OAAO,CAAC,MAAM,CAAC,SAAS,KAAK,WAAW;QAFxC,CAEwC,CAAC,uGAAuG;SACnJ,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;IACH,kBAAC;AAAD,CAAC,AAjOD,IAiOC;AAjOY,kCAAW"} \ No newline at end of file +{"version":3,"file":"RealTimeAPI.js","sourceRoot":"","sources":["../src/RealTimeAPI.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,4CAIwB;AACxB,4CAA0E;AAC1E,6BAAkC;AAClC,uCAAmC;AAEnC;IAGE,qBAAY,KAA2C;QACrD,IAAI,CAAC,SAAS,GAAG,qBAAS,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACI,mCAAa,GAApB;QACE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,gCAAU,GAAjB;QACE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,+BAAS,GAAhB,UAAiB,cAAkD;QACjE,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACI,6BAAO,GAAd,UAAe,YAAiD;QAC9D,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACI,kCAAY,GAAnB,UAAoB,iBAA4C;QAC9D,IAAI,CAAC,SAAS,CAAC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ACN,EAAE,IAAA;YACF,MAAM,QAAA;SACP,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACI,qCAAe,GAAtB,UACE,UAAkB,EAClB,WAAmB,EACnB,QAAiB;QAEjB,IAAI,EAAE,GAAG,SAAI,EAAE,CAAC;QAChB,IAAI,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CACzC,cAAM,OAAA,CAAC;YACL,GAAG,EAAE,KAAK;YACV,EAAE,EAAE,EAAE;YACN,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC;SAChC,CAAC,EALI,CAKJ,EACF,cAAM,OAAA,CAAC;YACL,GAAG,EAAE,OAAO;YACZ,EAAE,EAAE,EAAE;SACP,CAAC,EAHI,CAGJ,EACF,UAAC,OAAY;YACX,OAAA,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ;gBACtC,OAAO,CAAC,UAAU,KAAK,UAAU;gBACjC,OAAO,CAAC,MAAM,CAAC,SAAS,KAAK,WAAW;QAFxC,CAEwC,CAAC,uGAAuG;SACnJ,CAAC;QACF,MAAM,CAAC,YAAY,CAAC;IACtB,CAAC;IACH,kBAAC;AAAD,CAAC,AAjOD,IAiOC;AAjOY,kCAAW"} \ No newline at end of file diff --git a/lib/index.d.ts b/lib/index.d.ts index 854370d..7b9a403 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -1 +1 @@ -export { RealTimeAPI } from "./RealTimeAPI"; +export { RealTimeAPI } from "./RealTimeAPI"; diff --git a/lib/index.js b/lib/index.js index 1d31cab..30a2247 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,5 +1,5 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var RealTimeAPI_1 = require("./RealTimeAPI"); -exports.RealTimeAPI = RealTimeAPI_1.RealTimeAPI; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var RealTimeAPI_1 = require("./RealTimeAPI"); +exports.RealTimeAPI = RealTimeAPI_1.RealTimeAPI; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package.json b/package.json index 8b83f54..0b05d61 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "rocket.chat.realtime.api.rxjs", + "name": "realtime.api.rxjs", "version": "0.0.0-development", - "description": "Abstraction for Utilizing Rocket.Chat's Realtime API Methods with RxJS", + "description": "Abstraction for Utilizing Realtime API Methods with RxJS", "main": "lib/index.js", "directories": { "lib": "lib" @@ -37,11 +37,12 @@ "scripts": { "test": "jest --env=jsdom --notify", "semantic-release": "semantic-release", + "build": "npx tsc -p tsconfig.json", "codecov": "codecov" }, "repository": { "type": "git", - "url": "https://github.com/inf3cti0n95/Rocket.Chat.RealTime.API.RxJS.git" + "url": "http://8.222.156.46:3000/Haina/RealTime.API.js.git" }, "keywords": [ "Rocket.Chat", @@ -53,9 +54,9 @@ "author": "Viraj Trivedi ", "license": "MIT", "bugs": { - "url": "https://github.com/inf3cti0n95/Rocket.Chat.RealTime.API.RxJS/issues" + "url": "http://8.222.156.46:3000/Haina/RealTime.API.js/issues" }, - "homepage": "https://github.com/inf3cti0n95/Rocket.Chat.RealTime.API.RxJS#readme", + "homepage": "http://8.222.156.46:3000/Haina/RealTime.API.js/src/branch/master/README.md", "jest": { "moduleFileExtensions": [ "ts",