files.com 1.2.502 → 1.2.504

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 CHANGED
@@ -1 +1 @@
1
- 1.2.502
1
+ 1.2.504
@@ -154,7 +154,7 @@ await Bundle.list({
154
154
  * `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.
155
155
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
156
156
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
157
- * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, created_at ]` and `[ user_id, expires_at ]`.
157
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, expires_at ]`.
158
158
  * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at` and `expires_at`.
159
159
  * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at` and `expires_at`.
160
160
  * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.
@@ -9,6 +9,7 @@
9
9
  "authentication_method": "password",
10
10
  "hostname": "remote-server.com",
11
11
  "remote_home_path": "/home/user1",
12
+ "upload_staging_path": "/tmp/uploads",
12
13
  "name": "My Remote server",
13
14
  "description": "More information or notes about my server",
14
15
  "port": 1,
@@ -70,11 +71,12 @@
70
71
  }
71
72
  ```
72
73
 
73
- * `id` (int64): Remote server ID
74
- * `disabled` (boolean): If true, this server has been disabled due to failures. Make any change or set disabled to false to clear this flag.
75
- * `authentication_method` (string): Type of authentication method
74
+ * `id` (int64): Remote Server ID
75
+ * `disabled` (boolean): If true, this Remote Server has been disabled due to failures. Make any change or set disabled to false to clear this flag.
76
+ * `authentication_method` (string): Type of authentication method to use
76
77
  * `hostname` (string): Hostname or IP address
77
78
  * `remote_home_path` (string): Initial home folder on remote server
79
+ * `upload_staging_path` (string): Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.
78
80
  * `name` (string): Internal name for your reference
79
81
  * `description` (string): Internal description for your reference
80
82
  * `port` (int64): Port for remote server.
@@ -238,6 +240,7 @@ await RemoteServer.create({
238
240
  'one_drive_account_type': "personal",
239
241
  'pin_to_site_region': true,
240
242
  'port': 1,
243
+ 'upload_staging_path': "/tmp/uploads",
241
244
  'remote_server_credential_id': 1,
242
245
  's3_bucket': "my-bucket",
243
246
  's3_compatible_access_key': "example",
@@ -314,6 +317,7 @@ await RemoteServer.create({
314
317
  * `one_drive_account_type` (string): OneDrive: Either personal or business_other account types
315
318
  * `pin_to_site_region` (boolean): If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
316
319
  * `port` (int64): Port for remote server.
320
+ * `upload_staging_path` (string): Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.
317
321
  * `remote_server_credential_id` (int64): ID of Remote Server Credential, if applicable.
318
322
  * `s3_bucket` (string): S3 bucket name
319
323
  * `s3_compatible_access_key` (string): S3-compatible: Access Key
@@ -471,6 +475,7 @@ await remote_server.update({
471
475
  'one_drive_account_type': "personal",
472
476
  'pin_to_site_region': true,
473
477
  'port': 1,
478
+ 'upload_staging_path': "/tmp/uploads",
474
479
  'remote_server_credential_id': 1,
475
480
  's3_bucket': "my-bucket",
476
481
  's3_compatible_access_key': "example",
@@ -546,6 +551,7 @@ await remote_server.update({
546
551
  * `one_drive_account_type` (string): OneDrive: Either personal or business_other account types
547
552
  * `pin_to_site_region` (boolean): If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
548
553
  * `port` (int64): Port for remote server.
554
+ * `upload_staging_path` (string): Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.
549
555
  * `remote_server_credential_id` (int64): ID of Remote Server Credential, if applicable.
550
556
  * `s3_bucket` (string): S3 bucket name
551
557
  * `s3_compatible_access_key` (string): S3-compatible: Access Key
@@ -571,6 +577,7 @@ await remote_server.update({
571
577
  "authentication_method": "password",
572
578
  "hostname": "remote-server.com",
573
579
  "remote_home_path": "/home/user1",
580
+ "upload_staging_path": "/tmp/uploads",
574
581
  "name": "My Remote server",
575
582
  "description": "More information or notes about my server",
576
583
  "port": 1,
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.502';
15
+ var version = '1.2.504';
16
16
  var userAgent = "Files.com JavaScript SDK v".concat(version);
17
17
  var logLevel = _Logger.LogLevel.INFO;
18
18
  var debugRequest = false;
@@ -699,7 +699,7 @@ _Bundle = Bundle;
699
699
  // 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.
700
700
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
701
701
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
702
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, created_at ]` and `[ user_id, expires_at ]`.
702
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, expires_at ]`.
703
703
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at` and `expires_at`.
704
704
  // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at` and `expires_at`.
705
705
  // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.
@@ -32,21 +32,21 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
32
32
  (0, _defineProperty2.default)(this, "isLoaded", function () {
33
33
  return !!_this.attributes.id;
34
34
  });
35
- // int64 # Remote server ID
35
+ // int64 # Remote Server ID
36
36
  (0, _defineProperty2.default)(this, "getId", function () {
37
37
  return _this.attributes.id;
38
38
  });
39
39
  (0, _defineProperty2.default)(this, "setId", function (value) {
40
40
  _this.attributes.id = value;
41
41
  });
42
- // boolean # If true, this server has been disabled due to failures. Make any change or set disabled to false to clear this flag.
42
+ // boolean # If true, this Remote Server has been disabled due to failures. Make any change or set disabled to false to clear this flag.
43
43
  (0, _defineProperty2.default)(this, "getDisabled", function () {
44
44
  return _this.attributes.disabled;
45
45
  });
46
46
  (0, _defineProperty2.default)(this, "setDisabled", function (value) {
47
47
  _this.attributes.disabled = value;
48
48
  });
49
- // string # Type of authentication method
49
+ // string # Type of authentication method to use
50
50
  (0, _defineProperty2.default)(this, "getAuthenticationMethod", function () {
51
51
  return _this.attributes.authentication_method;
52
52
  });
@@ -67,6 +67,13 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
67
67
  (0, _defineProperty2.default)(this, "setRemoteHomePath", function (value) {
68
68
  _this.attributes.remote_home_path = value;
69
69
  });
70
+ // string # Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.
71
+ (0, _defineProperty2.default)(this, "getUploadStagingPath", function () {
72
+ return _this.attributes.upload_staging_path;
73
+ });
74
+ (0, _defineProperty2.default)(this, "setUploadStagingPath", function (value) {
75
+ _this.attributes.upload_staging_path = value;
76
+ });
70
77
  // string # Internal name for your reference
71
78
  (0, _defineProperty2.default)(this, "getName", function () {
72
79
  return _this.attributes.name;
@@ -850,6 +857,7 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
850
857
  // one_drive_account_type - string - OneDrive: Either personal or business_other account types
851
858
  // pin_to_site_region - boolean - If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
852
859
  // port - int64 - Port for remote server.
860
+ // upload_staging_path - string - Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.
853
861
  // remote_server_credential_id - int64 - ID of Remote Server Credential, if applicable.
854
862
  // s3_bucket - string - S3 bucket name
855
863
  // s3_compatible_access_key - string - S3-compatible: Access Key
@@ -1186,116 +1194,122 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
1186
1194
  }
1187
1195
  throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(params.port)));
1188
1196
  case 52:
1189
- if (!(params.remote_server_credential_id && !(0, _utils.isInt)(params.remote_server_credential_id))) {
1197
+ if (!(params.upload_staging_path && !(0, _utils.isString)(params.upload_staging_path))) {
1190
1198
  _context3.next = 53;
1191
1199
  break;
1192
1200
  }
1193
- throw new errors.InvalidParameterError("Bad parameter: remote_server_credential_id must be of type Int, received ".concat((0, _utils.getType)(params.remote_server_credential_id)));
1201
+ throw new errors.InvalidParameterError("Bad parameter: upload_staging_path must be of type String, received ".concat((0, _utils.getType)(params.upload_staging_path)));
1194
1202
  case 53:
1195
- if (!(params.s3_bucket && !(0, _utils.isString)(params.s3_bucket))) {
1203
+ if (!(params.remote_server_credential_id && !(0, _utils.isInt)(params.remote_server_credential_id))) {
1196
1204
  _context3.next = 54;
1197
1205
  break;
1198
1206
  }
1199
- throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_bucket)));
1207
+ throw new errors.InvalidParameterError("Bad parameter: remote_server_credential_id must be of type Int, received ".concat((0, _utils.getType)(params.remote_server_credential_id)));
1200
1208
  case 54:
1201
- if (!(params.s3_compatible_access_key && !(0, _utils.isString)(params.s3_compatible_access_key))) {
1209
+ if (!(params.s3_bucket && !(0, _utils.isString)(params.s3_bucket))) {
1202
1210
  _context3.next = 55;
1203
1211
  break;
1204
1212
  }
1205
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_access_key)));
1213
+ throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_bucket)));
1206
1214
  case 55:
1207
- if (!(params.s3_compatible_bucket && !(0, _utils.isString)(params.s3_compatible_bucket))) {
1215
+ if (!(params.s3_compatible_access_key && !(0, _utils.isString)(params.s3_compatible_access_key))) {
1208
1216
  _context3.next = 56;
1209
1217
  break;
1210
1218
  }
1211
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_bucket)));
1219
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_access_key)));
1212
1220
  case 56:
