mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
docs: add generated docs
This commit is contained in:
26
.jsdoc.json
Normal file
26
.jsdoc.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"tags": {
|
||||
"allowUnknownTags": true,
|
||||
"dictionaries": ["jsdoc"]
|
||||
},
|
||||
"source": {
|
||||
"include": ["src", "package.json", "README.md"],
|
||||
"includePattern": ".js$",
|
||||
"excludePattern": "(node_modules/|docs)"
|
||||
},
|
||||
"plugins": [
|
||||
"plugins/markdown"
|
||||
],
|
||||
"templates": {
|
||||
"cleverLinks": false,
|
||||
"monospaceLinks": true,
|
||||
"useLongnameInNav": false,
|
||||
"showInheritedInNav": true
|
||||
},
|
||||
"opts": {
|
||||
"destination": "./docs/",
|
||||
"encoding": "utf8",
|
||||
"recurse": true,
|
||||
"template": "./node_modules/jsdoc-baseline"
|
||||
}
|
||||
}
|
||||
65
docs/Base.html
Normal file
65
docs/Base.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: Base</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Base</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_Base.js.html#source-line-7">structures/<wbr>Base.<wbr>js:7</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a WhatsApp data structure</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="Base">new <span class="symbol-name">Base</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
154
docs/BusinessContact.html
Normal file
154
docs/BusinessContact.html
Normal file
@@ -0,0 +1,154 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: BusinessContact</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">BusinessContact</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_BusinessContact.js.html#source-line-9">structures/<wbr>BusinessContact.<wbr>js:9</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Business Contact on WhatsApp</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="BusinessContact.html#businessProfile">businessProfile</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#isBusiness">isBusiness</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="BusinessContact.html#isEnterprise">isEnterprise</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="BusinessContact.html#pushname">pushname</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="BusinessContact.html#shortName">shortName</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="BusinessContact">new <span class="symbol-name">BusinessContact</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
<dt>Extends</dt>
|
||||
<dd><a href="Contact.html">Contact</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<h3 id="businessProfile"><span class="symbol-name">businessProfile</span></h3>
|
||||
<p>The contact's business profile</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="id"><span class="symbol-name">id</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>ID that represents the contact</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#id">Contact#id</a></dd>
|
||||
</dl>
|
||||
<h3 id="isBusiness"><span class="symbol-name">isBusiness</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the contact is a business contact</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#isBusiness">Contact#isBusiness</a></dd>
|
||||
</dl>
|
||||
<h3 id="isEnterprise"><span class="symbol-name">isEnterprise</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the contact is an enterprise contact</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#isEnterprise">Contact#isEnterprise</a></dd>
|
||||
</dl>
|
||||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>The contact's name, as saved by the current user</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#name">Contact#name</a></dd>
|
||||
</dl>
|
||||
<h3 id="pushname"><span class="symbol-name">pushname</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>The name that the contact has configured to be shown publically</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#pushname">Contact#pushname</a></dd>
|
||||
</dl>
|
||||
<h3 id="shortName"><span class="symbol-name">shortName</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>A shortened version of name</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#shortName">Contact#shortName</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
205
docs/Chat.html
Normal file
205
docs/Chat.html
Normal file
@@ -0,0 +1,205 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: Chat</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Chat</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_Chat.js.html#source-line-10">structures/<wbr>Chat.<wbr>js:10</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Chat on WhatsApp</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Chat.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#isGroup">isGroup</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Chat.html#isReadOnly">isReadOnly</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Chat.html#timestamp">timestamp</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Chat.html#unreadCount">unreadCount</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Method</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Chat.html#sendMessage">sendMessage(content, options)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="Chat">new <span class="symbol-name">Chat</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
<dt>Extends</dt>
|
||||
<dd><a href="Base.html">Base</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<h3 id="id"><span class="symbol-name">id</span><small class="property-type">
|
||||
object</small></h3>
|
||||
<p>ID that represents the chat</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isGroup"><span class="symbol-name">isGroup</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the Chat is a Group Chat</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isReadOnly"><span class="symbol-name">isReadOnly</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the Chat is readonly</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Title of the chat</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="timestamp"><span class="symbol-name">timestamp</span><small class="property-type">
|
||||
number</small></h3>
|
||||
<p>Unix timestamp for when the chat was created</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="unreadCount"><span class="symbol-name">unreadCount</span><small class="property-type">
|
||||
number</small></h3>
|
||||
<p>Amount of messages unread</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
<h2>Method</h2>
|
||||
<section>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="sendMessage"><span class="symbol-name">sendMessage</span><span class="signature"><span class="signature-params">(content, options)</span> → <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>
|
||||
<p>Send a message to this chat</p>
|
||||
<section>
|
||||
<h4>Parameters</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>content</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>(string or <a href="MessageMedia.html">MessageMedia</a>)</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>options</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>object</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing <a href="Message.html">Message</a></code> <p>Message that was just sent</p>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
622
docs/Client.html
Normal file
622
docs/Client.html
Normal file
@@ -0,0 +1,622 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: Client</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Client</span></h1>
|
||||
<p class="source-link">Source: <a href="Client.js.html#source-line-31">Client.<wbr>js:31</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Starting point for interacting with the WhatsApp Web API</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Methods</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Client.html#acceptInvite">acceptInvite(inviteCode)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#destroy">destroy()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#getChatById">getChatById(chatId)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Client.html#getChats">getChats()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#getContactById">getContactById(contactId)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#getContacts">getContacts()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Client.html#initialize">initialize()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#sendMessage">sendMessage(chatId, content, options)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Events</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Client.html#event:auth_failure">auth_failure</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#event:authenticated">authenticated</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#event:disconnected">disconnected</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Client.html#event:message">message</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#event:message_create">message_create</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#event:message_revoke_everyone">message_revoke_everyone</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Client.html#event:message_revoke_me">message_revoke_me</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#event:qr">qr</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Client.html#event:ready">ready</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="Client">new <span class="symbol-name">Client</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
<dt>Extends</dt>
|
||||
<dd>EventEmitter</dd>
|
||||
<dt>Fires</dt>
|
||||
<dd><a href="Client.html#event:qr">Client#event:qr</a></dd>
|
||||
<dd><a href="Client.html#event:authenticated">Client#event:authenticated</a></dd>
|
||||
<dd><a href="Client.html#event:auth_failure">Client#event:auth_failure</a></dd>
|
||||
<dd><a href="Client.html#event:ready">Client#event:ready</a></dd>
|
||||
<dd><a href="Client.html#event:message">Client#event:message</a></dd>
|
||||
<dd><a href="Client.html#event:message_create">Client#event:message_create</a></dd>
|
||||
<dd><a href="Client.html#event:message_revoke_me">Client#event:message_revoke_me</a></dd>
|
||||
<dd><a href="Client.html#event:message_revoke_everyone">Client#event:message_revoke_everyone</a></dd>
|
||||
<dd><a href="Client.html#event:disconnected">Client#event:disconnected</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Methods</h2>
|
||||
<section>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="acceptInvite"><span class="symbol-name">acceptInvite</span><span class="signature"><span class="signature-params">(inviteCode)</span></span></h3>
|
||||
<p>Accepts an invitation to join a group</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>inviteCode</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Invitation code</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="destroy"><span class="symbol-name">destroy</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||||
<p>Closes the client</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="getChatById"><span class="symbol-name">getChatById</span><span class="signature"><span class="signature-params">(chatId)</span> → <span class="signature-returns"> Promise containing <a href="Chat.html">Chat</a></span></span></h3>
|
||||
<p>Get chat instance by ID</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>chatId</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing <a href="Chat.html">Chat</a></code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="getChats"><span class="symbol-name">getChats</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing Array of <a href="Chat.html">Chat</a></span></span></h3>
|
||||
<p>Get all current chat instances</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing Array of <a href="Chat.html">Chat</a></code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="getContactById"><span class="symbol-name">getContactById</span><span class="signature"><span class="signature-params">(contactId)</span> → <span class="signature-returns"> Promise containing <a href="Contact.html">Contact</a></span></span></h3>
|
||||
<p>Get contact instance by ID</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>contactId</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing <a href="Contact.html">Contact</a></code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="getContacts"><span class="symbol-name">getContacts</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing Array of <a href="Contact.html">Contact</a></span></span></h3>
|
||||
<p>Get all current contact instances</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing Array of <a href="Contact.html">Contact</a></code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="initialize"><span class="symbol-name">initialize</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||||
<p>Sets up events and requirements, kicks off authentication request</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="sendMessage"><span class="symbol-name">sendMessage</span><span class="signature"><span class="signature-params">(chatId, content, options)</span> → <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>
|
||||
<p>Send a message to a specific chatId</p>
|
||||
<section>
|
||||
<h4>Parameters</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>chatId</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>content</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>(string or <a href="MessageMedia.html">MessageMedia</a>)</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>options</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>object</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing <a href="Message.html">Message</a></code> <p>Message that was just sent</p>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<h2>Events</h2>
|
||||
<section>
|
||||
<h3 id="event:auth_failure"><span class="symbol-name">auth_failure</span></h3>
|
||||
<p>Emitted when there has been an error while trying to restore an existing session</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>message</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="event:authenticated"><span class="symbol-name">authenticated</span></h3>
|
||||
<p>Emitted when authentication is successful</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>session</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>object</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Object containing session information. Can be used to restore the session.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="event:disconnected"><span class="symbol-name">disconnected</span></h3>
|
||||
<p>Emitted when the client has been disconnected</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="event:message"><span class="symbol-name">message</span></h3>
|
||||
<p>Emitted when a new message is received.</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>message</p>
|
||||
</td>
|
||||
<td>
|
||||
<p><a href="Message.html">Message</a></p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>The message that was received</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="event:message_create"><span class="symbol-name">message_create</span></h3>
|
||||
<p>Emitted when a new message is created, which may include the current user's own messages.</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>message</p>
|
||||
</td>
|
||||
<td>
|
||||
<p><a href="Message.html">Message</a></p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>The message that was created</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="event:message_revoke_everyone"><span class="symbol-name">message_revoke_everyone</span></h3>
|
||||
<p>Emitted when a message is deleted for everyone in the chat.</p>
|
||||
<section>
|
||||
<h4>Parameters</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>message</p>
|
||||
</td>
|
||||
<td>
|
||||
<p><a href="Message.html">Message</a></p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>The message that was revoked, in its current state. It will not contain the original message's data.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>revoked_msg</p>
|
||||
</td>
|
||||
<td>
|
||||
<p><a href="Message.html">Message</a></p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>The message that was revoked, before it was revoked. It will contain the message's original data.
|
||||
Note that due to the way this data is captured, it may be possible that this param will be undefined.</p>
|
||||
<p>Value can be null.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="event:message_revoke_me"><span class="symbol-name">message_revoke_me</span></h3>
|
||||
<p>Emitted when a message is deleted by the current user.</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>message</p>
|
||||
</td>
|
||||
<td>
|
||||
<p><a href="Message.html">Message</a></p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>The message that was revoked</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="event:qr"><span class="symbol-name">qr</span></h3>
|
||||
<p>Emitted when the QR code is received</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>qr</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>QR Code</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="event:ready"><span class="symbol-name">ready</span></h3>
|
||||
<p>Emitted when the client has initialized and is ready to receive messages.</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
386
docs/Client.js.html
Normal file
386
docs/Client.js.html
Normal file
@@ -0,0 +1,386 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: Client.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: Client.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const EventEmitter = require('events');
|
||||
const puppeteer = require('puppeteer');
|
||||
const moduleRaid = require('moduleraid/moduleraid');
|
||||
const jsQR = require('jsqr');
|
||||
|
||||
const Util = require('./util/Util');
|
||||
const { WhatsWebURL, UserAgent, DefaultOptions, Events, WAState } = require('./util/Constants');
|
||||
const { ExposeStore, LoadUtils } = require('./util/Injected');
|
||||
const ChatFactory = require('./factories/ChatFactory');
|
||||
const ContactFactory = require('./factories/ContactFactory');
|
||||
const ClientInfo = require('./structures/ClientInfo');
|
||||
const Message = require('./structures/Message');
|
||||
const MessageMedia = require('./structures/MessageMedia');
|
||||
|
||||
/**
|
||||
* Starting point for interacting with the WhatsApp Web API
|
||||
* @extends {EventEmitter}
|
||||
* @fires Client#qr
|
||||
* @fires Client#authenticated
|
||||
* @fires Client#auth_failure
|
||||
* @fires Client#ready
|
||||
* @fires Client#message
|
||||
* @fires Client#message_create
|
||||
* @fires Client#message_revoke_me
|
||||
* @fires Client#message_revoke_everyone
|
||||
* @fires Client#disconnected
|
||||
*/
|
||||
class Client extends EventEmitter {
|
||||
constructor(options = {}) {
|
||||
super();
|
||||
|
||||
this.options = Util.mergeDefault(DefaultOptions, options);
|
||||
|
||||
this.pupBrowser = null;
|
||||
this.pupPage = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up events and requirements, kicks off authentication request
|
||||
*/
|
||||
async initialize() {
|
||||
const browser = await puppeteer.launch(this.options.puppeteer);
|
||||
const page = await browser.newPage();
|
||||
page.setUserAgent(UserAgent);
|
||||
|
||||
if (this.options.session) {
|
||||
await page.evaluateOnNewDocument(
|
||||
session => {
|
||||
localStorage.clear();
|
||||
localStorage.setItem('WABrowserId', session.WABrowserId);
|
||||
localStorage.setItem('WASecretBundle', session.WASecretBundle);
|
||||
localStorage.setItem('WAToken1', session.WAToken1);
|
||||
localStorage.setItem('WAToken2', session.WAToken2);
|
||||
}, this.options.session);
|
||||
}
|
||||
|
||||
await page.goto(WhatsWebURL);
|
||||
|
||||
const KEEP_PHONE_CONNECTED_IMG_SELECTOR = '[data-asset-intro-image="true"]';
|
||||
|
||||
if (this.options.session) {
|
||||
// Check if session restore was successfull
|
||||
try {
|
||||
await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 15000 });
|
||||
} catch (err) {
|
||||
if (err.name === 'TimeoutError') {
|
||||
/**
|
||||
* Emitted when there has been an error while trying to restore an existing session
|
||||
* @event Client#auth_failure
|
||||
* @param {string} message
|
||||
*/
|
||||
this.emit(Events.AUTHENTICATION_FAILURE, 'Unable to log in. Are the session details valid?');
|
||||
browser.close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
throw err;
|
||||
}
|
||||
|
||||
} else {
|
||||
// Wait for QR Code
|
||||
const QR_CANVAS_SELECTOR = 'canvas';
|
||||
await page.waitForSelector(QR_CANVAS_SELECTOR);
|
||||
const qrImgData = await page.$eval(QR_CANVAS_SELECTOR, canvas => [].slice.call(canvas.getContext('2d').getImageData(0,0,264,264).data));
|
||||
const qr = jsQR(qrImgData, 264, 264).data;
|
||||
|
||||
/**
|
||||
* Emitted when the QR code is received
|
||||
* @event Client#qr
|
||||
* @param {string} qr QR Code
|
||||
*/
|
||||
this.emit(Events.QR_RECEIVED, qr);
|
||||
|
||||
// Wait for code scan
|
||||
await page.waitForSelector(KEEP_PHONE_CONNECTED_IMG_SELECTOR, { timeout: 0 });
|
||||
}
|
||||
|
||||
await page.evaluate(ExposeStore, moduleRaid.toString());
|
||||
|
||||
// Get session tokens
|
||||
const localStorage = JSON.parse(await page.evaluate(() => {
|
||||
return JSON.stringify(window.localStorage);
|
||||
}));
|
||||
|
||||
const session = {
|
||||
WABrowserId: localStorage.WABrowserId,
|
||||
WASecretBundle: localStorage.WASecretBundle,
|
||||
WAToken1: localStorage.WAToken1,
|
||||
WAToken2: localStorage.WAToken2
|
||||
};
|
||||
|
||||
/**
|
||||
* Emitted when authentication is successful
|
||||
* @event Client#authenticated
|
||||
* @param {object} session Object containing session information. Can be used to restore the session.
|
||||
*/
|
||||
this.emit(Events.AUTHENTICATED, session);
|
||||
|
||||
// Check window.Store Injection
|
||||
await page.waitForFunction('window.Store != undefined');
|
||||
|
||||
//Load util functions (serializers, helper functions)
|
||||
await page.evaluate(LoadUtils);
|
||||
|
||||
// Expose client info
|
||||
this.info = new ClientInfo(this, await page.evaluate(() => {
|
||||
return window.Store.Conn.serialize();
|
||||
}));
|
||||
|
||||
// Register events
|
||||
await page.exposeFunction('onAddMessageEvent', msg => {
|
||||
if (!msg.isNewMsg) return;
|
||||
|
||||
const message = new Message(this, msg);
|
||||
|
||||
/**
|
||||
* Emitted when a new message is created, which may include the current user's own messages.
|
||||
* @event Client#message_create
|
||||
* @param {Message} message The message that was created
|
||||
*/
|
||||
this.emit(Events.MESSAGE_CREATE, message);
|
||||
|
||||
if (msg.id.fromMe) return;
|
||||
|
||||
/**
|
||||
* Emitted when a new message is received.
|
||||
* @event Client#message
|
||||
* @param {Message} message The message that was received
|
||||
*/
|
||||
this.emit(Events.MESSAGE_RECEIVED, message);
|
||||
});
|
||||
|
||||
let last_message;
|
||||
|
||||
await page.exposeFunction('onChangeMessageTypeEvent', (msg) => {
|
||||
|
||||
if (msg.type === 'revoked') {
|
||||
const message = new Message(this, msg);
|
||||
let revoked_msg;
|
||||
if(last_message &amp;&amp; msg.id.id === last_message.id.id) {
|
||||
revoked_msg = new Message(this, last_message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Emitted when a message is deleted for everyone in the chat.
|
||||
* @event Client#message_revoke_everyone
|
||||
* @param {Message} message The message that was revoked, in its current state. It will not contain the original message's data.
|
||||
* @param {?Message} revoked_msg The message that was revoked, before it was revoked. It will contain the message's original data.
|
||||
* Note that due to the way this data is captured, it may be possible that this param will be undefined.
|
||||
*/
|
||||
this.emit(Events.MESSAGE_REVOKED_EVERYONE, message, revoked_msg);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
await page.exposeFunction('onChangeMessageEvent', (msg) => {
|
||||
|
||||
if (msg.type !== 'revoked') {
|
||||
last_message = msg;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
await page.exposeFunction('onRemoveMessageEvent', (msg) => {
|
||||
|
||||
if (!msg.isNewMsg) return;
|
||||
|
||||
const message = new Message(this, msg);
|
||||
|
||||
/**
|
||||
* Emitted when a message is deleted by the current user.
|
||||
* @event Client#message_revoke_me
|
||||
* @param {Message} message The message that was revoked
|
||||
*/
|
||||
this.emit(Events.MESSAGE_REVOKED_ME, message);
|
||||
|
||||
});
|
||||
|
||||
await page.exposeFunction('onAppStateChangedEvent', (AppState, state) => {
|
||||
const ACCEPTED_STATES = [WAState.CONNECTED, WAState.OPENING, WAState.PAIRING];
|
||||
if (!ACCEPTED_STATES.includes(state)) {
|
||||
/**
|
||||
* Emitted when the client has been disconnected
|
||||
* @event Client#disconnected
|
||||
*/
|
||||
this.emit(Events.DISCONNECTED);
|
||||
this.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
await page.evaluate(() => {
|
||||
window.Store.Msg.on('add', window.onAddMessageEvent);
|
||||
window.Store.Msg.on('change', window.onChangeMessageEvent);
|
||||
window.Store.Msg.on('change:type', window.onChangeMessageTypeEvent);
|
||||
window.Store.Msg.on('remove', window.onRemoveMessageEvent);
|
||||
window.Store.AppState.on('change:state', window.onAppStateChangedEvent);
|
||||
});
|
||||
|
||||
this.pupBrowser = browser;
|
||||
this.pupPage = page;
|
||||
|
||||
/**
|
||||
* Emitted when the client has initialized and is ready to receive messages.
|
||||
* @event Client#ready
|
||||
*/
|
||||
this.emit(Events.READY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the client
|
||||
*/
|
||||
async destroy() {
|
||||
await this.pupBrowser.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a message to a specific chatId
|
||||
* @param {string} chatId
|
||||
* @param {string|MessageMedia} content
|
||||
* @param {object} options
|
||||
* @returns {Promise&lt;Message>} Message that was just sent
|
||||
*/
|
||||
async sendMessage(chatId, content, options={}) {
|
||||
let internalOptions = {
|
||||
caption: options.caption,
|
||||
quotedMessageId: options.quotedMessageId
|
||||
};
|
||||
|
||||
if(content instanceof MessageMedia) {
|
||||
internalOptions.attachment = content;
|
||||
content = '';
|
||||
} else if(options.media instanceof MessageMedia) {
|
||||
internalOptions.media = options.media;
|
||||
internalOptions.caption = content;
|
||||
}
|
||||
|
||||
const newMessage = await this.pupPage.evaluate(async (chatId, message, options) => {
|
||||
const msg = await window.WWebJS.sendMessage(window.Store.Chat.get(chatId), message, options);
|
||||
return msg.serialize();
|
||||
}, chatId, content, internalOptions);
|
||||
|
||||
return new Message(this, newMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all current chat instances
|
||||
* @returns {Promise&lt;Array&lt;Chat>>}
|
||||
*/
|
||||
async getChats() {
|
||||
let chats = await this.pupPage.evaluate(() => {
|
||||
return window.WWebJS.getChats();
|
||||
});
|
||||
|
||||
return chats.map(chat => ChatFactory.create(this, chat));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get chat instance by ID
|
||||
* @param {string} chatId
|
||||
* @returns {Promise&lt;Chat>}
|
||||
*/
|
||||
async getChatById(chatId) {
|
||||
let chat = await this.pupPage.evaluate(chatId => {
|
||||
return window.WWebJS.getChat(chatId);
|
||||
}, chatId);
|
||||
|
||||
return ChatFactory.create(this, chat);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all current contact instances
|
||||
* @returns {Promise&lt;Array&lt;Contact>>}
|
||||
*/
|
||||
async getContacts() {
|
||||
let contacts = await this.pupPage.evaluate(() => {
|
||||
return window.WWebJS.getContacts();
|
||||
});
|
||||
|
||||
return contacts.map(contact => ContactFactory.create(this, contact));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get contact instance by ID
|
||||
* @param {string} contactId
|
||||
* @returns {Promise&lt;Contact>}
|
||||
*/
|
||||
async getContactById(contactId) {
|
||||
let contact = await this.pupPage.evaluate(contactId => {
|
||||
return window.WWebJS.getContact(contactId);
|
||||
}, contactId);
|
||||
|
||||
return ContactFactory.create(this, contact);
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts an invitation to join a group
|
||||
* @param {string} inviteCode Invitation code
|
||||
*/
|
||||
async acceptInvite(inviteCode) {
|
||||
const chatId = await this.pupPage.evaluate(async inviteCode => {
|
||||
return await window.Store.Invite.sendJoinGroupViaInvite(inviteCode);
|
||||
}, inviteCode);
|
||||
|
||||
return chatId._serialized;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Client;
|
||||
</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
202
docs/ClientInfo.html
Normal file
202
docs/ClientInfo.html
Normal file
@@ -0,0 +1,202 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: ClientInfo</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">ClientInfo</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_ClientInfo.js.html#source-line-10">structures/<wbr>ClientInfo.<wbr>js:10</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Current connection information</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="ClientInfo.html#me">me</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="ClientInfo.html#phone">phone</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="ClientInfo.html#platform">platform</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="ClientInfo.html#pushname">pushname</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="ClientInfo">new <span class="symbol-name">ClientInfo</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
<dt>Extends</dt>
|
||||
<dd><a href="Base.html">Base</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<h3 id="me"><span class="symbol-name">me</span><small class="property-type">
|
||||
object</small></h3>
|
||||
<p>Current user ID</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="phone"><span class="symbol-name">phone</span><small class="property-type">
|
||||
object</small></h3>
|
||||
<p>Information about the phone this client is connected to</p>
|
||||
<section>
|
||||
<h4>Properties</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>wa_version</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>WhatsApp Version running on the phone</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>os_version</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>OS Version running on the phone (iOS or Android version)</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>device_manufacturer</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Device manufacturer</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>device_model</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Device model</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>os_build_number</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>OS build number</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="platform"><span class="symbol-name">platform</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Platform the phone is running on</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="pushname"><span class="symbol-name">pushname</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Name configured to be shown in push notifications</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
135
docs/Contact.html
Normal file
135
docs/Contact.html
Normal file
@@ -0,0 +1,135 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: Contact</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Contact</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_Contact.js.html#source-line-10">structures/<wbr>Contact.<wbr>js:10</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Contact on WhatsApp</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Contact.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Contact.html#isBusiness">isBusiness</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Contact.html#isEnterprise">isEnterprise</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Contact.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Contact.html#pushname">pushname</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Contact.html#shortName">shortName</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="Contact">new <span class="symbol-name">Contact</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
<dt>Extends</dt>
|
||||
<dd><a href="Base.html">Base</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<h3 id="id"><span class="symbol-name">id</span><small class="property-type">
|
||||
object</small></h3>
|
||||
<p>ID that represents the contact</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isBusiness"><span class="symbol-name">isBusiness</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the contact is a business contact</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isEnterprise"><span class="symbol-name">isEnterprise</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the contact is an enterprise contact</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||||
nullable string</small></h3>
|
||||
<p>The contact's name, as saved by the current user</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="pushname"><span class="symbol-name">pushname</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>The name that the contact has configured to be shown publically</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="shortName"><span class="symbol-name">shortName</span><small class="property-type">
|
||||
nullable string</small></h3>
|
||||
<p>A shortened version of name</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
570
docs/GroupChat.html
Normal file
570
docs/GroupChat.html
Normal file
@@ -0,0 +1,570 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: GroupChat</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">GroupChat</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_GroupChat.js.html#source-line-9">structures/<wbr>GroupChat.<wbr>js:9</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Group Chat on WhatsApp</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="GroupChat.html#createdAt">createdAt</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#description">description</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#isGroup">isGroup</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="GroupChat.html#isReadOnly">isReadOnly</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#owner">owner</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#participants">participants</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="GroupChat.html#timestamp">timestamp</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#unreadCount">unreadCount</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Methods</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="GroupChat.html#.getInviteInfo">getInviteInfo(inviteCode)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#.join">join(inviteCode)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#addParticipants">addParticipants(participantIds)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#demoteParticipants">demoteParticipants(participantIds)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="GroupChat.html#getInviteCode">getInviteCode()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#leave">leave()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#promoteParticipants">promoteParticipants(participantIds)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#removeParticipants">removeParticipants(participantIds)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="GroupChat.html#revokeInvite">revokeInvite()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#sendMessage">sendMessage(content, options)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#setDescription">setDescription(description)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="GroupChat.html#setSubject">setSubject(subject)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="GroupChat">new <span class="symbol-name">GroupChat</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
<dt>Extends</dt>
|
||||
<dd><a href="Chat.html">Chat</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<h3 id="createdAt"><span class="symbol-name">createdAt</span><small class="property-type">
|
||||
date</small></h3>
|
||||
<p>Gets the date at which the group was created</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="description"><span class="symbol-name">description</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Gets the group description</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="id"><span class="symbol-name">id</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>ID that represents the chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#id">Chat#id</a></dd>
|
||||
</dl>
|
||||
<h3 id="isGroup"><span class="symbol-name">isGroup</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the Chat is a Group Chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isGroup">Chat#isGroup</a></dd>
|
||||
</dl>
|
||||
<h3 id="isReadOnly"><span class="symbol-name">isReadOnly</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the Chat is readonly</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isReadOnly">Chat#isReadOnly</a></dd>
|
||||
</dl>
|
||||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Title of the chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#name">Chat#name</a></dd>
|
||||
</dl>
|
||||
<h3 id="owner"><span class="symbol-name">owner</span></h3>
|
||||
<p>Gets the group owner</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="participants"><span class="symbol-name">participants</span><small class="property-type">
|
||||
array</small></h3>
|
||||
<p>Gets the group participants</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="timestamp"><span class="symbol-name">timestamp</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Unix timestamp for when the chat was created</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#timestamp">Chat#timestamp</a></dd>
|
||||
</dl>
|
||||
<h3 id="unreadCount"><span class="symbol-name">unreadCount</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Amount of messages unread</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#unreadCount">Chat#unreadCount</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<h2>Methods</h2>
|
||||
<section>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span> <span class="label label-static">static</span></div>
|
||||
<h3 id=".getInviteInfo"><span class="symbol-name">getInviteInfo</span><span class="signature"><span class="signature-params">(inviteCode)</span> → <span class="signature-returns"> Promise containing object</span></span></h3>
|
||||
<p>Returns an object with information about the invite code's group</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>inviteCode</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing object</code> <p>Invite information</p>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span> <span class="label label-static">static</span></div>
|
||||
<h3 id=".join"><span class="symbol-name">join</span><span class="signature"><span class="signature-params">(inviteCode)</span></span></h3>
|
||||
<p>Joins a group with an invite code</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>inviteCode</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="addParticipants"><span class="symbol-name">addParticipants</span><span class="signature"><span class="signature-params">(participantIds)</span></span></h3>
|
||||
<p>Adds a list of participants by ID to the group</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>participantIds</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Array of string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="demoteParticipants"><span class="symbol-name">demoteParticipants</span><span class="signature"><span class="signature-params">(participantIds)</span></span></h3>
|
||||
<p>Demotes participants by IDs to regular users</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>participantIds</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Array of string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="getInviteCode"><span class="symbol-name">getInviteCode</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||||
<p>Gets the invite code for a specific group</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="leave"><span class="symbol-name">leave</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||||
<p>Makes the bot leave the group</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="promoteParticipants"><span class="symbol-name">promoteParticipants</span><span class="signature"><span class="signature-params">(participantIds)</span></span></h3>
|
||||
<p>Promotes participants by IDs to admins</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>participantIds</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Array of string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="removeParticipants"><span class="symbol-name">removeParticipants</span><span class="signature"><span class="signature-params">(participantIds)</span></span></h3>
|
||||
<p>Removes a list of participants by ID to the group</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>participantIds</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Array of string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="revokeInvite"><span class="symbol-name">revokeInvite</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||||
<p>Invalidates the current group invite code and generates a new one</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="sendMessage"><span class="symbol-name">sendMessage</span><span class="signature"><span class="signature-params">(content, options)</span> → <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>
|
||||
<p>Send a message to this chat</p>
|
||||
<section>
|
||||
<h4>Parameters</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>content</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>options</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#sendMessage">Chat#sendMessage</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p>Message that was just sent</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="setDescription"><span class="symbol-name">setDescription</span><span class="signature"><span class="signature-params">(description)</span></span></h3>
|
||||
<p>Updates the group description</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>description</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="setSubject"><span class="symbol-name">setSubject</span><span class="signature"><span class="signature-params">(subject)</span></span></h3>
|
||||
<p>Updates the group subject</p>
|
||||
<section>
|
||||
<h4>Parameter</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>subject</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
320
docs/Message.html
Normal file
320
docs/Message.html
Normal file
@@ -0,0 +1,320 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: Message</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Message</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_Message.js.html#source-line-11">structures/<wbr>Message.<wbr>js:11</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Message on WhatsApp</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Message.html#author">author</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#body">body</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#broadcast">broadcast</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#from">from</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Message.html#fromMe">fromMe</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#hasMedia">hasMedia</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#hasQuotedMsg">hasQuotedMsg</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Message.html#isForwarded">isForwarded</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#timestamp">timestamp</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#to">to</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#type">type</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Methods</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Message.html#downloadMedia">downloadMedia()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#getChat">getChat()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Message.html#getContact">getContact()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="Message.html#getQuotedMessage">getQuotedMessage()</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="Message.html#reply">reply(content, chatId, options)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="Message">new <span class="symbol-name">Message</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
<dt>Extends</dt>
|
||||
<dd><a href="Base.html">Base</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<h3 id="author"><span class="symbol-name">author</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>If the message was sent to a group, this field will contain the user that sent the message.</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="body"><span class="symbol-name">body</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Message content</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="broadcast"><span class="symbol-name">broadcast</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the message was a broadcast</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="from"><span class="symbol-name">from</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>ID for the Chat that this message was sent to, except if the message was sent by the current user.</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="fromMe"><span class="symbol-name">fromMe</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the message was sent by the current user</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="hasMedia"><span class="symbol-name">hasMedia</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the message has media available for download</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="hasQuotedMsg"><span class="symbol-name">hasQuotedMsg</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the message was sent as a reply to another message.</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="id"><span class="symbol-name">id</span><small class="property-type">
|
||||
object</small></h3>
|
||||
<p>ID that represents the message</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="isForwarded"><span class="symbol-name">isForwarded</span><small class="property-type">
|
||||
boolean</small></h3>
|
||||
<p>Indicates if the message was forwarded</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="timestamp"><span class="symbol-name">timestamp</span><small class="property-type">
|
||||
number</small></h3>
|
||||
<p>Unix timestamp for when the message was created</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="to"><span class="symbol-name">to</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>ID for who this message is for.</p>
|
||||
<p>If the message is sent by the current user, it will be the Chat to which the message is being sent.
|
||||
If the message is sent by another user, it will be the ID for the current user.</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="type"><span class="symbol-name">type</span><small class="property-type">
|
||||
<a href="global.html#MessageTypes">MessageTypes</a></small></h3>
|
||||
<p>Message type</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
<h2>Methods</h2>
|
||||
<section>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="downloadMedia"><span class="symbol-name">downloadMedia</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing <a href="MessageMedia.html">MessageMedia</a></span></span></h3>
|
||||
<p>Downloads and returns the attatched message media</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing <a href="MessageMedia.html">MessageMedia</a></code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<h3 id="getChat"><span class="symbol-name">getChat</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing <a href="Chat.html">Chat</a></span></span></h3>
|
||||
<p>Returns the Chat this message was sent in</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing <a href="Chat.html">Chat</a></code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<h3 id="getContact"><span class="symbol-name">getContact</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing <a href="Contact.html">Contact</a></span></span></h3>
|
||||
<p>Returns the Contact this message was sent from</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing <a href="Contact.html">Contact</a></code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="getQuotedMessage"><span class="symbol-name">getQuotedMessage</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>
|
||||
<p>Returns the quoted message, if any</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing <a href="Message.html">Message</a></code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="reply"><span class="symbol-name">reply</span><span class="signature"><span class="signature-params">(content, chatId, options)</span> → <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>
|
||||
<p>Sends a message as a reply to this message. If chatId is specified, it will be sent
|
||||
through the specified Chat. If not, it will send the message
|
||||
in the same Chat as the original message was sent.</p>
|
||||
<section>
|
||||
<h4>Parameters</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>content</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>(string or <a href="MessageMedia.html">MessageMedia</a>)</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>chatId</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>string</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Value can be null.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>options</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>object</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p><code>Promise containing <a href="Message.html">Message</a></code> </p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
167
docs/MessageMedia.html
Normal file
167
docs/MessageMedia.html
Normal file
@@ -0,0 +1,167 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: MessageMedia</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">MessageMedia</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_MessageMedia.js.html#source-line-10">structures/<wbr>MessageMedia.<wbr>js:10</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Media attached to a message</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="MessageMedia.html#data">data</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="MessageMedia.html#filename">filename</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="MessageMedia.html#mimetype">mimetype</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="MessageMedia">new <span class="symbol-name">MessageMedia</span><span class="signature"><span class="signature-params">(mimetype, data, filename)</span></span></h2>
|
||||
<section>
|
||||
<h3>Parameters</h3>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>mimetype</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>MIME type of the attachment</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>data</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Base64-encoded data of the file</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>filename</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p>Document file name</p>
|
||||
<p>Value can be null.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<h3 id="data"><span class="symbol-name">data</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Base64 encoded data that represents the file</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="filename"><span class="symbol-name">filename</span><small class="property-type">
|
||||
nullable string</small></h3>
|
||||
<p>Name of the file (for documents)</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<h3 id="mimetype"><span class="symbol-name">mimetype</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>MIME type of the attachment</p>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
218
docs/PrivateChat.html
Normal file
218
docs/PrivateChat.html
Normal file
@@ -0,0 +1,218 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: PrivateChat</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">PrivateChat</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_PrivateChat.js.html#source-line-9">structures/<wbr>PrivateChat.<wbr>js:9</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Private Chat on WhatsApp</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateChat.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#isGroup">isGroup</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateChat.html#isReadOnly">isReadOnly</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateChat.html#timestamp">timestamp</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateChat.html#unreadCount">unreadCount</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Method</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateChat.html#sendMessage">sendMessage(content, options)</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="PrivateChat">new <span class="symbol-name">PrivateChat</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
<dt>Extends</dt>
|
||||
<dd><a href="Chat.html">Chat</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<h3 id="id"><span class="symbol-name">id</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>ID that represents the chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#id">Chat#id</a></dd>
|
||||
</dl>
|
||||
<h3 id="isGroup"><span class="symbol-name">isGroup</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the Chat is a Group Chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isGroup">Chat#isGroup</a></dd>
|
||||
</dl>
|
||||
<h3 id="isReadOnly"><span class="symbol-name">isReadOnly</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the Chat is readonly</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#isReadOnly">Chat#isReadOnly</a></dd>
|
||||
</dl>
|
||||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Title of the chat</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#name">Chat#name</a></dd>
|
||||
</dl>
|
||||
<h3 id="timestamp"><span class="symbol-name">timestamp</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Unix timestamp for when the chat was created</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#timestamp">Chat#timestamp</a></dd>
|
||||
</dl>
|
||||
<h3 id="unreadCount"><span class="symbol-name">unreadCount</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Amount of messages unread</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#unreadCount">Chat#unreadCount</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<h2>Method</h2>
|
||||
<section>
|
||||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||||
<h3 id="sendMessage"><span class="symbol-name">sendMessage</span><span class="signature"><span class="signature-params">(content, options)</span> → <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>
|
||||
<p>Send a message to this chat</p>
|
||||
<section>
|
||||
<h4>Parameters</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>content</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>options</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Chat.html#sendMessage">Chat#sendMessage</a></dd>
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
<p>Message that was just sent</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
147
docs/PrivateContact.html
Normal file
147
docs/PrivateContact.html
Normal file
@@ -0,0 +1,147 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: PrivateContact</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">PrivateContact</span></h1>
|
||||
<p class="source-link">Source: <a href="structures_PrivateContact.js.html#source-line-9">structures/<wbr>PrivateContact.<wbr>js:9</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Represents a Private Contact on WhatsApp</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateContact.html#id">id</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateContact.html#isBusiness">isBusiness</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateContact.html#isEnterprise">isEnterprise</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateContact.html#name">name</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="PrivateContact.html#pushname">pushname</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="PrivateContact.html#shortName">shortName</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="PrivateContact">new <span class="symbol-name">PrivateContact</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
<dt>Extends</dt>
|
||||
<dd><a href="Contact.html">Contact</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<h3 id="id"><span class="symbol-name">id</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>ID that represents the contact</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#id">Contact#id</a></dd>
|
||||
</dl>
|
||||
<h3 id="isBusiness"><span class="symbol-name">isBusiness</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the contact is a business contact</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#isBusiness">Contact#isBusiness</a></dd>
|
||||
</dl>
|
||||
<h3 id="isEnterprise"><span class="symbol-name">isEnterprise</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>Indicates if the contact is an enterprise contact</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#isEnterprise">Contact#isEnterprise</a></dd>
|
||||
</dl>
|
||||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>The contact's name, as saved by the current user</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#name">Contact#name</a></dd>
|
||||
</dl>
|
||||
<h3 id="pushname"><span class="symbol-name">pushname</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>The name that the contact has configured to be shown publically</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#pushname">Contact#pushname</a></dd>
|
||||
</dl>
|
||||
<h3 id="shortName"><span class="symbol-name">shortName</span><small class="property-type">
|
||||
unknown</small></h3>
|
||||
<p>A shortened version of name</p>
|
||||
<dl class="dl-compact">
|
||||
<dt>Inherited from</dt>
|
||||
<dd><a href="Contact.html#shortName">Contact#shortName</a></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
65
docs/Util.html
Normal file
65
docs/Util.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Class: Util</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||||
<h1><small></small><span class="symbol-name">Util</span></h1>
|
||||
<p class="source-link">Source: <a href="util_Util.js.html#source-line-10">util/<wbr>Util.<wbr>js:10</a></p>
|
||||
<div class="symbol-classdesc">
|
||||
<p>Utility methods</p>
|
||||
</div>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</header>
|
||||
<section id="summary">
|
||||
</section>
|
||||
<section>
|
||||
<h2 id="Util">new <span class="symbol-name">Util</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
4
docs/css/baseline.css
Normal file
4
docs/css/baseline.css
Normal file
File diff suppressed because one or more lines are too long
633
docs/global.html
Normal file
633
docs/global.html
Normal file
@@ -0,0 +1,633 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Globals</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-main" role="main">
|
||||
<h1>Globals</h1>
|
||||
<section id="summary">
|
||||
<div class="summary-callout">
|
||||
<h2 class="summary-callout-heading">Properties</h2>
|
||||
<div class="summary-content">
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="global.html#ChatTypes">ChatTypes</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="global.html#Events">Events</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="global.html#MessageTypes">MessageTypes</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
<dt><a href="global.html#Status">Status</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="summary-column">
|
||||
<dl class="dl-summary-callout">
|
||||
<dt><a href="global.html#WAState">WAState</a></dt>
|
||||
<dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Properties</h2>
|
||||
<section>
|
||||
<div class="symbol-detail-labels"><span class="label label-readonly">read-only</span></div>
|
||||
<h3 id="ChatTypes"><span class="symbol-name">ChatTypes</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Chat types</p>
|
||||
<section>
|
||||
<h4>Properties</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>SOLO</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>GROUP</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>UNKNOWN</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-readonly">read-only</span></div>
|
||||
<h3 id="Events"><span class="symbol-name">Events</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Events that can be emitted by the client</p>
|
||||
<section>
|
||||
<h4>Properties</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>AUTHENTICATED</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>AUTHENTICATION_FAILURE</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>READY</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>MESSAGE_RECEIVED</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>MESSAGE_CREATE</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>MESSAGE_REVOKED_EVERYONE</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>MESSAGE_REVOKED_ME</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>QR_RECEIVED</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>DISCONNECTED</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-readonly">read-only</span></div>
|
||||
<h3 id="MessageTypes"><span class="symbol-name">MessageTypes</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>Message types</p>
|
||||
<section>
|
||||
<h4>Properties</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>TEXT</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>AUDIO</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>VOICE</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>IMAGE</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>VIDEO</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>DOCUMENT</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>STICKER</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-readonly">read-only</span></div>
|
||||
<h3 id="Status"><span class="symbol-name">Status</span><small class="property-type">
|
||||
number</small></h3>
|
||||
<p>Client status</p>
|
||||
<section>
|
||||
<h4>Properties</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>INITIALIZING</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>AUTHENTICATING</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>READY</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
<div class="symbol-detail-labels"><span class="label label-readonly">read-only</span></div>
|
||||
<h3 id="WAState"><span class="symbol-name">WAState</span><small class="property-type">
|
||||
string</small></h3>
|
||||
<p>WhatsApp state</p>
|
||||
<section>
|
||||
<h4>Properties</h4>
|
||||
<table class="jsdoc-details-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Optional</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>CONFLICT</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>CONNECTED</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>DEPRECATED_VERSION</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>OPENING</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>PAIRING</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>PROXYBLOCK</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>SMB_TOS_BLOCK</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>TIMEOUT</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>TOS_BLOCK</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>UNLAUNCHED</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>UNPAIRED</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>UNPAIRED_IDLE</p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<dl class="dl-compact">
|
||||
</dl>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
1098
docs/index.html
Normal file
1098
docs/index.html
Normal file
File diff suppressed because it is too large
Load Diff
2
docs/scripts/jquery.min.js
vendored
Normal file
2
docs/scripts/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
docs/scripts/jsdoc-toc.js
Normal file
17
docs/scripts/jsdoc-toc.js
Normal file
@@ -0,0 +1,17 @@
|
||||
(function($) {
|
||||
// TODO: make the node ID configurable
|
||||
var treeNode = $('#jsdoc-toc-nav');
|
||||
|
||||
// initialize the tree
|
||||
treeNode.tree({
|
||||
autoEscape: false,
|
||||
closedIcon: '⇢',
|
||||
data: [{"label":"<a href=\"global.html\">Globals</a>","id":"global","children":[]},{"label":"<a href=\"Base.html\">Base</a>","id":"Base","children":[]},{"label":"<a href=\"BusinessContact.html\">BusinessContact</a>","id":"BusinessContact","children":[]},{"label":"<a href=\"Chat.html\">Chat</a>","id":"Chat","children":[]},{"label":"<a href=\"Client.html\">Client</a>","id":"Client","children":[]},{"label":"<a href=\"ClientInfo.html\">ClientInfo</a>","id":"ClientInfo","children":[]},{"label":"<a href=\"Contact.html\">Contact</a>","id":"Contact","children":[]},{"label":"<a href=\"GroupChat.html\">GroupChat</a>","id":"GroupChat","children":[]},{"label":"<a href=\"Message.html\">Message</a>","id":"Message","children":[]},{"label":"<a href=\"MessageMedia.html\">MessageMedia</a>","id":"MessageMedia","children":[]},{"label":"<a href=\"PrivateChat.html\">PrivateChat</a>","id":"PrivateChat","children":[]},{"label":"<a href=\"PrivateContact.html\">PrivateContact</a>","id":"PrivateContact","children":[]},{"label":"<a href=\"Util.html\">Util</a>","id":"Util","children":[]}],
|
||||
openedIcon: ' ⇣',
|
||||
saveState: false,
|
||||
useContextMenu: false
|
||||
});
|
||||
|
||||
// add event handlers
|
||||
// TODO
|
||||
})(jQuery);
|
||||
1
docs/scripts/lang-css.js
Normal file
1
docs/scripts/lang-css.js
Normal file
@@ -0,0 +1 @@
|
||||
PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']+)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:<!--|-->)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}\b/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]),PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]),PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]);
|
||||
1
docs/scripts/linenumber.js
Normal file
1
docs/scripts/linenumber.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(){var n,e=0,t=document.getElementsByClassName("prettyprint");t&&t[0]&&(n=(n=(t=t[0].getElementsByTagName("code")[0]).innerHTML.split("\n")).map(function(n){return'<span id="source-line-'+ ++e+'" class="line"></span>'+n}),t.innerHTML=n.join("\n"))}();
|
||||
1
docs/scripts/prettify.js
Normal file
1
docs/scripts/prettify.js
Normal file
File diff suppressed because one or more lines are too long
1
docs/scripts/scrollanchor.js
Normal file
1
docs/scripts/scrollanchor.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(){function o(n){var o,t,e=document.getElementById(n.replace(/^#/,""));e&&(t=e.getBoundingClientRect(),o=t.top+window.pageYOffset,setTimeout(function(){window.scrollTo(0,o-50)},5))}window.addEventListener("load",function(){var n=window.location.hash;n&&"#"!==n&&o(n),window.addEventListener("hashchange",function(){o(window.location.hash)})})}();
|
||||
1
docs/scripts/tree.jquery.js
Normal file
1
docs/scripts/tree.jquery.js
Normal file
File diff suppressed because one or more lines are too long
75
docs/structures_Base.js.html
Normal file
75
docs/structures_Base.js.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/Base.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/Base.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
/**
|
||||
* Represents a WhatsApp data structure
|
||||
*/
|
||||
class Base {
|
||||
constructor(client) {
|
||||
/**
|
||||
* The client that instantiated this
|
||||
* @readonly
|
||||
*/
|
||||
Object.defineProperty(this, 'client', { value: client });
|
||||
}
|
||||
|
||||
_clone() {
|
||||
return Object.assign(Object.create(this), this);
|
||||
}
|
||||
|
||||
_patch(data) { return data; }
|
||||
}
|
||||
|
||||
module.exports = Base;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
74
docs/structures_BusinessContact.js.html
Normal file
74
docs/structures_BusinessContact.js.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/BusinessContact.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/BusinessContact.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const Contact = require('./Contact');
|
||||
|
||||
/**
|
||||
* Represents a Business Contact on WhatsApp
|
||||
* @extends {Contact}
|
||||
*/
|
||||
class BusinessContact extends Contact {
|
||||
_patch(data) {
|
||||
/**
|
||||
* The contact's business profile
|
||||
*/
|
||||
this.businessProfile = data.businessProfile;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = BusinessContact;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
120
docs/structures_Chat.js.html
Normal file
120
docs/structures_Chat.js.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/Chat.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/Chat.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const Base = require('./Base');
|
||||
|
||||
/**
|
||||
* Represents a Chat on WhatsApp
|
||||
* @extends {Base}
|
||||
*/
|
||||
class Chat extends Base {
|
||||
constructor(client, data) {
|
||||
super(client);
|
||||
|
||||
if(data) this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
/**
|
||||
* ID that represents the chat
|
||||
* @type {object}
|
||||
*/
|
||||
this.id = data.id;
|
||||
|
||||
/**
|
||||
* Title of the chat
|
||||
* @type {string}
|
||||
*/
|
||||
this.name = data.formattedTitle;
|
||||
|
||||
/**
|
||||
* Indicates if the Chat is a Group Chat
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isGroup = data.isGroup;
|
||||
|
||||
/**
|
||||
* Indicates if the Chat is readonly
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isReadOnly = data.isReadOnly;
|
||||
|
||||
/**
|
||||
* Amount of messages unread
|
||||
* @type {number}
|
||||
*/
|
||||
this.unreadCount = data.unreadCount;
|
||||
|
||||
/**
|
||||
* Unix timestamp for when the chat was created
|
||||
* @type {number}
|
||||
*/
|
||||
this.timestamp = data.t;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a message to this chat
|
||||
* @param {string|MessageMedia} content
|
||||
* @param {object} options
|
||||
* @returns {Promise&lt;Message>} Message that was just sent
|
||||
*/
|
||||
async sendMessage(content, options) {
|
||||
return this.client.sendMessage(this.id._serialized, content, options);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Chat;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
104
docs/structures_ClientInfo.js.html
Normal file
104
docs/structures_ClientInfo.js.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/ClientInfo.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/ClientInfo.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const Base = require('./Base');
|
||||
|
||||
/**
|
||||
* Current connection information
|
||||
* @extends {Base}
|
||||
*/
|
||||
class ClientInfo extends Base {
|
||||
constructor(client, data) {
|
||||
super(client);
|
||||
|
||||
if(data) this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
/**
|
||||
* Name configured to be shown in push notifications
|
||||
* @type {string}
|
||||
*/
|
||||
this.pushname = data.pushname;
|
||||
|
||||
/**
|
||||
* Current user ID
|
||||
* @type {object}
|
||||
*/
|
||||
this.me = data.me;
|
||||
|
||||
/**
|
||||
* Information about the phone this client is connected to
|
||||
* @type {object}
|
||||
* @property {string} wa_version WhatsApp Version running on the phone
|
||||
* @property {string} os_version OS Version running on the phone (iOS or Android version)
|
||||
* @property {string} device_manufacturer Device manufacturer
|
||||
* @property {string} device_model Device model
|
||||
* @property {string} os_build_number OS build number
|
||||
*/
|
||||
this.phone = data.phone;
|
||||
|
||||
/**
|
||||
* Platform the phone is running on
|
||||
* @type {string}
|
||||
*/
|
||||
this.platform = data.platform;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = ClientInfo;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
120
docs/structures_Contact.js.html
Normal file
120
docs/structures_Contact.js.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/Contact.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/Contact.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const Base = require('./Base');
|
||||
|
||||
/**
|
||||
* Represents a Contact on WhatsApp
|
||||
* @extends {Base}
|
||||
*/
|
||||
class Contact extends Base {
|
||||
constructor(client, data) {
|
||||
super(client);
|
||||
|
||||
if(data) this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
/**
|
||||
* ID that represents the contact
|
||||
* @type {object}
|
||||
*/
|
||||
this.id = data.id;
|
||||
|
||||
/**
|
||||
* Indicates if the contact is a business contact
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isBusiness = data.isBusiness;
|
||||
|
||||
/**
|
||||
* Indicates if the contact is an enterprise contact
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isEnterprise = data.isEnterprise;
|
||||
|
||||
this.labels = data.labels;
|
||||
|
||||
/**
|
||||
* The contact's name, as saved by the current user
|
||||
* @type {?string}
|
||||
*/
|
||||
this.name = data.name;
|
||||
|
||||
/**
|
||||
* The name that the contact has configured to be shown publically
|
||||
* @type {string}
|
||||
*/
|
||||
this.pushname = data.pushname;
|
||||
|
||||
this.sectionHeader = data.sectionHeader;
|
||||
|
||||
/**
|
||||
* A shortened version of name
|
||||
* @type {?string}
|
||||
*/
|
||||
this.shortName = data.shortName;
|
||||
|
||||
this.statusMute = data.statusMute;
|
||||
this.type = data.type;
|
||||
this.verifiedLevel = data.verifiedLevel;
|
||||
this.verifiedName = data.verifiedName;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Contact;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
224
docs/structures_GroupChat.js.html
Normal file
224
docs/structures_GroupChat.js.html
Normal file
@@ -0,0 +1,224 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/GroupChat.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/GroupChat.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const Chat = require('./Chat');
|
||||
|
||||
/**
|
||||
* Represents a Group Chat on WhatsApp
|
||||
* @extends {Chat}
|
||||
*/
|
||||
class GroupChat extends Chat {
|
||||
_patch(data) {
|
||||
this.groupMetadata = data.groupMetadata;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the group owner
|
||||
*/
|
||||
get owner() {
|
||||
return this.groupMetadata.owner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the date at which the group was created
|
||||
* @type {date}
|
||||
*/
|
||||
get createdAt() {
|
||||
return new Date(this.groupMetadata.creation * 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the group description
|
||||
* @type {string}
|
||||
*/
|
||||
get description() {
|
||||
return this.groupMetadata.desc;
|
||||
}
|
||||
/**
|
||||
* Gets the group participants
|
||||
* @type {array}
|
||||
*/
|
||||
get participants() {
|
||||
return this.groupMetadata.participants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a list of participants by ID to the group
|
||||
* @param {Array&lt;string>} participantIds
|
||||
*/
|
||||
async addParticipants(participantIds) {
|
||||
return await this.client.pupPage.evaluate((chatId, participantIds) => {
|
||||
return window.Store.Wap.addParticipants(chatId, participantIds);
|
||||
}, this.id._serialized, participantIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a list of participants by ID to the group
|
||||
* @param {Array&lt;string>} participantIds
|
||||
*/
|
||||
async removeParticipants(participantIds) {
|
||||
return await this.client.pupPage.evaluate((chatId, participantIds) => {
|
||||
return window.Store.Wap.removeParticipants(chatId, participantIds);
|
||||
}, this.id._serialized, participantIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Promotes participants by IDs to admins
|
||||
* @param {Array&lt;string>} participantIds
|
||||
*/
|
||||
async promoteParticipants(participantIds) {
|
||||
return await this.client.pupPage.evaluate((chatId, participantIds) => {
|
||||
return window.Store.Wap.promoteParticipants(chatId, participantIds);
|
||||
}, this.id._serialized, participantIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Demotes participants by IDs to regular users
|
||||
* @param {Array&lt;string>} participantIds
|
||||
*/
|
||||
async demoteParticipants(participantIds) {
|
||||
return await this.client.pupPage.evaluate((chatId, participantIds) => {
|
||||
return window.Store.Wap.demoteParticipants(chatId, participantIds);
|
||||
}, this.id._serialized, participantIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the group subject
|
||||
* @param {string} subject
|
||||
*/
|
||||
async setSubject(subject) {
|
||||
let res = await this.client.pupPage.evaluate((chatId, subject) => {
|
||||
return window.Store.Wap.changeSubject(chatId, subject);
|
||||
}, this.id._serialized, subject);
|
||||
|
||||
if(res.status == 200) {
|
||||
this.name = subject;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the group description
|
||||
* @param {string} description
|
||||
*/
|
||||
async setDescription(description) {
|
||||
let res = await this.client.pupPage.evaluate((chatId, description) => {
|
||||
let descId = window.Store.GroupMetadata.get(chatId).descId;
|
||||
return window.Store.Wap.setGroupDescription(chatId, description, window.Store.genId(), descId);
|
||||
}, this.id._serialized, description);
|
||||
|
||||
if (res.status == 200) {
|
||||
this.groupMetadata.desc = description;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the invite code for a specific group
|
||||
*/
|
||||
async getInviteCode() {
|
||||
let res = await this.client.pupPage.evaluate(chatId => {
|
||||
return window.Store.Wap.groupInviteCode(chatId);
|
||||
}, this.id._serialized);
|
||||
|
||||
if (res.status == 200) {
|
||||
return res.code;
|
||||
}
|
||||
|
||||
throw new Error('Not authorized');
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidates the current group invite code and generates a new one
|
||||
*/
|
||||
async revokeInvite() {
|
||||
return await this.client.pupPage.evaluate(chatId => {
|
||||
return window.Store.Wap.revokeGroupInvite(chatId);
|
||||
}, this.id._serialized);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an object with information about the invite code's group
|
||||
* @param {string} inviteCode
|
||||
* @returns {Promise&lt;object>} Invite information
|
||||
*/
|
||||
static async getInviteInfo(inviteCode) {
|
||||
return await this.client.pupPage.evaluate(inviteCode => {
|
||||
return window.Store.Wap.groupInviteInfo(inviteCode);
|
||||
}, inviteCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Joins a group with an invite code
|
||||
* @param {string} inviteCode
|
||||
*/
|
||||
static async join(inviteCode) {
|
||||
return await this.client.pupPage.evaluate(inviteCode => {
|
||||
return window.Store.Wap.acceptGroupInvite(inviteCode);
|
||||
}, inviteCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the bot leave the group
|
||||
*/
|
||||
async leave() {
|
||||
return await this.client.pupPage.evaluate(chatId => {
|
||||
return window.Store.Wap.leaveGroup(chatId);
|
||||
}, this.id._serialized);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = GroupChat;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
234
docs/structures_Message.js.html
Normal file
234
docs/structures_Message.js.html
Normal file
@@ -0,0 +1,234 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/Message.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/Message.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const Base = require('./Base');
|
||||
const MessageMedia = require('./MessageMedia');
|
||||
|
||||
/**
|
||||
* Represents a Message on WhatsApp
|
||||
* @extends {Base}
|
||||
*/
|
||||
class Message extends Base {
|
||||
constructor(client, data) {
|
||||
super(client);
|
||||
|
||||
if(data) this._patch(data);
|
||||
}
|
||||
|
||||
_patch(data) {
|
||||
/**
|
||||
* ID that represents the message
|
||||
* @type {object}
|
||||
*/
|
||||
this.id = data.id;
|
||||
|
||||
/**
|
||||
* Indicates if the message has media available for download
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.hasMedia = data.clientUrl ? true : false;
|
||||
|
||||
/**
|
||||
* Message content
|
||||
* @type {string}
|
||||
*/
|
||||
this.body = this.hasMedia ? data.caption || '' : data.body || '';
|
||||
|
||||
/**
|
||||
* Message type
|
||||
* @type {MessageTypes}
|
||||
*/
|
||||
this.type = data.type;
|
||||
|
||||
/**
|
||||
* Unix timestamp for when the message was created
|
||||
* @type {number}
|
||||
*/
|
||||
this.timestamp = data.t;
|
||||
|
||||
/**
|
||||
* ID for the Chat that this message was sent to, except if the message was sent by the current user.
|
||||
* @type {string}
|
||||
*/
|
||||
this.from = typeof (data.from) === 'object' ? data.from._serialized : data.from;
|
||||
|
||||
/**
|
||||
* ID for who this message is for.
|
||||
*
|
||||
* If the message is sent by the current user, it will be the Chat to which the message is being sent.
|
||||
* If the message is sent by another user, it will be the ID for the current user.
|
||||
* @type {string}
|
||||
*/
|
||||
this.to = typeof (data.to) === 'object' ? data.to._serialized : data.to;
|
||||
|
||||
/**
|
||||
* If the message was sent to a group, this field will contain the user that sent the message.
|
||||
* @type {string}
|
||||
*/
|
||||
this.author = typeof (data.author) === 'object' ? data.author._serialized : data.author;
|
||||
|
||||
/**
|
||||
* Indicates if the message was forwarded
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.isForwarded = data.isForwarded;
|
||||
|
||||
/**
|
||||
* Indicates if the message was a broadcast
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.broadcast = data.broadcast;
|
||||
|
||||
/**
|
||||
* Indicates if the message was sent by the current user
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.fromMe = data.id.fromMe;
|
||||
|
||||
/**
|
||||
* Indicates if the message was sent as a reply to another message.
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.hasQuotedMsg = data.quotedMsg ? true : false;
|
||||
|
||||
return super._patch(data);
|
||||
}
|
||||
|
||||
_getChatId() {
|
||||
return this.fromMe ? this.to : this.from;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Chat this message was sent in
|
||||
* @returns {Promise&lt;Chat>}
|
||||
*/
|
||||
getChat() {
|
||||
return this.client.getChatById(this._getChatId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Contact this message was sent from
|
||||
* @returns {Promise&lt;Contact>}
|
||||
*/
|
||||
getContact() {
|
||||
return this.client.getContactById(this._getChatId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the quoted message, if any
|
||||
* @returns {Promise&lt;Message>}
|
||||
*/
|
||||
async getQuotedMessage() {
|
||||
if (!this.hasQuotedMsg) return undefined;
|
||||
|
||||
const quotedMsg = await this.client.pupPage.evaluate((msgId) => {
|
||||
let msg = window.Store.Msg.get(msgId);
|
||||
return msg.quotedMsgObj().serialize();
|
||||
}, this.id._serialized);
|
||||
|
||||
return new Message(this.client, quotedMsg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message as a reply to this message. If chatId is specified, it will be sent
|
||||
* through the specified Chat. If not, it will send the message
|
||||
* in the same Chat as the original message was sent.
|
||||
*
|
||||
* @param {string|MessageMedia} content
|
||||
* @param {?string} chatId
|
||||
* @param {object} options
|
||||
* @returns {Promise&lt;Message>}
|
||||
*/
|
||||
async reply(content, chatId, options={}) {
|
||||
if (!chatId) {
|
||||
chatId = this._getChatId();
|
||||
}
|
||||
|
||||
options = {
|
||||
...options,
|
||||
quotedMessageId: this.id._serialized
|
||||
};
|
||||
|
||||
return this.client.sendMessage(chatId, content, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Downloads and returns the attatched message media
|
||||
* @returns {Promise&lt;MessageMedia>}
|
||||
*/
|
||||
async downloadMedia() {
|
||||
if (!this.hasMedia) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const {data, mimetype, filename} = await this.client.pupPage.evaluate(async (msgId) => {
|
||||
const msg = window.Store.Msg.get(msgId);
|
||||
const buffer = await window.WWebJS.downloadBuffer(msg.clientUrl);
|
||||
const decrypted = await window.Store.CryptoLib.decryptE2EMedia(msg.type, buffer, msg.mediaKey, msg.mimetype);
|
||||
const data = await window.WWebJS.readBlobAsync(decrypted._blob);
|
||||
|
||||
return {
|
||||
data: data.split(',')[1],
|
||||
mimetype: msg.mimetype,
|
||||
filename: msg.filename
|
||||
};
|
||||
|
||||
}, this.id._serialized);
|
||||
|
||||
return new MessageMedia(mimetype, data, filename);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Message;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
84
docs/structures_MessageMedia.js.html
Normal file
84
docs/structures_MessageMedia.js.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/MessageMedia.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/MessageMedia.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
/**
|
||||
* Media attached to a message
|
||||
* @param {string} mimetype MIME type of the attachment
|
||||
* @param {string} data Base64-encoded data of the file
|
||||
* @param {?string} filename Document file name
|
||||
*/
|
||||
class MessageMedia {
|
||||
constructor(mimetype, data, filename) {
|
||||
/**
|
||||
* MIME type of the attachment
|
||||
* @type {string}
|
||||
*/
|
||||
this.mimetype = mimetype;
|
||||
|
||||
/**
|
||||
* Base64 encoded data that represents the file
|
||||
* @type {string}
|
||||
*/
|
||||
this.data = data;
|
||||
|
||||
/**
|
||||
* Name of the file (for documents)
|
||||
* @type {?string}
|
||||
*/
|
||||
this.filename = filename;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MessageMedia;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
66
docs/structures_PrivateChat.js.html
Normal file
66
docs/structures_PrivateChat.js.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/PrivateChat.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/PrivateChat.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const Chat = require('./Chat');
|
||||
|
||||
/**
|
||||
* Represents a Private Chat on WhatsApp
|
||||
* @extends {Chat}
|
||||
*/
|
||||
class PrivateChat extends Chat {
|
||||
|
||||
}
|
||||
|
||||
module.exports = PrivateChat;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
66
docs/structures_PrivateContact.js.html
Normal file
66
docs/structures_PrivateContact.js.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: structures/PrivateContact.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: structures/PrivateContact.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const Contact = require('./Contact');
|
||||
|
||||
/**
|
||||
* Represents a Private Contact on WhatsApp
|
||||
* @extends {Contact}
|
||||
*/
|
||||
class PrivateContact extends Contact {
|
||||
|
||||
}
|
||||
|
||||
module.exports = PrivateContact;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
139
docs/util_Constants.js.html
Normal file
139
docs/util_Constants.js.html
Normal file
@@ -0,0 +1,139 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: util/Constants.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: util/Constants.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
exports.WhatsWebURL = 'https://web.whatsapp.com/';
|
||||
|
||||
exports.UserAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36';
|
||||
|
||||
exports.DefaultOptions = {
|
||||
puppeteer: {
|
||||
headless: true
|
||||
},
|
||||
session: false
|
||||
};
|
||||
|
||||
/**
|
||||
* Client status
|
||||
* @readonly
|
||||
* @enum {number}
|
||||
*/
|
||||
exports.Status = {
|
||||
INITIALIZING: 0,
|
||||
AUTHENTICATING: 1,
|
||||
READY: 3
|
||||
};
|
||||
|
||||
/**
|
||||
* Events that can be emitted by the client
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
exports.Events = {
|
||||
AUTHENTICATED: 'authenticated',
|
||||
AUTHENTICATION_FAILURE: 'auth_failure',
|
||||
READY: 'ready',
|
||||
MESSAGE_RECEIVED: 'message',
|
||||
MESSAGE_CREATE: 'message_create',
|
||||
MESSAGE_REVOKED_EVERYONE: 'message_revoke_everyone',
|
||||
MESSAGE_REVOKED_ME: 'message_revoke_me',
|
||||
QR_RECEIVED: 'qr',
|
||||
DISCONNECTED: 'disconnected'
|
||||
};
|
||||
|
||||
/**
|
||||
* Message types
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
exports.MessageTypes = {
|
||||
TEXT: 'chat',
|
||||
AUDIO: 'audio',
|
||||
VOICE: 'ptt',
|
||||
IMAGE: 'image',
|
||||
VIDEO: 'video',
|
||||
DOCUMENT: 'document',
|
||||
STICKER: 'sticker'
|
||||
};
|
||||
|
||||
/**
|
||||
* Chat types
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
exports.ChatTypes = {
|
||||
SOLO: 'solo',
|
||||
GROUP: 'group',
|
||||
UNKNOWN: 'unknown'
|
||||
};
|
||||
|
||||
/**
|
||||
* WhatsApp state
|
||||
* @readonly
|
||||
* @enum {string}
|
||||
*/
|
||||
exports.WAState = {
|
||||
CONFLICT: 'CONFLICT',
|
||||
CONNECTED: 'CONNECTED',
|
||||
DEPRECATED_VERSION: 'DEPRECATED_VERSION',
|
||||
OPENING: 'OPENING',
|
||||
PAIRING: 'PAIRING',
|
||||
PROXYBLOCK: 'PROXYBLOCK',
|
||||
SMB_TOS_BLOCK: 'SMB_TOS_BLOCK',
|
||||
TIMEOUT: 'TIMEOUT',
|
||||
TOS_BLOCK: 'TOS_BLOCK',
|
||||
UNLAUNCHED: 'UNLAUNCHED',
|
||||
UNPAIRED: 'UNPAIRED',
|
||||
UNPAIRED_IDLE: 'UNPAIRED_IDLE'
|
||||
};</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
88
docs/util_Util.js.html
Normal file
88
docs/util_Util.js.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.3">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 0.3.2 » Source: util/Util.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
<link href="css/baseline.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint()">
|
||||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 0.<wbr>3.<wbr>2</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="jsdoc-body-container">
|
||||
<div id="jsdoc-content">
|
||||
<div id="jsdoc-content-container">
|
||||
<div id="jsdoc-banner" role="banner">
|
||||
</div>
|
||||
<div id="jsdoc-main" role="main">
|
||||
<header class="page-header">
|
||||
<h1>Source: util/Util.js</h1>
|
||||
</header>
|
||||
<article>
|
||||
<pre class="prettyprint linenums"><code>'use strict';
|
||||
|
||||
const has = (o, k) => Object.prototype.hasOwnProperty.call(o, k);
|
||||
|
||||
/**
|
||||
* Utility methods
|
||||
*/
|
||||
class Util {
|
||||
|
||||
constructor() {
|
||||
throw new Error(`The ${this.constructor.name} class may not be instantiated.`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets default properties on an object that aren't already specified.
|
||||
* @param {Object} def Default properties
|
||||
* @param {Object} given Object to assign defaults to
|
||||
* @returns {Object}
|
||||
* @private
|
||||
*/
|
||||
static mergeDefault(def, given) {
|
||||
if (!given) return def;
|
||||
for (const key in def) {
|
||||
if (!has(given, key) || given[key] === undefined) {
|
||||
given[key] = def[key];
|
||||
} else if (given[key] === Object(given[key])) {
|
||||
given[key] = Util.mergeDefault(def[key], given[key]);
|
||||
}
|
||||
}
|
||||
|
||||
return given;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Util;</code></pre>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on February 5, 2020.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="scripts/jquery.min.js"></script>
|
||||
<script src="scripts/tree.jquery.js"></script>
|
||||
<script src="scripts/prettify.js"></script>
|
||||
<script src="scripts/jsdoc-toc.js"></script>
|
||||
<script src="scripts/linenumber.js"></script>
|
||||
<script src="scripts/scrollanchor.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
412
package-lock.json
generated
412
package-lock.json
generated
@@ -24,11 +24,23 @@
|
||||
"js-tokens": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"@babel/parser": {
|
||||
"version": "7.8.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz",
|
||||
"integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/mime-types": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.0.tgz",
|
||||
"integrity": "sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM="
|
||||
},
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"dev": true
|
||||
},
|
||||
"acorn": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
|
||||
@@ -107,6 +119,12 @@
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.7.2",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
|
||||
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
@@ -127,6 +145,15 @@
|
||||
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
|
||||
"dev": true
|
||||
},
|
||||
"catharsis": {
|
||||
"version": "0.8.11",
|
||||
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz",
|
||||
"integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash": "^4.17.14"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
@@ -174,6 +201,12 @@
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||
"dev": true
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@@ -190,6 +223,16 @@
|
||||
"typedarray": "^0.0.6"
|
||||
}
|
||||
},
|
||||
"config-chain": {
|
||||
"version": "1.1.12",
|
||||
"resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz",
|
||||
"integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ini": "^1.3.4",
|
||||
"proto-list": "~1.2.1"
|
||||
}
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
@@ -224,6 +267,12 @@
|
||||
"ms": "^2.1.1"
|
||||
}
|
||||
},
|
||||
"deep-extend": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||
"dev": true
|
||||
},
|
||||
"deep-is": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
|
||||
@@ -239,12 +288,38 @@
|
||||
"esutils": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"editorconfig": {
|
||||
"version": "0.15.3",
|
||||
"resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz",
|
||||
"integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"commander": "^2.19.0",
|
||||
"lru-cache": "^4.1.5",
|
||||
"semver": "^5.6.0",
|
||||
"sigmund": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||
"dev": true
|
||||
},
|
||||
"entities": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
|
||||
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
|
||||
"dev": true
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
@@ -519,6 +594,30 @@
|
||||
"type-fest": "^0.8.1"
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
|
||||
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
|
||||
"dev": true
|
||||
},
|
||||
"handlebars": {
|
||||
"version": "4.7.2",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.2.tgz",
|
||||
"integrity": "sha512-4PwqDL2laXtTWZghzzCtunQUTLbo31pcCJrd/B/9JP8XbhVzpS5ZXuKqlOzsd1rtcaLo4KqAn8nl8mkknS4MHw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"neo-async": "^2.6.0",
|
||||
"optimist": "^0.6.1",
|
||||
"source-map": "^0.6.1",
|
||||
"uglify-js": "^3.1.4"
|
||||
}
|
||||
},
|
||||
"handlebars-layouts": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/handlebars-layouts/-/handlebars-layouts-3.1.4.tgz",
|
||||
"integrity": "sha1-JrO+uTG0uHffv35v6vQFjuYiiwI=",
|
||||
"dev": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
@@ -579,6 +678,12 @@
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
||||
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
|
||||
"dev": true
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz",
|
||||
@@ -638,6 +743,19 @@
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
|
||||
"dev": true
|
||||
},
|
||||
"js-beautify": {
|
||||
"version": "1.10.3",
|
||||
"resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.10.3.tgz",
|
||||
"integrity": "sha512-wfk/IAWobz1TfApSdivH5PJ0miIHgDoYb1ugSqHcODPmaYu46rYe5FVuIEkhjg8IQiv6rDNPyhsqbsohI/C2vQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"config-chain": "^1.1.12",
|
||||
"editorconfig": "^0.15.3",
|
||||
"glob": "^7.1.3",
|
||||
"mkdirp": "~0.5.1",
|
||||
"nopt": "~4.0.1"
|
||||
}
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
@@ -654,6 +772,72 @@
|
||||
"esprima": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"js2xmlparser": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz",
|
||||
"integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"xmlcreate": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"jsdoc": {
|
||||
"version": "3.6.3",
|
||||
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.3.tgz",
|
||||
"integrity": "sha512-Yf1ZKA3r9nvtMWHO1kEuMZTlHOF8uoQ0vyo5eH7SQy5YeIiHM+B0DgKnn+X6y6KDYZcF7G2SPkKF+JORCXWE/A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/parser": "^7.4.4",
|
||||
"bluebird": "^3.5.4",
|
||||
"catharsis": "^0.8.11",
|
||||
"escape-string-regexp": "^2.0.0",
|
||||
"js2xmlparser": "^4.0.0",
|
||||
"klaw": "^3.0.0",
|
||||
"markdown-it": "^8.4.2",
|
||||
"markdown-it-anchor": "^5.0.2",
|
||||
"marked": "^0.7.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"requizzle": "^0.2.3",
|
||||
"strip-json-comments": "^3.0.1",
|
||||
"taffydb": "2.6.2",
|
||||
"underscore": "~1.9.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
|
||||
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"jsdoc-baseline": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/jsdoc-baseline/-/jsdoc-baseline-0.1.5.tgz",
|
||||
"integrity": "sha512-bJwd6KRIEeAaazLwDxTM0XN5hG/uPA59omgsfYEJrnqZDZ9w4S7vPK5dRdCyQ/Gaxa5h8bCH4O7dCWW1yTGjtA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"catharsis": "^0.8.11",
|
||||
"deep-extend": "^0.6.0",
|
||||
"escape-string-regexp": "^2.0.0",
|
||||
"handlebars": "^4.4.3",
|
||||
"handlebars-layouts": "^3.1.4",
|
||||
"js-beautify": "^1.10.2",
|
||||
"js-yaml": "^3.13.1",
|
||||
"lodash": "^4.17.15",
|
||||
"messageformat": "^2.3.0",
|
||||
"spdx-license-list": "^6.1.0",
|
||||
"strip-json-comments": "^3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"escape-string-regexp": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
|
||||
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"json-schema-traverse": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||
@@ -671,6 +855,15 @@
|
||||
"resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.2.0.tgz",
|
||||
"integrity": "sha512-wKcQS9QC2VHGk7aphWCp1RrFyC0CM6fMgC5prZZ2KV/Lk6OKNoCod9IR6bao+yx3KPY0gZFC5dc+h+KFzCI0Wg=="
|
||||
},
|
||||
"klaw": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
|
||||
"integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.9"
|
||||
}
|
||||
},
|
||||
"levn": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
|
||||
@@ -681,12 +874,103 @@
|
||||
"type-check": "~0.3.2"
|
||||
}
|
||||
},
|
||||
"linkify-it": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",
|
||||
"integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"uc.micro": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"dev": true
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "4.1.5",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
|
||||
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pseudomap": "^1.0.2",
|
||||
"yallist": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"make-plural": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/make-plural/-/make-plural-4.3.0.tgz",
|
||||
"integrity": "sha512-xTYd4JVHpSCW+aqDof6w/MebaMVNTVYBZhbB/vi513xXdiPT92JMVCo0Jq8W2UZnzYRFeVbQiQ+I25l13JuKvA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"markdown-it": {
|
||||
"version": "8.4.2",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz",
|
||||
"integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"entities": "~1.1.1",
|
||||
"linkify-it": "^2.0.0",
|
||||
"mdurl": "^1.0.1",
|
||||
"uc.micro": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"markdown-it-anchor": {
|
||||
"version": "5.2.5",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.2.5.tgz",
|
||||
"integrity": "sha512-xLIjLQmtym3QpoY9llBgApknl7pxAcN3WDRc2d3rwpl+/YvDZHPmKscGs+L6E05xf2KrCXPBvosWt7MZukwSpQ==",
|
||||
"dev": true
|
||||
},
|
||||
"marked": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz",
|
||||
"integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==",
|
||||
"dev": true
|
||||
},
|
||||
"mdurl": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
|
||||
"integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
|
||||
"dev": true
|
||||
},
|
||||
"messageformat": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/messageformat/-/messageformat-2.3.0.tgz",
|
||||
"integrity": "sha512-uTzvsv0lTeQxYI2y1NPa1lItL5VRI8Gb93Y2K2ue5gBPyrbJxfDi/EYWxh2PKv5yO42AJeeqblS9MJSh/IEk4w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"make-plural": "^4.3.0",
|
||||
"messageformat-formatters": "^2.0.1",
|
||||
"messageformat-parser": "^4.1.2"
|
||||
}
|
||||
},
|
||||
"messageformat-formatters": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/messageformat-formatters/-/messageformat-formatters-2.0.1.tgz",
|
||||
"integrity": "sha512-E/lQRXhtHwGuiQjI7qxkLp8AHbMD5r2217XNe/SREbBlSawe0lOqsFb7rflZJmlQFSULNLIqlcjjsCPlB3m3Mg==",
|
||||
"dev": true
|
||||
},
|
||||
"messageformat-parser": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/messageformat-parser/-/messageformat-parser-4.1.2.tgz",
|
||||
"integrity": "sha512-7dWuifeyldz7vhEuL96Kwq1fhZXBW+TUfbnHN4UCrCxoXQTYjHnR78eI66Gk9LaLLsAvzPNVJBaa66DRfFNaiA==",
|
||||
"dev": true
|
||||
},
|
||||
"mime": {
|
||||
"version": "2.4.4",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz",
|
||||
@@ -753,12 +1037,28 @@
|
||||
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
|
||||
"dev": true
|
||||
},
|
||||
"neo-async": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz",
|
||||
"integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==",
|
||||
"dev": true
|
||||
},
|
||||
"nice-try": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
||||
"dev": true
|
||||
},
|
||||
"nopt": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
|
||||
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"abbrev": "1",
|
||||
"osenv": "^0.1.4"
|
||||
}
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
@@ -776,6 +1076,16 @@
|
||||
"mimic-fn": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"optimist": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
|
||||
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "~0.0.1",
|
||||
"wordwrap": "~0.0.2"
|
||||
}
|
||||
},
|
||||
"optionator": {
|
||||
"version": "0.8.3",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
|
||||
@@ -790,12 +1100,28 @@
|
||||
"word-wrap": "~1.2.3"
|
||||
}
|
||||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||
"dev": true
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"dev": true
|
||||
},
|
||||
"osenv": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
|
||||
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"os-homedir": "^1.0.0",
|
||||
"os-tmpdir": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"parent-module": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||
@@ -837,11 +1163,23 @@
|
||||
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
|
||||
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="
|
||||
},
|
||||
"proto-list": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
|
||||
"integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=",
|
||||
"dev": true
|
||||
},
|
||||
"proxy-from-env": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz",
|
||||
"integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4="
|
||||
},
|
||||
"pseudomap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
|
||||
"dev": true
|
||||
},
|
||||
"punycode": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
|
||||
@@ -885,6 +1223,15 @@
|
||||
"integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==",
|
||||
"dev": true
|
||||
},
|
||||
"requizzle": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz",
|
||||
"integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash": "^4.17.14"
|
||||
}
|
||||
},
|
||||
"resolve-from": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
|
||||
@@ -959,6 +1306,12 @@
|
||||
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
|
||||
"dev": true
|
||||
},
|
||||
"sigmund": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
|
||||
"integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
|
||||
"dev": true
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
@@ -984,6 +1337,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
},
|
||||
"spdx-license-list": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-6.1.0.tgz",
|
||||
"integrity": "sha512-xiaE3KtBiylVmZrlux8tHR28HZgZ921HTXbx2fEZaDloRjbBOro79LeKttcQJ5MSDYFKG7in9v2GTAEhcR9/Qg==",
|
||||
"dev": true
|
||||
},
|
||||
"sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
@@ -1089,6 +1454,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"taffydb": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
|
||||
"integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=",
|
||||
"dev": true
|
||||
},
|
||||
"text-table": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
|
||||
@@ -1136,6 +1507,29 @@
|
||||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
||||
},
|
||||
"uc.micro": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
|
||||
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
|
||||
"dev": true
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "3.7.7",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.7.tgz",
|
||||
"integrity": "sha512-FeSU+hi7ULYy6mn8PKio/tXsdSXN35lm4KgV2asx00kzrLU9Pi3oAslcJT70Jdj7PHX29gGUPOT6+lXGBbemhA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"commander": "~2.20.3",
|
||||
"source-map": "~0.6.1"
|
||||
}
|
||||
},
|
||||
"underscore": {
|
||||
"version": "1.9.2",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz",
|
||||
"integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==",
|
||||
"dev": true
|
||||
},
|
||||
"uri-js": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
|
||||
@@ -1171,6 +1565,12 @@
|
||||
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
|
||||
"dev": true
|
||||
},
|
||||
"wordwrap": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
|
||||
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
|
||||
"dev": true
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
@@ -1193,6 +1593,18 @@
|
||||
"async-limiter": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"xmlcreate": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz",
|
||||
"integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==",
|
||||
"dev": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
|
||||
"dev": true
|
||||
},
|
||||
"yauzl": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
"description": "Library for interacting with the WhatsApp Web API ",
|
||||
"main": "./index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"generate-docs": "node_modules/.bin/jsdoc --configure .jsdoc.json --verbose"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -30,6 +31,8 @@
|
||||
"puppeteer": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^6.8.0"
|
||||
"eslint": "^6.8.0",
|
||||
"jsdoc": "^3.6.3",
|
||||
"jsdoc-baseline": "^0.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user