visualvault-api 2.0.0-beta.0 → 2.0.0-beta.3

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/LICENSE CHANGED
@@ -1,21 +1,15 @@
1
- MIT License
1
+ ISC License
2
2
 
3
- Copyright (c) 2025 VisualVault
3
+ Copyright (c) 2025, VisualVault
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
11
8
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -1,148 +1,148 @@
1
- # visualvault-api
2
-
3
- ![Stability: Beta](https://img.shields.io/badge/stability-beta-yellow.svg)
4
-
5
- A Node.js client library that provides convenient access to the VisualVault REST API for server-side applications.
6
-
7
- ## Installation
8
-
9
- ```bash
10
- npm install visualvault-api
11
- ```
12
-
13
- ## Requirements
14
-
15
- - Node.js 20.0.0 or higher
16
-
17
- ## Quick Start
18
-
19
- ### Basic Authentication and Setup
20
-
21
- ```javascript
22
- // ES Modules (recommended)
23
- import vvRestApi from 'visualvault-api';
24
-
25
- // CommonJS
26
- const vvRestApi = require('visualvault-api');
27
-
28
- // Initialize authentication
29
- const auth = new vvRestApi.authorize();
30
-
31
- // Get authenticated client
32
- auth.getVaultApi(
33
- 'your-client-id',
34
- 'your-client-secret',
35
- 'username',
36
- 'password',
37
- 'your-audience',
38
- 'https://your-vault-url.com',
39
- 'customer-alias',
40
- 'database-alias'
41
- ).then(client => {
42
- console.log('Successfully authenticated!');
43
- // Use the client for API calls
44
- }).catch(error => {
45
- console.error('Authentication failed:', error);
46
- });
47
- ```
48
-
49
- ### JWT Authentication
50
-
51
- If you already have a JWT token:
52
-
53
- ```javascript
54
- const auth = new vvRestApi.authorize();
55
-
56
- auth.getVaultApiFromJwt(
57
- 'your-jwt-token',
58
- 'https://your-vault-url.com',
59
- 'customer-alias',
60
- 'database-alias',
61
- new Date('2024-12-31') // expiration date
62
- ).then(client => {
63
- console.log('JWT authentication successful!');
64
- }).catch(error => {
65
- console.error('JWT authentication failed:', error);
66
- });
67
- ```
68
-
69
- ## API Usage
70
-
71
- Once authenticated, the client provides access to various API modules. All methods return Promises.
72
-
73
- ```javascript
74
- // Example: Get forms by template name
75
- client.forms.getForms(params, 'Your Form Template Name')
76
- .then(response => {
77
- const forms = JSON.parse(response);
78
- console.log('Forms:', forms.data);
79
- });
80
-
81
- // Example: Execute a web service
82
- client.scripts.runWebService('YourWebServiceName', { param1: 'value1' })
83
- .then(response => {
84
- console.log('Web service result:', response);
85
- });
86
- ```
87
-
88
- ## API Modules
89
-
90
- The client provides access to the following VisualVault API modules:
91
-
92
- - **documents** - Document management operations
93
- - **forms** - Form template and instance operations
94
- - **library** - Folder and library management
95
- - **users** - User management operations
96
- - **groups** - Group management operations
97
- - **sites** - Site management operations
98
- - **files** - File upload/download operations
99
- - **scripts** - Web service execution
100
- - **customQuery** - Custom query execution
101
- - **email** - Email operations
102
- - **constants** - API constants and enums
103
- - **scheduledProcess** - Scheduled process management
104
- - **customer** - Customer management operations
105
- - **projects** - Project management operations
106
- - **indexFields** - Document Index field operations
107
- - **outsideProcesses** - Outside process management
108
- - **securityMembers** - Security member management
109
- - **reports** - Report generation
110
-
111
- ## Extended API Modules
112
-
113
- When enabled, the following additional API modules are available:
114
-
115
- - **docApi** - Enhanced document operations
116
- - **formsApi** - Enhanced forms operations
117
- - **objectsApi** - Object model operations
118
- - **studioApi** - Workflow and studio operations
119
- - **notificationsApi** - Real-time notifications
120
-
121
- ## Error Handling
122
-
123
- ```javascript
124
- client.documents.getDocuments(params, folderId)
125
- .then(response => {
126
- const result = JSON.parse(response);
127
- if (result.meta && result.meta.statusCode === 200) {
128
- console.log('Success:', result.data);
129
- } else {
130
- console.error('API Error:', result);
131
- }
132
- })
133
- .catch(error => {
134
- console.error('Request failed:', error);
135
- });
136
- ```
137
-
138
- ## Support
139
-
140
- For more information about the VisualVault API, visit the [VisualVault documentation](https://docs.visualvault.com/).
141
-
142
- ## License
143
-
144
- This project is licensed under the [MIT License](LICENSE).
145
-
146
- ## Contributing
147
-
148
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
1
+ # visualvault-api
2
+
3
+ ![Stability: Beta](https://img.shields.io/badge/stability-beta-yellow.svg)
4
+
5
+ A Node.js client library that provides convenient access to the VisualVault REST API for server-side applications.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install visualvault-api
11
+ ```
12
+
13
+ ## Requirements
14
+
15
+ - Node.js 20.0.0 or higher
16
+
17
+ ## Quick Start
18
+
19
+ ### Basic Authentication and Setup
20
+
21
+ ```javascript
22
+ // ES Modules (recommended)
23
+ import vvRestApi from 'visualvault-api';
24
+
25
+ // CommonJS
26
+ const vvRestApi = require('visualvault-api');
27
+
28
+ // Initialize authentication
29
+ const auth = new vvRestApi.authorize();
30
+
31
+ // Get authenticated client
32
+ auth.getVaultApi(
33
+ 'your-client-id',
34
+ 'your-client-secret',
35
+ 'username',
36
+ 'password',
37
+ 'your-audience',
38
+ 'https://your-vault-url.com',
39
+ 'customer-alias',
40
+ 'database-alias'
41
+ ).then(client => {
42
+ console.log('Successfully authenticated!');
43
+ // Use the client for API calls
44
+ }).catch(error => {
45
+ console.error('Authentication failed:', error);
46
+ });
47
+ ```
48
+
49
+ ### JWT Authentication
50
+
51
+ If you already have a JWT token:
52
+
53
+ ```javascript
54
+ const auth = new vvRestApi.authorize();
55
+
56
+ auth.getVaultApiFromJwt(
57
+ 'your-jwt-token',
58
+ 'https://your-vault-url.com',
59
+ 'customer-alias',
60
+ 'database-alias',
61
+ new Date('2024-12-31') // expiration date
62
+ ).then(client => {
63
+ console.log('JWT authentication successful!');
64
+ }).catch(error => {
65
+ console.error('JWT authentication failed:', error);
66
+ });
67
+ ```
68
+
69
+ ## API Usage
70
+
71
+ Once authenticated, the client provides access to various API modules. All methods return Promises.
72
+
73
+ ```javascript
74
+ // Example: Get forms by template name
75
+ client.forms.getForms(params, 'Your Form Template Name')
76
+ .then(response => {
77
+ const forms = JSON.parse(response);
78
+ console.log('Forms:', forms.data);
79
+ });
80
+
81
+ // Example: Execute a web service
82
+ client.scripts.runWebService('YourWebServiceName', { param1: 'value1' })
83
+ .then(response => {
84
+ console.log('Web service result:', response);
85
+ });
86
+ ```
87
+
88
+ ## API Modules
89
+
90
+ The client provides access to the following VisualVault API modules:
91
+
92
+ - **documents** - Document management operations
93
+ - **forms** - Form template and instance operations
94
+ - **library** - Folder and library management
95
+ - **users** - User management operations
96
+ - **groups** - Group management operations
97
+ - **sites** - Site management operations
98
+ - **files** - File upload/download operations
99
+ - **scripts** - Web service execution
100
+ - **customQuery** - Custom query execution
101
+ - **email** - Email operations
102
+ - **constants** - API constants and enums
103
+ - **scheduledProcess** - Scheduled process management
104
+ - **customer** - Customer management operations
105
+ - **projects** - Project management operations
106
+ - **indexFields** - Document Index field operations
107
+ - **outsideProcesses** - Outside process management
108
+ - **securityMembers** - Security member management
109
+ - **reports** - Report generation
110
+
111
+ ## Extended API Modules
112
+
113
+ When enabled, the following additional API modules are available:
114
+
115
+ - **docApi** - Enhanced document operations
116
+ - **formsApi** - Enhanced forms operations
117
+ - **objectsApi** - Object model operations
118
+ - **studioApi** - Workflow and studio operations
119
+ - **notificationsApi** - Real-time notifications
120
+
121
+ ## Error Handling
122
+
123
+ ```javascript
124
+ client.documents.getDocuments(params, folderId)
125
+ .then(response => {
126
+ const result = JSON.parse(response);
127
+ if (result.meta && result.meta.statusCode === 200) {
128
+ console.log('Success:', result.data);
129
+ } else {
130
+ console.error('API Error:', result);
131
+ }
132
+ })
133
+ .catch(error => {
134
+ console.error('Request failed:', error);
135
+ });
136
+ ```
137
+
138
+ ## Support
139
+
140
+ For more information about the VisualVault API, visit the [VisualVault documentation](https://docs.visualvault.com/).
141
+
142
+ ## License
143
+
144
+ This project is licensed under the [ISC License](LICENSE).
145
+
146
+ ## Contributing
147
+
148
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.