1213
- if (!(params.s3_compatible_endpoint && !(0, _utils.isString)(params.s3_compatible_endpoint))) {
1221
+ if (!(params.s3_compatible_bucket && !(0, _utils.isString)(params.s3_compatible_bucket))) {
1214
1222
  _context3.next = 57;
1215
1223
  break;
1216
1224
  }
1217
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_endpoint)));
1225
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_bucket)));
1218
1226
  case 57:
1219
- if (!(params.s3_compatible_region && !(0, _utils.isString)(params.s3_compatible_region))) {
1227
+ if (!(params.s3_compatible_endpoint && !(0, _utils.isString)(params.s3_compatible_endpoint))) {
1220
1228
  _context3.next = 58;
1221
1229
  break;
1222
1230
  }
1223
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_region)));
1231
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_endpoint)));
1224
1232
  case 58:
1225
- if (!(params.s3_region && !(0, _utils.isString)(params.s3_region))) {
1233
+ if (!(params.s3_compatible_region && !(0, _utils.isString)(params.s3_compatible_region))) {
1226
1234
  _context3.next = 59;
1227
1235
  break;
1228
1236
  }
1229
- throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(params.s3_region)));
1237
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_region)));
1230
1238
  case 59:
1231
- if (!(params.server_certificate && !(0, _utils.isString)(params.server_certificate))) {
1239
+ if (!(params.s3_region && !(0, _utils.isString)(params.s3_region))) {
1232
1240
  _context3.next = 60;
1233
1241
  break;
1234
1242
  }
1235
- throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
1243
+ throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(params.s3_region)));
1236
1244
  case 60:
