visualvault-api 1.1.0 → 1.2.0

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.
@@ -1,100 +1,109 @@
1
-
2
-
3
-
4
- # VisualVault URIs
5
- ApiUri: /api/v1/{custalias}/{custdbalias}
6
- FormsApiUri: /api/v1
7
- DocApiUri: /api/v1
8
- NotificationsApiUri: /api/v1
9
- AutheticateUri: /OAuth/Token
10
-
11
- # VisualVault endpoints
12
- ResourceUri:
13
- ConfigurationDocApi: /configuration/docapi
14
- ConfigurationFormsApi: /configuration/formsapi
15
- ConfigurationStudioApi: /configuration/studioapi
16
- ConfigurationNotificationApi: /configuration/notificationapi
17
- DocumentsPost: /documents
18
- DocumentsId: /documents/{id}
19
- DocumentsIdCopy: /documents/{id}/copy
20
- DocumentsIdMove: /documents/{id}/move
21
- DocumentIndexFields: /documents/{id}/indexfields
22
- DocumentAlertsId: /documents/{documentId}/alerts/{eventId}
23
- DocumentsIdOcr: /documents/{id}/ocr
24
- DocumentsIdRelateDocument: /documents/{id}/relateDocument
25
- DocumentsIdExpiration: /documents/{id}/expiration
26
- Files: /files
27
- FilesQuery: /files?q=
28
- FilesId: /files/{id}
29
- FormTemplates: /formtemplates
30
- FormTemplatesImport: /formtemplates/{id}/import
31
- Forms: /formtemplates/{id}/forms
32
- FormId: /formtemplates/{id}/forms/{formId}
33
- FormIdPdf: /formtemplates/{id}/forms/{formId}/pdf
34
- FormIdFields: /formtemplates/{id}/fields
35
- FormsId: /forms/{id}
36
- FormInstance: /forminstance/{id}
37
- FormInstanceRelatedDocs: /forminstance/{id}/documents
38
- FormInstanceRelatedForms: /forminstance/{id}/forms
39
- FormInstanceUpdateOriginator: /forminstance/{id}/updateOriginator
40
- FormDesignerFormsTemplatesIdFields: /formdesigner/forms/formtemplates/{id}/fields
41
- FormInstanceImage: /FormEntity/{id}/setFieldImage
42
- Sites: /sites
43
- ChangeUserSite: /sites/changeusersite
44
- User: /users
45
- Users: /sites/{id}/users
46
- UserWebToken: /users/{id}/webToken
47
- UsersGetJwt: /users/getjwt
48
- UserGroups: /users/{id}/groups
49
- UserSupervisors: /users/{id}/supervisors
50
- UserSupervisees: /users/{id}/supervisees
51
- UserById: /users/{id}
52
- UserDelete: /customerdatabase/{databaseId}/deleteuser/{authenticationUserId}
53
- UsersPassword: /users/{id}/password
54
- UsersIdUserId: /users/{id}/userId
55
- GetGroups: /groups
56
- Groups: /sites/{id}/groups
57
- GroupsUsers: /groups/{id}/users
58
- GroupsAddUser: /groups/{groupId}/users/{userId}
59
- Folders: /folders
60
- FoldersId: /folders/{id}
61
- FoldersCopy: /folders/copy
62
- FoldersMove: /folders/move
63
- FolderIndexFields: /folders/{id}/indexfields
64
- FoldersIdIndexFieldsId: /folders/{id}/indexfields/{indexFieldId}
65
- FolderAlertsId: /folders/{folderId}/alerts/{eventId}
66
- FolderSecurity: /folders/{folderId}/securitymembers
67
- FolderSecurityId: /folders/{folderId}/securitymembers/{memberId}
68
- Documents: /folders/{id}/documents
69
- Emails: /emails
70
- ScheduledProcess: /scheduledProcess
71
- CustomQuery: /customquery
72
- Scripts: /scripts
73
- ScriptsCompleteWf: /scripts/CompleteWorkflowScript
74
- ProjectAlertsId: /projects/{projectId}/alerts/{eventId}
75
- Customers: /customers
76
- CustomerInvite: /customers/invite
77
- CustomerInviteId: /customers/invite/{inviteCode}
78
- CustomerAssignUser: /customer/{customerId}/assignuser
79
- CustomerDatabaseAssignUser: /customerdatabase/{databaseId}/assignuser
80
- IndexFields: /indexfields
81
- OutsideProcesses: /outsideprocesses
82
- SecurityMembers: /securitymembers
83
- Layout: /layout
84
- ReportServerPDF: /ReportServer/{id}/PDF
85
- DocApi:
86
- GetRevision: /Documents/revisions/{id}
87
- OcrStatus: /Documents/ocr/{id}
88
- AdvancedSearch: /Search/Advanced
89
- FormsApi:
90
- FormInstance: /forminstance
91
- StudioApi:
92
- WorkflowLatestPublished: /workflows/latest/published
93
- WorkflowLatestPublishedId: /workflows/latest/published/{id}
94
- WorkflowVariables: /workflows/{id}/variables
95
- WorkflowRun: /workflows/{id}/revisions/{revision}/run
96
- WorkflowTerminate: /workflows/{workflowId}/instances/{instanceId}/complete
97
- WorkflowHistoryObject: /workflowhistories/{workflowId}/objects/{objectId}
98
- WorkflowHistoryRunningObject: /workflowhistories/{workflowId}/objects/{objectId}/running
99
- NotificationsApi:
100
- ForceUIRefresh: /Users/{id}/ForceUIRefresh
1
+
2
+
3
+
4
+ # VisualVault URIs
5
+ ApiUri: /api/v1/{custalias}/{custdbalias}
6
+ FormsApiUri: /api/v1
7
+ DocApiUri: /api/v1
8
+ NotificationsApiUri: /api/v1
9
+ AutheticateUri: /OAuth/Token
10
+
11
+ # VisualVault endpoints
12
+ ResourceUri:
13
+ ConfigurationDocApi: /configuration/docapi
14
+ ConfigurationFormsApi: /configuration/formsapi
15
+ ConfigurationObjectsApi: /configuration/objectsapi
16
+ ConfigurationStudioApi: /configuration/studioapi
17
+ ConfigurationNotificationApi: /configuration/notificationapi
18
+ DocumentsPost: /documents
19
+ DocumentsId: /documents/{id}
20
+ DocumentsIdCopy: /documents/{id}/copy
21
+ DocumentsIdMove: /documents/{id}/move
22
+ DocumentIndexFields: /documents/{id}/indexfields
23
+ DocumentAlertsId: /documents/{documentId}/alerts/{eventId}
24
+ DocumentsIdOcr: /documents/{id}/ocr
25
+ DocumentsIdRelateDocument: /documents/{id}/relateDocument
26
+ DocumentsIdExpiration: /documents/{id}/expiration
27
+ Files: /files
28
+ FilesQuery: /files?q=
29
+ FilesId: /files/{id}
30
+ FormTemplates: /formtemplates
31
+ FormTemplatesImport: /formtemplates/{id}/import
32
+ Forms: /formtemplates/{id}/forms
33
+ FormId: /formtemplates/{id}/forms/{formId}
34
+ FormIdPdf: /formtemplates/{id}/forms/{formId}/pdf
35
+ FormIdFields: /formtemplates/{id}/fields
36
+ FormsId: /forms/{id}
37
+ FormInstance: /forminstance/{id}
38
+ FormInstanceRelatedDocs: /forminstance/{id}/documents
39
+ FormInstanceRelatedForms: /forminstance/{id}/forms
40
+ FormInstanceUpdateOriginator: /forminstance/{id}/updateOriginator
41
+ FormDesignerFormsTemplatesIdFields: /formdesigner/forms/formtemplates/{id}/fields
42
+ FormInstanceImage: /FormEntity/{id}/setFieldImage
43
+ Sites: /sites
44
+ ChangeUserSite: /sites/changeusersite
45
+ User: /users
46
+ Users: /sites/{id}/users
47
+ UserWebToken: /users/{id}/webToken
48
+ UsersGetJwt: /users/getjwt
49
+ UserGroups: /users/{id}/groups
50
+ UserSupervisors: /users/{id}/supervisors
51
+ UserSupervisees: /users/{id}/supervisees
52
+ UserById: /users/{id}
53
+ UserDelete: /customerdatabase/{databaseId}/deleteuser/{authenticationUserId}
54
+ UsersPassword: /users/{id}/password
55
+ UsersIdUserId: /users/{id}/userId
56
+ UsersMe: /users/me
57
+ GetGroups: /groups
58
+ Groups: /sites/{id}/groups
59
+ GroupsUsers: /groups/{id}/users
60
+ GroupsAddUser: /groups/{groupId}/users/{userId}
61
+ Folders: /folders
62
+ FoldersId: /folders/{id}
63
+ FoldersCopy: /folders/copy
64
+ FoldersMove: /folders/move
65
+ FolderIndexFields: /folders/{id}/indexfields
66
+ FoldersIdIndexFieldsId: /folders/{id}/indexfields/{indexFieldId}
67
+ FolderAlertsId: /folders/{folderId}/alerts/{eventId}
68
+ FolderSecurity: /folders/{folderId}/securitymembers
69
+ FolderSecurityId: /folders/{folderId}/securitymembers/{memberId}
70
+ Documents: /folders/{id}/documents
71
+ Emails: /emails
72
+ ScheduledProcess: /scheduledProcess
73
+ CustomQuery: /customquery
74
+ Scripts: /scripts
75
+ ScriptsCompleteWf: /scripts/CompleteWorkflowScript
76
+ ProjectAlertsId: /projects/{projectId}/alerts/{eventId}
77
+ Customers: /customers
78
+ CustomerInvite: /customers/invite
79
+ CustomerInviteId: /customers/invite/{inviteCode}
80
+ CustomerAssignUser: /customer/{customerId}/assignuser
81
+ CustomerDatabaseAssignUser: /customerdatabase/{databaseId}/assignuser
82
+ IndexFields: /indexfields
83
+ OutsideProcesses: /outsideprocesses
84
+ SecurityMembers: /securitymembers
85
+ Layout: /layout
86
+ ReportServerPDF: /ReportServer/{id}/PDF
87
+ DocApi:
88
+ GetRevision: /Documents/revisions/{id}
89
+ OcrStatus: /Documents/ocr/{id}
90
+ AdvancedSearch: /Search/Advanced
91
+ FormsApi:
92
+ FormInstance: /forminstance
93
+ ObjectsApi:
94
+ Models: /models
95
+ ModelById: /models/{id}
96
+ Object: /object
97
+ ObjectById: /object/{id}
98
+ ObjectSearchByModelId: /object/search/{modelId}
99
+ StudioApi:
100
+ ResourceUserFeatures: /resources/userFeatures
101
+ WorkflowLatestPublished: /workflows/latest/published
102
+ WorkflowLatestPublishedId: /workflows/latest/published/{id}
103
+ WorkflowVariables: /workflows/{id}/variables
104
+ WorkflowRun: /workflows/{id}/revisions/{revision}/run
105
+ WorkflowTerminate: /workflows/{workflowId}/instances/{instanceId}/complete
106
+ WorkflowHistoryObject: /workflowhistories/{workflowId}/objects/{objectId}
107
+ WorkflowHistoryRunningObject: /workflowhistories/{workflowId}/objects/{objectId}/running
108
+ NotificationsApi:
109
+ ForceUIRefresh: /Users/{id}/ForceUIRefresh
@@ -0,0 +1,51 @@
1
+ var vvEntities = require("../VVRestApi");
2
+ var logger = require('../log');
3
+
4
+ module.exports.getCredentials = function () {
5
+ var options = {};
6
+ options.baseUrl = "http://localhost/VisualVault4_1_13";
7
+ options.customerAlias = "Cust"; //Change this to your customer name
8
+ options.databaseAlias = "Default"; //Make sure this is the right database
9
+ options.userId = "860028f6-0fbf-4a13-99fd-598dcaad6a36"; //Vaultaccess user with HTTP API Access Key/Secret generated in user properties.
10
+ options.password = "c5MCZasWnIeEerz6SnXQw5WGE1r3JIxN7LhR66E0APU=";
11
+ options.clientId = "860028f6-0fbf-4a13-99fd-598dcaad6a36";
12
+ options.clientSecret = "c5MCZasWnIeEerz6SnXQw5WGE1r3JIxN7LhR66E0APU=";
13
+ options.audience = "e98f5a306fed4a279a2837dee47751b6";
14
+ return options;
15
+ };
16
+
17
+
18
+ module.exports.main = function (vvClient, response, token) {
19
+ /*Script Name: NodeJSTestCommunicationScheduledProcess
20
+ Customer: Test
21
+ Purpose: Test to make sure communications between VV and NodeJS are working for new installations. Need to replace the credentials aboe with valid information. Setup as outside process, then as scheduled process. Run as scheduled process.
22
+ Date of Dev: 12/24/2014
23
+ Last Rev Date:
24
+ Revision Notes:
25
+ 12/24/2014 - Jason: First Setup of the script
26
+ */
27
+
28
+ var scheduledProcessGUID = token;
29
+
30
+ vvClient.documents.getDocuments().then(function(result){
31
+ var documents = JSON.parse(result);
32
+ console.log(documents);
33
+ for(var doc in documents.data){
34
+ console.log(documents.data[doc]);
35
+ vvClient.files.getFileBytesId(documents.data[doc]['documentId']).then(function(result2){
36
+ var templates = JSON.parse(result2);
37
+ console.log(templates)
38
+ });
39
+ }
40
+ })
41
+
42
+
43
+
44
+ response.json(200, 'COMMUNICATION ARRIVED SUCCESSFULLY. THIS IS A CUSTOM MESSAGE COMING BACK FROM THE NODEJS SERVER.');
45
+
46
+ logger.info('COMMUNICATION ARRIVED SUCCESSFULLY TO THE NODEJS SERVER.');
47
+
48
+ vvClient.scheduledProcess.postCompletion(scheduledProcessGUID, 'complete', true, "Scheduled Process End has completed.");
49
+
50
+
51
+ }
@@ -1,20 +1,20 @@
1
- var winston = require('winston');
2
-
3
- var os = require("os");
4
- var infoLogStreamName = 'nodejs-' + os.hostname().toLowerCase() + '-info';
5
- var errorLogStreamName = 'nodejs-' + os.hostname().toLowerCase() + '-error';
6
-
7
- const tsFormat = () => (new Date()).toUTCString();
8
-
9
- var logger = new (winston.Logger)({
10
- transports: [
11
- new (winston.transports.Console)({ timestamp: tsFormat }),
12
- new (winston.transports.File)({ timestamp: tsFormat, filename: infoLogStreamName + '.log' })
13
- ]
14
- });
15
-
16
-
17
- module.exports = logger;
18
-
19
-
20
-
1
+ var winston = require('winston');
2
+
3
+ var os = require("os");
4
+ var infoLogStreamName = 'nodejs-' + os.hostname().toLowerCase() + '-info';
5
+ var errorLogStreamName = 'nodejs-' + os.hostname().toLowerCase() + '-error';
6
+
7
+ const tsFormat = () => (new Date()).toUTCString();
8
+
9
+ var logger = new (winston.Logger)({
10
+ transports: [
11
+ new (winston.transports.Console)({ timestamp: tsFormat }),
12
+ new (winston.transports.File)({ timestamp: tsFormat, filename: infoLogStreamName + '.log' })
13
+ ]
14
+ });
15
+
16
+
17
+ module.exports = logger;
18
+
19
+
20
+
package/package.json CHANGED
@@ -1,98 +1,98 @@
1
- {
2
- "name": "visualvault-api",
3
- "version": "1.1.0",
4
- "description": "Simplifies the use of VisualVault REST APIs from a Node.Js app",
5
- "main": "lib/VVRestApi/VVRestApiNodeJs/VVRestApi.js",
6
- "_comments": [
7
- {
8
- "checkout-node-sdk-v5": "file:checkout-node-sdk-v5-5.4.0.tgz",
9
- "comment": "This dependency has been removed from the dependencies. It may be required to support a specific customer feature."
10
- }
11
- ],
12
- "dependencies": {
13
- "@aws-sdk/client-comprehend": "^3.418.0",
14
- "@esri/arcgis-rest-request": "^4.5.0",
15
- "amazon-textract-response-parser": "^0.3.1",
16
- "aws-sdk": "^2.1472.0",
17
- "axios": "^1.9.0",
18
- "body-parser": "^1.18.3",
19
- "cors": "^2.8.5",
20
- "cross-fetch": "^3.1.4",
21
- "csv": "^4.0.0",
22
- "currency.js": "^2.0.4",
23
- "dayjs": "^1.11.7",
24
- "digest-fetch": "^1.1.6",
25
- "ejs": "^2.6.1",
26
- "eml-parser": "^2.0.3",
27
- "exceljs": "^4.4.0",
28
- "express": "^4.16.3",
29
- "express-error-handler": "^1.1.0",
30
- "fetch": "^1.1.0",
31
- "file-type-es5": "^6.2.1",
32
- "form-data": "^4.0.2",
33
- "FormData": "^0.10.1",
34
- "https": "^1.0.0",
35
- "isomorphic-form-data": "^2.0.0",
36
- "js-yaml": "^2.1.3",
37
- "jsforce": "^1.9.1",
38
- "jsonwebtoken": "^9.0.2",
39
- "libreoffice-convert": "^1.5.1",
40
- "moment": "^2.22.2",
41
- "moment-business-days": "^1.2.0",
42
- "moment-timezone": "^0.5.23",
43
- "mssql": "^6.0.1",
44
- "multer": "^1.3.1",
45
- "node-fetch": "^2.6.1",
46
- "node-uuid": "^1.4.1",
47
- "p-limit": "^3.1.0",
48
- "parse-full-name": "^1.2.6",
49
- "pdf-lib": "^1.17.1",
50
- "pdf-merger-js": "^4.3.1",
51
- "properties-reader": "^2.3.0",
52
- "puppeteer": "^13.0.0",
53
- "q": "^0.9.7",
54
- "read-chunk": "^3.2.0",
55
- "request": "^2.27.0",
56
- "serve-favicon": "^2.5.0",
57
- "ssh2-sftp-client": "^8.1.0",
58
- "ssl-root-cas": "^1.3.1",
59
- "sweetalert2": "^11.17.2",
60
- "talisman": "^1.1.3",
61
- "text-encoder": "^0.0.4",
62
- "winston": "^2.4.2",
63
- "winston-cloudwatch": "^1.13.1",
64
- "winston-cloudwatch-transport": "^1.0.8"
65
- },
66
- "scripts": {
67
- "test": "echo \"Error: no test specified\" && exit 1",
68
- "prepublishOnly": "echo \"Ready to publish VVRestApi library\""
69
- },
70
- "keywords": [
71
- "visualvault",
72
- "api",
73
- "rest",
74
- "client",
75
- "document",
76
- "management",
77
- "forms",
78
- "nodejs"
79
- ],
80
- "engines": {
81
- "node": ">=20.0.0"
82
- },
83
- "files": [
84
- "lib/VVRestApi/**/*",
85
- "README.md",
86
- "package.json"
87
- ],
88
- "repository": {
89
- "type": "git",
90
- "url": "git+https://github.com/VisualVault/nodeJs-rest-client-library.git"
91
- },
92
- "author": "VisualVault",
93
- "license": "ISC",
94
- "bugs": {
95
- "url": "https://github.com/VisualVault/nodeJs-rest-client-library/issues"
96
- },
97
- "homepage": "https://github.com/VisualVault/nodeJs-rest-client-library#readme"
98
- }
1
+ {
2
+ "name": "visualvault-api",
3
+ "version": "1.2.0",
4
+ "description": "Simplifies the use of VisualVault REST APIs from a Node.Js app",
5
+ "main": "lib/VVRestApi/VVRestApiNodeJs/VVRestApi.js",
6
+ "_comments": [
7
+ {
8
+ "checkout-node-sdk-v5": "file:checkout-node-sdk-v5-5.4.0.tgz",
9
+ "comment": "This dependency has been removed from the dependencies. It may be required to support a specific customer feature."
10
+ }
11
+ ],
12
+ "dependencies": {
13
+ "@aws-sdk/client-comprehend": "^3.418.0",
14
+ "@esri/arcgis-rest-request": "^4.5.0",
15
+ "amazon-textract-response-parser": "^0.3.1",
16
+ "aws-sdk": "^2.1472.0",
17
+ "axios": "^1.9.0",
18
+ "body-parser": "^1.18.3",
19
+ "cors": "^2.8.5",
20
+ "cross-fetch": "^3.1.4",
21
+ "csv": "^4.0.0",
22
+ "currency.js": "^2.0.4",
23
+ "dayjs": "^1.11.7",
24
+ "digest-fetch": "^1.1.6",
25
+ "ejs": "^2.6.1",
26
+ "eml-parser": "^2.0.3",
27
+ "exceljs": "^4.4.0",
28
+ "express": "^4.16.3",
29
+ "express-error-handler": "^1.1.0",
30
+ "fetch": "^1.1.0",
31
+ "file-type-es5": "^6.2.1",
32
+ "form-data": "^4.0.2",
33
+ "FormData": "^0.10.1",
34
+ "https": "^1.0.0",
35
+ "isomorphic-form-data": "^2.0.0",
36
+ "js-yaml": "^2.1.3",
37
+ "jsforce": "^1.9.1",
38
+ "jsonwebtoken": "^9.0.2",
39
+ "libreoffice-convert": "^1.5.1",
40
+ "moment": "^2.22.2",
41
+ "moment-business-days": "^1.2.0",
42
+ "moment-timezone": "^0.5.23",
43
+ "mssql": "^6.0.1",
44
+ "multer": "^1.3.1",
45
+ "node-fetch": "^2.6.1",
46
+ "node-uuid": "^1.4.1",
47
+ "p-limit": "^3.1.0",
48
+ "parse-full-name": "^1.2.6",
49
+ "pdf-lib": "^1.17.1",
50
+ "pdf-merger-js": "^4.3.1",
51
+ "properties-reader": "^2.3.0",
52
+ "puppeteer": "^13.0.0",
53
+ "q": "^0.9.7",
54
+ "read-chunk": "^3.2.0",
55
+ "request": "^2.27.0",
56
+ "serve-favicon": "^2.5.0",
57
+ "ssh2-sftp-client": "^8.1.0",
58
+ "ssl-root-cas": "^1.3.1",
59
+ "sweetalert2": "^11.17.2",
60
+ "talisman": "^1.1.3",
61
+ "text-encoder": "^0.0.4",
62
+ "winston": "^2.4.2",
63
+ "winston-cloudwatch": "^1.13.1",
64
+ "winston-cloudwatch-transport": "^1.0.8"
65
+ },
66
+ "scripts": {
67
+ "test": "echo \"Error: no test specified\" && exit 1",
68
+ "prepublishOnly": "echo \"Ready to publish VVRestApi library\""
69
+ },
70
+ "keywords": [
71
+ "visualvault",
72
+ "api",
73
+ "rest",
74
+ "client",
75
+ "document",
76
+ "management",
77
+ "forms",
78
+ "nodejs"
79
+ ],
80
+ "engines": {
81
+ "node": ">=20.0.0"
82
+ },
83
+ "files": [
84
+ "lib/VVRestApi/**/*",
85
+ "README.md",
86
+ "package.json"
87
+ ],
88
+ "repository": {
89
+ "type": "git",
90
+ "url": "git+https://github.com/VisualVault/nodeJs-rest-client-library.git"
91
+ },
92
+ "author": "VisualVault",
93
+ "license": "ISC",
94
+ "bugs": {
95
+ "url": "https://github.com/VisualVault/nodeJs-rest-client-library/issues"
96
+ },
97
+ "homepage": "https://github.com/VisualVault/nodeJs-rest-client-library#readme"
98
+ }