@docbrasil/api-systemmanager 1.0.107 → 1.0.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/static.yml +43 -0
- package/api/external.js +41 -0
- package/dist/bundle.cjs +41 -0
- package/dist/bundle.mjs +1 -1
- package/doc/api.md +382 -0
- package/docs/Admin.html +336 -0
- package/docs/AdminDocuments.html +2235 -0
- package/docs/AdminForm.html +934 -0
- package/docs/AdminLists.html +895 -0
- package/docs/AdminMessage.html +1490 -0
- package/docs/AdminNotification.html +1636 -0
- package/docs/AdminPlugin.html +696 -0
- package/docs/AdminPolicy.html +451 -0
- package/docs/AdminProcesses.html +692 -0
- package/docs/AdminTask.html +740 -0
- package/docs/AdminUser.html +1203 -0
- package/docs/Datasource.html +660 -0
- package/docs/Dispatch.html +624 -0
- package/docs/Documents.html +4875 -0
- package/docs/External.html +1497 -0
- package/docs/GeoLocation.html +503 -0
- package/docs/Login.html +1839 -0
- package/docs/Notification.html +625 -0
- package/docs/Organization.html +2767 -0
- package/docs/Process.html +1598 -0
- package/docs/Register.html +1604 -0
- package/docs/Session.html +482 -0
- package/docs/Task.html +1394 -0
- package/docs/TaskAvailable.html +893 -0
- package/docs/User.html +2002 -0
- package/docs/Users.html +569 -0
- package/docs/admin_doctypes.js.html +193 -0
- package/docs/admin_document.js.html +449 -0
- package/docs/admin_form.js.html +268 -0
- package/docs/admin_index.js.html +163 -0
- package/docs/admin_list.js.html +250 -0
- package/docs/admin_message.js.html +311 -0
- package/docs/admin_notification.js.html +350 -0
- package/docs/admin_organization.js.html +241 -0
- package/docs/admin_plugin.js.html +233 -0
- package/docs/admin_policy.js.html +195 -0
- package/docs/admin_processes.js.html +487 -0
- package/docs/admin_task.js.html +242 -0
- package/docs/admin_user.js.html +302 -0
- package/docs/dispatch.js.html +218 -0
- package/docs/external.js.html +333 -0
- package/docs/general_geoLocation.js.html +205 -0
- package/docs/general_index.js.html +140 -0
- package/docs/index.html +129 -0
- package/docs/login.js.html +384 -0
- package/docs/scripts/app.min.js +1 -0
- package/docs/scripts/linenumber.js +26 -0
- package/docs/scripts/search.js +39 -0
- package/docs/session.js.html +202 -0
- package/docs/styles/app.min.css +1 -0
- package/docs/styles/iframe.css +13 -0
- package/docs/styles/prettify-jsdoc.css +111 -0
- package/docs/styles/prettify-tomorrow.css +132 -0
- package/docs/styles/reset.css +44 -0
- package/docs/user_datasource.js.html +261 -0
- package/docs/user_document.js.html +847 -0
- package/docs/user_index.js.html +156 -0
- package/docs/user_notification.js.html +218 -0
- package/docs/user_organization.js.html +347 -0
- package/docs/user_process.js.html +352 -0
- package/docs/user_register.js.html +322 -0
- package/docs/user_task.js.html +319 -0
- package/docs/user_task_available.js.html +252 -0
- package/docs/user_user.js.html +404 -0
- package/docs/utils_promises.js.html +235 -0
- package/package.json +7 -4
- package/readme.md +7 -8
- package/doc.md +0 -653
|
@@ -0,0 +1,4875 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
|
|
6
|
+
<meta charset="utf-8">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<title> Documents</title>
|
|
9
|
+
|
|
10
|
+
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
|
|
11
|
+
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
|
|
12
|
+
<script src="./build/entry.js"></script>
|
|
13
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
14
|
+
<!--[if lt IE 9]>
|
|
15
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
16
|
+
<![endif]-->
|
|
17
|
+
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
|
|
18
|
+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
|
|
19
|
+
<link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
|
|
20
|
+
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
|
|
21
|
+
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
|
|
22
|
+
<link type="text/css" rel="stylesheet" href="">
|
|
23
|
+
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
</head>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<body class="layout small-header">
|
|
31
|
+
<div id="stickyNavbarOverlay"></div>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<div class="top-nav">
|
|
35
|
+
<div class="inner">
|
|
36
|
+
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
|
|
37
|
+
<span aria-hidden="true"></span>
|
|
38
|
+
<span aria-hidden="true"></span>
|
|
39
|
+
<span aria-hidden="true"></span>
|
|
40
|
+
</a>
|
|
41
|
+
<div class="logo">
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
<div class="menu">
|
|
46
|
+
|
|
47
|
+
<div class="navigation">
|
|
48
|
+
<a
|
|
49
|
+
href="index.html"
|
|
50
|
+
class="link"
|
|
51
|
+
>
|
|
52
|
+
Documentation
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div id="main">
|
|
62
|
+
<div
|
|
63
|
+
class="sidebar "
|
|
64
|
+
id="sidebarNav"
|
|
65
|
+
>
|
|
66
|
+
|
|
67
|
+
<nav>
|
|
68
|
+
|
|
69
|
+
<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Classes</h3><ul><li><a href="Admin.html">Admin</a></li><li><a href="AdminDocuments.html">AdminDocuments</a></li><li><a href="AdminForm.html">AdminForm</a></li><li><a href="AdminLists.html">AdminLists</a></li><li><a href="AdminMessage.html">AdminMessage</a></li><li><a href="AdminNotification.html">AdminNotification</a></li><li><a href="AdminPlugin.html">AdminPlugin</a></li><li><a href="AdminPolicy.html">AdminPolicy</a></li><li><a href="AdminProcesses.html">AdminProcesses</a></li><li><a href="AdminTask.html">AdminTask</a></li><li><a href="AdminUser.html">AdminUser</a></li><li><a href="Datasource.html">Datasource</a></li><li><a href="Dispatch.html">Dispatch</a></li><li><a href="Documents.html">Documents</a></li><li><a href="External.html">External</a></li><li><a href="GeoLocation.html">GeoLocation</a></li><li><a href="Login.html">Login</a></li><li><a href="Notification.html">Notification</a></li><li><a href="Organization.html">Organization</a></li><li><a href="Process.html">Process</a></li><li><a href="Register.html">Register</a></li><li><a href="Session.html">Session</a></li><li><a href="Task.html">Task</a></li><li><a href="TaskAvailable.html">TaskAvailable</a></li><li><a href="User.html">User</a></li><li><a href="Users.html">Users</a></li></ul></div>
|
|
70
|
+
|
|
71
|
+
</nav>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="core" id="main-content-wrapper">
|
|
74
|
+
<div class="content">
|
|
75
|
+
<header class="page-title">
|
|
76
|
+
<p>Class</p>
|
|
77
|
+
<h1>Documents</h1>
|
|
78
|
+
</header>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
<section>
|
|
85
|
+
|
|
86
|
+
<header>
|
|
87
|
+
|
|
88
|
+
<h2><span class="attribs"><span class="type-signature"></span></span>Documents<span class="signature">()</span><span class="type-signature"></span></h2>
|
|
89
|
+
|
|
90
|
+
<div class="class-description">Class for documents, permission user</div>
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
</header>
|
|
94
|
+
|
|
95
|
+
<article>
|
|
96
|
+
<div class="container-overview">
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<div class='vertical-section'>
|
|
100
|
+
<div class="members">
|
|
101
|
+
<div class="member">
|
|
102
|
+
<div class=name>
|
|
103
|
+
<span class="tag">Constructor</span>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<h4 class="name" id="Documents">
|
|
110
|
+
<a class="href-link" href="#Documents">#</a>
|
|
111
|
+
|
|
112
|
+
<span class="code-name">
|
|
113
|
+
|
|
114
|
+
new Documents<span class="signature">()</span><span class="type-signature"></span>
|
|
115
|
+
|
|
116
|
+
</span>
|
|
117
|
+
</h4>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
<dl class="details">
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<p class="tag-source">
|
|
168
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
169
|
+
<span>
|
|
170
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line10">line 10</a>
|
|
171
|
+
</span>
|
|
172
|
+
</p>
|
|
173
|
+
|
|
174
|
+
</dl>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
<div class='vertical-section'>
|
|
220
|
+
<h1>Methods</h1>
|
|
221
|
+
<div class="members">
|
|
222
|
+
|
|
223
|
+
<div class="member">
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<h4 class="name" id="add">
|
|
228
|
+
<a class="href-link" href="#add">#</a>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<span class='tag'>async</span>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
<span class="code-name">
|
|
235
|
+
|
|
236
|
+
add<span class="signature">(params, session)</span><span class="type-signature"> → {Promise}</span>
|
|
237
|
+
|
|
238
|
+
</span>
|
|
239
|
+
</h4>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<div class="description">
|
|
245
|
+
Create new document
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
<h5>Parameters:</h5>
|
|
258
|
+
|
|
259
|
+
<div class="table-container">
|
|
260
|
+
<table class="params table">
|
|
261
|
+
<thead>
|
|
262
|
+
<tr>
|
|
263
|
+
|
|
264
|
+
<th>Name</th>
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
<th>Type</th>
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
<th>Attributes</th>
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
<th>Default</th>
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
<th class="last">Description</th>
|
|
278
|
+
</tr>
|
|
279
|
+
</thead>
|
|
280
|
+
|
|
281
|
+
<tbody>
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
<tr class="deep-level-0">
|
|
286
|
+
|
|
287
|
+
<td class="name"><code>params</code></td>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
<td class="type">
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
<code class="param-type">object</code>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
</td>
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
<td class="attributes">
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
</td>
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
<td class="default">
|
|
311
|
+
|
|
312
|
+
</td>
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
<td class="description last">Object for add new document</td>
|
|
316
|
+
</tr>
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
<tr class="deep-level-1">
|
|
322
|
+
|
|
323
|
+
<td class="name"><code>orgname</code></td>
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
<td class="type">
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
<code class="param-type">string</code>
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
</td>
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
<td class="attributes">
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
</td>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
<td class="default">
|
|
347
|
+
|
|
348
|
+
</td>
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
<td class="description last">Organization name</td>
|
|
352
|
+
</tr>
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
<tr class="deep-level-1">
|
|
357
|
+
|
|
358
|
+
<td class="name"><code>areaId</code></td>
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
<td class="type">
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
<code class="param-type">string</code>
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
</td>
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
<td class="attributes">
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
</td>
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
<td class="default">
|
|
382
|
+
|
|
383
|
+
</td>
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
<td class="description last">Doc area id (_id database)</td>
|
|
387
|
+
</tr>
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
<tr class="deep-level-1">
|
|
392
|
+
|
|
393
|
+
<td class="name"><code>docId</code></td>
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
<td class="type">
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
<code class="param-type">string</code>
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
</td>
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
<td class="attributes">
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
</td>
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
<td class="default">
|
|
417
|
+
|
|
418
|
+
</td>
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
<td class="description last">Document id (_id database)</td>
|
|
422
|
+
</tr>
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
<tr class="deep-level-1">
|
|
427
|
+
|
|
428
|
+
<td class="name"><code>documentDate</code></td>
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
<td class="type">
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
<code class="param-type">string</code>
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
</td>
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
<td class="attributes">
|
|
442
|
+
|
|
443
|
+
<optional><br>
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
</td>
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
<td class="default">
|
|
454
|
+
|
|
455
|
+
new Date()
|
|
456
|
+
|
|
457
|
+
</td>
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
<td class="description last">Date of document</td>
|
|
461
|
+
</tr>
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
<tr class="deep-level-1">
|
|
466
|
+
|
|
467
|
+
<td class="name"><code>document</code></td>
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
<td class="type">
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
<code class="param-type">string</code>
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
</td>
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
<td class="attributes">
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
</td>
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
<td class="default">
|
|
491
|
+
|
|
492
|
+
</td>
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
<td class="description last">The path to the file. If S3, the key to S3, gotten after getting a signed URL</td>
|
|
496
|
+
</tr>
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
<tr class="deep-level-1">
|
|
501
|
+
|
|
502
|
+
<td class="name"><code>filename</code></td>
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
<td class="type">
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
<code class="param-type">string</code>
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
</td>
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
<td class="attributes">
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
</td>
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
<td class="default">
|
|
526
|
+
|
|
527
|
+
</td>
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
<td class="description last">File name</td>
|
|
531
|
+
</tr>
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
<tr class="deep-level-1">
|
|
536
|
+
|
|
537
|
+
<td class="name"><code>type</code></td>
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
<td class="type">
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
<code class="param-type">string</code>
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
</td>
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
<td class="attributes">
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
</td>
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
<td class="default">
|
|
561
|
+
|
|
562
|
+
</td>
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
<td class="description last">Mimetype of the document (image/png)</td>
|
|
566
|
+
</tr>
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
<tr class="deep-level-1">
|
|
571
|
+
|
|
572
|
+
<td class="name"><code>name</code></td>
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
<td class="type">
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
<code class="param-type">string</code>
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
</td>
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
<td class="attributes">
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
</td>
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
<td class="default">
|
|
596
|
+
|
|
597
|
+
</td>
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
<td class="description last">Document name</td>
|
|
601
|
+
</tr>
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
<tr class="deep-level-1">
|
|
606
|
+
|
|
607
|
+
<td class="name"><code>content</code></td>
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
<td class="type">
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
<code class="param-type">string</code>
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
</td>
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
<td class="attributes">
|
|
621
|
+
|
|
622
|
+
<optional><br>
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
</td>
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
<td class="default">
|
|
633
|
+
|
|
634
|
+
''
|
|
635
|
+
|
|
636
|
+
</td>
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
<td class="description last">Content of document</td>
|
|
640
|
+
</tr>
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
<tr class="deep-level-1">
|
|
645
|
+
|
|
646
|
+
<td class="name"><code>description</code></td>
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
<td class="type">
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
<code class="param-type">string</code>
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
</td>
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
<td class="attributes">
|
|
660
|
+
|
|
661
|
+
<optional><br>
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
</td>
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
<td class="default">
|
|
672
|
+
|
|
673
|
+
''
|
|
674
|
+
|
|
675
|
+
</td>
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
<td class="description last">Description of document</td>
|
|
679
|
+
</tr>
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
<tr class="deep-level-1">
|
|
684
|
+
|
|
685
|
+
<td class="name"><code>category</code></td>
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
<td class="type">
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
<code class="param-type">string</code>
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
</td>
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
<td class="attributes">
|
|
699
|
+
|
|
700
|
+
<optional><br>
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
</td>
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
<td class="default">
|
|
711
|
+
|
|
712
|
+
''
|
|
713
|
+
|
|
714
|
+
</td>
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
<td class="description last">Category of document</td>
|
|
718
|
+
</tr>
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
<tr class="deep-level-1">
|
|
723
|
+
|
|
724
|
+
<td class="name"><code>tags</code></td>
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
<td class="type">
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
<code class="param-type">array</code>
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
</td>
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
<td class="attributes">
|
|
738
|
+
|
|
739
|
+
<optional><br>
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
</td>
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
<td class="default">
|
|
750
|
+
|
|
751
|
+
[]
|
|
752
|
+
|
|
753
|
+
</td>
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
<td class="description last">Tags of document</td>
|
|
757
|
+
</tr>
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
<tr class="deep-level-1">
|
|
762
|
+
|
|
763
|
+
<td class="name"><code>docTypeId</code></td>
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
<td class="type">
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
<code class="param-type">string</code>
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
</td>
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
<td class="attributes">
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
</td>
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
<td class="default">
|
|
787
|
+
|
|
788
|
+
</td>
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
<td class="description last">Document type id (_id database)</td>
|
|
792
|
+
</tr>
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
<tr class="deep-level-1">
|
|
797
|
+
|
|
798
|
+
<td class="name"><code>hasPhisicalStorage</code></td>
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
<td class="type">
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
<code class="param-type">boolean</code>
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
</td>
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
<td class="attributes">
|
|
812
|
+
|
|
813
|
+
<optional><br>
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
</td>
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
<td class="default">
|
|
824
|
+
|
|
825
|
+
false
|
|
826
|
+
|
|
827
|
+
</td>
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
<td class="description last">Has Phisical Storage</td>
|
|
831
|
+
</tr>
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
<tr class="deep-level-1">
|
|
836
|
+
|
|
837
|
+
<td class="name"><code>boxId</code></td>
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
<td class="type">
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
<code class="param-type">string</code>
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
</td>
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
<td class="attributes">
|
|
851
|
+
|
|
852
|
+
<optional><br>
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
</td>
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
<td class="default">
|
|
863
|
+
|
|
864
|
+
''
|
|
865
|
+
|
|
866
|
+
</td>
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
<td class="description last">Box ID</td>
|
|
870
|
+
</tr>
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
<tr class="deep-level-1">
|
|
875
|
+
|
|
876
|
+
<td class="name"><code>storageStatus</code></td>
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
<td class="type">
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
<code class="param-type">string</code>
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
</td>
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
<td class="attributes">
|
|
890
|
+
|
|
891
|
+
<optional><br>
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
</td>
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
<td class="default">
|
|
902
|
+
|
|
903
|
+
''
|
|
904
|
+
|
|
905
|
+
</td>
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
<td class="description last">Storage status</td>
|
|
909
|
+
</tr>
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
<tr class="deep-level-1">
|
|
914
|
+
|
|
915
|
+
<td class="name"><code>ocrDocumentBackend</code></td>
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
<td class="type">
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
<code class="param-type">boolean</code>
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
</td>
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
<td class="attributes">
|
|
929
|
+
|
|
930
|
+
<optional><br>
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
</td>
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
<td class="default">
|
|
941
|
+
|
|
942
|
+
false
|
|
943
|
+
|
|
944
|
+
</td>
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
<td class="description last">Ocr document backend</td>
|
|
948
|
+
</tr>
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
<tr class="deep-level-1">
|
|
953
|
+
|
|
954
|
+
<td class="name"><code>bytes</code></td>
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
<td class="type">
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
<code class="param-type">number</code>
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
</td>
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
<td class="attributes">
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
</td>
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
<td class="default">
|
|
978
|
+
|
|
979
|
+
</td>
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
<td class="description last">Size document in bytes</td>
|
|
983
|
+
</tr>
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
<tr class="deep-level-1">
|
|
988
|
+
|
|
989
|
+
<td class="name"><code>docAreaPermission</code></td>
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
<td class="type">
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
<code class="param-type">object</code>
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
</td>
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
<td class="attributes">
|
|
1003
|
+
|
|
1004
|
+
<optional><br>
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
</td>
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
<td class="default">
|
|
1015
|
+
|
|
1016
|
+
{}
|
|
1017
|
+
|
|
1018
|
+
</td>
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
<td class="description last">Permission to doc area</td>
|
|
1022
|
+
</tr>
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
<tr class="deep-level-1">
|
|
1027
|
+
|
|
1028
|
+
<td class="name"><code>docTypeFieldsData</code></td>
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
<td class="type">
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
<code class="param-type">object</code>
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
</td>
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
<td class="attributes">
|
|
1042
|
+
|
|
1043
|
+
<optional><br>
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
</td>
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
<td class="default">
|
|
1054
|
+
|
|
1055
|
+
{}
|
|
1056
|
+
|
|
1057
|
+
</td>
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
<td class="description last">Fields data "extraField'</td>
|
|
1061
|
+
</tr>
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
<tr class="deep-level-1">
|
|
1066
|
+
|
|
1067
|
+
<td class="name"><code>signedUrl</code></td>
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
<td class="type">
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
<code class="param-type">string</code>
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
</td>
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
<td class="attributes">
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
</td>
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
<td class="default">
|
|
1091
|
+
|
|
1092
|
+
</td>
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
<td class="description last">SIgned URL</td>
|
|
1096
|
+
</tr>
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
<tr class="deep-level-1">
|
|
1101
|
+
|
|
1102
|
+
<td class="name"><code>urlType</code></td>
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
<td class="type">
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
<code class="param-type">string</code>
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
</td>
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
<td class="attributes">
|
|
1116
|
+
|
|
1117
|
+
<optional><br>
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
</td>
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
<td class="default">
|
|
1128
|
+
|
|
1129
|
+
'S3'
|
|
1130
|
+
|
|
1131
|
+
</td>
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
<td class="description last">URL type</td>
|
|
1135
|
+
</tr>
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
<tr class="deep-level-1">
|
|
1140
|
+
|
|
1141
|
+
<td class="name"><code>addType</code></td>
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
<td class="type">
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
<code class="param-type">string</code>
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
</td>
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
<td class="attributes">
|
|
1155
|
+
|
|
1156
|
+
<optional><br>
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
</td>
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
<td class="default">
|
|
1167
|
+
|
|
1168
|
+
'S3_SIGNED'
|
|
1169
|
+
|
|
1170
|
+
</td>
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
<td class="description last">Add type</td>
|
|
1174
|
+
</tr>
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
<tr class="deep-level-1">
|
|
1179
|
+
|
|
1180
|
+
<td class="name"><code>orgId</code></td>
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
<td class="type">
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
<code class="param-type">string</code>
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
</td>
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
<td class="attributes">
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
</td>
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
<td class="default">
|
|
1204
|
+
|
|
1205
|
+
</td>
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
<td class="description last">Organization id (_id database)</td>
|
|
1209
|
+
</tr>
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
<tr class="deep-level-0">
|
|
1218
|
+
|
|
1219
|
+
<td class="name"><code>session</code></td>
|
|
1220
|
+
|
|
1221
|
+
|
|
1222
|
+
<td class="type">
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
<code class="param-type">string</code>
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
</td>
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
<td class="attributes">
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
</td>
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
<td class="default">
|
|
1243
|
+
|
|
1244
|
+
</td>
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
<td class="description last">Session, token JWT</td>
|
|
1248
|
+
</tr>
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
</tbody>
|
|
1253
|
+
</table>
|
|
1254
|
+
</div>
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
<dl class="details">
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
<dt class="tag-author">Author:</dt>
|
|
1280
|
+
<dd class="tag-author">
|
|
1281
|
+
<ul>
|
|
1282
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
1283
|
+
</ul>
|
|
1284
|
+
</dd>
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
<p class="tag-source">
|
|
1300
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
1301
|
+
<span>
|
|
1302
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line188">line 188</a>
|
|
1303
|
+
</span>
|
|
1304
|
+
</p>
|
|
1305
|
+
|
|
1306
|
+
</dl>
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
<div class='columns method-parameter'>
|
|
1326
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1327
|
+
<div class="column is-10">
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
<div class="columns">
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
<div class='column is-5 has-text-left'>
|
|
1335
|
+
<label>Type: </label>
|
|
1336
|
+
|
|
1337
|
+
<code class="param-type">Promise</code>
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
</div>
|
|
1341
|
+
|
|
1342
|
+
</div>
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
</div>
|
|
1346
|
+
</div>
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
<h5>Example</h5>
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
1355
|
+
const api = new API();
|
|
1356
|
+
const params = {
|
|
1357
|
+
orgname: 'cloundbrasil',
|
|
1358
|
+
areaId: '5edf9f8ee896b817e45b8dac',
|
|
1359
|
+
docId: '5edf86fbe896b817e45b8da6',
|
|
1360
|
+
fileName: 'foto',
|
|
1361
|
+
type: 'image/png',
|
|
1362
|
+
name: 'Fotografia',
|
|
1363
|
+
docTypeId = '5edf9f8ee896b817e45b8dac',
|
|
1364
|
+
bytes: 12345,
|
|
1365
|
+
signedUrl: 'https://s3.amazonaws.com...'
|
|
1366
|
+
docTypeFieldsData: {extraUser: '12349f8ee896b817e45b8dac'},
|
|
1367
|
+
orgId: '5df7f19618430c89a41a19d2',
|
|
1368
|
+
};
|
|
1369
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1370
|
+
await api.user.document.add(params, session);</code></pre>
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
</div>
|
|
1375
|
+
|
|
1376
|
+
<div class="member">
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
<h4 class="name" id="checkPrimaryKeys">
|
|
1381
|
+
<a class="href-link" href="#checkPrimaryKeys">#</a>
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
<span class='tag'>async</span>
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
<span class="code-name">
|
|
1388
|
+
|
|
1389
|
+
checkPrimaryKeys<span class="signature">(params, session)</span><span class="type-signature"> → {Promise.<array>|array.<string>}</span>
|
|
1390
|
+
|
|
1391
|
+
</span>
|
|
1392
|
+
</h4>
|
|
1393
|
+
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
<h5>Parameters:</h5>
|
|
1407
|
+
|
|
1408
|
+
<div class="table-container">
|
|
1409
|
+
<table class="params table">
|
|
1410
|
+
<thead>
|
|
1411
|
+
<tr>
|
|
1412
|
+
|
|
1413
|
+
<th>Name</th>
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
<th>Type</th>
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
<th class="last">Description</th>
|
|
1423
|
+
</tr>
|
|
1424
|
+
</thead>
|
|
1425
|
+
|
|
1426
|
+
<tbody>
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
<tr class="deep-level-0">
|
|
1431
|
+
|
|
1432
|
+
<td class="name"><code>params</code></td>
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
<td class="type">
|
|
1436
|
+
|
|
1437
|
+
</td>
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
<td class="description last"></td>
|
|
1444
|
+
</tr>
|
|
1445
|
+
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
<tr class="deep-level-1">
|
|
1450
|
+
|
|
1451
|
+
<td class="name"><code>orgId</code></td>
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
<td class="type">
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
<code class="param-type">string</code>
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
</td>
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
|
|
1467
|
+
<td class="description last">the organization id</td>
|
|
1468
|
+
</tr>
|
|
1469
|
+
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
<tr class="deep-level-1">
|
|
1473
|
+
|
|
1474
|
+
<td class="name"><code>docTypeId</code></td>
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
<td class="type">
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
<code class="param-type">string</code>
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
</td>
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
<td class="description last">the id of the doc type</td>
|
|
1491
|
+
</tr>
|
|
1492
|
+
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
<tr class="deep-level-1">
|
|
1496
|
+
|
|
1497
|
+
<td class="name"><code>docs</code></td>
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
<td class="type">
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
<code class="param-type">array.<object></code>
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
</td>
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
<td class="description last">an array of documents</td>
|
|
1514
|
+
</tr>
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
<tr class="deep-level-1">
|
|
1519
|
+
|
|
1520
|
+
<td class="name"><code>docs.id</code></td>
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
<td class="type">
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
<code class="param-type">string</code>
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
</td>
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
|
|
1535
|
+
|
|
1536
|
+
<td class="description last">an unique id representing the document</td>
|
|
1537
|
+
</tr>
|
|
1538
|
+
|
|
1539
|
+
|
|
1540
|
+
|
|
1541
|
+
<tr class="deep-level-1">
|
|
1542
|
+
|
|
1543
|
+
<td class="name"><code>docs.docTypeFields</code></td>
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
<td class="type">
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
<code class="param-type">object</code>
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
|
|
1553
|
+
</td>
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
<td class="description last">thje docTypeFields of the document</td>
|
|
1560
|
+
</tr>
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
<tr class="deep-level-1">
|
|
1565
|
+
|
|
1566
|
+
<td class="name"><code>docs.docTypeFieldsData</code></td>
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
<td class="type">
|
|
1570
|
+
|
|
1571
|
+
|
|
1572
|
+
<code class="param-type">object</code>
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
</td>
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
|
|
1582
|
+
<td class="description last">thje docTypeFieldsData of the document</td>
|
|
1583
|
+
</tr>
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
<tr class="deep-level-0">
|
|
1592
|
+
|
|
1593
|
+
<td class="name"><code>session</code></td>
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
<td class="type">
|
|
1597
|
+
|
|
1598
|
+
</td>
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
<td class="description last"></td>
|
|
1605
|
+
</tr>
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
|
|
1609
|
+
</tbody>
|
|
1610
|
+
</table>
|
|
1611
|
+
</div>
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
<dl class="details">
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
|
|
1624
|
+
|
|
1625
|
+
|
|
1626
|
+
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
|
|
1635
|
+
|
|
1636
|
+
<dt class="tag-author">Author:</dt>
|
|
1637
|
+
<dd class="tag-author">
|
|
1638
|
+
<ul>
|
|
1639
|
+
<li>CloudBrasil <abernardo.br@gmail.com>
|
|
1640
|
+
Checks if a document can be added and it does not repeat its primary key</li>
|
|
1641
|
+
</ul>
|
|
1642
|
+
</dd>
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
<p class="tag-source">
|
|
1658
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
1659
|
+
<span>
|
|
1660
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line661">line 661</a>
|
|
1661
|
+
</span>
|
|
1662
|
+
</p>
|
|
1663
|
+
|
|
1664
|
+
</dl>
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
<div class='columns method-parameter'>
|
|
1684
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
1685
|
+
<div class="column is-10">
|
|
1686
|
+
|
|
1687
|
+
|
|
1688
|
+
|
|
1689
|
+
<div class="columns">
|
|
1690
|
+
|
|
1691
|
+
<div class='param-desc column is-7'>Return the array of the documents that are repeated. If not document is repeaded, then if returns an empty array.</div>
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
<div class='column is-5 has-text-left'>
|
|
1695
|
+
<label>Type: </label>
|
|
1696
|
+
|
|
1697
|
+
<code class="param-type">Promise.<array></code>
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
</div>
|
|
1701
|
+
|
|
1702
|
+
</div>
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
<div class="columns">
|
|
1708
|
+
|
|
1709
|
+
<div class='param-desc column is-7'>id the id of the repeated document</div>
|
|
1710
|
+
|
|
1711
|
+
|
|
1712
|
+
<div class='column is-5 has-text-left'>
|
|
1713
|
+
<label>Type: </label>
|
|
1714
|
+
|
|
1715
|
+
<code class="param-type">array.<string></code>
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
</div>
|
|
1719
|
+
|
|
1720
|
+
</div>
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
</div>
|
|
1724
|
+
</div>
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
<h5>Example</h5>
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
1733
|
+
const api = new API();
|
|
1734
|
+
const docTypeFields = [...]; // the doc type fields array
|
|
1735
|
+
const docTypeFieldsData = {...}; // the data of this fields
|
|
1736
|
+
const params - {
|
|
1737
|
+
docs: [{ id: '5dadd01dc4af3941d42f8c5c', docTypeFields, docTypeFieldsData }],
|
|
1738
|
+
orgId: '5df7f19618430c89a41a19d2',
|
|
1739
|
+
docTypeId: '5df7f19618430c89a41a19d5',
|
|
1740
|
+
};
|
|
1741
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
1742
|
+
const retDocs = await api.user.document.checkPrimaryKeys(params, session);</code></pre>
|
|
1743
|
+
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
</div>
|
|
1747
|
+
|
|
1748
|
+
<div class="member">
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
<h4 class="name" id="find">
|
|
1753
|
+
<a class="href-link" href="#find">#</a>
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
<span class='tag'>async</span>
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
<span class="code-name">
|
|
1760
|
+
|
|
1761
|
+
find<span class="signature">(params, session)</span><span class="type-signature"> → {Promise}</span>
|
|
1762
|
+
|
|
1763
|
+
</span>
|
|
1764
|
+
</h4>
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
|
|
1775
|
+
|
|
1776
|
+
|
|
1777
|
+
|
|
1778
|
+
<h5>Parameters:</h5>
|
|
1779
|
+
|
|
1780
|
+
<div class="table-container">
|
|
1781
|
+
<table class="params table">
|
|
1782
|
+
<thead>
|
|
1783
|
+
<tr>
|
|
1784
|
+
|
|
1785
|
+
<th>Name</th>
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
<th>Type</th>
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
<th>Attributes</th>
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
<th>Default</th>
|
|
1796
|
+
|
|
1797
|
+
|
|
1798
|
+
<th class="last">Description</th>
|
|
1799
|
+
</tr>
|
|
1800
|
+
</thead>
|
|
1801
|
+
|
|
1802
|
+
<tbody>
|
|
1803
|
+
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
<tr class="deep-level-0">
|
|
1807
|
+
|
|
1808
|
+
<td class="name"><code>params</code></td>
|
|
1809
|
+
|
|
1810
|
+
|
|
1811
|
+
<td class="type">
|
|
1812
|
+
|
|
1813
|
+
|
|
1814
|
+
<code class="param-type">object</code>
|
|
1815
|
+
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
</td>
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
<td class="attributes">
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
|
|
1827
|
+
</td>
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
<td class="default">
|
|
1832
|
+
|
|
1833
|
+
</td>
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
<td class="description last">Object with params</td>
|
|
1837
|
+
</tr>
|
|
1838
|
+
|
|
1839
|
+
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
<tr class="deep-level-1">
|
|
1843
|
+
|
|
1844
|
+
<td class="name"><code>index</code></td>
|
|
1845
|
+
|
|
1846
|
+
|
|
1847
|
+
<td class="type">
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
<code class="param-type">string</code>
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
</td>
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
<td class="attributes">
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
|
|
1863
|
+
</td>
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
<td class="default">
|
|
1868
|
+
|
|
1869
|
+
</td>
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
<td class="description last">Field to search</td>
|
|
1873
|
+
</tr>
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
<tr class="deep-level-1">
|
|
1878
|
+
|
|
1879
|
+
<td class="name"><code>txtToSearch</code></td>
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
<td class="type">
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
<code class="param-type">string</code>
|
|
1886
|
+
|
|
1887
|
+
|
|
1888
|
+
|
|
1889
|
+
</td>
|
|
1890
|
+
|
|
1891
|
+
|
|
1892
|
+
<td class="attributes">
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
|
|
1896
|
+
|
|
1897
|
+
|
|
1898
|
+
</td>
|
|
1899
|
+
|
|
1900
|
+
|
|
1901
|
+
|
|
1902
|
+
<td class="default">
|
|
1903
|
+
|
|
1904
|
+
</td>
|
|
1905
|
+
|
|
1906
|
+
|
|
1907
|
+
<td class="description last">Text to search</td>
|
|
1908
|
+
</tr>
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
<tr class="deep-level-1">
|
|
1913
|
+
|
|
1914
|
+
<td class="name"><code>compare</code></td>
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
<td class="type">
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
<code class="param-type">string</code>
|
|
1921
|
+
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
</td>
|
|
1925
|
+
|
|
1926
|
+
|
|
1927
|
+
<td class="attributes">
|
|
1928
|
+
|
|
1929
|
+
<optional><br>
|
|
1930
|
+
|
|
1931
|
+
|
|
1932
|
+
|
|
1933
|
+
|
|
1934
|
+
|
|
1935
|
+
</td>
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
|
|
1939
|
+
<td class="default">
|
|
1940
|
+
|
|
1941
|
+
*
|
|
1942
|
+
|
|
1943
|
+
</td>
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
<td class="description last">Filter to search (=, ~, *, =*, *=, *?)</td>
|
|
1947
|
+
</tr>
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
|
|
1951
|
+
<tr class="deep-level-1">
|
|
1952
|
+
|
|
1953
|
+
<td class="name"><code>docId</code></td>
|
|
1954
|
+
|
|
1955
|
+
|
|
1956
|
+
<td class="type">
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
<code class="param-type">string</code>
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
|
|
1963
|
+
</td>
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
<td class="attributes">
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
|
|
1972
|
+
</td>
|
|
1973
|
+
|
|
1974
|
+
|
|
1975
|
+
|
|
1976
|
+
<td class="default">
|
|
1977
|
+
|
|
1978
|
+
</td>
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
<td class="description last">Document id for serach</td>
|
|
1982
|
+
</tr>
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
|
|
1986
|
+
<tr class="deep-level-1">
|
|
1987
|
+
|
|
1988
|
+
<td class="name"><code>docAreaId</code></td>
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
<td class="type">
|
|
1992
|
+
|
|
1993
|
+
|
|
1994
|
+
<code class="param-type">string</code>
|
|
1995
|
+
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
</td>
|
|
1999
|
+
|
|
2000
|
+
|
|
2001
|
+
<td class="attributes">
|
|
2002
|
+
|
|
2003
|
+
|
|
2004
|
+
|
|
2005
|
+
|
|
2006
|
+
|
|
2007
|
+
</td>
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
|
|
2011
|
+
<td class="default">
|
|
2012
|
+
|
|
2013
|
+
</td>
|
|
2014
|
+
|
|
2015
|
+
|
|
2016
|
+
<td class="description last">Doc area id</td>
|
|
2017
|
+
</tr>
|
|
2018
|
+
|
|
2019
|
+
|
|
2020
|
+
|
|
2021
|
+
<tr class="deep-level-1">
|
|
2022
|
+
|
|
2023
|
+
<td class="name"><code>tag</code></td>
|
|
2024
|
+
|
|
2025
|
+
|
|
2026
|
+
<td class="type">
|
|
2027
|
+
|
|
2028
|
+
|
|
2029
|
+
<code class="param-type">string</code>
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
|
|
2033
|
+
</td>
|
|
2034
|
+
|
|
2035
|
+
|
|
2036
|
+
<td class="attributes">
|
|
2037
|
+
|
|
2038
|
+
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
|
|
2042
|
+
</td>
|
|
2043
|
+
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
<td class="default">
|
|
2047
|
+
|
|
2048
|
+
</td>
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
<td class="description last">Tag of the document</td>
|
|
2052
|
+
</tr>
|
|
2053
|
+
|
|
2054
|
+
|
|
2055
|
+
|
|
2056
|
+
<tr class="deep-level-1">
|
|
2057
|
+
|
|
2058
|
+
<td class="name"><code>projection</code></td>
|
|
2059
|
+
|
|
2060
|
+
|
|
2061
|
+
<td class="type">
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
<code class="param-type">string</code>
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
|
|
2068
|
+
</td>
|
|
2069
|
+
|
|
2070
|
+
|
|
2071
|
+
<td class="attributes">
|
|
2072
|
+
|
|
2073
|
+
<optional><br>
|
|
2074
|
+
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
|
|
2078
|
+
|
|
2079
|
+
</td>
|
|
2080
|
+
|
|
2081
|
+
|
|
2082
|
+
|
|
2083
|
+
<td class="default">
|
|
2084
|
+
|
|
2085
|
+
""
|
|
2086
|
+
|
|
2087
|
+
</td>
|
|
2088
|
+
|
|
2089
|
+
|
|
2090
|
+
<td class="description last">Projection to return fields</td>
|
|
2091
|
+
</tr>
|
|
2092
|
+
|
|
2093
|
+
|
|
2094
|
+
|
|
2095
|
+
<tr class="deep-level-1">
|
|
2096
|
+
|
|
2097
|
+
<td class="name"><code>sort</code></td>
|
|
2098
|
+
|
|
2099
|
+
|
|
2100
|
+
<td class="type">
|
|
2101
|
+
|
|
2102
|
+
|
|
2103
|
+
<code class="param-type">string</code>
|
|
2104
|
+
|
|
2105
|
+
|
|
2106
|
+
|
|
2107
|
+
</td>
|
|
2108
|
+
|
|
2109
|
+
|
|
2110
|
+
<td class="attributes">
|
|
2111
|
+
|
|
2112
|
+
<optional><br>
|
|
2113
|
+
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
|
|
2117
|
+
|
|
2118
|
+
</td>
|
|
2119
|
+
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
<td class="default">
|
|
2123
|
+
|
|
2124
|
+
"Mais+recentes"
|
|
2125
|
+
|
|
2126
|
+
</td>
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
<td class="description last">Sort data</td>
|
|
2130
|
+
</tr>
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
<tr class="deep-level-1">
|
|
2135
|
+
|
|
2136
|
+
<td class="name"><code>orgId</code></td>
|
|
2137
|
+
|
|
2138
|
+
|
|
2139
|
+
<td class="type">
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
<code class="param-type">string</code>
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
|
|
2146
|
+
</td>
|
|
2147
|
+
|
|
2148
|
+
|
|
2149
|
+
<td class="attributes">
|
|
2150
|
+
|
|
2151
|
+
|
|
2152
|
+
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
</td>
|
|
2156
|
+
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
<td class="default">
|
|
2160
|
+
|
|
2161
|
+
</td>
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
<td class="description last">Organization id (_id database)</td>
|
|
2165
|
+
</tr>
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
|
|
2169
|
+
<tr class="deep-level-1">
|
|
2170
|
+
|
|
2171
|
+
<td class="name"><code>pagination</code></td>
|
|
2172
|
+
|
|
2173
|
+
|
|
2174
|
+
<td class="type">
|
|
2175
|
+
|
|
2176
|
+
|
|
2177
|
+
<code class="param-type">string</code>
|
|
2178
|
+
|
|
2179
|
+
|
|
2180
|
+
|
|
2181
|
+
</td>
|
|
2182
|
+
|
|
2183
|
+
|
|
2184
|
+
<td class="attributes">
|
|
2185
|
+
|
|
2186
|
+
|
|
2187
|
+
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
</td>
|
|
2191
|
+
|
|
2192
|
+
|
|
2193
|
+
|
|
2194
|
+
<td class="default">
|
|
2195
|
+
|
|
2196
|
+
</td>
|
|
2197
|
+
|
|
2198
|
+
|
|
2199
|
+
<td class="description last">Set pagination</td>
|
|
2200
|
+
</tr>
|
|
2201
|
+
|
|
2202
|
+
|
|
2203
|
+
|
|
2204
|
+
<tr class="deep-level-1">
|
|
2205
|
+
|
|
2206
|
+
<td class="name"><code>pagination.page</code></td>
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
<td class="type">
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
<code class="param-type">number</code>
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
</td>
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
<td class="attributes">
|
|
2220
|
+
|
|
2221
|
+
<optional><br>
|
|
2222
|
+
|
|
2223
|
+
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
|
|
2227
|
+
</td>
|
|
2228
|
+
|
|
2229
|
+
|
|
2230
|
+
|
|
2231
|
+
<td class="default">
|
|
2232
|
+
|
|
2233
|
+
1
|
|
2234
|
+
|
|
2235
|
+
</td>
|
|
2236
|
+
|
|
2237
|
+
|
|
2238
|
+
<td class="description last">Page</td>
|
|
2239
|
+
</tr>
|
|
2240
|
+
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
<tr class="deep-level-1">
|
|
2244
|
+
|
|
2245
|
+
<td class="name"><code>pagination.perPage</code></td>
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
<td class="type">
|
|
2249
|
+
|
|
2250
|
+
|
|
2251
|
+
<code class="param-type">number</code>
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
</td>
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
<td class="attributes">
|
|
2259
|
+
|
|
2260
|
+
<optional><br>
|
|
2261
|
+
|
|
2262
|
+
|
|
2263
|
+
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
</td>
|
|
2267
|
+
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
<td class="default">
|
|
2271
|
+
|
|
2272
|
+
100
|
|
2273
|
+
|
|
2274
|
+
</td>
|
|
2275
|
+
|
|
2276
|
+
|
|
2277
|
+
<td class="description last">perPage Itens per page</td>
|
|
2278
|
+
</tr>
|
|
2279
|
+
|
|
2280
|
+
|
|
2281
|
+
|
|
2282
|
+
|
|
2283
|
+
|
|
2284
|
+
|
|
2285
|
+
|
|
2286
|
+
<tr class="deep-level-0">
|
|
2287
|
+
|
|
2288
|
+
<td class="name"><code>session</code></td>
|
|
2289
|
+
|
|
2290
|
+
|
|
2291
|
+
<td class="type">
|
|
2292
|
+
|
|
2293
|
+
|
|
2294
|
+
<code class="param-type">string</code>
|
|
2295
|
+
|
|
2296
|
+
|
|
2297
|
+
|
|
2298
|
+
</td>
|
|
2299
|
+
|
|
2300
|
+
|
|
2301
|
+
<td class="attributes">
|
|
2302
|
+
|
|
2303
|
+
|
|
2304
|
+
|
|
2305
|
+
|
|
2306
|
+
|
|
2307
|
+
</td>
|
|
2308
|
+
|
|
2309
|
+
|
|
2310
|
+
|
|
2311
|
+
<td class="default">
|
|
2312
|
+
|
|
2313
|
+
</td>
|
|
2314
|
+
|
|
2315
|
+
|
|
2316
|
+
<td class="description last">Session, token JWT</td>
|
|
2317
|
+
</tr>
|
|
2318
|
+
|
|
2319
|
+
|
|
2320
|
+
|
|
2321
|
+
</tbody>
|
|
2322
|
+
</table>
|
|
2323
|
+
</div>
|
|
2324
|
+
|
|
2325
|
+
|
|
2326
|
+
|
|
2327
|
+
|
|
2328
|
+
|
|
2329
|
+
<dl class="details">
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
|
|
2340
|
+
|
|
2341
|
+
|
|
2342
|
+
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
<dt class="tag-author">Author:</dt>
|
|
2349
|
+
<dd class="tag-author">
|
|
2350
|
+
<ul>
|
|
2351
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
2352
|
+
</ul>
|
|
2353
|
+
</dd>
|
|
2354
|
+
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
|
|
2367
|
+
|
|
2368
|
+
<p class="tag-source">
|
|
2369
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
2370
|
+
<span>
|
|
2371
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line264">line 264</a>
|
|
2372
|
+
</span>
|
|
2373
|
+
</p>
|
|
2374
|
+
|
|
2375
|
+
</dl>
|
|
2376
|
+
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
<div class='columns method-parameter'>
|
|
2395
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2396
|
+
<div class="column is-10">
|
|
2397
|
+
|
|
2398
|
+
|
|
2399
|
+
|
|
2400
|
+
<div class="columns">
|
|
2401
|
+
|
|
2402
|
+
|
|
2403
|
+
<div class='column is-5 has-text-left'>
|
|
2404
|
+
<label>Type: </label>
|
|
2405
|
+
|
|
2406
|
+
<code class="param-type">Promise</code>
|
|
2407
|
+
|
|
2408
|
+
|
|
2409
|
+
</div>
|
|
2410
|
+
|
|
2411
|
+
</div>
|
|
2412
|
+
|
|
2413
|
+
|
|
2414
|
+
</div>
|
|
2415
|
+
</div>
|
|
2416
|
+
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
|
|
2420
|
+
<h5>Example</h5>
|
|
2421
|
+
|
|
2422
|
+
|
|
2423
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2424
|
+
const api = new API();
|
|
2425
|
+
const params - {
|
|
2426
|
+
index: 'extraCity',
|
|
2427
|
+
txtToSearch: 'São',
|
|
2428
|
+
docId: '5df7f19618430c89a41a19d2',
|
|
2429
|
+
docAreaId: '5edd11c46b6ce9729c2c297c',
|
|
2430
|
+
tag: 'Nome da cidade',
|
|
2431
|
+
orgId: '1234d01dc4af3941d42f8c5c'
|
|
2432
|
+
};
|
|
2433
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2434
|
+
await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
2435
|
+
|
|
2436
|
+
|
|
2437
|
+
|
|
2438
|
+
</div>
|
|
2439
|
+
|
|
2440
|
+
<div class="member">
|
|
2441
|
+
|
|
2442
|
+
|
|
2443
|
+
|
|
2444
|
+
<h4 class="name" id="findByIdAndRemove">
|
|
2445
|
+
<a class="href-link" href="#findByIdAndRemove">#</a>
|
|
2446
|
+
|
|
2447
|
+
|
|
2448
|
+
<span class='tag'>async</span>
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
<span class="code-name">
|
|
2452
|
+
|
|
2453
|
+
findByIdAndRemove<span class="signature">(params, session)</span><span class="type-signature"> → {Promise.<object>|number|array.<object>|string|string|string}</span>
|
|
2454
|
+
|
|
2455
|
+
</span>
|
|
2456
|
+
</h4>
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
|
|
2461
|
+
<div class="description">
|
|
2462
|
+
Remove document by id
|
|
2463
|
+
</div>
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
<h5>Parameters:</h5>
|
|
2475
|
+
|
|
2476
|
+
<div class="table-container">
|
|
2477
|
+
<table class="params table">
|
|
2478
|
+
<thead>
|
|
2479
|
+
<tr>
|
|
2480
|
+
|
|
2481
|
+
<th>Name</th>
|
|
2482
|
+
|
|
2483
|
+
|
|
2484
|
+
<th>Type</th>
|
|
2485
|
+
|
|
2486
|
+
|
|
2487
|
+
|
|
2488
|
+
|
|
2489
|
+
|
|
2490
|
+
<th class="last">Description</th>
|
|
2491
|
+
</tr>
|
|
2492
|
+
</thead>
|
|
2493
|
+
|
|
2494
|
+
<tbody>
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
|
|
2498
|
+
<tr class="deep-level-0">
|
|
2499
|
+
|
|
2500
|
+
<td class="name"><code>params</code></td>
|
|
2501
|
+
|
|
2502
|
+
|
|
2503
|
+
<td class="type">
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
<code class="param-type">object</code>
|
|
2507
|
+
|
|
2508
|
+
|
|
2509
|
+
|
|
2510
|
+
</td>
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
|
|
2514
|
+
|
|
2515
|
+
|
|
2516
|
+
<td class="description last">Params to remove document</td>
|
|
2517
|
+
</tr>
|
|
2518
|
+
|
|
2519
|
+
|
|
2520
|
+
|
|
2521
|
+
|
|
2522
|
+
<tr class="deep-level-1">
|
|
2523
|
+
|
|
2524
|
+
<td class="name"><code>docId</code></td>
|
|
2525
|
+
|
|
2526
|
+
|
|
2527
|
+
<td class="type">
|
|
2528
|
+
|
|
2529
|
+
|
|
2530
|
+
<code class="param-type">string</code>
|
|
2531
|
+
|
|
2532
|
+
|
|
2533
|
+
|
|
2534
|
+
</td>
|
|
2535
|
+
|
|
2536
|
+
|
|
2537
|
+
|
|
2538
|
+
|
|
2539
|
+
|
|
2540
|
+
<td class="description last">Document Id (_id database)</td>
|
|
2541
|
+
</tr>
|
|
2542
|
+
|
|
2543
|
+
|
|
2544
|
+
|
|
2545
|
+
<tr class="deep-level-1">
|
|
2546
|
+
|
|
2547
|
+
<td class="name"><code>orgId</code></td>
|
|
2548
|
+
|
|
2549
|
+
|
|
2550
|
+
<td class="type">
|
|
2551
|
+
|
|
2552
|
+
|
|
2553
|
+
<code class="param-type">string</code>
|
|
2554
|
+
|
|
2555
|
+
|
|
2556
|
+
|
|
2557
|
+
</td>
|
|
2558
|
+
|
|
2559
|
+
|
|
2560
|
+
|
|
2561
|
+
|
|
2562
|
+
|
|
2563
|
+
<td class="description last">Organizarion id (_id database)</td>
|
|
2564
|
+
</tr>
|
|
2565
|
+
|
|
2566
|
+
|
|
2567
|
+
|
|
2568
|
+
|
|
2569
|
+
|
|
2570
|
+
|
|
2571
|
+
|
|
2572
|
+
<tr class="deep-level-0">
|
|
2573
|
+
|
|
2574
|
+
<td class="name"><code>session</code></td>
|
|
2575
|
+
|
|
2576
|
+
|
|
2577
|
+
<td class="type">
|
|
2578
|
+
|
|
2579
|
+
|
|
2580
|
+
<code class="param-type">string</code>
|
|
2581
|
+
|
|
2582
|
+
|
|
2583
|
+
|
|
2584
|
+
</td>
|
|
2585
|
+
|
|
2586
|
+
|
|
2587
|
+
|
|
2588
|
+
|
|
2589
|
+
|
|
2590
|
+
<td class="description last">Session, token JWT</td>
|
|
2591
|
+
</tr>
|
|
2592
|
+
|
|
2593
|
+
|
|
2594
|
+
|
|
2595
|
+
</tbody>
|
|
2596
|
+
</table>
|
|
2597
|
+
</div>
|
|
2598
|
+
|
|
2599
|
+
|
|
2600
|
+
|
|
2601
|
+
|
|
2602
|
+
|
|
2603
|
+
<dl class="details">
|
|
2604
|
+
|
|
2605
|
+
|
|
2606
|
+
|
|
2607
|
+
|
|
2608
|
+
|
|
2609
|
+
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
<dt class="tag-author">Author:</dt>
|
|
2623
|
+
<dd class="tag-author">
|
|
2624
|
+
<ul>
|
|
2625
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
2626
|
+
</ul>
|
|
2627
|
+
</dd>
|
|
2628
|
+
|
|
2629
|
+
|
|
2630
|
+
|
|
2631
|
+
|
|
2632
|
+
|
|
2633
|
+
|
|
2634
|
+
|
|
2635
|
+
|
|
2636
|
+
|
|
2637
|
+
|
|
2638
|
+
|
|
2639
|
+
|
|
2640
|
+
|
|
2641
|
+
|
|
2642
|
+
<p class="tag-source">
|
|
2643
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
2644
|
+
<span>
|
|
2645
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line348">line 348</a>
|
|
2646
|
+
</span>
|
|
2647
|
+
</p>
|
|
2648
|
+
|
|
2649
|
+
</dl>
|
|
2650
|
+
|
|
2651
|
+
|
|
2652
|
+
|
|
2653
|
+
|
|
2654
|
+
|
|
2655
|
+
|
|
2656
|
+
|
|
2657
|
+
|
|
2658
|
+
|
|
2659
|
+
|
|
2660
|
+
|
|
2661
|
+
|
|
2662
|
+
|
|
2663
|
+
|
|
2664
|
+
|
|
2665
|
+
|
|
2666
|
+
|
|
2667
|
+
|
|
2668
|
+
<div class='columns method-parameter'>
|
|
2669
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
2670
|
+
<div class="column is-10">
|
|
2671
|
+
|
|
2672
|
+
|
|
2673
|
+
|
|
2674
|
+
<div class="columns">
|
|
2675
|
+
|
|
2676
|
+
<div class='param-desc column is-7'>data The returned data</div>
|
|
2677
|
+
|
|
2678
|
+
|
|
2679
|
+
<div class='column is-5 has-text-left'>
|
|
2680
|
+
<label>Type: </label>
|
|
2681
|
+
|
|
2682
|
+
<code class="param-type">Promise.<object></code>
|
|
2683
|
+
|
|
2684
|
+
|
|
2685
|
+
</div>
|
|
2686
|
+
|
|
2687
|
+
</div>
|
|
2688
|
+
|
|
2689
|
+
|
|
2690
|
+
|
|
2691
|
+
|
|
2692
|
+
<div class="columns">
|
|
2693
|
+
|
|
2694
|
+
<div class='param-desc column is-7'>data.removed The quantity of removed documents</div>
|
|
2695
|
+
|
|
2696
|
+
|
|
2697
|
+
<div class='column is-5 has-text-left'>
|
|
2698
|
+
<label>Type: </label>
|
|
2699
|
+
|
|
2700
|
+
<code class="param-type">number</code>
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
</div>
|
|
2704
|
+
|
|
2705
|
+
</div>
|
|
2706
|
+
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
<div class="columns">
|
|
2711
|
+
|
|
2712
|
+
<div class='param-desc column is-7'>data.errors Array of errors</div>
|
|
2713
|
+
|
|
2714
|
+
|
|
2715
|
+
<div class='column is-5 has-text-left'>
|
|
2716
|
+
<label>Type: </label>
|
|
2717
|
+
|
|
2718
|
+
<code class="param-type">array.<object></code>
|
|
2719
|
+
|
|
2720
|
+
|
|
2721
|
+
</div>
|
|
2722
|
+
|
|
2723
|
+
</div>
|
|
2724
|
+
|
|
2725
|
+
|
|
2726
|
+
|
|
2727
|
+
|
|
2728
|
+
<div class="columns">
|
|
2729
|
+
|
|
2730
|
+
<div class='param-desc column is-7'>data.errors.id Id of the document that had an error</div>
|
|
2731
|
+
|
|
2732
|
+
|
|
2733
|
+
<div class='column is-5 has-text-left'>
|
|
2734
|
+
<label>Type: </label>
|
|
2735
|
+
|
|
2736
|
+
<code class="param-type">string</code>
|
|
2737
|
+
|
|
2738
|
+
|
|
2739
|
+
</div>
|
|
2740
|
+
|
|
2741
|
+
</div>
|
|
2742
|
+
|
|
2743
|
+
|
|
2744
|
+
|
|
2745
|
+
|
|
2746
|
+
<div class="columns">
|
|
2747
|
+
|
|
2748
|
+
<div class='param-desc column is-7'>data.errors.code Error code</div>
|
|
2749
|
+
|
|
2750
|
+
|
|
2751
|
+
<div class='column is-5 has-text-left'>
|
|
2752
|
+
<label>Type: </label>
|
|
2753
|
+
|
|
2754
|
+
<code class="param-type">string</code>
|
|
2755
|
+
|
|
2756
|
+
|
|
2757
|
+
</div>
|
|
2758
|
+
|
|
2759
|
+
</div>
|
|
2760
|
+
|
|
2761
|
+
|
|
2762
|
+
|
|
2763
|
+
|
|
2764
|
+
<div class="columns">
|
|
2765
|
+
|
|
2766
|
+
<div class='param-desc column is-7'>data.errors.message Error message</div>
|
|
2767
|
+
|
|
2768
|
+
|
|
2769
|
+
<div class='column is-5 has-text-left'>
|
|
2770
|
+
<label>Type: </label>
|
|
2771
|
+
|
|
2772
|
+
<code class="param-type">string</code>
|
|
2773
|
+
|
|
2774
|
+
|
|
2775
|
+
</div>
|
|
2776
|
+
|
|
2777
|
+
</div>
|
|
2778
|
+
|
|
2779
|
+
|
|
2780
|
+
</div>
|
|
2781
|
+
</div>
|
|
2782
|
+
|
|
2783
|
+
|
|
2784
|
+
|
|
2785
|
+
|
|
2786
|
+
<h5>Example</h5>
|
|
2787
|
+
|
|
2788
|
+
|
|
2789
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
2790
|
+
const api = new API();
|
|
2791
|
+
const params - {
|
|
2792
|
+
docId: '5dadd01dc4af3941d42f8c5c',
|
|
2793
|
+
orgIdId: '5df7f19618430c89a41a19d2',
|
|
2794
|
+
};
|
|
2795
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
2796
|
+
await api.user.document.findByIdAndRemove(params, session);</code></pre>
|
|
2797
|
+
|
|
2798
|
+
|
|
2799
|
+
|
|
2800
|
+
</div>
|
|
2801
|
+
|
|
2802
|
+
<div class="member">
|
|
2803
|
+
|
|
2804
|
+
|
|
2805
|
+
|
|
2806
|
+
<h4 class="name" id="findByIdsAndRemove">
|
|
2807
|
+
<a class="href-link" href="#findByIdsAndRemove">#</a>
|
|
2808
|
+
|
|
2809
|
+
|
|
2810
|
+
<span class='tag'>async</span>
|
|
2811
|
+
|
|
2812
|
+
|
|
2813
|
+
<span class="code-name">
|
|
2814
|
+
|
|
2815
|
+
findByIdsAndRemove<span class="signature">(params, session)</span><span class="type-signature"> → {Promise.<object>|number|array.<object>|string|string|string}</span>
|
|
2816
|
+
|
|
2817
|
+
</span>
|
|
2818
|
+
</h4>
|
|
2819
|
+
|
|
2820
|
+
|
|
2821
|
+
|
|
2822
|
+
|
|
2823
|
+
<div class="description">
|
|
2824
|
+
Remove documents
|
|
2825
|
+
</div>
|
|
2826
|
+
|
|
2827
|
+
|
|
2828
|
+
|
|
2829
|
+
|
|
2830
|
+
|
|
2831
|
+
|
|
2832
|
+
|
|
2833
|
+
|
|
2834
|
+
|
|
2835
|
+
|
|
2836
|
+
<h5>Parameters:</h5>
|
|
2837
|
+
|
|
2838
|
+
<div class="table-container">
|
|
2839
|
+
<table class="params table">
|
|
2840
|
+
<thead>
|
|
2841
|
+
<tr>
|
|
2842
|
+
|
|
2843
|
+
<th>Name</th>
|
|
2844
|
+
|
|
2845
|
+
|
|
2846
|
+
<th>Type</th>
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
|
|
2850
|
+
|
|
2851
|
+
|
|
2852
|
+
<th class="last">Description</th>
|
|
2853
|
+
</tr>
|
|
2854
|
+
</thead>
|
|
2855
|
+
|
|
2856
|
+
<tbody>
|
|
2857
|
+
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
<tr class="deep-level-0">
|
|
2861
|
+
|
|
2862
|
+
<td class="name"><code>params</code></td>
|
|
2863
|
+
|
|
2864
|
+
|
|
2865
|
+
<td class="type">
|
|
2866
|
+
|
|
2867
|
+
|
|
2868
|
+
<code class="param-type">object</code>
|
|
2869
|
+
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
</td>
|
|
2873
|
+
|
|
2874
|
+
|
|
2875
|
+
|
|
2876
|
+
|
|
2877
|
+
|
|
2878
|
+
<td class="description last">Params to remove document</td>
|
|
2879
|
+
</tr>
|
|
2880
|
+
|
|
2881
|
+
|
|
2882
|
+
|
|
2883
|
+
|
|
2884
|
+
<tr class="deep-level-1">
|
|
2885
|
+
|
|
2886
|
+
<td class="name"><code>documents</code></td>
|
|
2887
|
+
|
|
2888
|
+
|
|
2889
|
+
<td class="type">
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
<code class="param-type">array.<string></code>
|
|
2893
|
+
|
|
2894
|
+
|
|
2895
|
+
|
|
2896
|
+
</td>
|
|
2897
|
+
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
|
|
2901
|
+
|
|
2902
|
+
<td class="description last">An array ids of documents (_id database)</td>
|
|
2903
|
+
</tr>
|
|
2904
|
+
|
|
2905
|
+
|
|
2906
|
+
|
|
2907
|
+
<tr class="deep-level-1">
|
|
2908
|
+
|
|
2909
|
+
<td class="name"><code>documents._id</code></td>
|
|
2910
|
+
|
|
2911
|
+
|
|
2912
|
+
<td class="type">
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
<code class="param-type">array.<string></code>
|
|
2916
|
+
|
|
2917
|
+
|
|
2918
|
+
|
|
2919
|
+
</td>
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
<td class="description last">The document id (_id database)</td>
|
|
2926
|
+
</tr>
|
|
2927
|
+
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
<tr class="deep-level-1">
|
|
2931
|
+
|
|
2932
|
+
<td class="name"><code>orgId</code></td>
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
<td class="type">
|
|
2936
|
+
|
|
2937
|
+
|
|
2938
|
+
<code class="param-type">string</code>
|
|
2939
|
+
|
|
2940
|
+
|
|
2941
|
+
|
|
2942
|
+
</td>
|
|
2943
|
+
|
|
2944
|
+
|
|
2945
|
+
|
|
2946
|
+
|
|
2947
|
+
|
|
2948
|
+
<td class="description last">Organizarion id (_id database)</td>
|
|
2949
|
+
</tr>
|
|
2950
|
+
|
|
2951
|
+
|
|
2952
|
+
|
|
2953
|
+
|
|
2954
|
+
|
|
2955
|
+
|
|
2956
|
+
|
|
2957
|
+
<tr class="deep-level-0">
|
|
2958
|
+
|
|
2959
|
+
<td class="name"><code>session</code></td>
|
|
2960
|
+
|
|
2961
|
+
|
|
2962
|
+
<td class="type">
|
|
2963
|
+
|
|
2964
|
+
|
|
2965
|
+
<code class="param-type">string</code>
|
|
2966
|
+
|
|
2967
|
+
|
|
2968
|
+
|
|
2969
|
+
</td>
|
|
2970
|
+
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
|
|
2974
|
+
|
|
2975
|
+
<td class="description last">Session, token JWT</td>
|
|
2976
|
+
</tr>
|
|
2977
|
+
|
|
2978
|
+
|
|
2979
|
+
|
|
2980
|
+
</tbody>
|
|
2981
|
+
</table>
|
|
2982
|
+
</div>
|
|
2983
|
+
|
|
2984
|
+
|
|
2985
|
+
|
|
2986
|
+
|
|
2987
|
+
|
|
2988
|
+
<dl class="details">
|
|
2989
|
+
|
|
2990
|
+
|
|
2991
|
+
|
|
2992
|
+
|
|
2993
|
+
|
|
2994
|
+
|
|
2995
|
+
|
|
2996
|
+
|
|
2997
|
+
|
|
2998
|
+
|
|
2999
|
+
|
|
3000
|
+
|
|
3001
|
+
|
|
3002
|
+
|
|
3003
|
+
|
|
3004
|
+
|
|
3005
|
+
|
|
3006
|
+
|
|
3007
|
+
<dt class="tag-author">Author:</dt>
|
|
3008
|
+
<dd class="tag-author">
|
|
3009
|
+
<ul>
|
|
3010
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
3011
|
+
</ul>
|
|
3012
|
+
</dd>
|
|
3013
|
+
|
|
3014
|
+
|
|
3015
|
+
|
|
3016
|
+
|
|
3017
|
+
|
|
3018
|
+
|
|
3019
|
+
|
|
3020
|
+
|
|
3021
|
+
|
|
3022
|
+
|
|
3023
|
+
|
|
3024
|
+
|
|
3025
|
+
|
|
3026
|
+
|
|
3027
|
+
<p class="tag-source">
|
|
3028
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
3029
|
+
<span>
|
|
3030
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line393">line 393</a>
|
|
3031
|
+
</span>
|
|
3032
|
+
</p>
|
|
3033
|
+
|
|
3034
|
+
</dl>
|
|
3035
|
+
|
|
3036
|
+
|
|
3037
|
+
|
|
3038
|
+
|
|
3039
|
+
|
|
3040
|
+
|
|
3041
|
+
|
|
3042
|
+
|
|
3043
|
+
|
|
3044
|
+
|
|
3045
|
+
|
|
3046
|
+
|
|
3047
|
+
|
|
3048
|
+
|
|
3049
|
+
|
|
3050
|
+
|
|
3051
|
+
|
|
3052
|
+
|
|
3053
|
+
<div class='columns method-parameter'>
|
|
3054
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
3055
|
+
<div class="column is-10">
|
|
3056
|
+
|
|
3057
|
+
|
|
3058
|
+
|
|
3059
|
+
<div class="columns">
|
|
3060
|
+
|
|
3061
|
+
<div class='param-desc column is-7'>data The returned data</div>
|
|
3062
|
+
|
|
3063
|
+
|
|
3064
|
+
<div class='column is-5 has-text-left'>
|
|
3065
|
+
<label>Type: </label>
|
|
3066
|
+
|
|
3067
|
+
<code class="param-type">Promise.<object></code>
|
|
3068
|
+
|
|
3069
|
+
|
|
3070
|
+
</div>
|
|
3071
|
+
|
|
3072
|
+
</div>
|
|
3073
|
+
|
|
3074
|
+
|
|
3075
|
+
|
|
3076
|
+
|
|
3077
|
+
<div class="columns">
|
|
3078
|
+
|
|
3079
|
+
<div class='param-desc column is-7'>data.removed The quantity of removed documents</div>
|
|
3080
|
+
|
|
3081
|
+
|
|
3082
|
+
<div class='column is-5 has-text-left'>
|
|
3083
|
+
<label>Type: </label>
|
|
3084
|
+
|
|
3085
|
+
<code class="param-type">number</code>
|
|
3086
|
+
|
|
3087
|
+
|
|
3088
|
+
</div>
|
|
3089
|
+
|
|
3090
|
+
</div>
|
|
3091
|
+
|
|
3092
|
+
|
|
3093
|
+
|
|
3094
|
+
|
|
3095
|
+
<div class="columns">
|
|
3096
|
+
|
|
3097
|
+
<div class='param-desc column is-7'>data.errors Array of errors</div>
|
|
3098
|
+
|
|
3099
|
+
|
|
3100
|
+
<div class='column is-5 has-text-left'>
|
|
3101
|
+
<label>Type: </label>
|
|
3102
|
+
|
|
3103
|
+
<code class="param-type">array.<object></code>
|
|
3104
|
+
|
|
3105
|
+
|
|
3106
|
+
</div>
|
|
3107
|
+
|
|
3108
|
+
</div>
|
|
3109
|
+
|
|
3110
|
+
|
|
3111
|
+
|
|
3112
|
+
|
|
3113
|
+
<div class="columns">
|
|
3114
|
+
|
|
3115
|
+
<div class='param-desc column is-7'>data.errors.id Id of the document that had an error</div>
|
|
3116
|
+
|
|
3117
|
+
|
|
3118
|
+
<div class='column is-5 has-text-left'>
|
|
3119
|
+
<label>Type: </label>
|
|
3120
|
+
|
|
3121
|
+
<code class="param-type">string</code>
|
|
3122
|
+
|
|
3123
|
+
|
|
3124
|
+
</div>
|
|
3125
|
+
|
|
3126
|
+
</div>
|
|
3127
|
+
|
|
3128
|
+
|
|
3129
|
+
|
|
3130
|
+
|
|
3131
|
+
<div class="columns">
|
|
3132
|
+
|
|
3133
|
+
<div class='param-desc column is-7'>data.errors.code Error code</div>
|
|
3134
|
+
|
|
3135
|
+
|
|
3136
|
+
<div class='column is-5 has-text-left'>
|
|
3137
|
+
<label>Type: </label>
|
|
3138
|
+
|
|
3139
|
+
<code class="param-type">string</code>
|
|
3140
|
+
|
|
3141
|
+
|
|
3142
|
+
</div>
|
|
3143
|
+
|
|
3144
|
+
</div>
|
|
3145
|
+
|
|
3146
|
+
|
|
3147
|
+
|
|
3148
|
+
|
|
3149
|
+
<div class="columns">
|
|
3150
|
+
|
|
3151
|
+
<div class='param-desc column is-7'>data.errors.message Error message</div>
|
|
3152
|
+
|
|
3153
|
+
|
|
3154
|
+
<div class='column is-5 has-text-left'>
|
|
3155
|
+
<label>Type: </label>
|
|
3156
|
+
|
|
3157
|
+
<code class="param-type">string</code>
|
|
3158
|
+
|
|
3159
|
+
|
|
3160
|
+
</div>
|
|
3161
|
+
|
|
3162
|
+
</div>
|
|
3163
|
+
|
|
3164
|
+
|
|
3165
|
+
</div>
|
|
3166
|
+
</div>
|
|
3167
|
+
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
|
|
3171
|
+
<h5>Example</h5>
|
|
3172
|
+
|
|
3173
|
+
|
|
3174
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3175
|
+
const api = new API();
|
|
3176
|
+
const params - {
|
|
3177
|
+
documents: [{ _id: '5dadd01dc4af3941d42f8c5c' }],
|
|
3178
|
+
orgId: '5df7f19618430c89a41a19d2',
|
|
3179
|
+
};
|
|
3180
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3181
|
+
await api.user.document.findByIdsAndRemove(params, session);</code></pre>
|
|
3182
|
+
|
|
3183
|
+
|
|
3184
|
+
|
|
3185
|
+
</div>
|
|
3186
|
+
|
|
3187
|
+
<div class="member">
|
|
3188
|
+
|
|
3189
|
+
|
|
3190
|
+
|
|
3191
|
+
<h4 class="name" id="searchDocuments">
|
|
3192
|
+
<a class="href-link" href="#searchDocuments">#</a>
|
|
3193
|
+
|
|
3194
|
+
|
|
3195
|
+
<span class='tag'>async</span>
|
|
3196
|
+
|
|
3197
|
+
|
|
3198
|
+
<span class="code-name">
|
|
3199
|
+
|
|
3200
|
+
searchDocuments<span class="signature">(params, session)</span><span class="type-signature"> → {promise|number|array.<object>|number|number}</span>
|
|
3201
|
+
|
|
3202
|
+
</span>
|
|
3203
|
+
</h4>
|
|
3204
|
+
|
|
3205
|
+
|
|
3206
|
+
|
|
3207
|
+
|
|
3208
|
+
<div class="description">
|
|
3209
|
+
Method to search documents for
|
|
3210
|
+
</div>
|
|
3211
|
+
|
|
3212
|
+
|
|
3213
|
+
|
|
3214
|
+
|
|
3215
|
+
|
|
3216
|
+
|
|
3217
|
+
|
|
3218
|
+
|
|
3219
|
+
|
|
3220
|
+
|
|
3221
|
+
<h5>Parameters:</h5>
|
|
3222
|
+
|
|
3223
|
+
<div class="table-container">
|
|
3224
|
+
<table class="params table">
|
|
3225
|
+
<thead>
|
|
3226
|
+
<tr>
|
|
3227
|
+
|
|
3228
|
+
<th>Name</th>
|
|
3229
|
+
|
|
3230
|
+
|
|
3231
|
+
<th>Type</th>
|
|
3232
|
+
|
|
3233
|
+
|
|
3234
|
+
|
|
3235
|
+
|
|
3236
|
+
|
|
3237
|
+
<th class="last">Description</th>
|
|
3238
|
+
</tr>
|
|
3239
|
+
</thead>
|
|
3240
|
+
|
|
3241
|
+
<tbody>
|
|
3242
|
+
|
|
3243
|
+
|
|
3244
|
+
|
|
3245
|
+
<tr class="deep-level-0">
|
|
3246
|
+
|
|
3247
|
+
<td class="name"><code>params</code></td>
|
|
3248
|
+
|
|
3249
|
+
|
|
3250
|
+
<td class="type">
|
|
3251
|
+
|
|
3252
|
+
|
|
3253
|
+
<code class="param-type">object</code>
|
|
3254
|
+
|
|
3255
|
+
|
|
3256
|
+
|
|
3257
|
+
</td>
|
|
3258
|
+
|
|
3259
|
+
|
|
3260
|
+
|
|
3261
|
+
|
|
3262
|
+
|
|
3263
|
+
<td class="description last">Params to search the documents</td>
|
|
3264
|
+
</tr>
|
|
3265
|
+
|
|
3266
|
+
|
|
3267
|
+
|
|
3268
|
+
|
|
3269
|
+
<tr class="deep-level-1">
|
|
3270
|
+
|
|
3271
|
+
<td class="name"><code>query</code></td>
|
|
3272
|
+
|
|
3273
|
+
|
|
3274
|
+
<td class="type">
|
|
3275
|
+
|
|
3276
|
+
|
|
3277
|
+
<code class="param-type">object</code>
|
|
3278
|
+
|
|
3279
|
+
|
|
3280
|
+
|
|
3281
|
+
</td>
|
|
3282
|
+
|
|
3283
|
+
|
|
3284
|
+
|
|
3285
|
+
|
|
3286
|
+
|
|
3287
|
+
<td class="description last">Search documents query</td>
|
|
3288
|
+
</tr>
|
|
3289
|
+
|
|
3290
|
+
|
|
3291
|
+
|
|
3292
|
+
<tr class="deep-level-1">
|
|
3293
|
+
|
|
3294
|
+
<td class="name"><code>orgId</code></td>
|
|
3295
|
+
|
|
3296
|
+
|
|
3297
|
+
<td class="type">
|
|
3298
|
+
|
|
3299
|
+
|
|
3300
|
+
<code class="param-type">object</code>
|
|
3301
|
+
|
|
3302
|
+
|
|
3303
|
+
|
|
3304
|
+
</td>
|
|
3305
|
+
|
|
3306
|
+
|
|
3307
|
+
|
|
3308
|
+
|
|
3309
|
+
|
|
3310
|
+
<td class="description last">Organization id (_id database)</td>
|
|
3311
|
+
</tr>
|
|
3312
|
+
|
|
3313
|
+
|
|
3314
|
+
|
|
3315
|
+
|
|
3316
|
+
|
|
3317
|
+
|
|
3318
|
+
|
|
3319
|
+
<tr class="deep-level-0">
|
|
3320
|
+
|
|
3321
|
+
<td class="name"><code>session</code></td>
|
|
3322
|
+
|
|
3323
|
+
|
|
3324
|
+
<td class="type">
|
|
3325
|
+
|
|
3326
|
+
|
|
3327
|
+
<code class="param-type">string</code>
|
|
3328
|
+
|
|
3329
|
+
|
|
3330
|
+
|
|
3331
|
+
</td>
|
|
3332
|
+
|
|
3333
|
+
|
|
3334
|
+
|
|
3335
|
+
|
|
3336
|
+
|
|
3337
|
+
<td class="description last">Session, token JWT</td>
|
|
3338
|
+
</tr>
|
|
3339
|
+
|
|
3340
|
+
|
|
3341
|
+
|
|
3342
|
+
</tbody>
|
|
3343
|
+
</table>
|
|
3344
|
+
</div>
|
|
3345
|
+
|
|
3346
|
+
|
|
3347
|
+
|
|
3348
|
+
|
|
3349
|
+
|
|
3350
|
+
<dl class="details">
|
|
3351
|
+
|
|
3352
|
+
|
|
3353
|
+
|
|
3354
|
+
|
|
3355
|
+
|
|
3356
|
+
|
|
3357
|
+
|
|
3358
|
+
|
|
3359
|
+
|
|
3360
|
+
|
|
3361
|
+
|
|
3362
|
+
|
|
3363
|
+
|
|
3364
|
+
|
|
3365
|
+
|
|
3366
|
+
|
|
3367
|
+
|
|
3368
|
+
|
|
3369
|
+
<dt class="tag-author">Author:</dt>
|
|
3370
|
+
<dd class="tag-author">
|
|
3371
|
+
<ul>
|
|
3372
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
3373
|
+
</ul>
|
|
3374
|
+
</dd>
|
|
3375
|
+
|
|
3376
|
+
|
|
3377
|
+
|
|
3378
|
+
|
|
3379
|
+
|
|
3380
|
+
|
|
3381
|
+
|
|
3382
|
+
|
|
3383
|
+
|
|
3384
|
+
|
|
3385
|
+
|
|
3386
|
+
|
|
3387
|
+
|
|
3388
|
+
|
|
3389
|
+
<p class="tag-source">
|
|
3390
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
3391
|
+
<span>
|
|
3392
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line709">line 709</a>
|
|
3393
|
+
</span>
|
|
3394
|
+
</p>
|
|
3395
|
+
|
|
3396
|
+
</dl>
|
|
3397
|
+
|
|
3398
|
+
|
|
3399
|
+
|
|
3400
|
+
|
|
3401
|
+
|
|
3402
|
+
|
|
3403
|
+
|
|
3404
|
+
|
|
3405
|
+
|
|
3406
|
+
|
|
3407
|
+
|
|
3408
|
+
|
|
3409
|
+
|
|
3410
|
+
|
|
3411
|
+
|
|
3412
|
+
|
|
3413
|
+
|
|
3414
|
+
|
|
3415
|
+
<div class='columns method-parameter'>
|
|
3416
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
3417
|
+
<div class="column is-10">
|
|
3418
|
+
|
|
3419
|
+
|
|
3420
|
+
|
|
3421
|
+
<div class="columns">
|
|
3422
|
+
|
|
3423
|
+
<div class='param-desc column is-7'>returned data from the search</div>
|
|
3424
|
+
|
|
3425
|
+
|
|
3426
|
+
<div class='column is-5 has-text-left'>
|
|
3427
|
+
<label>Type: </label>
|
|
3428
|
+
|
|
3429
|
+
<code class="param-type">promise</code>
|
|
3430
|
+
|
|
3431
|
+
|
|
3432
|
+
</div>
|
|
3433
|
+
|
|
3434
|
+
</div>
|
|
3435
|
+
|
|
3436
|
+
|
|
3437
|
+
|
|
3438
|
+
|
|
3439
|
+
<div class="columns">
|
|
3440
|
+
|
|
3441
|
+
<div class='param-desc column is-7'>count the count of items searched</div>
|
|
3442
|
+
|
|
3443
|
+
|
|
3444
|
+
<div class='column is-5 has-text-left'>
|
|
3445
|
+
<label>Type: </label>
|
|
3446
|
+
|
|
3447
|
+
<code class="param-type">number</code>
|
|
3448
|
+
|
|
3449
|
+
|
|
3450
|
+
</div>
|
|
3451
|
+
|
|
3452
|
+
</div>
|
|
3453
|
+
|
|
3454
|
+
|
|
3455
|
+
|
|
3456
|
+
|
|
3457
|
+
<div class="columns">
|
|
3458
|
+
|
|
3459
|
+
<div class='param-desc column is-7'>items the items returned from search</div>
|
|
3460
|
+
|
|
3461
|
+
|
|
3462
|
+
<div class='column is-5 has-text-left'>
|
|
3463
|
+
<label>Type: </label>
|
|
3464
|
+
|
|
3465
|
+
<code class="param-type">array.<object></code>
|
|
3466
|
+
|
|
3467
|
+
|
|
3468
|
+
</div>
|
|
3469
|
+
|
|
3470
|
+
</div>
|
|
3471
|
+
|
|
3472
|
+
|
|
3473
|
+
|
|
3474
|
+
|
|
3475
|
+
<div class="columns">
|
|
3476
|
+
|
|
3477
|
+
<div class='param-desc column is-7'>took the number of documents taken</div>
|
|
3478
|
+
|
|
3479
|
+
|
|
3480
|
+
<div class='column is-5 has-text-left'>
|
|
3481
|
+
<label>Type: </label>
|
|
3482
|
+
|
|
3483
|
+
<code class="param-type">number</code>
|
|
3484
|
+
|
|
3485
|
+
|
|
3486
|
+
</div>
|
|
3487
|
+
|
|
3488
|
+
</div>
|
|
3489
|
+
|
|
3490
|
+
|
|
3491
|
+
|
|
3492
|
+
|
|
3493
|
+
<div class="columns">
|
|
3494
|
+
|
|
3495
|
+
<div class='param-desc column is-7'>totalCount the total count of all documents</div>
|
|
3496
|
+
|
|
3497
|
+
|
|
3498
|
+
<div class='column is-5 has-text-left'>
|
|
3499
|
+
<label>Type: </label>
|
|
3500
|
+
|
|
3501
|
+
<code class="param-type">number</code>
|
|
3502
|
+
|
|
3503
|
+
|
|
3504
|
+
</div>
|
|
3505
|
+
|
|
3506
|
+
</div>
|
|
3507
|
+
|
|
3508
|
+
|
|
3509
|
+
</div>
|
|
3510
|
+
</div>
|
|
3511
|
+
|
|
3512
|
+
|
|
3513
|
+
|
|
3514
|
+
|
|
3515
|
+
<h5>Example</h5>
|
|
3516
|
+
|
|
3517
|
+
|
|
3518
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3519
|
+
const api = new API();
|
|
3520
|
+
const params = {
|
|
3521
|
+
query: {p: 20, i: 1, s: 'Mais recentes', as: '', m: 'w', ai: '57e6a3bd6be6b45210833fae'},
|
|
3522
|
+
orgId: '55e4a3bd6be6b45210833fae',
|
|
3523
|
+
};
|
|
3524
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
3525
|
+
const retSearch = await api.user.document.searchDocuments(params, session);</code></pre>
|
|
3526
|
+
|
|
3527
|
+
|
|
3528
|
+
|
|
3529
|
+
</div>
|
|
3530
|
+
|
|
3531
|
+
<div class="member">
|
|
3532
|
+
|
|
3533
|
+
|
|
3534
|
+
|
|
3535
|
+
<h4 class="name" id="signedUrl">
|
|
3536
|
+
<a class="href-link" href="#signedUrl">#</a>
|
|
3537
|
+
|
|
3538
|
+
|
|
3539
|
+
<span class='tag'>async</span>
|
|
3540
|
+
|
|
3541
|
+
|
|
3542
|
+
<span class="code-name">
|
|
3543
|
+
|
|
3544
|
+
signedUrl<span class="signature">(params, session)</span><span class="type-signature"> → {Promise.<object>|string|string|string|string|string}</span>
|
|
3545
|
+
|
|
3546
|
+
</span>
|
|
3547
|
+
</h4>
|
|
3548
|
+
|
|
3549
|
+
|
|
3550
|
+
|
|
3551
|
+
|
|
3552
|
+
<div class="description">
|
|
3553
|
+
Request signed url url to put or get
|
|
3554
|
+
</div>
|
|
3555
|
+
|
|
3556
|
+
|
|
3557
|
+
|
|
3558
|
+
|
|
3559
|
+
|
|
3560
|
+
|
|
3561
|
+
|
|
3562
|
+
|
|
3563
|
+
|
|
3564
|
+
|
|
3565
|
+
<h5>Parameters:</h5>
|
|
3566
|
+
|
|
3567
|
+
<div class="table-container">
|
|
3568
|
+
<table class="params table">
|
|
3569
|
+
<thead>
|
|
3570
|
+
<tr>
|
|
3571
|
+
|
|
3572
|
+
<th>Name</th>
|
|
3573
|
+
|
|
3574
|
+
|
|
3575
|
+
<th>Type</th>
|
|
3576
|
+
|
|
3577
|
+
|
|
3578
|
+
|
|
3579
|
+
|
|
3580
|
+
|
|
3581
|
+
<th class="last">Description</th>
|
|
3582
|
+
</tr>
|
|
3583
|
+
</thead>
|
|
3584
|
+
|
|
3585
|
+
<tbody>
|
|
3586
|
+
|
|
3587
|
+
|
|
3588
|
+
|
|
3589
|
+
<tr class="deep-level-0">
|
|
3590
|
+
|
|
3591
|
+
<td class="name"><code>params</code></td>
|
|
3592
|
+
|
|
3593
|
+
|
|
3594
|
+
<td class="type">
|
|
3595
|
+
|
|
3596
|
+
|
|
3597
|
+
<code class="param-type">object</code>
|
|
3598
|
+
|
|
3599
|
+
|
|
3600
|
+
|
|
3601
|
+
</td>
|
|
3602
|
+
|
|
3603
|
+
|
|
3604
|
+
|
|
3605
|
+
|
|
3606
|
+
|
|
3607
|
+
<td class="description last">Params to request signed url</td>
|
|
3608
|
+
</tr>
|
|
3609
|
+
|
|
3610
|
+
|
|
3611
|
+
|
|
3612
|
+
|
|
3613
|
+
<tr class="deep-level-1">
|
|
3614
|
+
|
|
3615
|
+
<td class="name"><code>methodType</code></td>
|
|
3616
|
+
|
|
3617
|
+
|
|
3618
|
+
<td class="type">
|
|
3619
|
+
|
|
3620
|
+
|
|
3621
|
+
<code class="param-type">string</code>
|
|
3622
|
+
|
|
3623
|
+
|
|
3624
|
+
|
|
3625
|
+
</td>
|
|
3626
|
+
|
|
3627
|
+
|
|
3628
|
+
|
|
3629
|
+
|
|
3630
|
+
|
|
3631
|
+
<td class="description last">Method type HTTP get or put</td>
|
|
3632
|
+
</tr>
|
|
3633
|
+
|
|
3634
|
+
|
|
3635
|
+
|
|
3636
|
+
<tr class="deep-level-1">
|
|
3637
|
+
|
|
3638
|
+
<td class="name"><code>docId</code></td>
|
|
3639
|
+
|
|
3640
|
+
|
|
3641
|
+
<td class="type">
|
|
3642
|
+
|
|
3643
|
+
|
|
3644
|
+
<code class="param-type">string</code>
|
|
3645
|
+
|
|
3646
|
+
|
|
3647
|
+
|
|
3648
|
+
</td>
|
|
3649
|
+
|
|
3650
|
+
|
|
3651
|
+
|
|
3652
|
+
|
|
3653
|
+
|
|
3654
|
+
<td class="description last">Document id</td>
|
|
3655
|
+
</tr>
|
|
3656
|
+
|
|
3657
|
+
|
|
3658
|
+
|
|
3659
|
+
<tr class="deep-level-1">
|
|
3660
|
+
|
|
3661
|
+
<td class="name"><code>fileName</code></td>
|
|
3662
|
+
|
|
3663
|
+
|
|
3664
|
+
<td class="type">
|
|
3665
|
+
|
|
3666
|
+
|
|
3667
|
+
<code class="param-type">string</code>
|
|
3668
|
+
|
|
3669
|
+
|
|
3670
|
+
|
|
3671
|
+
</td>
|
|
3672
|
+
|
|
3673
|
+
|
|
3674
|
+
|
|
3675
|
+
|
|
3676
|
+
|
|
3677
|
+
<td class="description last">File name</td>
|
|
3678
|
+
</tr>
|
|
3679
|
+
|
|
3680
|
+
|
|
3681
|
+
|
|
3682
|
+
<tr class="deep-level-1">
|
|
3683
|
+
|
|
3684
|
+
<td class="name"><code>docAreaId</code></td>
|
|
3685
|
+
|
|
3686
|
+
|
|
3687
|
+
<td class="type">
|
|
3688
|
+
|
|
3689
|
+
|
|
3690
|
+
<code class="param-type">string</code>
|
|
3691
|
+
|
|
3692
|
+
|
|
3693
|
+
|
|
3694
|
+
</td>
|
|
3695
|
+
|
|
3696
|
+
|
|
3697
|
+
|
|
3698
|
+
|
|
3699
|
+
|
|
3700
|
+
<td class="description last">docAreaId of the document</td>
|
|
3701
|
+
</tr>
|
|
3702
|
+
|
|
3703
|
+
|
|
3704
|
+
|
|
3705
|
+
<tr class="deep-level-1">
|
|
3706
|
+
|
|
3707
|
+
<td class="name"><code>type</code></td>
|
|
3708
|
+
|
|
3709
|
+
|
|
3710
|
+
<td class="type">
|
|
3711
|
+
|
|
3712
|
+
|
|
3713
|
+
<code class="param-type">string</code>
|
|
3714
|
+
|
|
3715
|
+
|
|
3716
|
+
|
|
3717
|
+
</td>
|
|
3718
|
+
|
|
3719
|
+
|
|
3720
|
+
|
|
3721
|
+
|
|
3722
|
+
|
|
3723
|
+
<td class="description last">mimeType image/png image/jpg others</td>
|
|
3724
|
+
</tr>
|
|
3725
|
+
|
|
3726
|
+
|
|
3727
|
+
|
|
3728
|
+
<tr class="deep-level-1">
|
|
3729
|
+
|
|
3730
|
+
<td class="name"><code>document</code></td>
|
|
3731
|
+
|
|
3732
|
+
|
|
3733
|
+
<td class="type">
|
|
3734
|
+
|
|
3735
|
+
|
|
3736
|
+
<code class="param-type">string</code>
|
|
3737
|
+
|
|
3738
|
+
|
|
3739
|
+
|
|
3740
|
+
</td>
|
|
3741
|
+
|
|
3742
|
+
|
|
3743
|
+
|
|
3744
|
+
|
|
3745
|
+
|
|
3746
|
+
<td class="description last">Name document to request if method type is get</td>
|
|
3747
|
+
</tr>
|
|
3748
|
+
|
|
3749
|
+
|
|
3750
|
+
|
|
3751
|
+
<tr class="deep-level-1">
|
|
3752
|
+
|
|
3753
|
+
<td class="name"><code>orgId</code></td>
|
|
3754
|
+
|
|
3755
|
+
|
|
3756
|
+
<td class="type">
|
|
3757
|
+
|
|
3758
|
+
|
|
3759
|
+
<code class="param-type">string</code>
|
|
3760
|
+
|
|
3761
|
+
|
|
3762
|
+
|
|
3763
|
+
</td>
|
|
3764
|
+
|
|
3765
|
+
|
|
3766
|
+
|
|
3767
|
+
|
|
3768
|
+
|
|
3769
|
+
<td class="description last">Organization id (_id database)</td>
|
|
3770
|
+
</tr>
|
|
3771
|
+
|
|
3772
|
+
|
|
3773
|
+
|
|
3774
|
+
|
|
3775
|
+
|
|
3776
|
+
|
|
3777
|
+
|
|
3778
|
+
<tr class="deep-level-0">
|
|
3779
|
+
|
|
3780
|
+
<td class="name"><code>session</code></td>
|
|
3781
|
+
|
|
3782
|
+
|
|
3783
|
+
<td class="type">
|
|
3784
|
+
|
|
3785
|
+
|
|
3786
|
+
<code class="param-type">string</code>
|
|
3787
|
+
|
|
3788
|
+
|
|
3789
|
+
|
|
3790
|
+
</td>
|
|
3791
|
+
|
|
3792
|
+
|
|
3793
|
+
|
|
3794
|
+
|
|
3795
|
+
|
|
3796
|
+
<td class="description last">Session, token JWT</td>
|
|
3797
|
+
</tr>
|
|
3798
|
+
|
|
3799
|
+
|
|
3800
|
+
|
|
3801
|
+
</tbody>
|
|
3802
|
+
</table>
|
|
3803
|
+
</div>
|
|
3804
|
+
|
|
3805
|
+
|
|
3806
|
+
|
|
3807
|
+
|
|
3808
|
+
|
|
3809
|
+
<dl class="details">
|
|
3810
|
+
|
|
3811
|
+
|
|
3812
|
+
|
|
3813
|
+
|
|
3814
|
+
|
|
3815
|
+
|
|
3816
|
+
|
|
3817
|
+
|
|
3818
|
+
|
|
3819
|
+
|
|
3820
|
+
|
|
3821
|
+
|
|
3822
|
+
|
|
3823
|
+
|
|
3824
|
+
|
|
3825
|
+
|
|
3826
|
+
|
|
3827
|
+
|
|
3828
|
+
<dt class="tag-author">Author:</dt>
|
|
3829
|
+
<dd class="tag-author">
|
|
3830
|
+
<ul>
|
|
3831
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
3832
|
+
</ul>
|
|
3833
|
+
</dd>
|
|
3834
|
+
|
|
3835
|
+
|
|
3836
|
+
|
|
3837
|
+
|
|
3838
|
+
|
|
3839
|
+
|
|
3840
|
+
|
|
3841
|
+
|
|
3842
|
+
|
|
3843
|
+
|
|
3844
|
+
|
|
3845
|
+
|
|
3846
|
+
|
|
3847
|
+
|
|
3848
|
+
<p class="tag-source">
|
|
3849
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
3850
|
+
<span>
|
|
3851
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line459">line 459</a>
|
|
3852
|
+
</span>
|
|
3853
|
+
</p>
|
|
3854
|
+
|
|
3855
|
+
</dl>
|
|
3856
|
+
|
|
3857
|
+
|
|
3858
|
+
|
|
3859
|
+
|
|
3860
|
+
|
|
3861
|
+
|
|
3862
|
+
|
|
3863
|
+
|
|
3864
|
+
|
|
3865
|
+
|
|
3866
|
+
|
|
3867
|
+
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
|
+
|
|
3871
|
+
|
|
3872
|
+
|
|
3873
|
+
|
|
3874
|
+
<div class='columns method-parameter'>
|
|
3875
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
3876
|
+
<div class="column is-10">
|
|
3877
|
+
|
|
3878
|
+
|
|
3879
|
+
|
|
3880
|
+
<div class="columns">
|
|
3881
|
+
|
|
3882
|
+
<div class='param-desc column is-7'>doc Returned document data with the signed url</div>
|
|
3883
|
+
|
|
3884
|
+
|
|
3885
|
+
<div class='column is-5 has-text-left'>
|
|
3886
|
+
<label>Type: </label>
|
|
3887
|
+
|
|
3888
|
+
<code class="param-type">Promise.<object></code>
|
|
3889
|
+
|
|
3890
|
+
|
|
3891
|
+
</div>
|
|
3892
|
+
|
|
3893
|
+
</div>
|
|
3894
|
+
|
|
3895
|
+
|
|
3896
|
+
|
|
3897
|
+
|
|
3898
|
+
<div class="columns">
|
|
3899
|
+
|
|
3900
|
+
<div class='param-desc column is-7'>doc.docId Document id</div>
|
|
3901
|
+
|
|
3902
|
+
|
|
3903
|
+
<div class='column is-5 has-text-left'>
|
|
3904
|
+
<label>Type: </label>
|
|
3905
|
+
|
|
3906
|
+
<code class="param-type">string</code>
|
|
3907
|
+
|
|
3908
|
+
|
|
3909
|
+
</div>
|
|
3910
|
+
|
|
3911
|
+
</div>
|
|
3912
|
+
|
|
3913
|
+
|
|
3914
|
+
|
|
3915
|
+
|
|
3916
|
+
<div class="columns">
|
|
3917
|
+
|
|
3918
|
+
<div class='param-desc column is-7'>doc.name The name of the document, which is the fileName</div>
|
|
3919
|
+
|
|
3920
|
+
|
|
3921
|
+
<div class='column is-5 has-text-left'>
|
|
3922
|
+
<label>Type: </label>
|
|
3923
|
+
|
|
3924
|
+
<code class="param-type">string</code>
|
|
3925
|
+
|
|
3926
|
+
|
|
3927
|
+
</div>
|
|
3928
|
+
|
|
3929
|
+
</div>
|
|
3930
|
+
|
|
3931
|
+
|
|
3932
|
+
|
|
3933
|
+
|
|
3934
|
+
<div class="columns">
|
|
3935
|
+
|
|
3936
|
+
<div class='param-desc column is-7'>doc.areaId docAreaId of the document</div>
|
|
3937
|
+
|
|
3938
|
+
|
|
3939
|
+
<div class='column is-5 has-text-left'>
|
|
3940
|
+
<label>Type: </label>
|
|
3941
|
+
|
|
3942
|
+
<code class="param-type">string</code>
|
|
3943
|
+
|
|
3944
|
+
|
|
3945
|
+
</div>
|
|
3946
|
+
|
|
3947
|
+
</div>
|
|
3948
|
+
|
|
3949
|
+
|
|
3950
|
+
|
|
3951
|
+
|
|
3952
|
+
<div class="columns">
|
|
3953
|
+
|
|
3954
|
+
<div class='param-desc column is-7'>doc.type the document mimi type</div>
|
|
3955
|
+
|
|
3956
|
+
|
|
3957
|
+
<div class='column is-5 has-text-left'>
|
|
3958
|
+
<label>Type: </label>
|
|
3959
|
+
|
|
3960
|
+
<code class="param-type">string</code>
|
|
3961
|
+
|
|
3962
|
+
|
|
3963
|
+
</div>
|
|
3964
|
+
|
|
3965
|
+
</div>
|
|
3966
|
+
|
|
3967
|
+
|
|
3968
|
+
|
|
3969
|
+
|
|
3970
|
+
<div class="columns">
|
|
3971
|
+
|
|
3972
|
+
<div class='param-desc column is-7'>doc.signedUrl the signed URL to upload</div>
|
|
3973
|
+
|
|
3974
|
+
|
|
3975
|
+
<div class='column is-5 has-text-left'>
|
|
3976
|
+
<label>Type: </label>
|
|
3977
|
+
|
|
3978
|
+
<code class="param-type">string</code>
|
|
3979
|
+
|
|
3980
|
+
|
|
3981
|
+
</div>
|
|
3982
|
+
|
|
3983
|
+
</div>
|
|
3984
|
+
|
|
3985
|
+
|
|
3986
|
+
</div>
|
|
3987
|
+
</div>
|
|
3988
|
+
|
|
3989
|
+
|
|
3990
|
+
|
|
3991
|
+
|
|
3992
|
+
<h5>Examples</h5>
|
|
3993
|
+
|
|
3994
|
+
|
|
3995
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
3996
|
+
const api = new API();
|
|
3997
|
+
const params - {
|
|
3998
|
+
methodType: 'put',
|
|
3999
|
+
docId: '5dadd01dc4af3941d42f8c5c',
|
|
4000
|
+
docAreaId: '5df7f19618430c89a41a19d2',
|
|
4001
|
+
fileName: 'Foto',
|
|
4002
|
+
type: 'image/png'
|
|
4003
|
+
orgId: '5df7f19618430c89a41a19f8'
|
|
4004
|
+
};
|
|
4005
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
4006
|
+
// each doc: { docId, name, areaId, type, signedUrl }
|
|
4007
|
+
const { docs } = await api.user.document.signedUrl(params, session);</code></pre>
|
|
4008
|
+
|
|
4009
|
+
|
|
4010
|
+
|
|
4011
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
4012
|
+
const api = new API();
|
|
4013
|
+
const params - {
|
|
4014
|
+
methodType: 'get',
|
|
4015
|
+
document: 'pinkandthebrain/5df7f19618430c89a41a19d2/5dadd01dc4af3941d42f8c5c/9dadd01dc4af3941d42f6dd4.pdf',
|
|
4016
|
+
};
|
|
4017
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
4018
|
+
const base64Data = await api.user.document.signedUrl(params, session);</code></pre>
|
|
4019
|
+
|
|
4020
|
+
|
|
4021
|
+
|
|
4022
|
+
</div>
|
|
4023
|
+
|
|
4024
|
+
<div class="member">
|
|
4025
|
+
|
|
4026
|
+
|
|
4027
|
+
|
|
4028
|
+
<h4 class="name" id="signedUrls">
|
|
4029
|
+
<a class="href-link" href="#signedUrls">#</a>
|
|
4030
|
+
|
|
4031
|
+
|
|
4032
|
+
<span class='tag'>async</span>
|
|
4033
|
+
|
|
4034
|
+
|
|
4035
|
+
<span class="code-name">
|
|
4036
|
+
|
|
4037
|
+
signedUrls<span class="signature">(params, session)</span><span class="type-signature"> → {Promise.<object>|string|string|string|string|string}</span>
|
|
4038
|
+
|
|
4039
|
+
</span>
|
|
4040
|
+
</h4>
|
|
4041
|
+
|
|
4042
|
+
|
|
4043
|
+
|
|
4044
|
+
|
|
4045
|
+
<div class="description">
|
|
4046
|
+
Request signed url url to put or get
|
|
4047
|
+
</div>
|
|
4048
|
+
|
|
4049
|
+
|
|
4050
|
+
|
|
4051
|
+
|
|
4052
|
+
|
|
4053
|
+
|
|
4054
|
+
|
|
4055
|
+
|
|
4056
|
+
|
|
4057
|
+
|
|
4058
|
+
<h5>Parameters:</h5>
|
|
4059
|
+
|
|
4060
|
+
<div class="table-container">
|
|
4061
|
+
<table class="params table">
|
|
4062
|
+
<thead>
|
|
4063
|
+
<tr>
|
|
4064
|
+
|
|
4065
|
+
<th>Name</th>
|
|
4066
|
+
|
|
4067
|
+
|
|
4068
|
+
<th>Type</th>
|
|
4069
|
+
|
|
4070
|
+
|
|
4071
|
+
|
|
4072
|
+
|
|
4073
|
+
|
|
4074
|
+
<th class="last">Description</th>
|
|
4075
|
+
</tr>
|
|
4076
|
+
</thead>
|
|
4077
|
+
|
|
4078
|
+
<tbody>
|
|
4079
|
+
|
|
4080
|
+
|
|
4081
|
+
|
|
4082
|
+
<tr class="deep-level-0">
|
|
4083
|
+
|
|
4084
|
+
<td class="name"><code>params</code></td>
|
|
4085
|
+
|
|
4086
|
+
|
|
4087
|
+
<td class="type">
|
|
4088
|
+
|
|
4089
|
+
|
|
4090
|
+
<code class="param-type">object</code>
|
|
4091
|
+
|
|
4092
|
+
|
|
4093
|
+
|
|
4094
|
+
</td>
|
|
4095
|
+
|
|
4096
|
+
|
|
4097
|
+
|
|
4098
|
+
|
|
4099
|
+
|
|
4100
|
+
<td class="description last">Params to request signed url</td>
|
|
4101
|
+
</tr>
|
|
4102
|
+
|
|
4103
|
+
|
|
4104
|
+
|
|
4105
|
+
|
|
4106
|
+
<tr class="deep-level-1">
|
|
4107
|
+
|
|
4108
|
+
<td class="name"><code>docs</code></td>
|
|
4109
|
+
|
|
4110
|
+
|
|
4111
|
+
<td class="type">
|
|
4112
|
+
|
|
4113
|
+
|
|
4114
|
+
<code class="param-type">array</code>
|
|
4115
|
+
|
|
4116
|
+
|
|
4117
|
+
|
|
4118
|
+
</td>
|
|
4119
|
+
|
|
4120
|
+
|
|
4121
|
+
|
|
4122
|
+
|
|
4123
|
+
|
|
4124
|
+
<td class="description last">the list of documents to get the signed urls</td>
|
|
4125
|
+
</tr>
|
|
4126
|
+
|
|
4127
|
+
|
|
4128
|
+
|
|
4129
|
+
<tr class="deep-level-1">
|
|
4130
|
+
|
|
4131
|
+
<td class="name"><code>docs.docId</code></td>
|
|
4132
|
+
|
|
4133
|
+
|
|
4134
|
+
<td class="type">
|
|
4135
|
+
|
|
4136
|
+
|
|
4137
|
+
<code class="param-type">string</code>
|
|
4138
|
+
|
|
4139
|
+
|
|
4140
|
+
|
|
4141
|
+
</td>
|
|
4142
|
+
|
|
4143
|
+
|
|
4144
|
+
|
|
4145
|
+
|
|
4146
|
+
|
|
4147
|
+
<td class="description last">Document id</td>
|
|
4148
|
+
</tr>
|
|
4149
|
+
|
|
4150
|
+
|
|
4151
|
+
|
|
4152
|
+
<tr class="deep-level-1">
|
|
4153
|
+
|
|
4154
|
+
<td class="name"><code>docs.name</code></td>
|
|
4155
|
+
|
|
4156
|
+
|
|
4157
|
+
<td class="type">
|
|
4158
|
+
|
|
4159
|
+
|
|
4160
|
+
<code class="param-type">string</code>
|
|
4161
|
+
|
|
4162
|
+
|
|
4163
|
+
|
|
4164
|
+
</td>
|
|
4165
|
+
|
|
4166
|
+
|
|
4167
|
+
|
|
4168
|
+
|
|
4169
|
+
|
|
4170
|
+
<td class="description last">File name</td>
|
|
4171
|
+
</tr>
|
|
4172
|
+
|
|
4173
|
+
|
|
4174
|
+
|
|
4175
|
+
<tr class="deep-level-1">
|
|
4176
|
+
|
|
4177
|
+
<td class="name"><code>docs.areaId</code></td>
|
|
4178
|
+
|
|
4179
|
+
|
|
4180
|
+
<td class="type">
|
|
4181
|
+
|
|
4182
|
+
|
|
4183
|
+
<code class="param-type">string</code>
|
|
4184
|
+
|
|
4185
|
+
|
|
4186
|
+
|
|
4187
|
+
</td>
|
|
4188
|
+
|
|
4189
|
+
|
|
4190
|
+
|
|
4191
|
+
|
|
4192
|
+
|
|
4193
|
+
<td class="description last">docAreaId of the document</td>
|
|
4194
|
+
</tr>
|
|
4195
|
+
|
|
4196
|
+
|
|
4197
|
+
|
|
4198
|
+
<tr class="deep-level-1">
|
|
4199
|
+
|
|
4200
|
+
<td class="name"><code>docs.type</code></td>
|
|
4201
|
+
|
|
4202
|
+
|
|
4203
|
+
<td class="type">
|
|
4204
|
+
|
|
4205
|
+
|
|
4206
|
+
<code class="param-type">string</code>
|
|
4207
|
+
|
|
4208
|
+
|
|
4209
|
+
|
|
4210
|
+
</td>
|
|
4211
|
+
|
|
4212
|
+
|
|
4213
|
+
|
|
4214
|
+
|
|
4215
|
+
|
|
4216
|
+
<td class="description last">mimeType image/png image/jpg others</td>
|
|
4217
|
+
</tr>
|
|
4218
|
+
|
|
4219
|
+
|
|
4220
|
+
|
|
4221
|
+
<tr class="deep-level-1">
|
|
4222
|
+
|
|
4223
|
+
<td class="name"><code>docs.document</code></td>
|
|
4224
|
+
|
|
4225
|
+
|
|
4226
|
+
<td class="type">
|
|
4227
|
+
|
|
4228
|
+
|
|
4229
|
+
<code class="param-type">string</code>
|
|
4230
|
+
|
|
4231
|
+
|
|
4232
|
+
|
|
4233
|
+
</td>
|
|
4234
|
+
|
|
4235
|
+
|
|
4236
|
+
|
|
4237
|
+
|
|
4238
|
+
|
|
4239
|
+
<td class="description last">Name document to request if method type is get</td>
|
|
4240
|
+
</tr>
|
|
4241
|
+
|
|
4242
|
+
|
|
4243
|
+
|
|
4244
|
+
<tr class="deep-level-1">
|
|
4245
|
+
|
|
4246
|
+
<td class="name"><code>methodType</code></td>
|
|
4247
|
+
|
|
4248
|
+
|
|
4249
|
+
<td class="type">
|
|
4250
|
+
|
|
4251
|
+
|
|
4252
|
+
<code class="param-type">string</code>
|
|
4253
|
+
|
|
4254
|
+
|
|
4255
|
+
|
|
4256
|
+
</td>
|
|
4257
|
+
|
|
4258
|
+
|
|
4259
|
+
|
|
4260
|
+
|
|
4261
|
+
|
|
4262
|
+
<td class="description last">Method type HTTP get or put</td>
|
|
4263
|
+
</tr>
|
|
4264
|
+
|
|
4265
|
+
|
|
4266
|
+
|
|
4267
|
+
<tr class="deep-level-1">
|
|
4268
|
+
|
|
4269
|
+
<td class="name"><code>orgId</code></td>
|
|
4270
|
+
|
|
4271
|
+
|
|
4272
|
+
<td class="type">
|
|
4273
|
+
|
|
4274
|
+
|
|
4275
|
+
<code class="param-type">string</code>
|
|
4276
|
+
|
|
4277
|
+
|
|
4278
|
+
|
|
4279
|
+
</td>
|
|
4280
|
+
|
|
4281
|
+
|
|
4282
|
+
|
|
4283
|
+
|
|
4284
|
+
|
|
4285
|
+
<td class="description last">Organization id (_id database)</td>
|
|
4286
|
+
</tr>
|
|
4287
|
+
|
|
4288
|
+
|
|
4289
|
+
|
|
4290
|
+
|
|
4291
|
+
|
|
4292
|
+
|
|
4293
|
+
|
|
4294
|
+
<tr class="deep-level-0">
|
|
4295
|
+
|
|
4296
|
+
<td class="name"><code>session</code></td>
|
|
4297
|
+
|
|
4298
|
+
|
|
4299
|
+
<td class="type">
|
|
4300
|
+
|
|
4301
|
+
|
|
4302
|
+
<code class="param-type">string</code>
|
|
4303
|
+
|
|
4304
|
+
|
|
4305
|
+
|
|
4306
|
+
</td>
|
|
4307
|
+
|
|
4308
|
+
|
|
4309
|
+
|
|
4310
|
+
|
|
4311
|
+
|
|
4312
|
+
<td class="description last">Session, token JWT</td>
|
|
4313
|
+
</tr>
|
|
4314
|
+
|
|
4315
|
+
|
|
4316
|
+
|
|
4317
|
+
</tbody>
|
|
4318
|
+
</table>
|
|
4319
|
+
</div>
|
|
4320
|
+
|
|
4321
|
+
|
|
4322
|
+
|
|
4323
|
+
|
|
4324
|
+
|
|
4325
|
+
<dl class="details">
|
|
4326
|
+
|
|
4327
|
+
|
|
4328
|
+
|
|
4329
|
+
|
|
4330
|
+
|
|
4331
|
+
|
|
4332
|
+
|
|
4333
|
+
|
|
4334
|
+
|
|
4335
|
+
|
|
4336
|
+
|
|
4337
|
+
|
|
4338
|
+
|
|
4339
|
+
|
|
4340
|
+
|
|
4341
|
+
|
|
4342
|
+
|
|
4343
|
+
|
|
4344
|
+
<dt class="tag-author">Author:</dt>
|
|
4345
|
+
<dd class="tag-author">
|
|
4346
|
+
<ul>
|
|
4347
|
+
<li><a href="mailto:abernardo.br@gmail.com">CloudBrasil</a></li>
|
|
4348
|
+
</ul>
|
|
4349
|
+
</dd>
|
|
4350
|
+
|
|
4351
|
+
|
|
4352
|
+
|
|
4353
|
+
|
|
4354
|
+
|
|
4355
|
+
|
|
4356
|
+
|
|
4357
|
+
|
|
4358
|
+
|
|
4359
|
+
|
|
4360
|
+
|
|
4361
|
+
|
|
4362
|
+
|
|
4363
|
+
|
|
4364
|
+
<p class="tag-source">
|
|
4365
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
4366
|
+
<span>
|
|
4367
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line555">line 555</a>
|
|
4368
|
+
</span>
|
|
4369
|
+
</p>
|
|
4370
|
+
|
|
4371
|
+
</dl>
|
|
4372
|
+
|
|
4373
|
+
|
|
4374
|
+
|
|
4375
|
+
|
|
4376
|
+
|
|
4377
|
+
|
|
4378
|
+
|
|
4379
|
+
|
|
4380
|
+
|
|
4381
|
+
|
|
4382
|
+
|
|
4383
|
+
|
|
4384
|
+
|
|
4385
|
+
|
|
4386
|
+
|
|
4387
|
+
|
|
4388
|
+
|
|
4389
|
+
|
|
4390
|
+
<div class='columns method-parameter'>
|
|
4391
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
4392
|
+
<div class="column is-10">
|
|
4393
|
+
|
|
4394
|
+
|
|
4395
|
+
|
|
4396
|
+
<div class="columns">
|
|
4397
|
+
|
|
4398
|
+
<div class='param-desc column is-7'>doc Returned document data with the signed url</div>
|
|
4399
|
+
|
|
4400
|
+
|
|
4401
|
+
<div class='column is-5 has-text-left'>
|
|
4402
|
+
<label>Type: </label>
|
|
4403
|
+
|
|
4404
|
+
<code class="param-type">Promise.<object></code>
|
|
4405
|
+
|
|
4406
|
+
|
|
4407
|
+
</div>
|
|
4408
|
+
|
|
4409
|
+
</div>
|
|
4410
|
+
|
|
4411
|
+
|
|
4412
|
+
|
|
4413
|
+
|
|
4414
|
+
<div class="columns">
|
|
4415
|
+
|
|
4416
|
+
<div class='param-desc column is-7'>doc.docId Document id</div>
|
|
4417
|
+
|
|
4418
|
+
|
|
4419
|
+
<div class='column is-5 has-text-left'>
|
|
4420
|
+
<label>Type: </label>
|
|
4421
|
+
|
|
4422
|
+
<code class="param-type">string</code>
|
|
4423
|
+
|
|
4424
|
+
|
|
4425
|
+
</div>
|
|
4426
|
+
|
|
4427
|
+
</div>
|
|
4428
|
+
|
|
4429
|
+
|
|
4430
|
+
|
|
4431
|
+
|
|
4432
|
+
<div class="columns">
|
|
4433
|
+
|
|
4434
|
+
<div class='param-desc column is-7'>doc.name The name of the document, which is the fileName</div>
|
|
4435
|
+
|
|
4436
|
+
|
|
4437
|
+
<div class='column is-5 has-text-left'>
|
|
4438
|
+
<label>Type: </label>
|
|
4439
|
+
|
|
4440
|
+
<code class="param-type">string</code>
|
|
4441
|
+
|
|
4442
|
+
|
|
4443
|
+
</div>
|
|
4444
|
+
|
|
4445
|
+
</div>
|
|
4446
|
+
|
|
4447
|
+
|
|
4448
|
+
|
|
4449
|
+
|
|
4450
|
+
<div class="columns">
|
|
4451
|
+
|
|
4452
|
+
<div class='param-desc column is-7'>doc.areaId docAreaId of the document</div>
|
|
4453
|
+
|
|
4454
|
+
|
|
4455
|
+
<div class='column is-5 has-text-left'>
|
|
4456
|
+
<label>Type: </label>
|
|
4457
|
+
|
|
4458
|
+
<code class="param-type">string</code>
|
|
4459
|
+
|
|
4460
|
+
|
|
4461
|
+
</div>
|
|
4462
|
+
|
|
4463
|
+
</div>
|
|
4464
|
+
|
|
4465
|
+
|
|
4466
|
+
|
|
4467
|
+
|
|
4468
|
+
<div class="columns">
|
|
4469
|
+
|
|
4470
|
+
<div class='param-desc column is-7'>doc.type the document mimi type</div>
|
|
4471
|
+
|
|
4472
|
+
|
|
4473
|
+
<div class='column is-5 has-text-left'>
|
|
4474
|
+
<label>Type: </label>
|
|
4475
|
+
|
|
4476
|
+
<code class="param-type">string</code>
|
|
4477
|
+
|
|
4478
|
+
|
|
4479
|
+
</div>
|
|
4480
|
+
|
|
4481
|
+
</div>
|
|
4482
|
+
|
|
4483
|
+
|
|
4484
|
+
|
|
4485
|
+
|
|
4486
|
+
<div class="columns">
|
|
4487
|
+
|
|
4488
|
+
<div class='param-desc column is-7'>doc.signedUrl the signed URL to upload</div>
|
|
4489
|
+
|
|
4490
|
+
|
|
4491
|
+
<div class='column is-5 has-text-left'>
|
|
4492
|
+
<label>Type: </label>
|
|
4493
|
+
|
|
4494
|
+
<code class="param-type">string</code>
|
|
4495
|
+
|
|
4496
|
+
|
|
4497
|
+
</div>
|
|
4498
|
+
|
|
4499
|
+
</div>
|
|
4500
|
+
|
|
4501
|
+
|
|
4502
|
+
</div>
|
|
4503
|
+
</div>
|
|
4504
|
+
|
|
4505
|
+
|
|
4506
|
+
|
|
4507
|
+
|
|
4508
|
+
<h5>Examples</h5>
|
|
4509
|
+
|
|
4510
|
+
|
|
4511
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
4512
|
+
const api = new API();
|
|
4513
|
+
const params - {
|
|
4514
|
+
methodType: 'put',
|
|
4515
|
+
orgId: '5df7f19618430c89a41a19f8'
|
|
4516
|
+
docs: [
|
|
4517
|
+
{
|
|
4518
|
+
docId: '5dadd01dc4af3941d42f8c5c',
|
|
4519
|
+
areaId: '5df7f19618430c89a41a19d2',
|
|
4520
|
+
name: 'Foto.png',
|
|
4521
|
+
type: 'image/png'
|
|
4522
|
+
}
|
|
4523
|
+
]
|
|
4524
|
+
};
|
|
4525
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
4526
|
+
// each doc: { docId, name, areaId, type, signedUrl }
|
|
4527
|
+
const { docs } = await api.user.document.signedUrls(params, session);</code></pre>
|
|
4528
|
+
|
|
4529
|
+
|
|
4530
|
+
|
|
4531
|
+
<pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
|
|
4532
|
+
const api = new API();
|
|
4533
|
+
const params - {
|
|
4534
|
+
methodType: 'get',
|
|
4535
|
+
docs: [
|
|
4536
|
+
{ document: 'pinkandthebrain/5df7f19618430c89a41a19d2/5dadd01dc4af3941d42f8c5c/9dadd01dc4af3941d42f6dd4.pdf' }
|
|
4537
|
+
],
|
|
4538
|
+
};
|
|
4539
|
+
const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
|
|
4540
|
+
const base64Data = await api.user.document.signedUrls(params, session);</code></pre>
|
|
4541
|
+
|
|
4542
|
+
|
|
4543
|
+
|
|
4544
|
+
</div>
|
|
4545
|
+
|
|
4546
|
+
<div class="member">
|
|
4547
|
+
|
|
4548
|
+
|
|
4549
|
+
|
|
4550
|
+
<h4 class="name" id="uploadSignedDocument">
|
|
4551
|
+
<a class="href-link" href="#uploadSignedDocument">#</a>
|
|
4552
|
+
|
|
4553
|
+
|
|
4554
|
+
<span class='tag'>async</span>
|
|
4555
|
+
|
|
4556
|
+
|
|
4557
|
+
<span class="code-name">
|
|
4558
|
+
|
|
4559
|
+
uploadSignedDocument<span class="signature">(params)</span><span class="type-signature"> → {Promise.<boolean>}</span>
|
|
4560
|
+
|
|
4561
|
+
</span>
|
|
4562
|
+
</h4>
|
|
4563
|
+
|
|
4564
|
+
|
|
4565
|
+
|
|
4566
|
+
|
|
4567
|
+
<div class="description">
|
|
4568
|
+
Uploads the file
|
|
4569
|
+
</div>
|
|
4570
|
+
|
|
4571
|
+
|
|
4572
|
+
|
|
4573
|
+
|
|
4574
|
+
|
|
4575
|
+
|
|
4576
|
+
|
|
4577
|
+
|
|
4578
|
+
|
|
4579
|
+
|
|
4580
|
+
<h5>Parameters:</h5>
|
|
4581
|
+
|
|
4582
|
+
<div class="table-container">
|
|
4583
|
+
<table class="params table">
|
|
4584
|
+
<thead>
|
|
4585
|
+
<tr>
|
|
4586
|
+
|
|
4587
|
+
<th>Name</th>
|
|
4588
|
+
|
|
4589
|
+
|
|
4590
|
+
<th>Type</th>
|
|
4591
|
+
|
|
4592
|
+
|
|
4593
|
+
|
|
4594
|
+
|
|
4595
|
+
|
|
4596
|
+
<th class="last">Description</th>
|
|
4597
|
+
</tr>
|
|
4598
|
+
</thead>
|
|
4599
|
+
|
|
4600
|
+
<tbody>
|
|
4601
|
+
|
|
4602
|
+
|
|
4603
|
+
|
|
4604
|
+
<tr class="deep-level-0">
|
|
4605
|
+
|
|
4606
|
+
<td class="name"><code>params</code></td>
|
|
4607
|
+
|
|
4608
|
+
|
|
4609
|
+
<td class="type">
|
|
4610
|
+
|
|
4611
|
+
|
|
4612
|
+
<code class="param-type">object</code>
|
|
4613
|
+
|
|
4614
|
+
|
|
4615
|
+
|
|
4616
|
+
</td>
|
|
4617
|
+
|
|
4618
|
+
|
|
4619
|
+
|
|
4620
|
+
|
|
4621
|
+
|
|
4622
|
+
<td class="description last">Params to upload document</td>
|
|
4623
|
+
</tr>
|
|
4624
|
+
|
|
4625
|
+
|
|
4626
|
+
|
|
4627
|
+
|
|
4628
|
+
<tr class="deep-level-1">
|
|
4629
|
+
|
|
4630
|
+
<td class="name"><code>content</code></td>
|
|
4631
|
+
|
|
4632
|
+
|
|
4633
|
+
<td class="type">
|
|
4634
|
+
|
|
4635
|
+
|
|
4636
|
+
<code class="param-type">buffer</code>
|
|
4637
|
+
|
|
4638
|
+
|
|
4639
|
+
|
|
4640
|
+
</td>
|
|
4641
|
+
|
|
4642
|
+
|
|
4643
|
+
|
|
4644
|
+
|
|
4645
|
+
|
|
4646
|
+
<td class="description last">The content of the file (Buffer)</td>
|
|
4647
|
+
</tr>
|
|
4648
|
+
|
|
4649
|
+
|
|
4650
|
+
|
|
4651
|
+
<tr class="deep-level-1">
|
|
4652
|
+
|
|
4653
|
+
<td class="name"><code>signedUrl</code></td>
|
|
4654
|
+
|
|
4655
|
+
|
|
4656
|
+
<td class="type">
|
|
4657
|
+
|
|
4658
|
+
|
|
4659
|
+
<code class="param-type">string</code>
|
|
4660
|
+
|
|
4661
|
+
|
|
4662
|
+
|
|
4663
|
+
</td>
|
|
4664
|
+
|
|
4665
|
+
|
|
4666
|
+
|
|
4667
|
+
|
|
4668
|
+
|
|
4669
|
+
<td class="description last">The signed URL</td>
|
|
4670
|
+
</tr>
|
|
4671
|
+
|
|
4672
|
+
|
|
4673
|
+
|
|
4674
|
+
<tr class="deep-level-1">
|
|
4675
|
+
|
|
4676
|
+
<td class="name"><code>type</code></td>
|
|
4677
|
+
|
|
4678
|
+
|
|
4679
|
+
<td class="type">
|
|
4680
|
+
|
|
4681
|
+
|
|
4682
|
+
<code class="param-type">string</code>
|
|
4683
|
+
|
|
4684
|
+
|
|
4685
|
+
|
|
4686
|
+
</td>
|
|
4687
|
+
|
|
4688
|
+
|
|
4689
|
+
|
|
4690
|
+
|
|
4691
|
+
|
|
4692
|
+
<td class="description last">The file mime type</td>
|
|
4693
|
+
</tr>
|
|
4694
|
+
|
|
4695
|
+
|
|
4696
|
+
|
|
4697
|
+
<tr class="deep-level-1">
|
|
4698
|
+
|
|
4699
|
+
<td class="name"><code>onUploadProgress</code></td>
|
|
4700
|
+
|
|
4701
|
+
|
|
4702
|
+
<td class="type">
|
|
4703
|
+
|
|
4704
|
+
|
|
4705
|
+
<code class="param-type">string</code>
|
|
4706
|
+
|
|
4707
|
+
|
|
4708
|
+
|
|
4709
|
+
</td>
|
|
4710
|
+
|
|
4711
|
+
|
|
4712
|
+
|
|
4713
|
+
|
|
4714
|
+
|
|
4715
|
+
<td class="description last">A callback for the upload progress. It will return a progressEvent.</td>
|
|
4716
|
+
</tr>
|
|
4717
|
+
|
|
4718
|
+
|
|
4719
|
+
|
|
4720
|
+
|
|
4721
|
+
|
|
4722
|
+
</tbody>
|
|
4723
|
+
</table>
|
|
4724
|
+
</div>
|
|
4725
|
+
|
|
4726
|
+
|
|
4727
|
+
|
|
4728
|
+
|
|
4729
|
+
|
|
4730
|
+
<dl class="details">
|
|
4731
|
+
|
|
4732
|
+
|
|
4733
|
+
|
|
4734
|
+
|
|
4735
|
+
|
|
4736
|
+
|
|
4737
|
+
|
|
4738
|
+
|
|
4739
|
+
|
|
4740
|
+
|
|
4741
|
+
|
|
4742
|
+
|
|
4743
|
+
|
|
4744
|
+
|
|
4745
|
+
|
|
4746
|
+
|
|
4747
|
+
|
|
4748
|
+
|
|
4749
|
+
|
|
4750
|
+
|
|
4751
|
+
|
|
4752
|
+
|
|
4753
|
+
|
|
4754
|
+
|
|
4755
|
+
|
|
4756
|
+
|
|
4757
|
+
|
|
4758
|
+
|
|
4759
|
+
|
|
4760
|
+
|
|
4761
|
+
|
|
4762
|
+
<p class="tag-source">
|
|
4763
|
+
<a href="user_document.js.html" class="button">View Source</a>
|
|
4764
|
+
<span>
|
|
4765
|
+
<a href="user_document.js.html">user/document.js</a>, <a href="user_document.js.html#line603">line 603</a>
|
|
4766
|
+
</span>
|
|
4767
|
+
</p>
|
|
4768
|
+
|
|
4769
|
+
</dl>
|
|
4770
|
+
|
|
4771
|
+
|
|
4772
|
+
|
|
4773
|
+
|
|
4774
|
+
|
|
4775
|
+
|
|
4776
|
+
|
|
4777
|
+
|
|
4778
|
+
|
|
4779
|
+
|
|
4780
|
+
|
|
4781
|
+
|
|
4782
|
+
|
|
4783
|
+
|
|
4784
|
+
|
|
4785
|
+
|
|
4786
|
+
|
|
4787
|
+
|
|
4788
|
+
<div class='columns method-parameter'>
|
|
4789
|
+
<div class="column is-2"><label>Returns:</label></div>
|
|
4790
|
+
<div class="column is-10">
|
|
4791
|
+
|
|
4792
|
+
|
|
4793
|
+
|
|
4794
|
+
<div class="columns">
|
|
4795
|
+
|
|
4796
|
+
<div class='param-desc column is-7'>True if success</div>
|
|
4797
|
+
|
|
4798
|
+
|
|
4799
|
+
<div class='column is-5 has-text-left'>
|
|
4800
|
+
<label>Type: </label>
|
|
4801
|
+
|
|
4802
|
+
<code class="param-type">Promise.<boolean></code>
|
|
4803
|
+
|
|
4804
|
+
|
|
4805
|
+
</div>
|
|
4806
|
+
|
|
4807
|
+
</div>
|
|
4808
|
+
|
|
4809
|
+
|
|
4810
|
+
</div>
|
|
4811
|
+
</div>
|
|
4812
|
+
|
|
4813
|
+
|
|
4814
|
+
|
|
4815
|
+
|
|
4816
|
+
<h5>Example</h5>
|
|
4817
|
+
|
|
4818
|
+
|
|
4819
|
+
<pre class="prettyprint"><code>const FS = require('fs');
|
|
4820
|
+
const Path = require('path');
|
|
4821
|
+
const API = require('@docbrasil/api-systemmanager');
|
|
4822
|
+
const api = new API();
|
|
4823
|
+
const params - {
|
|
4824
|
+
content: FS.readFileSync(Path.join(__dirname, '.mypdf.pdf')),
|
|
4825
|
+
signedUrl: 'https://signedurl.com/token...',
|
|
4826
|
+
type: 'application/pdf'
|
|
4827
|
+
};
|
|
4828
|
+
const retData = await api.user.document.uploadSignedDocument(params);
|
|
4829
|
+
|
|
4830
|
+
onUploadProgress return the progressEvent
|
|
4831
|
+
- lengthComputable: A Boolean that indicates whether or not the total number of bytes is known.
|
|
4832
|
+
- loaded: The number of bytes of the file that have been uploaded.
|
|
4833
|
+
- total: The total number of bytes in the file.</code></pre>
|
|
4834
|
+
|
|
4835
|
+
|
|
4836
|
+
|
|
4837
|
+
</div>
|
|
4838
|
+
|
|
4839
|
+
</div>
|
|
4840
|
+
</div>
|
|
4841
|
+
|
|
4842
|
+
|
|
4843
|
+
|
|
4844
|
+
|
|
4845
|
+
|
|
4846
|
+
</article>
|
|
4847
|
+
|
|
4848
|
+
</section>
|
|
4849
|
+
|
|
4850
|
+
|
|
4851
|
+
|
|
4852
|
+
|
|
4853
|
+
</div>
|
|
4854
|
+
|
|
4855
|
+
<footer class="footer">
|
|
4856
|
+
<div class="content has-text-centered">
|
|
4857
|
+
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a></p>
|
|
4858
|
+
<p class="sidebar-created-by">
|
|
4859
|
+
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
|
|
4860
|
+
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
|
|
4861
|
+
</p>
|
|
4862
|
+
</div>
|
|
4863
|
+
</footer>
|
|
4864
|
+
|
|
4865
|
+
</div>
|
|
4866
|
+
<div id="side-nav" class="side-nav">
|
|
4867
|
+
</div>
|
|
4868
|
+
</div>
|
|
4869
|
+
<script src="scripts/app.min.js"></script>
|
|
4870
|
+
<script>PR.prettyPrint();</script>
|
|
4871
|
+
<script src="scripts/linenumber.js"> </script>
|
|
4872
|
+
|
|
4873
|
+
|
|
4874
|
+
</body>
|
|
4875
|
+
</html>
|