1237
- if (!(params.server_host_key && !(0, _utils.isString)(params.server_host_key))) {
1245
+ if (!(params.server_certificate && !(0, _utils.isString)(params.server_certificate))) {
1238
1246
  _context3.next = 61;
1239
1247
  break;
1240
1248
  }
1241
- throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(params.server_host_key)));
1249
+ throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
1242
1250
  case 61:
1243
- if (!(params.server_type && !(0, _utils.isString)(params.server_type))) {
1251
+ if (!(params.server_host_key && !(0, _utils.isString)(params.server_host_key))) {
1244
1252
  _context3.next = 62;
1245
1253
  break;
1246
1254
  }
1247
- throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(params.server_type)));
1255
+ throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(params.server_host_key)));
1248
1256
  case 62:
1249
- if (!(params.ssl && !(0, _utils.isString)(params.ssl))) {
1257
+ if (!(params.server_type && !(0, _utils.isString)(params.server_type))) {
1250
1258
  _context3.next = 63;
1251
1259
  break;
1252
1260
  }
1253
- throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(params.ssl)));
1261
+ throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(params.server_type)));
1254
1262
  case 63:
1255
- if (!(params.username && !(0, _utils.isString)(params.username))) {
1263
+ if (!(params.ssl && !(0, _utils.isString)(params.ssl))) {
1256
1264
  _context3.next = 64;
1257
1265
  break;
1258
1266
  }
1259
- throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
1267
+ throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(params.ssl)));
1260
1268
  case 64:
