Skip to content

Commit a720aef

Browse files
committed
docs(generate): update jsdoc/docdash generated documentation
1 parent 2f12f1d commit a720aef

17 files changed

Lines changed: 454 additions & 129 deletions

docs/EcomAuth.html

Lines changed: 302 additions & 75 deletions
Large diffs are not rendered by default.

docs/constructor.js.html

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<nav >
2929

30-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EcomAuth.html">EcomAuth</a><ul class='methods'><li data-type='method'><a href="EcomAuth.html#checkLogin">checkLogin</a></li><li data-type='method'><a href="EcomAuth.html#createEcomplusSession">createEcomplusSession</a></li><li data-type='method'><a href="EcomAuth.html#fetchAuthentication">fetchAuthentication</a></li><li data-type='method'><a href="EcomAuth.html#fetchStore">fetchStore</a></li><li data-type='method'><a href="EcomAuth.html#getAuthenticationId">getAuthenticationId</a></li><li data-type='method'><a href="EcomAuth.html#getSession">getSession</a></li><li data-type='method'><a href="EcomAuth.html#login">login</a></li><li data-type='method'><a href="EcomAuth.html#logout">logout</a></li><li data-type='method'><a href="EcomAuth.html#requestApi">requestApi</a></li><li data-type='method'><a href="EcomAuth.html#setSession">setSession</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-@ecomplus_auth.html">@ecomplus/auth</a></li></ul><h3>Events</h3><ul><li><a href="EcomAuth.html#event:login">login</a></li><li><a href="EcomAuth.html#event:logout">logout</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ecomAuth">ecomAuth</a></li></ul>
30+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EcomAuth.html">EcomAuth</a><ul class='methods'><li data-type='method'><a href="EcomAuth.html#checkLogin">checkLogin</a></li><li data-type='method'><a href="EcomAuth.html#createEcomplusSession">createEcomplusSession</a></li><li data-type='method'><a href="EcomAuth.html#fetchAuthentication">fetchAuthentication</a></li><li data-type='method'><a href="EcomAuth.html#fetchStore">fetchStore</a></li><li data-type='method'><a href="EcomAuth.html#getAuthenticationId">getAuthenticationId</a></li><li data-type='method'><a href="EcomAuth.html#getSession">getSession</a></li><li data-type='method'><a href="EcomAuth.html#login">login</a></li><li data-type='method'><a href="EcomAuth.html#logout">logout</a></li><li data-type='method'><a href="EcomAuth.html#requestApi">requestApi</a></li><li data-type='method'><a href="EcomAuth.html#setSession">setSession</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-@ecomplus_auth.html">@ecomplus/auth</a></li></ul><h3>Events</h3><ul><li><a href="EcomAuth.html#event:login">login</a></li><li><a href="EcomAuth.html#event:logout">logout</a></li><li><a href="EcomAuth.html#event:updateAuthentication">updateAuthentication</a></li><li><a href="EcomAuth.html#event:updateStore">updateStore</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ecomAuth">ecomAuth</a></li></ul>
3131
</nav>
3232

3333
<div id="main">
@@ -101,14 +101,7 @@ <h1 class="page-title">constructor.js</h1>
101101
*/
102102
ecomAuth.lang = lang
103103

104-
/**
105-
* Authentication session object.
106-
* @memberof EcomAuth
107-
* @type {object}
108-
*/
109-
ecomAuth.session = {
110-
store_id: ecomAuth.storeId
111-
}
104+
const session = {}
112105

113106
const emitter = new EventEmitter()
114107
;['on', 'off', 'once'].forEach(method => {
@@ -117,7 +110,7 @@ <h1 class="page-title">constructor.js</h1>
117110
}
118111
})
119112

120-
const args = [ecomAuth, emitter]
113+
const args = [ecomAuth, session, emitter]
121114

122115
this.login = (userOrEmail, password, isMd5Hash) => login(args, userOrEmail, password, isMd5Hash)
123116

@@ -155,7 +148,7 @@ <h1 class="page-title">constructor.js</h1>
155148
<br class="clear">
156149

157150
<footer>
158-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Tue Jan 19 2021 18:41:36 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
151+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed Jan 20 2021 15:54:44 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
159152
</footer>
160153

161154
<script>prettyPrint();</script>

docs/global.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<nav >
2929

