Commit 11b5ca4c authored by timkinnane's avatar timkinnane

build(npm): Change package name to org scope

parent b3f6e1bc
......@@ -33,9 +33,9 @@ Currently, there are two modules exported by the SDK:
Access these modules by importing them from SDK, e.g:
ES6 `import { driver, methodCache } from 'rocketchat-sdk'`
ES6 `import { driver, methodCache } from '@rocket.chat/sdk'`
ES5 `const { driver, methodCache } = require('rocketchat-sdk')`
ES5 `const { driver, methodCache } = require('@rocket.chat/sdk')`
See [Asteroid][asteroid] docs for methods that can be called from that API.
......@@ -272,12 +272,12 @@ interactions (i.e. bots) locally while in development.
## Use as Dependency
`yarn add rocketchat-sdk` or `npm install --save rocketchat-sdk`
`yarn add @rocket.chat/sdk` or `npm install --save @rocket.chat/sdk`
ES6 module, using async
```
import * as rocketchat from 'rocketchat-sdk'
import * as rocketchat from '@rocket.chat/sdk'
const asteroid = await rocketchat.driver.connect({ host: 'localhost:3000' })
console.log('connected', asteroid)
......@@ -286,7 +286,7 @@ console.log('connected', asteroid)
ES5 module, using callback
```
const rocketchat = require('rocketchat-sdk')
const rocketchat = require('@rocket.chat/sdk')
rocketchat.driver.connect({ host: 'localhost:3000' }, function (err, asteroid) {
if (err) console.error(err)
......
......@@ -7,7 +7,7 @@ import { IMessage } from '../config/messageInterfaces';
/**
* Event Emitter for listening to connection.
* @example
* import { driver } from 'rocketchat-sdk'
* import { driver } from '@rocket.chat/sdk'
* driver.connect()
* driver.events.on('connected', () => console.log('driver connected'))
*/
......@@ -36,13 +36,13 @@ export declare function useLog(externalLog: ILogger): void;
* error-first-pattern. Error returned or promise rejected on timeout.
* Removes http/s protocol to get connection hostname if taken from URL.
* @example <caption>Use with callback</caption>
* import { driver } from 'rocketchat-sdk'
* import { driver } from '@rocket.chat/sdk'
* driver.connect({}, (err) => {
* if (err) throw err
* else console.log('connected')
* })
* @example <caption>Using promise</caption>
* import { driver } from 'rocketchat-sdk'
* import { driver } from '@rocket.chat/sdk'
* driver.connect()
* .then(() => console.log('connected'))
* .catch((err) => console.error(err))
......
......@@ -52,7 +52,7 @@ const integrationId = process.env.INTEGRATION_ID || 'js.SDK';
/**
* Event Emitter for listening to connection.
* @example
* import { driver } from 'rocketchat-sdk'
* import { driver } from '@rocket.chat/sdk'
* driver.connect()
* driver.events.on('connected', () => console.log('driver connected'))
*/
......@@ -75,13 +75,13 @@ exports.useLog = useLog;
* error-first-pattern. Error returned or promise rejected on timeout.
* Removes http/s protocol to get connection hostname if taken from URL.
* @example <caption>Use with callback</caption>
* import { driver } from 'rocketchat-sdk'
* import { driver } from '@rocket.chat/sdk'
* driver.connect({}, (err) => {
* if (err) throw err
* else console.log('connected')
* })
* @example <caption>Using promise</caption>
* import { driver } from 'rocketchat-sdk'
* import { driver } from '@rocket.chat/sdk'
* driver.connect()
* .then(() => console.log('connected'))
* .catch((err) => console.error(err))
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>InternalLog | rocketchat-sdk</title>
<title>InternalLog | @rocket.chat/sdk</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
......@@ -22,7 +22,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">rocketchat-sdk</a>
<a href="../index.html" class="title">@rocket.chat/sdk</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
......@@ -117,7 +117,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/lib/log.ts#L5">lib/log.ts:5</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/lib/log.ts#L5">lib/log.ts:5</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......@@ -140,7 +140,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/lib/log.ts#L17">lib/log.ts:17</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/lib/log.ts#L17">lib/log.ts:17</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......@@ -163,7 +163,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/lib/log.ts#L8">lib/log.ts:8</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/lib/log.ts#L8">lib/log.ts:8</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......@@ -186,7 +186,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/lib/log.ts#L14">lib/log.ts:14</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/lib/log.ts#L14">lib/log.ts:14</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......@@ -209,7 +209,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/lib/log.ts#L11">lib/log.ts:11</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/lib/log.ts#L11">lib/log.ts:11</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Message | rocketchat-sdk</title>
<title>Message | @rocket.chat/sdk</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
......@@ -22,7 +22,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">rocketchat-sdk</a>
<a href="../index.html" class="title">@rocket.chat/sdk</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
......@@ -148,7 +148,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/lib/message.ts#L13">lib/message.ts:13</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/lib/message.ts#L13">lib/message.ts:13</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......@@ -174,7 +174,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#_id">_id</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L5">config/messageInterfaces.ts:5</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L5">config/messageInterfaces.ts:5</a></li>
</ul>
</aside>
</section>
......@@ -185,7 +185,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#alias">alias</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L8">config/messageInterfaces.ts:8</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L8">config/messageInterfaces.ts:8</a></li>
</ul>
</aside>
</section>
......@@ -196,7 +196,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#attachments">attachments</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L20">config/messageInterfaces.ts:20</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L20">config/messageInterfaces.ts:20</a></li>
</ul>
</aside>
</section>
......@@ -207,7 +207,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#avatar">avatar</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L10">config/messageInterfaces.ts:10</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L10">config/messageInterfaces.ts:10</a></li>
</ul>
</aside>
</section>
......@@ -218,7 +218,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#bot">bot</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L12">config/messageInterfaces.ts:12</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L12">config/messageInterfaces.ts:12</a></li>
</ul>
</aside>
</section>
......@@ -229,7 +229,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#editedat">editedAt</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L21">config/messageInterfaces.ts:21</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L21">config/messageInterfaces.ts:21</a></li>
</ul>
</aside>
</section>
......@@ -240,7 +240,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#editedby">editedBy</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L22">config/messageInterfaces.ts:22</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L22">config/messageInterfaces.ts:22</a></li>
</ul>
</aside>
</section>
......@@ -251,7 +251,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#emoji">emoji</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L9">config/messageInterfaces.ts:9</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L9">config/messageInterfaces.ts:9</a></li>
</ul>
</aside>
</section>
......@@ -262,7 +262,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#groupable">groupable</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L11">config/messageInterfaces.ts:11</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L11">config/messageInterfaces.ts:11</a></li>
</ul>
</aside>
</section>
......@@ -273,7 +273,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#location">location</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L16">config/messageInterfaces.ts:16</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L16">config/messageInterfaces.ts:16</a></li>
</ul>
</aside>
</section>
......@@ -284,7 +284,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#mentions">mentions</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L14">config/messageInterfaces.ts:14</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L14">config/messageInterfaces.ts:14</a></li>
</ul>
</aside>
</section>
......@@ -295,7 +295,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#msg">msg</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L7">config/messageInterfaces.ts:7</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L7">config/messageInterfaces.ts:7</a></li>
</ul>
</aside>
</section>
......@@ -306,7 +306,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#reactions">reactions</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L15">config/messageInterfaces.ts:15</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L15">config/messageInterfaces.ts:15</a></li>
</ul>
</aside>
</section>
......@@ -317,7 +317,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#rid">rid</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L4">config/messageInterfaces.ts:4</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L4">config/messageInterfaces.ts:4</a></li>
</ul>
</aside>
</section>
......@@ -328,7 +328,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#t">t</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L6">config/messageInterfaces.ts:6</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L6">config/messageInterfaces.ts:6</a></li>
</ul>
</aside>
</section>
......@@ -339,7 +339,7 @@
<aside class="tsd-sources">
<p>Inherited from <a href="../interfaces/_config_messageinterfaces_.imessage.html">IMessage</a>.<a href="../interfaces/_config_messageinterfaces_.imessage.html#urls">urls</a></p>
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/messageInterfaces.ts#L13">config/messageInterfaces.ts:13</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/messageInterfaces.ts#L13">config/messageInterfaces.ts:13</a></li>
</ul>
</aside>
</section>
......@@ -356,7 +356,7 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/lib/message.ts#L19">lib/message.ts:19</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/lib/message.ts#L19">lib/message.ts:19</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>rocketchat-sdk</title>
<title>@rocket.chat/sdk</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/main.css">
......@@ -22,7 +22,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="index.html" class="title">rocketchat-sdk</a>
<a href="index.html" class="title">@rocket.chat/sdk</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
......@@ -54,7 +54,7 @@
<a href="globals.html">Globals</a>
</li>
</ul>
<h1> rocketchat-sdk</h1>
<h1> @rocket.chat/sdk</h1>
</div>
</div>
</header>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>rocketchat-sdk</title>
<title>@rocket.chat/sdk</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/main.css">
......@@ -22,7 +22,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="index.html" class="title">rocketchat-sdk</a>
<a href="index.html" class="title">@rocket.chat/sdk</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
......@@ -54,7 +54,7 @@
<a href="globals.html">Globals</a>
</li>
</ul>
<h1> rocketchat-sdk</h1>
<h1> @rocket.chat/sdk</h1>
</div>
</div>
</header>
......@@ -85,8 +85,8 @@
<li><code>methodCache</code> - Manages results cache for calls to server (via LRU cache)</li>
</ul>
<p>Access these modules by importing them from SDK, e.g:</p>
<p>ES6 <code>import { driver, methodCache } from &#39;rocketchat-sdk&#39;</code></p>
<p>ES5 <code>const { driver, methodCache } = require(&#39;rocketchat-sdk&#39;)</code></p>
<p>ES6 <code>import { driver, methodCache } from &#39;@rocket.chat/sdk&#39;</code></p>
<p>ES5 <code>const { driver, methodCache } = require(&#39;@rocket.chat/sdk&#39;)</code></p>
<p>See <a href="https://www.npmjs.com/package/asteroid">Asteroid</a> docs for methods that can be called from that API.</p>
<p>Any Rocket.Chat server method can be called via <code>driver.callMethod</code>,
<code>driver.cacheCall</code> or <code>driver.asyncCall</code>. Server methods are not fully
......@@ -302,14 +302,14 @@
and subscription methods are functional. And it helps to manually run your SDK
interactions (i.e. bots) locally while in development.</p>
<h2 id="use-as-dependency">Use as Dependency</h2>
<p><code>yarn add rocketchat-sdk</code> or <code>npm install --save rocketchat-sdk</code></p>
<p><code>yarn add @rocket.chat/sdk</code> or <code>npm install --save @rocket.chat/sdk</code></p>
<p>ES6 module, using async</p>
<pre><code><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> rocketchat <span class="hljs-keyword">from</span> <span class="hljs-string">'rocketchat-sdk'</span>
<pre><code><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> rocketchat <span class="hljs-keyword">from</span> <span class="hljs-string">'@rocket.chat/sdk'</span>
<span class="hljs-keyword">const</span> asteroid = <span class="hljs-keyword">await</span> rocketchat.driver.connect({ <span class="hljs-attr">host</span>: <span class="hljs-string">'localhost:3000'</span> })
<span class="hljs-built_in">console</span>.log(<span class="hljs-string">'connected'</span>, asteroid)
</code></pre><p>ES5 module, using callback</p>
<pre><code><span class="hljs-keyword">const</span> rocketchat = <span class="hljs-built_in">require</span>(<span class="hljs-string">'rocketchat-sdk'</span>)
<pre><code><span class="hljs-keyword">const</span> rocketchat = <span class="hljs-built_in">require</span>(<span class="hljs-string">'@rocket.chat/sdk'</span>)
rocketchat.driver.connect({ <span class="hljs-attr">host</span>: <span class="hljs-string">'localhost:3000'</span> }, <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">err, asteroid</span>) </span>{
<span class="hljs-keyword">if</span> (err) <span class="hljs-built_in">console</span>.error(err)
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>IAsteroid | rocketchat-sdk</title>
<title>IAsteroid | @rocket.chat/sdk</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
......@@ -22,7 +22,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">rocketchat-sdk</a>
<a href="../index.html" class="title">@rocket.chat/sdk</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
......@@ -149,7 +149,7 @@
<div class="tsd-signature tsd-kind-icon">apply<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L22">config/asteroidInterfaces.ts:22</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L22">config/asteroidInterfaces.ts:22</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -183,7 +183,7 @@
<div class="tsd-signature tsd-kind-icon">call<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L21">config/asteroidInterfaces.ts:21</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L21">config/asteroidInterfaces.ts:21</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -217,7 +217,7 @@
<div class="tsd-signature tsd-kind-icon">connect<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L9">config/asteroidInterfaces.ts:9</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L9">config/asteroidInterfaces.ts:9</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -242,7 +242,7 @@
<div class="tsd-signature tsd-kind-icon">create<wbr>User<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L11">config/asteroidInterfaces.ts:11</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L11">config/asteroidInterfaces.ts:11</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -279,7 +279,7 @@
<div class="tsd-signature tsd-kind-icon">ddp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L24">config/asteroidInterfaces.ts:24</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L24">config/asteroidInterfaces.ts:24</a></li>
</ul>
</aside>
</section>
......@@ -289,7 +289,7 @@
<div class="tsd-signature tsd-kind-icon">disconnect<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L10">config/asteroidInterfaces.ts:10</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L10">config/asteroidInterfaces.ts:10</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -314,7 +314,7 @@
<div class="tsd-signature tsd-kind-icon">get<wbr>Collection<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L23">config/asteroidInterfaces.ts:23</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L23">config/asteroidInterfaces.ts:23</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -345,7 +345,7 @@
<div class="tsd-signature tsd-kind-icon">login<wbr>With<wbr>Facebook<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L13">config/asteroidInterfaces.ts:13</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L13">config/asteroidInterfaces.ts:13</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -376,7 +376,7 @@
<div class="tsd-signature tsd-kind-icon">login<wbr>With<wbr>Github<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L16">config/asteroidInterfaces.ts:16</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L16">config/asteroidInterfaces.ts:16</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -407,7 +407,7 @@
<div class="tsd-signature tsd-kind-icon">login<wbr>With<wbr>Google<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L14">config/asteroidInterfaces.ts:14</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L14">config/asteroidInterfaces.ts:14</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -438,7 +438,7 @@
<div class="tsd-signature tsd-kind-icon">login<wbr>WithLDAP<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L12">config/asteroidInterfaces.ts:12</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L12">config/asteroidInterfaces.ts:12</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -469,7 +469,7 @@
<div class="tsd-signature tsd-kind-icon">login<wbr>With<wbr>Password<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L17">config/asteroidInterfaces.ts:17</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L17">config/asteroidInterfaces.ts:17</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -503,7 +503,7 @@
<div class="tsd-signature tsd-kind-icon">login<wbr>With<wbr>Twitter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L15">config/asteroidInterfaces.ts:15</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L15">config/asteroidInterfaces.ts:15</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -534,7 +534,7 @@
<div class="tsd-signature tsd-kind-icon">logout<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L18">config/asteroidInterfaces.ts:18</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L18">config/asteroidInterfaces.ts:18</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -559,7 +559,7 @@
<div class="tsd-signature tsd-kind-icon">subscribe<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L19">config/asteroidInterfaces.ts:19</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L19">config/asteroidInterfaces.ts:19</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -593,7 +593,7 @@
<div class="tsd-signature tsd-kind-icon">subscriptions<span class="tsd-signature-symbol">:</span> <a href="_config_asteroidinterfaces_.isubscription.html" class="tsd-signature-type">ISubscription</a><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L20">config/asteroidInterfaces.ts:20</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L20">config/asteroidInterfaces.ts:20</a></li>
</ul>
</aside>
</section>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>ICollection | rocketchat-sdk</title>
<title>ICollection | @rocket.chat/sdk</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
......@@ -22,7 +22,7 @@
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">rocketchat-sdk</a>
<a href="../index.html" class="title">@rocket.chat/sdk</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
......@@ -100,7 +100,7 @@
<div class="tsd-signature tsd-kind-icon">insert<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L88">config/asteroidInterfaces.ts:88</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L88">config/asteroidInterfaces.ts:88</a></li>
</ul>
</aside>
<div class="tsd-type-declaration">
......@@ -131,7 +131,7 @@
<div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L87">config/asteroidInterfaces.ts:87</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L87">config/asteroidInterfaces.ts:87</a></li>
</ul>
</aside>
</section>
......@@ -141,7 +141,7 @@
<div class="tsd-signature tsd-kind-icon">reactive<wbr>Query<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/665a0d5/src/config/asteroidInterfaces.ts#L91">config/asteroidInterfaces.ts:91</a></li>
<li>Defined in <a href="https://github.com/RocketChat/Rocket.Chat.js.SDK/blob/b3f6e1b/src/config/asteroidInterfaces.ts#L91">config/asteroidInterfaces.ts:91</a></li>