1261
- if (!(params.wasabi_access_key && !(0, _utils.isString)(params.wasabi_access_key))) {
1269
+ if (!(params.username && !(0, _utils.isString)(params.username))) {
1262
1270
  _context3.next = 65;
1263
1271
  break;
1264
1272
  }
1265
- throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(params.wasabi_access_key)));
1273
+ throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
1266
1274
  case 65:
1267
- if (!(params.wasabi_bucket && !(0, _utils.isString)(params.wasabi_bucket))) {
1275
+ if (!(params.wasabi_access_key && !(0, _utils.isString)(params.wasabi_access_key))) {
1268
1276
  _context3.next = 66;
1269
1277
  break;
1270
1278
  }
1271
- throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(params.wasabi_bucket)));
1279
+ throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(params.wasabi_access_key)));
1272
1280
  case 66:
1273
- if (!(params.wasabi_region && !(0, _utils.isString)(params.wasabi_region))) {
1281
+ if (!(params.wasabi_bucket && !(0, _utils.isString)(params.wasabi_bucket))) {
1274
1282
  _context3.next = 67;
1275
1283
  break;
1276
1284
  }
1277
- throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(params.wasabi_region)));
1285
+ throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(params.wasabi_bucket)));
1278
1286
  case 67:
1287
+ if (!(params.wasabi_region && !(0, _utils.isString)(params.wasabi_region))) {
1288
+ _context3.next = 68;
1289
+ break;
1290
+ }
1291
+ throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(params.wasabi_region)));
1292
+ case 68:
1279
1293
  if (params.id) {
1280
- _context3.next = 69;
1294
+ _context3.next = 70;
1281
1295
  break;
1282
1296
  }
1283
1297
  if (!_this.attributes.id) {
1284
- _context3.next = 68;
1298
+ _context3.next = 69;
1285
1299
  break;
1286
1300
  }
1287
1301
  params.id = _this.id;
1288
- _context3.next = 69;
1302
+ _context3.next = 70;
1289
1303
  break;
1290
- case 68:
1291
- throw new errors.MissingParameterError('Parameter missing: id');
1292
1304
  case 69:
1293
- _context3.next = 70;
1294
- return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
1305
+ throw new errors.MissingParameterError('Parameter missing: id');
1295
1306
  case 70:
1307
+ _context3.next = 71;
1308
+ return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
1309
+ case 71:
1296
1310
  response = _context3.sent;
1297
1311
  return _context3.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, _this.options));
1298
- case 71:
1312
+ case 72:
1299
1313
  case "end":
1300
1314
  return _context3.stop();
1301
1315
  }
@@ -1598,6 +1612,7 @@ _RemoteServer = RemoteServer;
1598
1612
  // one_drive_account_type - string - OneDrive: Either personal or business_other account types
1599
1613
  // pin_to_site_region - boolean - If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
1600
1614
  // port - int64 - Port for remote server.
1615
+ // upload_staging_path - string - Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.
1601
1616
  // remote_server_credential_id - int64 - ID of Remote Server Credential, if applicable.
1602
1617
  // s3_bucket - string - S3 bucket name
1603
1618
  // s3_compatible_access_key - string - S3-compatible: Access Key
@@ -1918,108 +1933,114 @@ _RemoteServer = RemoteServer;
1918
1933
  }
1919
1934
  throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(params.port)));
1920
1935
  case 49:
1921
- if (!(params.remote_server_credential_id && !(0, _utils.isInt)(params.remote_server_credential_id))) {
1936
+ if (!(params.upload_staging_path && !(0, _utils.isString)(params.upload_staging_path))) {
1922
1937
  _context9.next = 50;
1923
1938
  break;
1924
1939
  }
1925
- throw new errors.InvalidParameterError("Bad parameter: remote_server_credential_id must be of type Int, received ".concat((0, _utils.getType)(params.remote_server_credential_id)));
1940
+ throw new errors.InvalidParameterError("Bad parameter: upload_staging_path must be of type String, received ".concat((0, _utils.getType)(params.upload_staging_path)));
1926
1941
  case 50:
1927
- if (!(params.s3_bucket && !(0, _utils.isString)(params.s3_bucket))) {
1942
+ if (!(params.remote_server_credential_id && !(0, _utils.isInt)(params.remote_server_credential_id))) {
1928
1943
  _context9.next = 51;
1929
1944
  break;
1930
1945
  }
1931
- throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_bucket)));
1946
+ throw new errors.InvalidParameterError("Bad parameter: remote_server_credential_id must be of type Int, received ".concat((0, _utils.getType)(params.remote_server_credential_id)));
1932
1947
  case 51:
