files.com 1.2.28 → 1.2.30

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.28
1
+ 1.2.30
@@ -9,6 +9,7 @@
9
9
  "name": "AS2 Partner Name",
10
10
  "uri": "example",
11
11
  "server_certificate": "require_match",
12
+ "mdn_validation_level": "none",
12
13
  "enable_dedicated_ips": true,
13
14
  "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
14
15
  "public_certificate_md5": "example",
@@ -25,6 +26,7 @@
25
26
  * `name` (string): The partner's formal AS2 name.
26
27
  * `uri` (string): Public URI for sending AS2 message to.
27
28
  * `server_certificate` (string): Remote server certificate security setting
29
+ * `mdn_validation_level` (string): MDN Validation Level
28
30
  * `enable_dedicated_ips` (boolean): `true` if remote server only accepts connections from dedicated IPs
29
31
  * `hex_public_certificate_serial` (string): Serial of public certificate used for message security in hex format.
30
32
  * `public_certificate_md5` (string): MD5 hash of public certificate used for message security.
@@ -75,6 +77,7 @@ await As2Partner.create({
75
77
  'public_certificate': "public_certificate",
76
78
  'as2_station_id': 1,
77
79
  'server_certificate': "require_match",
80
+ 'mdn_validation_level': "none",
78
81
  'enable_dedicated_ips': true,
79
82
  })
80
83
  ```
@@ -87,6 +90,7 @@ await As2Partner.create({
87
90
  * `public_certificate` (string): Required -
88
91
  * `as2_station_id` (int64): Required - Id of As2Station for this partner
89
92
  * `server_certificate` (string): Remote server certificate security setting
93
+ * `mdn_validation_level` (string): MDN Validation Level
90
94
  * `enable_dedicated_ips` (boolean):
91
95
 
92
96
  ---
@@ -100,6 +104,7 @@ await as2_partner.update({
100
104
  'name': "AS2 Partner Name",
101
105
  'uri': "example",
102
106
  'server_certificate': "require_match",
107
+ 'mdn_validation_level': "none",
103
108
  'enable_dedicated_ips': true,
104
109
  })
105
110
  ```
