@docbrasil/api-systemmanager 1.0.107 → 1.0.108

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.
Files changed (73) hide show
  1. package/.github/workflows/static.yml +43 -0
  2. package/api/external.js +41 -0
  3. package/dist/bundle.cjs +41 -0
  4. package/dist/bundle.mjs +1 -1
  5. package/doc/api.md +382 -0
  6. package/docs/Admin.html +336 -0
  7. package/docs/AdminDocuments.html +2235 -0
  8. package/docs/AdminForm.html +934 -0
  9. package/docs/AdminLists.html +895 -0
  10. package/docs/AdminMessage.html +1490 -0
  11. package/docs/AdminNotification.html +1636 -0
  12. package/docs/AdminPlugin.html +696 -0
  13. package/docs/AdminPolicy.html +451 -0
  14. package/docs/AdminProcesses.html +692 -0
  15. package/docs/AdminTask.html +740 -0
  16. package/docs/AdminUser.html +1203 -0
  17. package/docs/Datasource.html +660 -0
  18. package/docs/Dispatch.html +624 -0
  19. package/docs/Documents.html +4875 -0
  20. package/docs/External.html +1203 -0
  21. package/docs/GeoLocation.html +503 -0
  22. package/docs/Login.html +1839 -0
  23. package/docs/Notification.html +625 -0
  24. package/docs/Organization.html +2767 -0
  25. package/docs/Process.html +1598 -0
  26. package/docs/Register.html +1604 -0
  27. package/docs/Session.html +482 -0
  28. package/docs/Task.html +1394 -0
  29. package/docs/TaskAvailable.html +893 -0
  30. package/docs/User.html +2002 -0
  31. package/docs/Users.html +569 -0
  32. package/docs/admin_doctypes.js.html +193 -0
  33. package/docs/admin_document.js.html +449 -0
  34. package/docs/admin_form.js.html +268 -0
  35. package/docs/admin_index.js.html +163 -0
  36. package/docs/admin_list.js.html +250 -0
  37. package/docs/admin_message.js.html +311 -0
  38. package/docs/admin_notification.js.html +350 -0
  39. package/docs/admin_organization.js.html +241 -0
  40. package/docs/admin_plugin.js.html +233 -0
  41. package/docs/admin_policy.js.html +195 -0
  42. package/docs/admin_processes.js.html +487 -0
  43. package/docs/admin_task.js.html +242 -0
  44. package/docs/admin_user.js.html +302 -0
  45. package/docs/dispatch.js.html +218 -0
  46. package/docs/external.js.html +333 -0
  47. package/docs/general_geoLocation.js.html +205 -0
  48. package/docs/general_index.js.html +140 -0
  49. package/docs/index.html +129 -0
  50. package/docs/login.js.html +384 -0
  51. package/docs/scripts/app.min.js +1 -0
  52. package/docs/scripts/linenumber.js +26 -0
  53. package/docs/scripts/search.js +39 -0
  54. package/docs/session.js.html +202 -0
  55. package/docs/styles/app.min.css +1 -0
  56. package/docs/styles/iframe.css +13 -0
  57. package/docs/styles/prettify-jsdoc.css +111 -0
  58. package/docs/styles/prettify-tomorrow.css +132 -0
  59. package/docs/styles/reset.css +44 -0
  60. package/docs/user_datasource.js.html +261 -0
  61. package/docs/user_document.js.html +847 -0
  62. package/docs/user_index.js.html +156 -0
  63. package/docs/user_notification.js.html +218 -0
  64. package/docs/user_organization.js.html +347 -0
  65. package/docs/user_process.js.html +352 -0
  66. package/docs/user_register.js.html +322 -0
  67. package/docs/user_task.js.html +319 -0
  68. package/docs/user_task_available.js.html +252 -0
  69. package/docs/user_user.js.html +404 -0
  70. package/docs/utils_promises.js.html +235 -0
  71. package/package.json +7 -4
  72. package/readme.md +7 -8
  73. package/doc.md +0 -653
@@ -0,0 +1,43 @@
1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name: Deploy static content to Pages
3
+
4
+ on:
5
+ # Runs on pushes targeting the default branch
6
+ push:
7
+ branches: ["develop"]
8
+
9
+ # Allows you to run this workflow manually from the Actions tab
10
+ workflow_dispatch:
11
+
12
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+ permissions:
14
+ contents: read
15
+ pages: write
16
+ id-token: write
17
+
18
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20
+ concurrency:
21
+ group: "pages"
22
+ cancel-in-progress: false
23
+
24
+ jobs:
25
+ # Single deploy job since we're just deploying
26
+ deploy:
27
+ environment:
28
+ name: github-pages
29
+ url: ${{ steps.deployment.outputs.page_url }}
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - name: Checkout
33
+ uses: actions/checkout@v3
34
+ - name: Setup Pages
35
+ uses: actions/configure-pages@v3
36
+ - name: Upload artifact
37
+ uses: actions/upload-pages-artifact@v1
38
+ with:
39
+ # Upload entire repository
40
+ path: '.'
41
+ - name: Deploy to GitHub Pages
42
+ id: deployment
43
+ uses: actions/deploy-pages@v2
package/api/external.js CHANGED
@@ -124,6 +124,47 @@ class External {
124
124
  }