1933
- if (!(params.s3_compatible_access_key && !(0, _utils.isString)(params.s3_compatible_access_key))) {
1948
+ if (!(params.s3_bucket && !(0, _utils.isString)(params.s3_bucket))) {
1934
1949
  _context9.next = 52;
1935
1950
  break;
1936
1951
  }
1937
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_access_key)));
1952
+ throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_bucket)));
1938
1953
  case 52:
1939
- if (!(params.s3_compatible_bucket && !(0, _utils.isString)(params.s3_compatible_bucket))) {
1954
+ if (!(params.s3_compatible_access_key && !(0, _utils.isString)(params.s3_compatible_access_key))) {
1940
1955
  _context9.next = 53;
1941
1956
  break;
1942
1957
  }
1943
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_bucket)));
1958
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_access_key)));
1944
1959
  case 53:
1945
- if (!(params.s3_compatible_endpoint && !(0, _utils.isString)(params.s3_compatible_endpoint))) {
1960
+ if (!(params.s3_compatible_bucket && !(0, _utils.isString)(params.s3_compatible_bucket))) {
1946
1961
  _context9.next = 54;
1947
1962
  break;
1948
1963
  }
1949
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_endpoint)));
1964
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_bucket)));
1950
1965
  case 54:
1951
- if (!(params.s3_compatible_region && !(0, _utils.isString)(params.s3_compatible_region))) {
1966
+ if (!(params.s3_compatible_endpoint && !(0, _utils.isString)(params.s3_compatible_endpoint))) {
1952
1967
  _context9.next = 55;
1953
1968
  break;
1954
1969
  }
1955
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_region)));
1970
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_endpoint)));
1956
1971
  case 55:
1957
- if (!(params.s3_region && !(0, _utils.isString)(params.s3_region))) {
1972
+ if (!(params.s3_compatible_region && !(0, _utils.isString)(params.s3_compatible_region))) {
1958
1973
  _context9.next = 56;
1959
1974
  break;
1960
1975
  }
1961
- throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(params.s3_region)));
1976
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_region)));
1962
1977
  case 56:
1963
- if (!(params.server_certificate && !(0, _utils.isString)(params.server_certificate))) {
1978
+ if (!(params.s3_region && !(0, _utils.isString)(params.s3_region))) {
1964
1979
  _context9.next = 57;
1965
1980
  break;
1966
1981
  }
1967
- throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
1982
+ throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(params.s3_region)));
1968
1983
  case 57:
1969
- if (!(params.server_host_key && !(0, _utils.isString)(params.server_host_key))) {
1984
+ if (!(params.server_certificate && !(0, _utils.isString)(params.server_certificate))) {
1970
1985
  _context9.next = 58;
1971
1986
  break;
1972
1987
  }
1973
- throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(params.server_host_key)));
1988
+ throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
1974
1989
  case 58:
1975
- if (!(params.server_type && !(0, _utils.isString)(params.server_type))) {
1990
+ if (!(params.server_host_key && !(0, _utils.isString)(params.server_host_key))) {
1976
1991
  _context9.next = 59;
1977
1992
  break;
1978
1993
  }
1979
- throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(params.server_type)));
1994
+ throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(params.server_host_key)));
1980
1995
  case 59:
1981
- if (!(params.ssl && !(0, _utils.isString)(params.ssl))) {
1996
+ if (!(params.server_type && !(0, _utils.isString)(params.server_type))) {
1982
1997
  _context9.next = 60;
1983
1998
  break;
1984
1999
  }
1985
- throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(params.ssl)));
2000
+ throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(params.server_type)));
1986
2001
  case 60:
