files.com 1.2.263 → 1.2.265
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/_VERSION +1 -1
- package/docs/models/As2Partner.md +10 -3
- package/docs/models/RemoteMountBackend.md +199 -0
- package/lib/Files.js +1 -1
- package/lib/models/As2Partner.js +57 -36
- package/lib/models/RemoteMountBackend.js +657 -0
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/As2Partner.js +20 -3
- package/src/models/RemoteMountBackend.js +427 -0
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.265
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"default_mime_type": "application/octet-stream",
|
|
17
17
|
"mdn_validation_level": "none",
|
|
18
|
+
"signature_validation_level": "normal",
|
|
18
19
|
"enable_dedicated_ips": true,
|
|
19
20
|
"hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
|
|
20
21
|
"public_certificate": "example",
|
|
@@ -35,7 +36,8 @@
|
|
|
35
36
|
* `http_auth_username` (string): Username to send to server for HTTP Authentication.
|
|
36
37
|
* `additional_http_headers` (object): Additional HTTP Headers for outgoing message sent to this partner.
|
|
37
38
|
* `default_mime_type` (string): Default mime type of the file attached to the encrypted message
|
|
38
|
-
* `mdn_validation_level` (string): How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
|
|
39
|
+
* `mdn_validation_level` (string): How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates. `auto`: Automatically set the correct value for this setting based on next mdn received.
|
|
40
|
+
* `signature_validation_level` (string): Should Files.com require signatures on incoming AS2 messages? `normal`: require that incoming messages are signed with a valid matching signature. `none`: Unsigned incoming messages are allowed. `auto`: Automatically set the correct value for this setting based on next message received.
|
|
39
41
|
* `enable_dedicated_ips` (boolean): If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
|
|
40
42
|
* `hex_public_certificate_serial` (string): Serial of public certificate used for message security in hex format.
|
|
41
43
|
* `public_certificate` (string): Public certificate used for message security.
|
|
@@ -83,6 +85,7 @@ await As2Partner.create({
|
|
|
83
85
|
'enable_dedicated_ips': true,
|
|
84
86
|
'http_auth_username': "username",
|
|
85
87
|
'mdn_validation_level': "none",
|
|
88
|
+
'signature_validation_level': "normal",
|
|
86
89
|
'server_certificate': "require_match",
|
|
87
90
|
'default_mime_type': "application/octet-stream",
|
|
88
91
|
'additional_http_headers': {"key":"example value"},
|
|
@@ -99,7 +102,8 @@ await As2Partner.create({
|
|
|
99
102
|
* `enable_dedicated_ips` (boolean): If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
|
|
100
103
|
* `http_auth_username` (string): Username to send to server for HTTP Authentication.
|
|
101
104
|
* `http_auth_password` (string): Password to send to server for HTTP Authentication.
|
|
102
|
-
* `mdn_validation_level` (string): How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
|
|
105
|
+
* `mdn_validation_level` (string): How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates. `auto`: Automatically set the correct value for this setting based on next mdn received.
|
|
106
|
+
* `signature_validation_level` (string): Should Files.com require signatures on incoming AS2 messages? `normal`: require that incoming messages are signed with a valid matching signature. `none`: Unsigned incoming messages are allowed. `auto`: Automatically set the correct value for this setting based on next message received.
|
|
103
107
|
* `server_certificate` (string): Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS? (This only applies to Outgoing AS2 message from Files.com to a Partner.)
|
|
104
108
|
* `default_mime_type` (string): Default mime type of the file attached to the encrypted message
|
|
105
109
|
* `additional_http_headers` (object): Additional HTTP Headers for outgoing message sent to this partner.
|
|
@@ -119,6 +123,7 @@ await as2_partner.update({
|
|
|
119
123
|
'enable_dedicated_ips': true,
|
|
120
124
|
'http_auth_username': "username",
|
|
121
125
|
'mdn_validation_level': "none",
|
|
126
|
+
'signature_validation_level': "normal",
|
|
122
127
|
'server_certificate': "require_match",
|
|
123
128
|
'default_mime_type': "application/octet-stream",
|
|
124
129
|
'additional_http_headers': {"key":"example value"},
|
|
@@ -134,7 +139,8 @@ await as2_partner.update({
|
|
|
134
139
|
* `enable_dedicated_ips` (boolean): If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
|
|
135
140
|
* `http_auth_username` (string): Username to send to server for HTTP Authentication.
|
|
136
141
|
* `http_auth_password` (string): Password to send to server for HTTP Authentication.
|
|
137
|
-
* `mdn_validation_level` (string): How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
|
|
142
|
+
* `mdn_validation_level` (string): How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates. `auto`: Automatically set the correct value for this setting based on next mdn received.
|
|
143
|
+
* `signature_validation_level` (string): Should Files.com require signatures on incoming AS2 messages? `normal`: require that incoming messages are signed with a valid matching signature. `none`: Unsigned incoming messages are allowed. `auto`: Automatically set the correct value for this setting based on next message received.
|
|
138
144
|
* `server_certificate` (string): Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS? (This only applies to Outgoing AS2 message from Files.com to a Partner.)
|
|
139
145
|
* `default_mime_type` (string): Default mime type of the file attached to the encrypted message
|
|
140
146
|
* `additional_http_headers` (object): Additional HTTP Headers for outgoing message sent to this partner.
|
|
@@ -157,6 +163,7 @@ await as2_partner.update({
|
|
|
157
163
|
},
|
|
158
164
|
"default_mime_type": "application/octet-stream",
|
|
159
165
|
"mdn_validation_level": "none",
|
|
166
|
+
"signature_validation_level": "normal",
|
|
160
167
|
"enable_dedicated_ips": true,
|
|
161
168
|
"hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
|
|
162
169
|
"public_certificate": "example",
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# RemoteMountBackend
|
|
2
|
+
|
|
3
|
+
## Example RemoteMountBackend Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"canary_file_path": "backend1.txt",
|
|
8
|
+
"enabled": true,
|
|
9
|
+
"fall": 1,
|
|
10
|
+
"health_check_enabled": true,
|
|
11
|
+
"health_check_type": "active",
|
|
12
|
+
"interval": 60,
|
|
13
|
+
"min_free_cpu": 1.0,
|
|
14
|
+
"min_free_mem": 1.0,
|
|
15
|
+
"priority": 1,
|
|
16
|
+
"remote_path": "/path/on/remote",
|
|
17
|
+
"remote_server_id": 1,
|
|
18
|
+
"remote_server_mount_id": 1,
|
|
19
|
+
"rise": 1,
|
|
20
|
+
"status": "healthy",
|
|
21
|
+
"undergoing_maintenance": true
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
* `canary_file_path` (string): Path to the canary file used for health checks.
|
|
26
|
+
* `enabled` (boolean): True if this backend is enabled.
|
|
27
|
+
* `fall` (int64): Number of consecutive failures before considering the backend unhealthy.
|
|
28
|
+
* `health_check_enabled` (boolean): True if health checks are enabled for this backend.
|
|
29
|
+
* `health_check_type` (string): Type of health check to perform.
|
|
30
|
+
* `interval` (int64): Interval in seconds between health checks.
|
|
31
|
+
* `min_free_cpu` (double): Minimum free CPU percentage required for this backend to be considered healthy.
|
|
32
|
+
* `min_free_mem` (double): Minimum free memory percentage required for this backend to be considered healthy.
|
|
33
|
+
* `priority` (int64): Priority of this backend.
|
|
34
|
+
* `remote_path` (string): Path on the remote server to treat as the root of this mount.
|
|
35
|
+
* `remote_server_id` (int64): The remote server that this backend is associated with.
|
|
36
|
+
* `remote_server_mount_id` (int64): The mount ID of the Remote Server Mount that this backend is associated with.
|
|
37
|
+
* `rise` (int64): Number of consecutive successes before considering the backend healthy.
|
|
38
|
+
* `status` (string): Status of this backend.
|
|
39
|
+
* `undergoing_maintenance` (boolean): True if this backend is undergoing maintenance.
|
|
40
|
+
* `id` (int64): Remote Mount Backend ID.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## List Remote Mount Backends
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
await RemoteMountBackend.list
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
54
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Show Remote Mount Backend
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
await RemoteMountBackend.find(id)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Parameters
|
|
66
|
+
|
|
67
|
+
* `id` (int64): Required - Remote Mount Backend ID.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Create Remote Mount Backend
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
await RemoteMountBackend.create({
|
|
75
|
+
'canary_file_path': "backend1.txt",
|
|
76
|
+
'remote_server_mount_id': 1,
|
|
77
|
+
'remote_server_id': 1,
|
|
78
|
+
'enabled': true,
|
|
79
|
+
'fall': 1,
|
|
80
|
+
'health_check_enabled': true,
|
|
81
|
+
'health_check_type': "active",
|
|
82
|
+
'interval': 60,
|
|
83
|
+
'min_free_cpu': 1.0,
|
|
84
|
+
'min_free_mem': 1.0,
|
|
85
|
+
'priority': 1,
|
|
86
|
+
'remote_path': "/path/on/remote",
|
|
87
|
+
'rise': 1,
|
|
88
|
+
})
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Parameters
|
|
93
|
+
|
|
94
|
+
* `canary_file_path` (string): Required - Path to the canary file used for health checks.
|
|
95
|
+
* `remote_server_mount_id` (int64): Required - The mount ID of the Remote Server Mount that this backend is associated with.
|
|
96
|
+
* `remote_server_id` (int64): Required - The remote server that this backend is associated with.
|
|
97
|
+
* `enabled` (boolean): True if this backend is enabled.
|
|
98
|
+
* `fall` (int64): Number of consecutive failures before considering the backend unhealthy.
|
|
99
|
+
* `health_check_enabled` (boolean): True if health checks are enabled for this backend.
|
|
100
|
+
* `health_check_type` (string): Type of health check to perform.
|
|
101
|
+
* `interval` (int64): Interval in seconds between health checks.
|
|
102
|
+
* `min_free_cpu` (double): Minimum free CPU percentage required for this backend to be considered healthy.
|
|
103
|
+
* `min_free_mem` (double): Minimum free memory percentage required for this backend to be considered healthy.
|
|
104
|
+
* `priority` (int64): Priority of this backend.
|
|
105
|
+
* `remote_path` (string): Path on the remote server to treat as the root of this mount.
|
|
106
|
+
* `rise` (int64): Number of consecutive successes before considering the backend healthy.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Reset backend status to healthy
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
const remote_mount_backend = await RemoteMountBackend.find(id)
|
|
114
|
+
|
|
115
|
+
await remote_mount_backend.reset_status()
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Parameters
|
|
119
|
+
|
|
120
|
+
* `id` (int64): Required - Remote Mount Backend ID.
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Update Remote Mount Backend
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
const remote_mount_backend = await RemoteMountBackend.find(id)
|
|
129
|
+
|
|
130
|
+
await remote_mount_backend.update({
|
|
131
|
+
'canary_file_path': "backend1.txt",
|
|
132
|
+
'remote_server_mount_id': 1,
|
|
133
|
+
'remote_server_id': 1,
|
|
134
|
+
'enabled': true,
|
|
135
|
+
'fall': 1,
|
|
136
|
+
'health_check_enabled': true,
|
|
137
|
+
'health_check_type': "active",
|
|
138
|
+
'interval': 60,
|
|
139
|
+
'min_free_cpu': 1.0,
|
|
140
|
+
'min_free_mem': 1.0,
|
|
141
|
+
'priority': 1,
|
|
142
|
+
'remote_path': "/path/on/remote",
|
|
143
|
+
'rise': 1,
|
|
144
|
+
})
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Parameters
|
|
148
|
+
|
|
149
|
+
* `id` (int64): Required - Remote Mount Backend ID.
|
|
150
|
+
* `canary_file_path` (string): Required - Path to the canary file used for health checks.
|
|
151
|
+
* `remote_server_mount_id` (int64): Required - The mount ID of the Remote Server Mount that this backend is associated with.
|
|
152
|
+
* `remote_server_id` (int64): Required - The remote server that this backend is associated with.
|
|
153
|
+
* `enabled` (boolean): True if this backend is enabled.
|
|
154
|
+
* `fall` (int64): Number of consecutive failures before considering the backend unhealthy.
|
|
155
|
+
* `health_check_enabled` (boolean): True if health checks are enabled for this backend.
|
|
156
|
+
* `health_check_type` (string): Type of health check to perform.
|
|
157
|
+
* `interval` (int64): Interval in seconds between health checks.
|
|
158
|
+
* `min_free_cpu` (double): Minimum free CPU percentage required for this backend to be considered healthy.
|
|
159
|
+
* `min_free_mem` (double): Minimum free memory percentage required for this backend to be considered healthy.
|
|
160
|
+
* `priority` (int64): Priority of this backend.
|
|
161
|
+
* `remote_path` (string): Path on the remote server to treat as the root of this mount.
|
|
162
|
+
* `rise` (int64): Number of consecutive successes before considering the backend healthy.
|
|
163
|
+
|
|
164
|
+
### Example Response
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"canary_file_path": "backend1.txt",
|
|
169
|
+
"enabled": true,
|
|
170
|
+
"fall": 1,
|
|
171
|
+
"health_check_enabled": true,
|
|
172
|
+
"health_check_type": "active",
|
|
173
|
+
"interval": 60,
|
|
174
|
+
"min_free_cpu": 1.0,
|
|
175
|
+
"min_free_mem": 1.0,
|
|
176
|
+
"priority": 1,
|
|
177
|
+
"remote_path": "/path/on/remote",
|
|
178
|
+
"remote_server_id": 1,
|
|
179
|
+
"remote_server_mount_id": 1,
|
|
180
|
+
"rise": 1,
|
|
181
|
+
"status": "healthy",
|
|
182
|
+
"undergoing_maintenance": true
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Delete Remote Mount Backend
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
const remote_mount_backend = await RemoteMountBackend.find(id)
|
|
192
|
+
|
|
193
|
+
await remote_mount_backend.delete()
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Parameters
|
|
197
|
+
|
|
198
|
+
* `id` (int64): Required - Remote Mount Backend ID.
|
|
199
|
+
|
package/lib/Files.js
CHANGED
|
@@ -12,7 +12,7 @@ var apiKey;
|
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
14
|
var language = null;
|
|
15
|
-
var version = '1.2.
|
|
15
|
+
var version = '1.2.265';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|
package/lib/models/As2Partner.js
CHANGED
|
@@ -88,13 +88,20 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
|
88
88
|
(0, _defineProperty2.default)(this, "setDefaultMimeType", function (value) {
|
|
89
89
|
_this.attributes.default_mime_type = value;
|
|
90
90
|
});
|
|
91
|
-
// string # How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
|
|
91
|
+
// string # How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates. `auto`: Automatically set the correct value for this setting based on next mdn received.
|
|
92
92
|
(0, _defineProperty2.default)(this, "getMdnValidationLevel", function () {
|
|
93
93
|
return _this.attributes.mdn_validation_level;
|
|
94
94
|
});
|
|
95
95
|
(0, _defineProperty2.default)(this, "setMdnValidationLevel", function (value) {
|
|
96
96
|
_this.attributes.mdn_validation_level = value;
|
|
97
97
|
});
|
|
98
|
+
// string # Should Files.com require signatures on incoming AS2 messages? `normal`: require that incoming messages are signed with a valid matching signature. `none`: Unsigned incoming messages are allowed. `auto`: Automatically set the correct value for this setting based on next message received.
|
|
99
|
+
(0, _defineProperty2.default)(this, "getSignatureValidationLevel", function () {
|
|
100
|
+
return _this.attributes.signature_validation_level;
|
|
101
|
+
});
|
|
102
|
+
(0, _defineProperty2.default)(this, "setSignatureValidationLevel", function (value) {
|
|
103
|
+
_this.attributes.signature_validation_level = value;
|
|
104
|
+
});
|
|
98
105
|
// boolean # If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
|
|
99
106
|
(0, _defineProperty2.default)(this, "getEnableDedicatedIps", function () {
|
|
100
107
|
return _this.attributes.enable_dedicated_ips;
|
|
@@ -169,7 +176,8 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
|
169
176
|
// enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
|
|
170
177
|
// http_auth_username - string - Username to send to server for HTTP Authentication.
|
|
171
178
|
// http_auth_password - string - Password to send to server for HTTP Authentication.
|
|
172
|
-
// mdn_validation_level - string - How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
|
|
179
|
+
// mdn_validation_level - string - How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates. `auto`: Automatically set the correct value for this setting based on next mdn received.
|
|
180
|
+
// signature_validation_level - string - Should Files.com require signatures on incoming AS2 messages? `normal`: require that incoming messages are signed with a valid matching signature. `none`: Unsigned incoming messages are allowed. `auto`: Automatically set the correct value for this setting based on next message received.
|
|
173
181
|
// server_certificate - string - Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS? (This only applies to Outgoing AS2 message from Files.com to a Partner.)
|
|
174
182
|
// default_mime_type - string - Default mime type of the file attached to the encrypted message
|
|
175
183
|
// additional_http_headers - object - Additional HTTP Headers for outgoing message sent to this partner.
|
|
@@ -221,56 +229,62 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
|
|
|
221
229
|
}
|
|
222
230
|
throw new errors.InvalidParameterError("Bad parameter: mdn_validation_level must be of type String, received ".concat((0, _utils.getType)(params.mdn_validation_level)));
|
|
223
231
|
case 6:
|
|
224
|
-
if (!(params.
|
|
232
|
+
if (!(params.signature_validation_level && !(0, _utils.isString)(params.signature_validation_level))) {
|
|
225
233
|
_context.next = 7;
|
|
226
234
|
break;
|
|
227
235
|
}
|
|
228
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
236
|
+
throw new errors.InvalidParameterError("Bad parameter: signature_validation_level must be of type String, received ".concat((0, _utils.getType)(params.signature_validation_level)));
|
|
229
237
|
case 7:
|
|
230
|
-
if (!(params.
|
|
238
|
+
if (!(params.server_certificate && !(0, _utils.isString)(params.server_certificate))) {
|
|
231
239
|
_context.next = 8;
|
|
232
240
|
break;
|
|
233
241
|
}
|
|
234
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
242
|
+
throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
|
|
235
243
|
case 8:
|
|
236
|
-
if (!(params.
|
|
244
|
+
if (!(params.default_mime_type && !(0, _utils.isString)(params.default_mime_type))) {
|
|
237
245
|
_context.next = 9;
|
|
238
246
|
break;
|
|
239
247
|
}
|
|
240
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
248
|
+
throw new errors.InvalidParameterError("Bad parameter: default_mime_type must be of type String, received ".concat((0, _utils.getType)(params.default_mime_type)));
|
|
241
249
|
case 9:
|
|
242
|
-
if (!(params.
|
|
250
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
243
251
|
_context.next = 10;
|
|
244
252
|
break;
|
|
245
253
|
}
|
|
246
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
254
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
247
255
|
case 10:
|
|
248
|
-
if (!(params.
|
|
256
|
+
if (!(params.uri && !(0, _utils.isString)(params.uri))) {
|
|
249
257
|
_context.next = 11;
|
|
250
258
|
break;
|
|
251
259
|
}
|
|
252
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
260
|
+
throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params.uri)));
|
|
253
261
|
case 11:
|
|
262
|
+
if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
|
|
263
|
+
_context.next = 12;
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
|
|
267
|
+
case 12:
|
|
254
268
|
if (params.id) {
|
|
255
|
-
_context.next =
|
|
269
|
+
_context.next = 14;
|
|
256
270
|
break;
|
|
257
271
|
}
|
|
258
272
|
if (!_this.attributes.id) {
|
|
259
|
-
_context.next =
|
|
273
|
+
_context.next = 13;
|
|
260
274
|
break;
|
|
261
275
|
}
|
|
262
276
|
params.id = _this.id;
|
|
263
|
-
_context.next =
|
|
277
|
+
_context.next = 14;
|
|
264
278
|
break;
|
|
265
|
-
case 12:
|
|
266
|
-
throw new errors.MissingParameterError('Parameter missing: id');
|
|
267
279
|
case 13:
|
|
268
|
-
|
|
269
|
-
return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
280
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
|
270
281
|
case 14:
|
|
282
|
+
_context.next = 15;
|
|
283
|
+
return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
284
|
+
case 15:
|
|
271
285
|
response = _context.sent;
|
|
272
286
|
return _context.abrupt("return", new As2Partner(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
273
|
-
case
|
|
287
|
+
case 16:
|
|
274
288
|
case "end":
|
|
275
289
|
return _context.stop();
|
|
276
290
|
}
|
|
@@ -470,7 +484,8 @@ _As2Partner = As2Partner;
|
|
|
470
484
|
// enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
|
|
471
485
|
// http_auth_username - string - Username to send to server for HTTP Authentication.
|
|
472
486
|
// http_auth_password - string - Password to send to server for HTTP Authentication.
|
|
473
|
-
// mdn_validation_level - string - How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
|
|
487
|
+
// mdn_validation_level - string - How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates. `auto`: Automatically set the correct value for this setting based on next mdn received.
|
|
488
|
+
// signature_validation_level - string - Should Files.com require signatures on incoming AS2 messages? `normal`: require that incoming messages are signed with a valid matching signature. `none`: Unsigned incoming messages are allowed. `auto`: Automatically set the correct value for this setting based on next message received.
|
|
474
489
|
// server_certificate - string - Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS? (This only applies to Outgoing AS2 message from Files.com to a Partner.)
|
|
475
490
|
// default_mime_type - string - Default mime type of the file attached to the encrypted message
|
|
476
491
|
// additional_http_headers - object - Additional HTTP Headers for outgoing message sent to this partner.
|
|
@@ -530,48 +545,54 @@ _As2Partner = As2Partner;
|
|
|
530
545
|
}
|
|
531
546
|
throw new errors.InvalidParameterError("Bad parameter: mdn_validation_level must be of type String, received ".concat((0, _utils.getType)(params.mdn_validation_level)));
|
|
532
547
|
case 7:
|
|
533
|
-
if (!(params.
|
|
548
|
+
if (!(params.signature_validation_level && !(0, _utils.isString)(params.signature_validation_level))) {
|
|
534
549
|
_context6.next = 8;
|
|
535
550
|
break;
|
|
536
551
|
}
|
|
537
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
552
|
+
throw new errors.InvalidParameterError("Bad parameter: signature_validation_level must be of type String, received ".concat((0, _utils.getType)(params.signature_validation_level)));
|
|
538
553
|
case 8:
|
|
539
|
-
if (!(params.
|
|
554
|
+
if (!(params.server_certificate && !(0, _utils.isString)(params.server_certificate))) {
|
|
540
555
|
_context6.next = 9;
|
|
541
556
|
break;
|
|
542
557
|
}
|
|
543
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
558
|
+
throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
|
|
544
559
|
case 9:
|
|
545
|
-
if (!(params.
|
|
560
|
+
if (!(params.default_mime_type && !(0, _utils.isString)(params.default_mime_type))) {
|
|
546
561
|
_context6.next = 10;
|
|
547
562
|
break;
|
|
548
563
|
}
|
|
549
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
564
|
+
throw new errors.InvalidParameterError("Bad parameter: default_mime_type must be of type String, received ".concat((0, _utils.getType)(params.default_mime_type)));
|
|
550
565
|
case 10:
|
|
551
|
-
if (!(params.
|
|
566
|
+
if (!(params.as2_station_id && !(0, _utils.isInt)(params.as2_station_id))) {
|
|
552
567
|
_context6.next = 11;
|
|
553
568
|
break;
|
|
554
569
|
}
|
|
555
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
570
|
+
throw new errors.InvalidParameterError("Bad parameter: as2_station_id must be of type Int, received ".concat((0, _utils.getType)(params.as2_station_id)));
|
|
556
571
|
case 11:
|
|
557
|
-
if (!(params.
|
|
572
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
558
573
|
_context6.next = 12;
|
|
559
574
|
break;
|
|
560
575
|
}
|
|
561
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
576
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
562
577
|
case 12:
|
|
563
|
-
if (!(params.
|
|
578
|
+
if (!(params.uri && !(0, _utils.isString)(params.uri))) {
|
|
564
579
|
_context6.next = 13;
|
|
565
580
|
break;
|
|
566
581
|
}
|
|
567
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
582
|
+
throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params.uri)));
|
|
568
583
|
case 13:
|
|
569
|
-
|
|
570
|
-
|
|
584
|
+
if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
|
|
585
|
+
_context6.next = 14;
|
|
586
|
+
break;
|
|
587
|
+
}
|
|
588
|
+
throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
|
|
571
589
|
case 14:
|
|
590
|
+
_context6.next = 15;
|
|
591
|
+
return _Api.default.sendRequest('/as2_partners', 'POST', params, options);
|
|
592
|
+
case 15:
|
|
572
593
|
response = _context6.sent;
|
|
573
594
|
return _context6.abrupt("return", new _As2Partner(response === null || response === void 0 ? void 0 : response.data, options));
|
|
574
|
-
case
|
|
595
|
+
case 16:
|
|
575
596
|
case "end":
|
|
576
597
|
return _context6.stop();
|
|
577
598
|
}
|