30-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EcomAuth.html">EcomAuth</a><ul class='methods'><li data-type='method'><a href="EcomAuth.html#checkLogin">checkLogin</a></li><li data-type='method'><a href="EcomAuth.html#createEcomplusSession">createEcomplusSession</a></li><li data-type='method'><a href="EcomAuth.html#fetchAuthentication">fetchAuthentication</a></li><li data-type='method'><a href="EcomAuth.html#fetchStore">fetchStore</a></li><li data-type='method'><a href="EcomAuth.html#getAuthenticationId">getAuthenticationId</a></li><li data-type='method'><a href="EcomAuth.html#getSession">getSession</a></li><li data-type='method'><a href="EcomAuth.html#login">login</a></li><li data-type='method'><a href="EcomAuth.html#logout">logout</a></li><li data-type='method'><a href="EcomAuth.html#requestApi">requestApi</a></li><li data-type='method'><a href="EcomAuth.html#setSession">setSession</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-@ecomplus_auth.html">@ecomplus/auth</a></li></ul><h3>Events</h3><ul><li><a href="EcomAuth.html#event:login">login</a></li><li><a href="EcomAuth.html#event:logout">logout</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ecomAuth">ecomAuth</a></li></ul>
30+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EcomAuth.html">EcomAuth</a><ul class='methods'><li data-type='method'><a href="EcomAuth.html#checkLogin">checkLogin</a></li><li data-type='method'><a href="EcomAuth.html#createEcomplusSession">createEcomplusSession</a></li><li data-type='method'><a href="EcomAuth.html#fetchAuthentication">fetchAuthentication</a></li><li data-type='method'><a href="EcomAuth.html#fetchStore">fetchStore</a></li><li data-type='method'><a href="EcomAuth.html#getAuthenticationId">getAuthenticationId</a></li><li data-type='method'><a href="EcomAuth.html#getSession">getSession</a></li><li data-type='method'><a href="EcomAuth.html#login">login</a></li><li data-type='method'><a href="EcomAuth.html#logout">logout</a></li><li data-type='method'><a href="EcomAuth.html#requestApi">requestApi</a></li><li data-type='method'><a href="EcomAuth.html#setSession">setSession</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-@ecomplus_auth.html">@ecomplus/auth</a></li></ul><h3>Events</h3><ul><li><a href="EcomAuth.html#event:login">login</a></li><li><a href="EcomAuth.html#event:logout">logout</a></li><li><a href="EcomAuth.html#event:updateAuthentication">updateAuthentication</a></li><li><a href="EcomAuth.html#event:updateStore">updateStore</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ecomAuth">ecomAuth</a></li></ul>
3131
</nav>
3232

3333
<div id="main">
@@ -212,7 +212,7 @@ <h5>Type:</h5>
212212
<br class="clear">
213213

214214
<footer>
215-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Tue Jan 19 2021 18:41:36 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
215+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed Jan 20 2021 15:54:44 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
216216
</footer>
217217

218218
<script>prettyPrint();</script>

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<nav >
2929

30-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EcomAuth.html">EcomAuth</a><ul class='methods'><li data-type='method'><a href="EcomAuth.html#checkLogin">checkLogin</a></li><li data-type='method'><a href="EcomAuth.html#createEcomplusSession">createEcomplusSession</a></li><li data-type='method'><a href="EcomAuth.html#fetchAuthentication">fetchAuthentication</a></li><li data-type='method'><a href="EcomAuth.html#fetchStore">fetchStore</a></li><li data-type='method'><a href="EcomAuth.html#getAuthenticationId">getAuthenticationId</a></li><li data-type='method'><a href="EcomAuth.html#getSession">getSession</a></li><li data-type='method'><a href="EcomAuth.html#login">login</a></li><li data-type='method'><a href="EcomAuth.html#logout">logout</a></li><li data-type='method'><a href="EcomAuth.html#requestApi">requestApi</a></li><li data-type='method'><a href="EcomAuth.html#setSession">setSession</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-@ecomplus_auth.html">@ecomplus/auth</a></li></ul><h3>Events</h3><ul><li><a href="EcomAuth.html#event:login">login</a></li><li><a href="EcomAuth.html#event:logout">logout</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ecomAuth">ecomAuth</a></li></ul>
30+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EcomAuth.html">EcomAuth</a><ul class='methods'><li data-type='method'><a href="EcomAuth.html#checkLogin">checkLogin</a></li><li data-type='method'><a href="EcomAuth.html#createEcomplusSession">createEcomplusSession</a></li><li data-type='method'><a href="EcomAuth.html#fetchAuthentication">fetchAuthentication</a></li><li data-type='method'><a href="EcomAuth.html#fetchStore">fetchStore</a></li><li data-type='method'><a href="EcomAuth.html#getAuthenticationId">getAuthenticationId</a></li><li data-type='method'><a href="EcomAuth.html#getSession">getSession</a></li><li data-type='method'><a href="EcomAuth.html#login">login</a></li><li data-type='method'><a href="EcomAuth.html#logout">logout</a></li><li data-type='method'><a href="EcomAuth.html#requestApi">requestApi</a></li><li data-type='method'><a href="EcomAuth.html#setSession">setSession</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-@ecomplus_auth.html">@ecomplus/auth</a></li></ul><h3>Events</h3><ul><li><a href="EcomAuth.html#event:login">login</a></li><li><a href="EcomAuth.html#event:logout">logout</a></li><li><a href="EcomAuth.html#event:updateAuthentication">updateAuthentication</a></li><li><a href="EcomAuth.html#event:updateStore">updateStore</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ecomAuth">ecomAuth</a></li></ul>
3131
</nav>
3232