1987
- if (!(params.username && !(0, _utils.isString)(params.username))) {
2002
+ if (!(params.ssl && !(0, _utils.isString)(params.ssl))) {
1988
2003
  _context9.next = 61;
1989
2004
  break;
1990
2005
  }
1991
- throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
2006
+ throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(params.ssl)));
1992
2007
  case 61:
1993
- if (!(params.wasabi_access_key && !(0, _utils.isString)(params.wasabi_access_key))) {
2008
+ if (!(params.username && !(0, _utils.isString)(params.username))) {
1994
2009
  _context9.next = 62;
1995
2010
  break;
1996
2011
  }
1997
- throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(params.wasabi_access_key)));
2012
+ throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params.username)));
1998
2013
  case 62:
1999
- if (!(params.wasabi_bucket && !(0, _utils.isString)(params.wasabi_bucket))) {
2014
+ if (!(params.wasabi_access_key && !(0, _utils.isString)(params.wasabi_access_key))) {
2000
2015
  _context9.next = 63;
2001
2016
  break;
2002
2017
  }
2003
- throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(params.wasabi_bucket)));
2018
+ throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(params.wasabi_access_key)));
2004
2019
  case 63:
2005
- if (!(params.wasabi_region && !(0, _utils.isString)(params.wasabi_region))) {
2020
+ if (!(params.wasabi_bucket && !(0, _utils.isString)(params.wasabi_bucket))) {
2006
2021
  _context9.next = 64;
2007
2022
  break;
2008
2023
  }
2009
- throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(params.wasabi_region)));
2024
+ throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(params.wasabi_bucket)));
2010
2025
  case 64:
2011
- if (!(params.workspace_id && !(0, _utils.isInt)(params.workspace_id))) {
2026
+ if (!(params.wasabi_region && !(0, _utils.isString)(params.wasabi_region))) {
2012
2027
  _context9.next = 65;
2013
2028
  break;
2014
2029
  }
2015
- throw new errors.InvalidParameterError("Bad parameter: workspace_id must be of type Int, received ".concat((0, _utils.getType)(params.workspace_id)));
2030
+ throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(params.wasabi_region)));
2016
2031
  case 65:
2017
- _context9.next = 66;
2018
- return _Api.default.sendRequest('/remote_servers', 'POST', params, options);
2032
+ if (!(params.workspace_id && !(0, _utils.isInt)(params.workspace_id))) {
2033
+ _context9.next = 66;
2034
+ break;
2035
+ }
2036
+ throw new errors.InvalidParameterError("Bad parameter: workspace_id must be of type Int, received ".concat((0, _utils.getType)(params.workspace_id)));
2019
2037
  case 66:
2038
+ _context9.next = 67;
2039
+ return _Api.default.sendRequest('/remote_servers', 'POST', params, options);
2040
+ case 67:
2020
2041
  response = _context9.sent;
