Skip to content

Commit 4baab53

Browse files
committed
updating docs
1 parent 0a3aefb commit 4baab53

26 files changed

+107
-31
lines changed

docs/api/1.0.0/database.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
5959
<br class="clear">
6060

6161
<footer>
62-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
62+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
6363
</footer>
6464

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

docs/api/1.0.0/index.html

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,23 @@ <h3>api 1.0.0</h3>
4444

4545
<section>
4646
<article><h1>Work Api</h1><p>A &quot;work&quot; api provides endpoints for record of proposals and records for proposals, are included and finalized for a record of their records.</p>
47-
<h2>Documentation</h2><p><a name="endpoints"></a></p>
48-
<h3>Endpoints</h3><h4>final</h4><dl>
47+
<h2>Documentation</h2><p>This project uses docker-compose to be able to facilitate the development, to run the project just have installed the doker and docker-compose.</p>
48+
<p>With docker-compose and docker installed use the following commands to run the project:</p>
49+
<pre class="prettyprint source lang-console"><code>[user@machine:~]$ docker-compose up
50+
51+
# If superuser access is required use
52+
53+
[user@machine:~]$ sudo docker-compose up
54+
</code></pre><p>The system displays logs of access and requests in the console and stores in files also, the log file is located in the directory /api/src/log/access.log, already for changes in the proposals the system stores the information referring to the operation directly in the MongoDb in collection log.</p>
55+
<p><img src="./images/mongodb.png" alt="MongoDBLog"></p>
56+
<p>Pm2 is also used to initialize and manage the process, it is configured to start 4 instances</p>
57+
<p><img src="./images/pm2.png" alt="Pm2Manager"></p>
58+
<p><a name="endpoints"></a></p>
59+
<h3>Endpoints</h3><h4>graphql</h4><dl>
60+
<dt><a href="#graphql">Graphql - /v1/graphql</dt>
61+
</dl>
62+
63+
<h4>final</h4><dl>
4964
<dt><a href="#get_final">GET - /api/final</a></dt>
5065
<dt><a href="#post_final">POST - /api/final</a></dt>
5166
<dt><a href="#get_final_id">GET - /api/final/:id</a></dt>
@@ -61,6 +76,66 @@ <h4>partial</h4><dl>
6176
<dt><a href="#delete_partial_id">GET - /api/partial/:id</a></dt>
6277
</dl>
6378

79+
<p>#</p>
80+
<p><a name="graphql"></a></p>
81+
<blockquote>
82+
<p>Graphql - /v1/graphql</p>
83+
</blockquote>
84+
<p>Endpoint using graphql, follows the same rules of registers as the Rest calls, same required fields</p>
85+
<p>Exemple of use:</p>
86+
<pre class="prettyprint source lang-graphql"><code># get a proposal using id
87+
query getProposal($id: String!){
88+
proposal(id: $id) {
89+
_id
90+
productId
91+
name
92+
email
93+
cpf
94+
birthdate
95+
}
96+
}
97+
98+
99+
# returns all bids that match the filters provided
100+
query getAllProposals($name: String){
101+
proposals(name: $name) {
102+
total
103+
items{
104+
_id
105+
name
106+
cpf
107+
email
108+
phone
109+
productId
110+
birthdate
111+
createdAt
112+
updatedAt
113+
}
114+
}
115+
}
116+
117+
118+
# store a proposal, all parameters are required
119+
mutation saveProposal{
120+
saveProposal(
121+
productId: 1
122+
name: &quot;Jhon Doe&quot;
123+
email: &quot;jhondoe@email.com&quot;
124+
cpf: &quot;774.154.510-82&quot;
125+
birthdate: &quot;02/12/1988&quot;
126+
phone: &quot;+55 (18) 33272-9856&quot;
127+
) {
128+
_id
129+
productId
130+
name
131+
email
132+
cpf
133+
birthdate
134+
phone
135+
createdAt
136+
updatedAt
137+
}
138+
}</code></pre><p>this is the basic operation, more details on available parameters by accessing /v1/graphql</p>
64139
<p>#</p>
65140
<p><a name="get_final"></a></p>
66141
<blockquote>
@@ -270,7 +345,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
270345
<br class="clear">
271346

272347
<footer>
273-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
348+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
274349
</footer>
275350

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

docs/api/1.0.0/lib_controller.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
195195
<br class="clear">
196196

197197
<footer>
198-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
198+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
199199
</footer>
200200

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

docs/api/1.0.0/lib_dal.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
172172
<br class="clear">
173173

174174
<footer>
175-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
175+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
176176
</footer>
177177

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

docs/api/1.0.0/lib_factory.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
7878
<br class="clear">
7979

8080
<footer>
81-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
81+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
8282
</footer>
8383

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

docs/api/1.0.0/lib_index.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
5656
<br class="clear">
5757

5858
<footer>
59-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
59+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
6060
</footer>
6161

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

docs/api/1.0.0/lib_middleware.find.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
6868
<br class="clear">
6969

7070
<footer>
71-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
71+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
7272
</footer>
7373

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

docs/api/1.0.0/lib_route.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
111111
<br class="clear">
112112

113113
<footer>
114-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
114+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
115115
</footer>
116116

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

docs/api/1.0.0/module-database.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
164164
<br class="clear">
165165

166166
<footer>
167-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
167+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
168168
</footer>
169169

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

docs/api/1.0.0/module-lib.Controller.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-da
16041604
<br class="clear">
16051605

16061606
<footer>
1607-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 09:53:09 GMT-0300 (GMT-03:00)
1607+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 23 2019 18:34:55 GMT-0300 (GMT-03:00)
16081608
</footer>
16091609

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

0 commit comments

Comments
 (0)