125
125
  }
126
126
 
127
+ /**
128
+ * @author CloudBrasil <abernardo.br@gmail.com>
129
+ * @description Get an upload signed url, for many documents. So it will be possible to upload documents temporarily during the use of the external form
130
+ * @param {array<object>} docs the list of documents
131
+ * @param {string} docs.mime the mime type of the document
132
+ * @param {string} authorization a legal authorization
133
+ * @returns {Promise<array>} docs
134
+ * @returns {string} docs.mime the original mime type of the document
135
+ * @returns {string} docs.signedUrl the signed url to upload the document
136
+ * @returns {string} docs.filename the filename of the uploaded file
137
+ * @returns {string} docs.extension the extension of the filename, obtained from the mime type
138
+ * @public
139
+ * @async
140
+ * @example
141
+ *
142
+ * const API = require('@docbrasil/api-systemmanager');
143
+ * const api = new API();
144
+ * const authorization = '...';
145
+ * const docs = [
146
+ * {
147
+ * mime: 'application/pdf'
148
+ * }
149
+ * ];
150
+ * const retDocs = await api.external.getUploadDocumentsSignedUrl(docs, authorization);
151
+ */
152
+ async getUploadDocumentSignedUrl(docs, authorization) {
153
+ const self = this;
154
+
155
+ try {
156
+ Joi.assert(docs, Joi.string().array().error(new Error('docs is required')));
157
+ Joi.assert(authorization, Joi.string().required().error(new Error('authorization is required')));
158
+
159
+ const apiCall = self._client
160
+ .post(`/external/forms/upload/signedurls`, docs, self._setHeader(authorization));
161
+
162
+ return self._returnData(await apiCall);
163
+ } catch (ex) {
164
+ throw ex;
165
+ }
166
+ }
167
+
127
168
  /**
128
169
  * @author CloudBrasil <abernardo.br@gmail.com>
129
170
  * @description Handles the execution of an external form
package/dist/bundle.cjs CHANGED
@@ -11745,6 +11745,47 @@ class External {
11745
11745
  }
11746
11746
  }
11747
11747
 
11748
+ /**
11749
+ * @author CloudBrasil <abernardo.br@gmail.com>
11750
+ * @description Get an upload signed url, for many documents. So it will be possible to upload documents temporarily during the use of the external form
11751
+ * @param {array<object>} docs the list of documents
11752
+ * @param {string} docs.mime the mime type of the document
11753
+ * @param {string} authorization a legal authorization
11754
+ * @returns {Promise<array>} docs
11755
+ * @returns {string} docs.mime the original mime type of the document
11756
+ * @returns {string} docs.signedUrl the signed url to upload the document
11757
+ * @returns {string} docs.filename the filename of the uploaded file
11758
+ * @returns {string} docs.extension the extension of the filename, obtained from the mime type
11759
+ * @public
11760
+ * @async
11761
+ * @example
11762
+ *
11763
+ * const API = require('@docbrasil/api-systemmanager');
11764
+ * const api = new API();
11765
+ * const authorization = '...';
11766
+ * const docs = [
11767
+ * {
11768
+ * mime: 'application/pdf'
11769
+ * }
11770
+ * ];
11771
+ * const retDocs = await api.external.getUploadDocumentsSignedUrl(docs, authorization);
11772
+ */
11773
+ async getUploadDocumentSignedUrl(docs, authorization) {
11774
+ const self = this;
11775
+
11776
+ try {
11777
+ Joi__default["default"].assert(docs, Joi__default["default"].string().array().error(new Error('docs is required')));
11778
+ Joi__default["default"].assert(authorization, Joi__default["default"].string().required().error(new Error('authorization is required')));
11779
+
11780
+ const apiCall = self._client
11781
+ .post(`/external/forms/upload/signedurls`, docs, self._setHeader(authorization));
11782
+
11783
+ return self._returnData(await apiCall);
11784
+ } catch (ex) {
11785
+ throw ex;
11786
+ }
11787
+ }
11788
+
11748
11789
  /**
11749
11790
  * @author CloudBrasil <abernardo.br@gmail.com>
11750
11791
  * @description Handles the execution of an external form