@docbrasil/api-systemmanager 1.1.67 → 1.1.69

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/doc/api.md CHANGED
@@ -131,6 +131,7 @@ Admin Class for documents, permission admin
131
131
  * [.updateContent(params, apiKey)](#AdminDocuments+updateContent) ⇒ <code>Promise.&lt;object&gt;</code>
132
132
  * [.updateAI(params, apiKey)](#AdminDocuments+updateAI) ⇒ <code>Promise.&lt;object&gt;</code>
133
133
  * [.getContent(params, apiKey)](#AdminDocuments+getContent) ⇒ <code>Promise.&lt;object&gt;</code> \| <code>string</code> \| <code>string</code> \| <code>string</code> \| <code>string</code> \| <code>number</code>
134
+ * [.getDocumentData(params, apiKey)](#AdminDocuments+getDocumentData) ⇒ <code>Promise.&lt;object&gt;</code>
134
135
 
135
136
  <a name="AdminDocuments+advancedSearch"></a>
136
137
 
@@ -334,6 +335,32 @@ const params - {
334
335
  const apiKey: '...';
335
336
  await api.admin.document.getContent(params, apiKey);
336
337
  ```
338
+ <a name="AdminDocuments+getDocumentData"></a>
339
+
340
+ ### adminDocuments.getDocumentData(params, apiKey) ⇒ <code>Promise.&lt;object&gt;</code>
341
+ Get the data of a document
342
+
343
+ **Kind**: instance method of [<code>AdminDocuments</code>](#AdminDocuments)
344
+ **Returns**: <code>Promise.&lt;object&gt;</code> - data the document data
345
+ **Access**: public
346
+ **Author**: Myndware <augusto.pissarra@myndware.com>
347
+
348
+ | Param | Type | Description |
349
+ | --- | --- | --- |
350
+ | params | <code>object</code> | Params to request signed url |
351
+ | params.id | <code>string</code> | The unique id of the document |
352
+ | apiKey | <code>string</code> | Api Key as permission to use this functionality |
353
+
354
+ **Example**
355
+ ```js
356
+ const API = require('@docbrasil/api-systemmanager');
357
+ const api = new API();
358
+ const params - {
359
+ id: '5dadd01dc4af3941d42f8c5c'
360
+ };
361
+ const apiKey: '...';
362
+ await api.admin.document.getDocumentData(params, apiKey);
363
+ ```
337
364
  <a name="AdminForm"></a>
338
365
 
339
366
  ## AdminForm
@@ -3431,6 +3458,7 @@ Class for process, permission user
3431
3458
  * [.getOrgDocTypes(params, session)](#Process+getOrgDocTypes) ⇒ <code>Promise</code>
3432
3459
  * [.getOrgGroups(params, session)](#Process+getOrgGroups) ⇒ <code>Promise</code>
3433
3460
  * [.getOrgUsers(params, session)](#Process+getOrgUsers) ⇒ <code>Promise</code>
3461
+ * [.getStepHistory(params, session)](#Process+getStepHistory) ⇒ <code>Promise.&lt;Array&gt;</code>
3434
3462
 
3435
3463
  <a name="Process+start"></a>
3436
3464
 
@@ -3767,6 +3795,36 @@ const params = {
3767
3795
  const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
3768
3796
  await api.user.process.getOrgUsers(params, session);
3769
3797
  ```
3798
+ <a name="Process+getStepHistory"></a>
3799
+
3800
+ ### process.getStepHistory(params, session) ⇒ <code>Promise.&lt;Array&gt;</code>
3801
+ Get step history of a process flow
3802
+
3803
+ **Kind**: instance method of [<code>Process</code>](#Process)
3804
+ **Returns**: <code>Promise.&lt;Array&gt;</code> - Array of step history entries
3805
+ **Access**: public
3806
+ **Author**: Myndware <augusto.pissarra@myndware.com>
3807
+
3808
+ | Param | Type | Description |
3809
+ | --- | --- | --- |
3810
+ | params | <code>object</code> | Params to get step history |
3811
+ | params.orgId | <code>string</code> | Organization id (_id database); |
3812
+ | params.processId | <code>string</code> | Process id (_id database); |
3813
+ | params.flowId | <code>string</code> | Flow id; |
3814
+ | session | <code>string</code> | Session, token JWT |
3815
+
3816
+ **Example**
3817
+ ```js
3818
+ const API = require('@docbrasil/api-systemmanager');
3819
+ const api = new API();
3820
+ const params = {
3821
+ orgId: '5edd11c46b6ce9729c2c297c',
3822
+ processId: '5dadd01dc4af3941d42f8c5c',
3823
+ flowId: 'Task_18v1xx7'
3824
+ }
3825
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
3826
+ const stepHistory = await api.user.process.getStepHistory(params, session);
3827
+ ```
3770
3828
  <a name="Register"></a>
3771
3829
 
3772
3830
  ## Register
@@ -984,7 +984,7 @@ await api.admin.document.findById(params, session);</code></pre>
984
984
  <p class="tag-source">
985
985
  <a href="admin_document.js.html" class="button">View Source</a>
986
986
  <span>
987
- <a href="admin_document.js.html">admin/document.js</a>, <a href="admin_document.js.html#line315">line 315</a>
987
+ <a href="admin_document.js.html">admin/document.js</a>, <a href="admin_document.js.html#line312">line 312</a>
988
988
  </span>
989
989
  </p>
990
990
 
@@ -1139,6 +1139,254 @@ await api.admin.document.getContent(params, apiKey);</code></pre>
1139
1139
 
1140
1140
 
1141
1141
 
1142
+ </div>
1143
+
1144
+ <div class="member">
1145
+
1146
+
1147
+
1148
+ <h4 class="name" id="getDocumentData">
1149
+ <a class="href-link" href="#getDocumentData">#</a>
1150
+
1151
+
1152
+ <span class='tag'>async</span>
1153
+
1154
+
1155
+ <span class="code-name">
1156
+
1157
+ getDocumentData<span class="signature">(params, apiKey)</span><span class="type-signature"> &rarr; {Promise.&lt;object>}</span>
1158
+
1159
+ </span>
1160
+ </h4>
1161
+
1162
+
1163
+
1164
+
1165
+ <div class="description">
1166
+ Get the data of a document
1167
+ </div>
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+ <h5>Parameters:</h5>
1179
+
1180
+ <div class="table-container">
1181
+ <table class="params table">
1182
+ <thead>
1183
+ <tr>
1184
+
1185
+ <th>Name</th>
1186
+
1187
+
1188
+ <th>Type</th>
1189
+
1190
+
1191
+
1192
+
1193
+
1194
+ <th class="last">Description</th>
1195
+ </tr>
1196
+ </thead>
1197
+
1198
+ <tbody>
1199
+
1200
+
1201
+
1202
+ <tr class="deep-level-0">
1203
+
1204
+ <td class="name"><code>params</code></td>
1205
+
1206
+
1207
+ <td class="type">
1208
+
1209
+
1210
+ <code class="param-type">object</code>
1211
+
1212
+
1213
+
1214
+ </td>
1215
+
1216
+
1217
+
1218
+
1219
+
1220
+ <td class="description last">Params to request signed url</td>
1221
+ </tr>
1222
+
1223
+
1224
+
1225
+
1226
+ <tr class="deep-level-1">
1227
+
1228
+ <td class="name"><code>id</code></td>
1229
+
1230
+
1231
+ <td class="type">
1232
+
1233
+
1234
+ <code class="param-type">string</code>
1235
+
1236
+
1237
+
1238
+ </td>
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+ <td class="description last">The unique id of the document</td>
1245
+ </tr>
1246
+
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+ <tr class="deep-level-0">
1254
+
1255
+ <td class="name"><code>apiKey</code></td>
1256
+
1257
+
1258
+ <td class="type">
1259
+
1260
+
1261
+ <code class="param-type">string</code>
1262
+
1263
+
1264
+
1265
+ </td>
1266
+
1267
+
1268
+
1269
+
1270
+
1271
+ <td class="description last">Api Key as permission to use this functionality</td>
1272
+ </tr>
1273
+
1274
+
1275
+
1276
+ </tbody>
1277
+ </table>
1278
+ </div>
1279
+
1280
+
1281
+
1282
+
1283
+
1284
+ <dl class="details">
1285
+
1286
+
1287
+
1288
+
1289
+
1290
+
1291
+
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+
1303
+ <dt class="tag-author">Author:</dt>
1304
+ <dd class="tag-author">
1305
+ <ul>
1306
+ <li><a href="mailto:augusto.pissarra@myndware.com">Myndware</a></li>
1307
+ </ul>
1308
+ </dd>
1309
+
1310
+
1311
+
1312
+
1313
+
1314
+
1315
+
1316
+
1317
+
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+ <p class="tag-source">
1324
+ <a href="admin_document.js.html" class="button">View Source</a>
1325
+ <span>
1326
+ <a href="admin_document.js.html">admin/document.js</a>, <a href="admin_document.js.html#line346">line 346</a>
1327
+ </span>
1328
+ </p>
1329
+
1330
+ </dl>
1331
+
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+ <div class='columns method-parameter'>
1350
+ <div class="column is-2"><label>Returns:</label></div>
1351
+ <div class="column is-10">
1352
+
1353
+
1354
+
1355
+ <div class="columns">
1356
+
1357
+ <div class='param-desc column is-7'>data the document data</div>
1358
+
1359
+
1360
+ <div class='column is-5 has-text-left'>
1361
+ <label>Type: </label>
1362
+
1363
+ <code class="param-type">Promise.&lt;object></code>
1364
+
1365
+
1366
+ </div>
1367
+
1368
+ </div>
1369
+
1370
+
1371
+ </div>
1372
+ </div>
1373
+
1374
+
1375
+
1376
+
1377
+ <h5>Example</h5>
1378
+
1379
+
1380
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
1381
+ const api = new API();
1382
+ const params - {
1383
+ id: '5dadd01dc4af3941d42f8c5c'
1384
+ };
1385
+ const apiKey: '...';
1386
+ await api.admin.document.getDocumentData(params, apiKey);</code></pre>
1387
+
1388
+
1389
+
1142
1390
  </div>
1143
1391
 
1144
1392
  <div class="member">
@@ -1857,7 +2105,7 @@ const { signedUrl, imageType } = await api.admin.document.signedUrl(params, apiK
1857
2105
  <p class="tag-source">
1858
2106
  <a href="admin_document.js.html" class="button">View Source</a>
1859
2107
  <span>
1860
- <a href="admin_document.js.html">admin/document.js</a>, <a href="admin_document.js.html#line270">line 270</a>
2108
+ <a href="admin_document.js.html">admin/document.js</a>, <a href="admin_document.js.html#line268">line 268</a>
1861
2109
  </span>
1862
2110
  </p>
1863
2111
 
@@ -2129,7 +2377,7 @@ await api.admin.document.updateContent(params, apiKey);</code></pre>
2129
2377
  <p class="tag-source">
2130
2378
  <a href="admin_document.js.html" class="button">View Source</a>
2131
2379
  <span>
2132
- <a href="admin_document.js.html">admin/document.js</a>, <a href="admin_document.js.html#line223">line 223</a>
2380
+ <a href="admin_document.js.html">admin/document.js</a>, <a href="admin_document.js.html#line222">line 222</a>
2133
2381
  </span>
2134
2382
  </p>
2135
2383
 
package/docs/Process.html CHANGED
@@ -2795,6 +2795,302 @@ await api.user.process.getProcessProperties(params, session);</code></pre>
2795
2795
 
2796
2796
 
2797
2797
 
2798
+ </div>
2799
+
2800
+ <div class="member">
2801
+
2802
+
2803
+
2804
+ <h4 class="name" id="getStepHistory">
2805
+ <a class="href-link" href="#getStepHistory">#</a>
2806
+
2807
+
2808
+ <span class='tag'>async</span>
2809
+
2810
+
2811
+ <span class="code-name">
2812
+
2813
+ getStepHistory<span class="signature">(params, session)</span><span class="type-signature"> &rarr; {Promise.&lt;Array>}</span>
2814
+
2815
+ </span>
2816
+ </h4>
2817
+
2818
+
2819
+
2820
+
2821
+ <div class="description">
2822
+ Get step history of a process flow
2823
+ </div>
2824
+
2825
+
2826
+
2827
+
2828
+
2829
+
2830
+
2831
+
2832
+
2833
+
2834
+ <h5>Parameters:</h5>
2835
+
2836
+ <div class="table-container">
2837
+ <table class="params table">
2838
+ <thead>
2839
+ <tr>
2840
+
2841
+ <th>Name</th>
2842
+
2843
+
2844
+ <th>Type</th>
2845
+
2846
+
2847
+
2848
+
2849
+
2850
+ <th class="last">Description</th>
2851
+ </tr>
2852
+ </thead>
2853
+
2854
+ <tbody>
2855
+
2856
+
2857
+
2858
+ <tr class="deep-level-0">
2859
+
2860
+ <td class="name"><code>params</code></td>
2861
+
2862
+
2863
+ <td class="type">
2864
+
2865
+
2866
+ <code class="param-type">object</code>
2867
+
2868
+
2869
+
2870
+ </td>
2871
+
2872
+
2873
+
2874
+
2875
+
2876
+ <td class="description last">Params to get step history</td>
2877
+ </tr>
2878
+
2879
+
2880
+
2881
+
2882
+ <tr class="deep-level-1">
2883
+
2884
+ <td class="name"><code>orgId</code></td>
2885
+
2886
+
2887
+ <td class="type">
2888
+
2889
+
2890
+ <code class="param-type">string</code>
2891
+
2892
+
2893
+
2894
+ </td>
2895
+
2896
+
2897
+
2898
+
2899
+
2900
+ <td class="description last">Organization id (_id database);</td>
2901
+ </tr>
2902
+
2903
+
2904
+
2905
+ <tr class="deep-level-1">
2906
+
2907
+ <td class="name"><code>processId</code></td>
2908
+
2909
+
2910
+ <td class="type">
2911
+
2912
+
2913
+ <code class="param-type">string</code>
2914
+
2915
+
2916
+
2917
+ </td>
2918
+
2919
+
2920
+
2921
+
2922
+
2923
+ <td class="description last">Process id (_id database);</td>
2924
+ </tr>
2925
+
2926
+
2927
+
2928
+ <tr class="deep-level-1">
2929
+
2930
+ <td class="name"><code>flowId</code></td>
2931
+
2932
+
2933
+ <td class="type">
2934
+
2935
+
2936
+ <code class="param-type">string</code>
2937
+
2938
+
2939
+
2940
+ </td>
2941
+
2942
+
2943
+
2944
+
2945
+
2946
+ <td class="description last">Flow id;</td>
2947
+ </tr>
2948
+
2949
+
2950
+
2951
+
2952
+
2953
+
2954
+
2955
+ <tr class="deep-level-0">
2956
+
2957
+ <td class="name"><code>session</code></td>
2958
+
2959
+
2960
+ <td class="type">
2961
+
2962
+
2963
+ <code class="param-type">string</code>
2964
+
2965
+
2966
+
2967
+ </td>
2968
+
2969
+
2970
+
2971
+
2972
+
2973
+ <td class="description last">Session, token JWT</td>
2974
+ </tr>
2975
+
2976
+
2977
+
2978
+ </tbody>
2979
+ </table>
2980
+ </div>
2981
+
2982
+
2983
+
2984
+
2985
+
2986
+ <dl class="details">
2987
+
2988
+
2989
+
2990
+
2991
+
2992
+
2993
+
2994
+
2995
+
2996
+
2997
+
2998
+
2999
+
3000
+
3001
+
3002
+
3003
+
3004
+
3005
+ <dt class="tag-author">Author:</dt>
3006
+ <dd class="tag-author">
3007
+ <ul>
3008
+ <li><a href="mailto:augusto.pissarra@myndware.com">Myndware</a></li>
3009
+ </ul>
3010
+ </dd>
3011
+
3012
+
3013
+
3014
+
3015
+
3016
+
3017
+
3018
+
3019
+
3020
+
3021
+
3022
+
3023
+
3024
+
3025
+ <p class="tag-source">
3026
+ <a href="user_process.js.html" class="button">View Source</a>
3027
+ <span>
3028
+ <a href="user_process.js.html">user/process.js</a>, <a href="user_process.js.html#line580">line 580</a>
3029
+ </span>
3030
+ </p>
3031
+
3032
+ </dl>
3033
+
3034
+
3035
+
3036
+
3037
+
3038
+
3039
+
3040
+
3041
+
3042
+
3043
+
3044
+
3045
+
3046
+
3047
+
3048
+
3049
+
3050
+
3051
+ <div class='columns method-parameter'>
3052
+ <div class="column is-2"><label>Returns:</label></div>
3053
+ <div class="column is-10">
3054
+
3055
+
3056
+
3057
+ <div class="columns">
3058
+
3059
+ <div class='param-desc column is-7'>Array of step history entries</div>
3060
+
3061
+
3062
+ <div class='column is-5 has-text-left'>
3063
+ <label>Type: </label>
3064
+
3065
+ <code class="param-type">Promise.&lt;Array></code>
3066
+
3067
+
3068
+ </div>
3069
+
3070
+ </div>
3071
+
3072
+
3073
+ </div>
3074
+ </div>
3075
+
3076
+
3077
+
3078
+
3079
+ <h5>Example</h5>
3080
+
3081
+
3082
+ <pre class="prettyprint"><code>const API = require('@docbrasil/api-systemmanager');
3083
+ const api = new API();
3084
+ const params = {
3085
+ orgId: '5edd11c46b6ce9729c2c297c',
3086
+ processId: '5dadd01dc4af3941d42f8c5c',
3087
+ flowId: 'Task_18v1xx7'
3088
+ }
3089
+ const session = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...';
3090
+ const stepHistory = await api.user.process.getStepHistory(params, session);</code></pre>
3091
+
3092
+
3093
+
2798
3094
  </div>
2799
3095
 
2800
3096
  <div class="member">