3333
<div id="main">
@@ -92,7 +92,7 @@ <h3>Example</h3>
9292
<br class="clear">
9393

9494
<footer>
95-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Tue Jan 19 2021 18:41:36 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
95+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed Jan 20 2021 15:54:44 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
9696
</footer>
9797

9898
<script>prettyPrint();</script>

docs/index.js.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<nav >
2929

30-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EcomAuth.html">EcomAuth</a><ul class='methods'><li data-type='method'><a href="EcomAuth.html#checkLogin">checkLogin</a></li><li data-type='method'><a href="EcomAuth.html#createEcomplusSession">createEcomplusSession</a></li><li data-type='method'><a href="EcomAuth.html#fetchAuthentication">fetchAuthentication</a></li><li data-type='method'><a href="EcomAuth.html#fetchStore">fetchStore</a></li><li data-type='method'><a href="EcomAuth.html#getAuthenticationId">getAuthenticationId</a></li><li data-type='method'><a href="EcomAuth.html#getSession">getSession</a></li><li data-type='method'><a href="EcomAuth.html#login">login</a></li><li data-type='method'><a href="EcomAuth.html#logout">logout</a></li><li data-type='method'><a href="EcomAuth.html#requestApi">requestApi</a></li><li data-type='method'><a href="EcomAuth.html#setSession">setSession</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-@ecomplus_auth.html">@ecomplus/auth</a></li></ul><h3>Events</h3><ul><li><a href="EcomAuth.html#event:login">login</a></li><li><a href="EcomAuth.html#event:logout">logout</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ecomAuth">ecomAuth</a></li></ul>
30+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EcomAuth.html">EcomAuth</a><ul class='methods'><li data-type='method'><a href="EcomAuth.html#checkLogin">checkLogin</a></li><li data-type='method'><a href="EcomAuth.html#createEcomplusSession">createEcomplusSession</a></li><li data-type='method'><a href="EcomAuth.html#fetchAuthentication">fetchAuthentication</a></li><li data-type='method'><a href="EcomAuth.html#fetchStore">fetchStore</a></li><li data-type='method'><a href="EcomAuth.html#getAuthenticationId">getAuthenticationId</a></li><li data-type='method'><a href="EcomAuth.html#getSession">getSession</a></li><li data-type='method'><a href="EcomAuth.html#login">login</a></li><li data-type='method'><a href="EcomAuth.html#logout">logout</a></li><li data-type='method'><a href="EcomAuth.html#requestApi">requestApi</a></li><li data-type='method'><a href="EcomAuth.html#setSession">setSession</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-@ecomplus_auth.html">@ecomplus/auth</a></li></ul><h3>Events</h3><ul><li><a href="EcomAuth.html#event:login">login</a></li><li><a href="EcomAuth.html#event:logout">logout</a></li><li><a href="EcomAuth.html#event:updateAuthentication">updateAuthentication</a></li><li><a href="EcomAuth.html#event:updateStore">updateStore</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ecomAuth">ecomAuth</a></li></ul>
3131
</nav>
3232

3333
<div id="main">
@@ -105,7 +105,7 @@ <h1 class="page-title">index.js</h1>
105105
<br class="clear">
106106