2021
2042
  return _context9.abrupt("return", new _RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
2022
- case 67:
2043
+ case 68:
2023
2044
  case "end":
2024
2045
  return _context9.stop();
2025
2046
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.502",
3
+ "version": "1.2.504",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -6,7 +6,7 @@ let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
8
  let language = null
9
- const version = '1.2.502'
9
+ const version = '1.2.504'
10
10
  let userAgent = `Files.com JavaScript SDK v${version}`
11
11
 
12
12
  let logLevel = LogLevel.INFO
@@ -556,7 +556,7 @@ class Bundle {
556
556
  // 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.
557
557
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
558
558
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
559
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, created_at ]` and `[ user_id, expires_at ]`.
559
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `expires_at`, `code` or `user_id`. Valid field combinations are `[ user_id, expires_at ]`.
560
560
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at` and `expires_at`.
561
561
  // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at` and `expires_at`.
562
562
  // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `code`.
@@ -28,21 +28,21 @@ class RemoteServer {
28
28
 
29
29
  isLoaded = () => !!this.attributes.id
30
30
 
31
- // int64 # Remote server ID
31
+ // int64 # Remote Server ID
32
32
  getId = () => this.attributes.id
33
33
 
34
34
  setId = value => {
35
35
  this.attributes.id = value
36
36
  }
37
37
 
38
- // boolean # If true, this server has been disabled due to failures. Make any change or set disabled to false to clear this flag.
38
+ // boolean # If true, this Remote Server has been disabled due to failures. Make any change or set disabled to false to clear this flag.
39
39
  getDisabled = () => this.attributes.disabled
40
40
 
41
41
  setDisabled = value => {
42
42
  this.attributes.disabled = value
43
43
  }
44
44
 
45
- // string # Type of authentication method
45
+ // string # Type of authentication method to use
46
46
  getAuthenticationMethod = () => this.attributes.authentication_method
47
47
 
48
48
  setAuthenticationMethod = value => {
@@ -63,6 +63,13 @@ class RemoteServer {
63
63
  this.attributes.remote_home_path = value
64
64
  }
65
65
 
66
+ // string # Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.
67
+ getUploadStagingPath = () => this.attributes.upload_staging_path
68
+
69
+ setUploadStagingPath = value => {
70
+ this.attributes.upload_staging_path = value
71
+ }
72
+
66
73
  // string # Internal name for your reference
67
74
  getName = () => this.attributes.name
68
75
 
@@ -772,6 +779,7 @@ class RemoteServer {
772
779
  // one_drive_account_type - string - OneDrive: Either personal or business_other account types
773
780
  // pin_to_site_region - boolean - If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
774
781
  // port - int64 - Port for remote server.
782
+ // upload_staging_path - string - Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.
775
783
  // remote_server_credential_id - int64 - ID of Remote Server Credential, if applicable.
776
784
  // s3_bucket - string - S3 bucket name
777
785
  // s3_compatible_access_key - string - S3-compatible: Access Key
@@ -997,6 +1005,10 @@ class RemoteServer {
997
1005
  throw new errors.InvalidParameterError(`Bad parameter: port must be of type Int, received ${getType(params.port)}`)
998
1006
  }
999
1007
 
1008
+ if (params.upload_staging_path && !isString(params.upload_staging_path)) {
1009
+ throw new errors.InvalidParameterError(`Bad parameter: upload_staging_path must be of type String, received ${getType(params.upload_staging_path)}`)
1010
+ }
1011
+
1000
1012
  if (params.remote_server_credential_id && !isInt(params.remote_server_credential_id)) {
1001
1013
  throw new errors.InvalidParameterError(`Bad parameter: remote_server_credential_id must be of type Int, received ${getType(params.remote_server_credential_id)}`)
1002
1014
  }
@@ -1236,6 +1248,7 @@ class RemoteServer {
1236
1248
  // one_drive_account_type - string - OneDrive: Either personal or business_other account types
1237
1249
  // pin_to_site_region - boolean - If true, we will ensure that all communications with this remote server are made through the primary region of the site. This setting can also be overridden by a site-wide setting which will force it to true.
1238
1250
  // port - int64 - Port for remote server.
1251
+ // upload_staging_path - string - Upload staging path. Applies to SFTP only. If a path is provided here, files will first be uploaded to this path on the remote folder and the moved into the final correct path via an SFTP move command. This is required by some remote MFT systems to emulate atomic uploads, which are otherwise not supoprted by SFTP.
1239
1252
  // remote_server_credential_id - int64 - ID of Remote Server Credential, if applicable.
1240
1253
  // s3_bucket - string - S3 bucket name
1241
1254
  // s3_compatible_access_key - string - S3-compatible: Access Key
@@ -1449,6 +1462,10 @@ class RemoteServer {
1449
1462
  throw new errors.InvalidParameterError(`Bad parameter: port must be of type Int, received ${getType(params.port)}`)
1450
1463
  }
1451
1464
 
1465
+ if (params.upload_staging_path && !isString(params.upload_staging_path)) {
1466
+ throw new errors.InvalidParameterError(`Bad parameter: upload_staging_path must be of type String, received ${getType(params.upload_staging_path)}`)
1467
+ }
1468
+
1452
1469
  if (params.remote_server_credential_id && !isInt(params.remote_server_credential_id)) {
1453
1470
  throw new errors.InvalidParameterError(`Bad parameter: remote_server_credential_id must be of type Int, received ${getType(params.remote_server_credential_id)}`)
1454
1471
  }