@@ -110,6 +115,7 @@ await as2_partner.update({
110
115
  * `name` (string): AS2 Name
111
116
  * `uri` (string): URL base for AS2 responses
112
117
  * `server_certificate` (string): Remote server certificate security setting
118
+ * `mdn_validation_level` (string): MDN Validation Level
113
119
  * `public_certificate` (string):
114
120
  * `enable_dedicated_ips` (boolean):
115
121
 
@@ -122,6 +128,7 @@ await as2_partner.update({
122
128
  "name": "AS2 Partner Name",
123
129
  "uri": "example",
124
130
  "server_certificate": "require_match",
131
+ "mdn_validation_level": "none",
125
132
  "enable_dedicated_ips": true,
126
133
  "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
127
134
  "public_certificate_md5": "example",
@@ -316,16 +316,9 @@ await RemoteServer.create({
316
316
  const [remote_server] = await RemoteServer.list()
317
317
 
318
318
  await remote_server.configuration_file({
319
- 'api_token': "example",
320
- 'permission_set': "full",
321
- 'root': "example",
322
- 'hostname': "example",
323
- 'port': 1,
324
- 'status': "example",
325
- 'config_version': "example",
319
+ 'permission_set': "example",
320
+ 'root': "C:\\Users\\",
326
321
  'private_key': "example",
327
- 'public_key': "example",
328
- 'server_host_key': "example",
329
322
  'subdomain': "example",
330
323
  })
331
324
  ```
@@ -333,34 +326,32 @@ await remote_server.configuration_file({
333
326
  ### Parameters
334
327
 
335
328
  * `id` (int64): Required - Remote Server ID.
336
- * `api_token` (string): Files Agent API Token
337
- * `permission_set` (string):
338
- * `root` (string): Agent local root path
339
- * `hostname` (string):
340
- * `port` (int64): Incoming port for files agent connections
341
- * `status` (string): either running or shutdown
342
- * `config_version` (string): agent config version
343
- * `private_key` (string): private key
344
- * `public_key` (string): public key
345
- * `server_host_key` (string):
346
- * `subdomain` (string):
329
+ * `permission_set` (string): The permission set for the agent ['read_write', 'read_only', 'write_only']
330
+ * `root` (string): The root directory for the agent
331
+ * `private_key` (string): The private key for the agent
332
+ * `subdomain` (string): Files.com subdomain site name
347
333
 
348
334
  ### Example Response
349
335
 
350
336
  ```json
351
337
  {
352
338
  "id": 1,
353
- "permission_set": "full",
339
+ "permission_set": "example",
354
340
  "private_key": "example",
355
341
  "subdomain": "example",
356
- "root": "example",
357
- "api_token": "example",
358
- "port": 1,
359
- "hostname": "example",
360
- "public_key": "example",
361
- "status": "example",
362
- "server_host_key": "example",
363
- "config_version": "example"
342
+ "root": "C:\\Users\\",
343
+ "follow_links": true,
344
+ "prefer_protocol": "example",
345
+ "dns": "example",
346
+ "proxy_all_outbound": true,
347
+ "endpoint_override": "example",
348
+ "log_file": "example",
349
+ "log_level": "example",
350
+ "log_rotate_num": 1,
351
+ "log_rotate_size": 1,
352
+ "max_concurrent_jobs": 1,
353
+ "graceful_shutdown_timeout": 1,
354
+ "transfer_rate_limit": "example"
364
355
  }
365
356
  ```
366
357
 
@@ -5,29 +5,49 @@
5
5
  ```
6
6
  {
7
7
  "id": 1,
8
- "permission_set": "full",
8
+ "permission_set": "example",
9
9
  "private_key": "example",
10
10
  "subdomain": "example",
11
- "root": "example",
12
- "api_token": "example",
13
- "port": 1,
14
- "hostname": "example",
15
- "public_key": "example",
16
- "status": "example",
17
- "server_host_key": "example",
18
- "config_version": "example"
11
+ "root": "C:\\Users\\",
12
+ "follow_links": true,
13
+ "prefer_protocol": "example",
14
+ "dns": "example",
15
+ "proxy_all_outbound": true,
16
+ "endpoint_override": "example",
17
+ "log_file": "example",
18
+ "log_level": "example",
19
+ "log_rotate_num": 1,
20
+ "log_rotate_size": 1,
21
+ "max_concurrent_jobs": 1,
22
+ "graceful_shutdown_timeout": 1,
23
+ "transfer_rate_limit": "example"
19
24
  }
20
25
  ```
21
26
 
22
- * `id` (int64): Agent ID
23
- * `permission_set` (string):
24
- * `private_key` (string): private key
25
- * `subdomain` (string):
26
- * `root` (string): Agent local root path
27
- * `api_token` (string): Files Agent API Token
28
- * `port` (int64): Incoming port for files agent connections
29
- * `hostname` (string):
30
- * `public_key` (string): public key
31
- * `status` (string): either running or shutdown
32
- * `server_host_key` (string):
33
- * `config_version` (string): agent config version
27
+ * `id` (int64): The remote server ID of the agent
28
+ * `permission_set` (string): The permission set for the agent ['read_write', 'read_only', 'write_only']
29
+ * `private_key` (string): The private key for the agent
30
+ * `subdomain` (string): Files.com subdomain site name
31
+ * `root` (string): The root directory for the agent
32
+ * `follow_links` (boolean): Follow symlinks when traversing directories
33
+ * `prefer_protocol` (string): Preferred network protocol ['udp', 'tcp']
34
+ * `dns` (string): DNS lookup method ['auto','doh','system']
35
+ * `proxy_all_outbound` (boolean): Proxy all outbound traffic through files.com proxy server
36
+ * `endpoint_override` (string): Custom site endpoint URL
37
+ * `log_file` (string): Log file name and location
38
+ * `log_level` (string): Log level for the agent logs ['debug', 'info', 'warn', 'error', 'fatal']
39
+ * `log_rotate_num` (int64): Log route for agent logs. (default 5)
40
+ * `log_rotate_size` (int64): Log route size in MB for agent logs. (default 20MB)
41
+ * `max_concurrent_jobs` (int64): Maximum number of concurrent jobs (default CPU Count * 4)
42
+ * `graceful_shutdown_timeout` (int64): Graceful shutdown timeout in seconds
43
+ * `transfer_rate_limit` (string): File transfer (upload/download) rate limit
44
+ <limit>-<period>, with the given periods:
45
+ * 'S': second
46
+ * 'M': minute
47
+ * 'H': hour
48
+ * 'D': day
49
+ Examples:
50
+ * 5 requests/second: '5-S'
51
+ * 10 requests/minute: '10-M'
52
+ * 1000 requests/hour: '1000-H'
53
+ * 2000 requests/day: '2000-D'
@@ -248,6 +248,7 @@
248
248
  "externally_managed": true,
249
249
  "time_zone": "Pacific Time (US & Canada)",
250
250
  "type_of_2fa": "yubi",
251
+ "type_of_2fa_for_display": "yubi",
251
252
  "updated_at": "2000-01-01T01:00:00Z",
252
253
  "user_root": "example",
253
254
  "days_remaining_until_password_expire": 1,
@@ -63,6 +63,7 @@
63
63
  "externally_managed": true,
64
64
  "time_zone": "Pacific Time (US & Canada)",
65
65
  "type_of_2fa": "yubi",
66
+ "type_of_2fa_for_display": "yubi",
66
67
  "user_root": "example",
67
68
  "days_remaining_until_password_expire": 1,
68
69
  "password_expire_at": "2000-01-01T01:00:00Z"
@@ -125,7 +126,8 @@
125
126
  * `subscribe_to_newsletter` (boolean): Is the user subscribed to the newsletter?
126
127
  * `externally_managed` (boolean): Is this user managed by a SsoStrategy?
127
128
  * `time_zone` (string): User time zone
128
- * `type_of_2fa` (string): Type(s) of 2FA methods in use. Will be either `sms`, `totp`, `u2f`, `yubi`, or multiple values sorted alphabetically and joined by an underscore.
129
+ * `type_of_2fa` (string): Type(s) of 2FA methods in use, for programmatic use. Will be either `sms`, `totp`, `u2f`, `yubi`, or multiple values sorted alphabetically and joined by an underscore. Does not specify whether user has more than one of a given method.
130
+ * `type_of_2fa_for_display` (string): Type(s) of 2FA methods in use, formatted for displaying in the UI. Unlike `type_of_2fa`, this value will make clear when a user has more than 1 of the same type of method.
129
131
  * `user_root` (string): Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
130
132
  * `days_remaining_until_password_expire` (int64): Number of days remaining until password expires
131
133
  * `password_expire_at` (date-time): Password expiration datetime
@@ -480,6 +482,7 @@ await user.update({
480
482
  "externally_managed": true,
481
483
  "time_zone": "Pacific Time (US & Canada)",
482
484
  "type_of_2fa": "yubi",
485
+ "type_of_2fa_for_display": "yubi",
483
486
  "user_root": "example",
484
487
  "days_remaining_until_password_expire": 1,
485
488
  "password_expire_at": "2000-01-01T01:00:00Z"
package/lib/Files.js CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
11
11
  var apiKey;
12
12
  var baseUrl = 'https://app.files.com';
13
13
  var sessionId = null;
14
- var version = '1.2.28';
14
+ var version = '1.2.30';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -68,6 +68,13 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
68
68
  (0, _defineProperty2.default)(this, "setServerCertificate", function (value) {
69
69
  _this.attributes.server_certificate = value;
70
70
  });
71
+ // string # MDN Validation Level
72
+ (0, _defineProperty2.default)(this, "getMdnValidationLevel", function () {
73
+ return _this.attributes.mdn_validation_level;
74
+ });
75
+ (0, _defineProperty2.default)(this, "setMdnValidationLevel", function (value) {
76
+ _this.attributes.mdn_validation_level = value;
77
+ });
71
78
  // boolean # `true` if remote server only accepts connections from dedicated IPs
72
79
  (0, _defineProperty2.default)(this, "getEnableDedicatedIps", function () {
73
80
  return _this.attributes.enable_dedicated_ips;
@@ -135,6 +142,7 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
135
142
  // name - string - AS2 Name
136
143
  // uri - string - URL base for AS2 responses
137
144
  // server_certificate - string - Remote server certificate security setting
145
+ // mdn_validation_level - string - MDN Validation Level
138
146
  // public_certificate - string
139
147
  // enable_dedicated_ips - boolean
140
148
  (0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
@@ -182,32 +190,38 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
182
190
  }
183
191
  throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
184
192
  case 14:
185
- if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
193
+ if (!(params.mdn_validation_level && !(0, _utils.isString)(params.mdn_validation_level))) {
186
194
  _context.next = 16;
187
195
  break;
188
196
  }
189
- throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
197
+ throw new errors.InvalidParameterError("Bad parameter: mdn_validation_level must be of type String, received ".concat((0, _utils.getType)(params.mdn_validation_level)));
190
198
  case 16:
199
+ if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
200
+ _context.next = 18;
201
+ break;
202
+ }
203
+ throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
204
+ case 18:
191
205
  if (params.id) {
192
- _context.next = 22;
206
+ _context.next = 24;
193
207
  break;
194
208
  }
195
209
  if (!_this.attributes.id) {
196
- _context.next = 21;
210
+ _context.next = 23;
197
211
  break;
198
212
  }
199
213
  params.id = _this.id;
200
- _context.next = 22;
214
+ _context.next = 24;
201
215
  break;
202
- case 21:
216
+ case 23:
203
217
  throw new errors.MissingParameterError('Parameter missing: id');
204
- case 22:
205
- _context.next = 24;
206
- return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
207
218
  case 24:
219
+ _context.next = 26;
220
+ return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
221
+ case 26:
208
222
  response = _context.sent;
209
223
  return _context.abrupt("return", new As2Partner(response === null || response === void 0 ? void 0 : response.data, _this.options));
210
- case 26:
224
+ case 28:
211
225
  case "end":
212
226
  return _context.stop();
213
227
  }
@@ -409,6 +423,7 @@ _As2Partner = As2Partner;
409
423
  // public_certificate (required) - string
410
424
  // as2_station_id (required) - int64 - Id of As2Station for this partner
411
425
  // server_certificate - string - Remote server certificate security setting
426
+ // mdn_validation_level - string - MDN Validation Level
412
427
  // enable_dedicated_ips - boolean
413
428
  (0, _defineProperty2.default)(As2Partner, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
414
429
  var params,
@@ -474,12 +489,18 @@ _As2Partner = As2Partner;
474
489
  }
475
490
  throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
476
491
  case 20:
477
- _context6.next = 22;
478
- return _Api.default.sendRequest('/as2_partners', 'POST', params, options);
492
+ if (!(params.mdn_validation_level && !(0, _utils.isString)(params.mdn_validation_level))) {
493
+ _context6.next = 22;
494
+ break;
495
+ }
496
+ throw new errors.InvalidParameterError("Bad parameter: mdn_validation_level must be of type String, received ".concat((0, _utils.getType)(params.mdn_validation_level)));
479
497
  case 22:
498
+ _context6.next = 24;
499
+ return _Api.default.sendRequest('/as2_partners', 'POST', params, options);
500
+ case 24:
480
501
  response = _context6.sent;
481
502
  return _context6.abrupt("return", new _As2Partner(response === null || response === void 0 ? void 0 : response.data, options));
482
- case 24:
503
+ case 26:
483
504
  case "end":
484
505
  return _context6.stop();
485
506
  }
@@ -554,17 +554,10 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
554
554
  // Post local changes, check in, and download configuration file (used by some Remote Server integrations, such as the Files.com Agent)
555
555
  //
556
556
  // Parameters:
557
- // api_token - string - Files Agent API Token
558
- // permission_set - string -
559
- // root - string - Agent local root path
560
- // hostname - string
561
- // port - int64 - Incoming port for files agent connections
562
- // status - string - either running or shutdown
563
- // config_version - string - agent config version
564
- // private_key - string - private key
565
- // public_key - string - public key
566
- // server_host_key - string
567
- // subdomain - string
557
+ // permission_set - string - The permission set for the agent ['read_write', 'read_only', 'write_only']
558
+ // root - string - The root directory for the agent
559
+ // private_key - string - The private key for the agent
560
+ // subdomain - string - Files.com subdomain site name
568
561
  (0, _defineProperty2.default)(this, "configurationFile", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
569
562
  var params,
570
563
  response,
@@ -593,93 +586,51 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
593
586
  }
594
587
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
595
588
  case 8:
596
- if (!(params.api_token && !(0, _utils.isString)(params.api_token))) {
597
- _context.next = 10;
598
- break;
599
- }
600
- throw new errors.InvalidParameterError("Bad parameter: api_token must be of type String, received ".concat((0, _utils.getType)(params.api_token)));
601
- case 10:
602
589
  if (!(params.permission_set && !(0, _utils.isString)(params.permission_set))) {
603
- _context.next = 12;
590
+ _context.next = 10;
604
591
  break;
605
592
  }
606
593
  throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(params.permission_set)));
607
- case 12:
594
+ case 10:
608
595
  if (!(params.root && !(0, _utils.isString)(params.root))) {
609
- _context.next = 14;
596
+ _context.next = 12;
610
597
  break;
611
598
  }
612
599
  throw new errors.InvalidParameterError("Bad parameter: root must be of type String, received ".concat((0, _utils.getType)(params.root)));
613
- case 14:
614
- if (!(params.hostname && !(0, _utils.isString)(params.hostname))) {
615
- _context.next = 16;
616
- break;
617
- }
618
- throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(params.hostname)));
619
- case 16:
620
- if (!(params.port && !(0, _utils.isInt)(params.port))) {
621
- _context.next = 18;
622
- break;
623
- }
624
- throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(params.port)));
625
- case 18:
626
- if (!(params.status && !(0, _utils.isString)(params.status))) {
627
- _context.next = 20;
628
- break;
629
- }
630
- throw new errors.InvalidParameterError("Bad parameter: status must be of type String, received ".concat((0, _utils.getType)(params.status)));
631
- case 20:
632
- if (!(params.config_version && !(0, _utils.isString)(params.config_version))) {
633
- _context.next = 22;
634
- break;
635
- }
636
- throw new errors.InvalidParameterError("Bad parameter: config_version must be of type String, received ".concat((0, _utils.getType)(params.config_version)));
637
- case 22:
600
+ case 12:
638
601
  if (!(params.private_key && !(0, _utils.isString)(params.private_key))) {
639
- _context.next = 24;
602
+ _context.next = 14;
640
603
  break;
641
604
  }
642
605
  throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params.private_key)));
643
- case 24:
644
- if (!(params.public_key && !(0, _utils.isString)(params.public_key))) {
645
- _context.next = 26;
646
- break;
647
- }
648
- throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(params.public_key)));
649
- case 26:
650
- if (!(params.server_host_key && !(0, _utils.isString)(params.server_host_key))) {
651
- _context.next = 28;
652
- break;
653
- }
654
- throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(params.server_host_key)));
655
- case 28:
606
+ case 14:
656
607
  if (!(params.subdomain && !(0, _utils.isString)(params.subdomain))) {
657
- _context.next = 30;
608
+ _context.next = 16;
658
609
  break;
659
610
  }
660
611
  throw new errors.InvalidParameterError("Bad parameter: subdomain must be of type String, received ".concat((0, _utils.getType)(params.subdomain)));
661
- case 30:
612
+ case 16:
662
613
  if (params.id) {
663
- _context.next = 36;
614
+ _context.next = 22;
664
615
  break;
665
616
  }
666
617
  if (!_this.attributes.id) {
667
- _context.next = 35;
618
+ _context.next = 21;
668
619
  break;
669
620
  }
670
621
  params.id = _this.id;
671
- _context.next = 36;
622
+ _context.next = 22;
672
623
  break;
673
- case 35:
624
+ case 21:
674
625
  throw new errors.MissingParameterError('Parameter missing: id');
675
- case 36:
676
- _context.next = 38;
626
+ case 22:
627
+ _context.next = 24;
677
628
  return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params.id), "/configuration_file"), 'POST', params, _this.options);
678
- case 38:
629
+ case 24:
679
630
  response = _context.sent;
680
631
  RemoteServerConfigurationFile = require('./RemoteServerConfigurationFile.js').default;
681
632
  return _context.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, _this.options));
682
- case 41:
633
+ case 27:
683
634
  case "end":
684
635
  return _context.stop();
685
636
  }
@@ -29,53 +29,83 @@ var RemoteServerConfigurationFile = /*#__PURE__*/(0, _createClass2.default)(func
29
29
  (0, _defineProperty2.default)(this, "isLoaded", function () {
30
30
  return !!_this.attributes.id;
31
31
  });
32
- // int64 # Agent ID
32
+ // int64 # The remote server ID of the agent
33
33
  (0, _defineProperty2.default)(this, "getId", function () {
34
34
  return _this.attributes.id;
35
35
  });
36
- // string #
36
+ // string # The permission set for the agent ['read_write', 'read_only', 'write_only']
37
37
  (0, _defineProperty2.default)(this, "getPermissionSet", function () {
38
38
  return _this.attributes.permission_set;
39
39
  });
40
- // string # private key
40
+ // string # The private key for the agent
41
41
  (0, _defineProperty2.default)(this, "getPrivateKey", function () {
42
42
  return _this.attributes.private_key;
43
43
  });
44
- // string
44
+ // string # Files.com subdomain site name
45
45
  (0, _defineProperty2.default)(this, "getSubdomain", function () {
46
46
  return _this.attributes.subdomain;
47
47
  });
48
- // string # Agent local root path
48
+ // string # The root directory for the agent
49
49
  (0, _defineProperty2.default)(this, "getRoot", function () {
50
50
  return _this.attributes.root;
51
51
  });
52
- // string # Files Agent API Token
53
- (0, _defineProperty2.default)(this, "getApiToken", function () {
54
- return _this.attributes.api_token;
52
+ // boolean # Follow symlinks when traversing directories
53
+ (0, _defineProperty2.default)(this, "getFollowLinks", function () {
54
+ return _this.attributes.follow_links;
55
55
  });
56
- // int64 # Incoming port for files agent connections
57
- (0, _defineProperty2.default)(this, "getPort", function () {
58
- return _this.attributes.port;
56
+ // string # Preferred network protocol ['udp', 'tcp']
57
+ (0, _defineProperty2.default)(this, "getPreferProtocol", function () {
58
+ return _this.attributes.prefer_protocol;
59
59
  });
60
- // string
61
- (0, _defineProperty2.default)(this, "getHostname", function () {
62
- return _this.attributes.hostname;
60
+ // string # DNS lookup method ['auto','doh','system']
61
+ (0, _defineProperty2.default)(this, "getDns", function () {
62
+ return _this.attributes.dns;
63
63
  });
64
- // string # public key
65
- (0, _defineProperty2.default)(this, "getPublicKey", function () {
66
- return _this.attributes.public_key;
64
+ // boolean # Proxy all outbound traffic through files.com proxy server
65
+ (0, _defineProperty2.default)(this, "getProxyAllOutbound", function () {
66
+ return _this.attributes.proxy_all_outbound;
67
67
  });
68
- // string # either running or shutdown
69
- (0, _defineProperty2.default)(this, "getStatus", function () {
70
- return _this.attributes.status;
68
+ // string # Custom site endpoint URL
69
+ (0, _defineProperty2.default)(this, "getEndpointOverride", function () {
70
+ return _this.attributes.endpoint_override;
71
71
  });
72
- // string
73
- (0, _defineProperty2.default)(this, "getServerHostKey", function () {
74
- return _this.attributes.server_host_key;
72
+ // string # Log file name and location
73
+ (0, _defineProperty2.default)(this, "getLogFile", function () {
74
+ return _this.attributes.log_file;
75
75
  });
76
- // string # agent config version
77
- (0, _defineProperty2.default)(this, "getConfigVersion", function () {
78
- return _this.attributes.config_version;
76
+ // string # Log level for the agent logs ['debug', 'info', 'warn', 'error', 'fatal']
77
+ (0, _defineProperty2.default)(this, "getLogLevel", function () {
78
+ return _this.attributes.log_level;
79
+ });
80
+ // int64 # Log route for agent logs. (default 5)
81
+ (0, _defineProperty2.default)(this, "getLogRotateNum", function () {
82
+ return _this.attributes.log_rotate_num;
83
+ });
84
+ // int64 # Log route size in MB for agent logs. (default 20MB)
85
+ (0, _defineProperty2.default)(this, "getLogRotateSize", function () {
86
+ return _this.attributes.log_rotate_size;
87
+ });
88
+ // int64 # Maximum number of concurrent jobs (default CPU Count * 4)
89
+ (0, _defineProperty2.default)(this, "getMaxConcurrentJobs", function () {
90
+ return _this.attributes.max_concurrent_jobs;
91
+ });
92
+ // int64 # Graceful shutdown timeout in seconds
93
+ (0, _defineProperty2.default)(this, "getGracefulShutdownTimeout", function () {
94
+ return _this.attributes.graceful_shutdown_timeout;
95
+ });
96
+ // string # File transfer (upload/download) rate limit
97
+ // <limit>-<period>, with the given periods:
98
+ // * 'S': second
99
+ // * 'M': minute
100
+ // * 'H': hour
101
+ // * 'D': day
102
+ // Examples:
103
+ // * 5 requests/second: '5-S'
104
+ // * 10 requests/minute: '10-M'
105
+ // * 1000 requests/hour: '1000-H'
106
+ // * 2000 requests/day: '2000-D'
107
+ (0, _defineProperty2.default)(this, "getTransferRateLimit", function () {
108
+ return _this.attributes.transfer_rate_limit;
79
109
  });
80
110
  Object.entries(attributes).forEach(function (_ref) {
81
111
  var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
@@ -422,13 +422,20 @@ var User = /*#__PURE__*/(0, _createClass2.default)(function User() {
422
422
  (0, _defineProperty2.default)(this, "setTimeZone", function (value) {
423
423
  _this.attributes.time_zone = value;
424
424
  });
425
- // string # Type(s) of 2FA methods in use. Will be either `sms`, `totp`, `u2f`, `yubi`, or multiple values sorted alphabetically and joined by an underscore.
425
+ // string # Type(s) of 2FA methods in use, for programmatic use. Will be either `sms`, `totp`, `u2f`, `yubi`, or multiple values sorted alphabetically and joined by an underscore. Does not specify whether user has more than one of a given method.
426
426
  (0, _defineProperty2.default)(this, "getTypeOf2fa", function () {
427
427
  return _this.attributes.type_of_2fa;
428
428
  });
429
429
  (0, _defineProperty2.default)(this, "setTypeOf2fa", function (value) {
430
430
  _this.attributes.type_of_2fa = value;
431
431
  });
432
+ // string # Type(s) of 2FA methods in use, formatted for displaying in the UI. Unlike `type_of_2fa`, this value will make clear when a user has more than 1 of the same type of method.
433
+ (0, _defineProperty2.default)(this, "getTypeOf2faForDisplay", function () {
434
+ return _this.attributes.type_of_2fa_for_display;
435
+ });
436
+ (0, _defineProperty2.default)(this, "setTypeOf2faForDisplay", function (value) {
437
+ _this.attributes.type_of_2fa_for_display = value;
438
+ });
432
439
  // string # Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
433
440
  (0, _defineProperty2.default)(this, "getUserRoot", function () {
434
441
  return _this.attributes.user_root;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.28",
3
+ "version": "1.2.30",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -5,7 +5,7 @@ const endpointPrefix = '/api/rest/v1'
5
5
  let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
- const version = '1.2.28'
8
+ const version = '1.2.30'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -63,6 +63,13 @@ class As2Partner {
63
63
  this.attributes.server_certificate = value
64
64
  }
65
65
 
66
+ // string # MDN Validation Level
67
+ getMdnValidationLevel = () => this.attributes.mdn_validation_level
68
+
69
+ setMdnValidationLevel = value => {
70
+ this.attributes.mdn_validation_level = value
71
+ }
72
+
66
73
  // boolean # `true` if remote server only accepts connections from dedicated IPs
67
74
  getEnableDedicatedIps = () => this.attributes.enable_dedicated_ips
68
75
 
@@ -130,6 +137,7 @@ class As2Partner {
130
137
  // name - string - AS2 Name
131
138
  // uri - string - URL base for AS2 responses
132
139
  // server_certificate - string - Remote server certificate security setting
140
+ // mdn_validation_level - string - MDN Validation Level
133
141
  // public_certificate - string
134
142
  // enable_dedicated_ips - boolean
135
143
  update = async (params = {}) => {
@@ -158,6 +166,10 @@ class As2Partner {
158
166
  throw new errors.InvalidParameterError(`Bad parameter: server_certificate must be of type String, received ${getType(params.server_certificate)}`)
159
167
  }
160
168
 
169
+ if (params.mdn_validation_level && !isString(params.mdn_validation_level)) {
170
+ throw new errors.InvalidParameterError(`Bad parameter: mdn_validation_level must be of type String, received ${getType(params.mdn_validation_level)}`)
171
+ }
172
+
161
173
  if (params.public_certificate && !isString(params.public_certificate)) {
162
174
  throw new errors.InvalidParameterError(`Bad parameter: public_certificate must be of type String, received ${getType(params.public_certificate)}`)
163
175
  }
@@ -266,6 +278,7 @@ class As2Partner {
266
278
  // public_certificate (required) - string
267
279
  // as2_station_id (required) - int64 - Id of As2Station for this partner
268
280
  // server_certificate - string - Remote server certificate security setting
281
+ // mdn_validation_level - string - MDN Validation Level
269
282
  // enable_dedicated_ips - boolean
270
283
  static create = async (params = {}, options = {}) => {
271
284
  if (!params.name) {
@@ -304,6 +317,10 @@ class As2Partner {
304
317
  throw new errors.InvalidParameterError(`Bad parameter: server_certificate must be of type String, received ${getType(params.server_certificate)}`)
305
318
  }
306
319
 
320
+ if (params.mdn_validation_level && !isString(params.mdn_validation_level)) {
321
+ throw new errors.InvalidParameterError(`Bad parameter: mdn_validation_level must be of type String, received ${getType(params.mdn_validation_level)}`)
322
+ }
323
+
307
324
  const response = await Api.sendRequest('/as2_partners', 'POST', params, options)
308
325
 
309
326
  return new As2Partner(response?.data, options)
@@ -549,17 +549,10 @@ class RemoteServer {
549
549
  // Post local changes, check in, and download configuration file (used by some Remote Server integrations, such as the Files.com Agent)
550
550
  //
551
551
  // Parameters:
552
- // api_token - string - Files Agent API Token
553
- // permission_set - string -
554
- // root - string - Agent local root path
555
- // hostname - string
556
- // port - int64 - Incoming port for files agent connections
557
- // status - string - either running or shutdown
558
- // config_version - string - agent config version
559
- // private_key - string - private key
560
- // public_key - string - public key
561
- // server_host_key - string
562
- // subdomain - string
552
+ // permission_set - string - The permission set for the agent ['read_write', 'read_only', 'write_only']
553
+ // root - string - The root directory for the agent
554
+ // private_key - string - The private key for the agent
555
+ // subdomain - string - Files.com subdomain site name
563
556
  configurationFile = async (params = {}) => {
564
557
  if (!this.attributes.id) {
565
558
  throw new errors.EmptyPropertyError('Current object has no id')
@@ -574,10 +567,6 @@ class RemoteServer {
574
567
  throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params.id)}`)
575
568
  }
576
569
 
577
- if (params.api_token && !isString(params.api_token)) {
578
- throw new errors.InvalidParameterError(`Bad parameter: api_token must be of type String, received ${getType(params.api_token)}`)
579
- }
580
-
581
570
  if (params.permission_set && !isString(params.permission_set)) {
582
571
  throw new errors.InvalidParameterError(`Bad parameter: permission_set must be of type String, received ${getType(params.permission_set)}`)
583
572
  }
@@ -586,34 +575,10 @@ class RemoteServer {
586
575
  throw new errors.InvalidParameterError(`Bad parameter: root must be of type String, received ${getType(params.root)}`)
587
576
  }
588
577
 
589
- if (params.hostname && !isString(params.hostname)) {
590
- throw new errors.InvalidParameterError(`Bad parameter: hostname must be of type String, received ${getType(params.hostname)}`)
591
- }
592
-
593
- if (params.port && !isInt(params.port)) {
594
- throw new errors.InvalidParameterError(`Bad parameter: port must be of type Int, received ${getType(params.port)}`)
595
- }
596
-
597
- if (params.status && !isString(params.status)) {
598
- throw new errors.InvalidParameterError(`Bad parameter: status must be of type String, received ${getType(params.status)}`)
599
- }
600
-
601
- if (params.config_version && !isString(params.config_version)) {
602
- throw new errors.InvalidParameterError(`Bad parameter: config_version must be of type String, received ${getType(params.config_version)}`)
603
- }
604
-
605
578
  if (params.private_key && !isString(params.private_key)) {
606
579
  throw new errors.InvalidParameterError(`Bad parameter: private_key must be of type String, received ${getType(params.private_key)}`)
607
580
  }
608
581
 
609
- if (params.public_key && !isString(params.public_key)) {
610
- throw new errors.InvalidParameterError(`Bad parameter: public_key must be of type String, received ${getType(params.public_key)}`)
611
- }
612
-
613
- if (params.server_host_key && !isString(params.server_host_key)) {
614
- throw new errors.InvalidParameterError(`Bad parameter: server_host_key must be of type String, received ${getType(params.server_host_key)}`)
615
- }
616
-
617
582
  if (params.subdomain && !isString(params.subdomain)) {
618
583
  throw new errors.InvalidParameterError(`Bad parameter: subdomain must be of type String, received ${getType(params.subdomain)}`)
619
584
  }
@@ -28,41 +28,66 @@ class RemoteServerConfigurationFile {
28
28
 
29
29
  isLoaded = () => !!this.attributes.id
30
30
 
31
- // int64 # Agent ID
31
+ // int64 # The remote server ID of the agent
32
32
  getId = () => this.attributes.id
33
33
 
34
- // string #
34
+ // string # The permission set for the agent ['read_write', 'read_only', 'write_only']
35
35
  getPermissionSet = () => this.attributes.permission_set
36
36
 
37
- // string # private key
37
+ // string # The private key for the agent
38
38
  getPrivateKey = () => this.attributes.private_key
39
39
 
40
- // string
40
+ // string # Files.com subdomain site name
41
41
  getSubdomain = () => this.attributes.subdomain
42
42
 
43
- // string # Agent local root path
43
+ // string # The root directory for the agent
44
44
  getRoot = () => this.attributes.root
45
45
 
46
- // string # Files Agent API Token
47
- getApiToken = () => this.attributes.api_token
46
+ // boolean # Follow symlinks when traversing directories
47
+ getFollowLinks = () => this.attributes.follow_links
48
48
 
49
- // int64 # Incoming port for files agent connections
50
- getPort = () => this.attributes.port
49
+ // string # Preferred network protocol ['udp', 'tcp']
50
+ getPreferProtocol = () => this.attributes.prefer_protocol
51
51
 
52
- // string
53
- getHostname = () => this.attributes.hostname
52
+ // string # DNS lookup method ['auto','doh','system']
53
+ getDns = () => this.attributes.dns
54
54
 
55
- // string # public key
56
- getPublicKey = () => this.attributes.public_key
55
+ // boolean # Proxy all outbound traffic through files.com proxy server
56
+ getProxyAllOutbound = () => this.attributes.proxy_all_outbound
57
57
 
58
- // string # either running or shutdown
59
- getStatus = () => this.attributes.status
58
+ // string # Custom site endpoint URL
59
+ getEndpointOverride = () => this.attributes.endpoint_override
60
60
 
61
- // string
62
- getServerHostKey = () => this.attributes.server_host_key
61
+ // string # Log file name and location
62
+ getLogFile = () => this.attributes.log_file
63
63
 
64
- // string # agent config version
65
- getConfigVersion = () => this.attributes.config_version
64
+ // string # Log level for the agent logs ['debug', 'info', 'warn', 'error', 'fatal']
65
+ getLogLevel = () => this.attributes.log_level
66
+
67
+ // int64 # Log route for agent logs. (default 5)
68
+ getLogRotateNum = () => this.attributes.log_rotate_num
69
+
70
+ // int64 # Log route size in MB for agent logs. (default 20MB)
71
+ getLogRotateSize = () => this.attributes.log_rotate_size
72
+
73
+ // int64 # Maximum number of concurrent jobs (default CPU Count * 4)
74
+ getMaxConcurrentJobs = () => this.attributes.max_concurrent_jobs
75
+
76
+ // int64 # Graceful shutdown timeout in seconds
77
+ getGracefulShutdownTimeout = () => this.attributes.graceful_shutdown_timeout
78
+
79
+ // string # File transfer (upload/download) rate limit
80
+ // <limit>-<period>, with the given periods:
81
+ // * 'S': second
82
+ // * 'M': minute
83
+ // * 'H': hour
84
+ // * 'D': day
85
+ // Examples:
86
+ // * 5 requests/second: '5-S'
87
+ // * 10 requests/minute: '10-M'
88
+ // * 1000 requests/hour: '1000-H'
89
+ // * 2000 requests/day: '2000-D'
90
+ getTransferRateLimit = () => this.attributes.transfer_rate_limit
66
91
  }
67
92
 
68
93
  export default RemoteServerConfigurationFile
@@ -416,13 +416,20 @@ class User {
416
416
  this.attributes.time_zone = value
417
417
  }
418
418
 
419
- // string # Type(s) of 2FA methods in use. Will be either `sms`, `totp`, `u2f`, `yubi`, or multiple values sorted alphabetically and joined by an underscore.
419
+ // string # Type(s) of 2FA methods in use, for programmatic use. Will be either `sms`, `totp`, `u2f`, `yubi`, or multiple values sorted alphabetically and joined by an underscore. Does not specify whether user has more than one of a given method.
420
420
  getTypeOf2fa = () => this.attributes.type_of_2fa
421
421
 
422
422
  setTypeOf2fa = value => {
423
423
  this.attributes.type_of_2fa = value
424
424
  }
425
425
 
426
+ // string # Type(s) of 2FA methods in use, formatted for displaying in the UI. Unlike `type_of_2fa`, this value will make clear when a user has more than 1 of the same type of method.
427
+ getTypeOf2faForDisplay = () => this.attributes.type_of_2fa_for_display
428
+
429
+ setTypeOf2faForDisplay = value => {
430
+ this.attributes.type_of_2fa_for_display = value
431
+ }
432
+
426
433
  // string # Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set.) Note that this is not used for API, Desktop, or Web interface.
427
434
  getUserRoot = () => this.attributes.user_root
428
435