107107
<footer>
108-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Tue Jan 19 2021 18:41:36 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
108+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed Jan 20 2021 15:54:44 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
109109
</footer>
110110

111111
<script>prettyPrint();</script>

docs/lib_fetch-and-cache.js.html

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
5+
<meta charset="utf-8">
6+
<title>lib/fetch-and-cache.js - Documentation</title>
7+
8+
9+
<script src="scripts/prettify/prettify.js"></script>
10+
<script src="scripts/prettify/lang-css.js"></script>
11+
<!--[if lt IE 9]>
12+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13+
<![endif]-->
14+
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
15+
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16+
<script src="scripts/nav.js" defer></script>
17+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
18+
</head>
19+
<body>
20+
21+
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
22+
<label for="nav-trigger" class="navicon-button x">
23+
<div class="navicon"></div>
24+
</label>
25+
26+
<label for="nav-trigger" class="overlay"></label>
27+
28+
<nav >
29+
30+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="EcomAuth.html">EcomAuth</a><ul class='methods'><li data-type='method'><a href="EcomAuth.html#checkLogin">checkLogin</a></li><li data-type='method'><a href="EcomAuth.html#createEcomplusSession">createEcomplusSession</a></li><li data-type='method'><a href="EcomAuth.html#fetchAuthentication">fetchAuthentication</a></li><li data-type='method'><a href="EcomAuth.html#fetchStore">fetchStore</a></li><li data-type='method'><a href="EcomAuth.html#getAuthenticationId">getAuthenticationId</a></li><li data-type='method'><a href="EcomAuth.html#getSession">getSession</a></li><li data-type='method'><a href="EcomAuth.html#login">login</a></li><li data-type='method'><a href="EcomAuth.html#logout">logout</a></li><li data-type='method'><a href="EcomAuth.html#requestApi">requestApi</a></li><li data-type='method'><a href="EcomAuth.html#setSession">setSession</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-@ecomplus_auth.html">@ecomplus/auth</a></li></ul><h3>Events</h3><ul><li><a href="EcomAuth.html#event:login">login</a></li><li><a href="EcomAuth.html#event:logout">logout</a></li><li><a href="EcomAuth.html#event:updateAuthentication">updateAuthentication</a></li><li><a href="EcomAuth.html#event:updateStore">updateStore</a></li></ul><h3>Global</h3><ul><li><a href="global.html#ecomAuth">ecomAuth</a></li></ul>
31+
</nav>
32+
33+
<div id="main">
34+
35+
<h1 class="page-title">lib/fetch-and-cache.js</h1>
36+
37+
38+
39+
40+
41+
42+
43+
<section>
44+
<article>
45+
<pre class="prettyprint source linenums"><code>export default (args, url, mustSkipSession, sessionField = 'authentication') => {
46+
const [self, session, emitter] = args
47+
48+
if (!mustSkipSession &amp;&amp; session[sessionField] &amp;&amp; session[sessionField]._id) {
49+
return Promise.resolve(session[sessionField])
50+
}
51+
52+
return self.requestApi(url).then(({ data }) => {
53+
session[sessionField] = data
54+
55+
/**
56+
* @event EcomAuth#updateAuthentication
57+
* @type {object}
58+
* @property {object} self
59+
* @example ecomAuth.on('updateAuthentication', console.log)
60+
*/
61+
62+
/**
63+
* @event EcomAuth#updateStore
64+
* @type {object}
65+
* @property {object} self
66+
* @example ecomAuth.on('updateStore', console.log)
67+
*/
68+
emitter.emit(`update${sessionField.charAt(0).toUpperCase()}${sessionField.substring(1)}`, self)
69+
70+
const timerField = `__session_${sessionField}_timer`
71+
clearTimeout(session[timerField])
72+
session[timerField] = setTimeout(() => {
73+
session[sessionField] = null
74+
}, 30000)
75+
76+
return data
77+
})
78+
}
79+
</code></pre>
80+
</article>
81+
</section>
82+
83+
84+
85+
86+
87+
88+
</div>
89+
90+
<br class="clear">
91+
92+
<footer>
93+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Wed Jan 20 2021 15:54:44 GMT-0300 (Brasilia Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
94+
</footer>
95+
96+
<script>prettyPrint();</script>
97+
<script src="scripts/polyfill.js"></script>
98+
<script src="scripts/linenumber.js"></script>
99+
100+
101+
102+
</body>
103+
</html>

0 commit comments

Comments
 (0)