files.com 1.2.199 → 1.2.201

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.199
1
+ 1.2.201
@@ -108,7 +108,7 @@ await Folder.listFor(path, {
108
108
  * `path` (string): Required - Path to operate on.
109
109
  * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
110
110
  * `sort_by` (object): Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
111
- * `search` (string): If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be trunacted if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
111
+ * `search` (string): If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be truncated if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
112
112
  * `search_all` (boolean): Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
113
113
  * `with_previews` (boolean): Include file previews?
114
114
  * `with_priority_color` (boolean): Include file priority color information?
@@ -41,6 +41,7 @@
41
41
  "azure_blob_storage_hierarchical_namespace": true,
42
42
  "azure_files_storage_account": "storage-account-name",
43
43
  "azure_files_storage_share_name": "share-name",
44
+ "azure_files_storage_dns_suffix": "file.core.windows.net",
44
45
  "s3_compatible_bucket": "my-bucket",
45
46
  "s3_compatible_endpoint": "mys3platform.com",
46
47
  "s3_compatible_region": "us-east-1",
@@ -100,6 +101,7 @@
100
101
  * `azure_blob_storage_hierarchical_namespace` (boolean): Enable when storage account has hierarchical namespace feature enabled
101
102
  * `azure_files_storage_account` (string): Azure File Storage Account name
102
103
  * `azure_files_storage_share_name` (string): Azure File Storage Share name
104
+ * `azure_files_storage_dns_suffix` (string): Custom DNS suffix
103
105
  * `s3_compatible_bucket` (string): S3-compatible Bucket name
104
106
  * `s3_compatible_endpoint` (string): S3-compatible endpoint
105
107
  * `s3_compatible_region` (string): S3-compatible endpoint
@@ -218,6 +220,7 @@ await RemoteServer.create({
218
220
  'azure_blob_storage_hierarchical_namespace': true,
219
221
  'azure_files_storage_account': "storage-account-name",
220
222
  'azure_files_storage_share_name': "share-name",
223
+ 'azure_files_storage_dns_suffix': "file.core.windows.net",
221
224
  's3_compatible_bucket': "my-bucket",
222
225
  's3_compatible_endpoint': "mys3platform.com",
223
226
  's3_compatible_region': "us-east-1",
@@ -284,6 +287,7 @@ await RemoteServer.create({
284
287
  * `azure_blob_storage_sas_token` (string): Shared Access Signature (SAS) token
285
288
  * `azure_files_storage_account` (string): Azure File Storage Account name
286
289
  * `azure_files_storage_share_name` (string): Azure File Storage Share name
290
+ * `azure_files_storage_dns_suffix` (string): Custom DNS suffix
287
291
  * `azure_files_storage_sas_token` (string): Shared Access Signature (SAS) token
288
292
  * `s3_compatible_bucket` (string): S3-compatible Bucket name
289
293
  * `s3_compatible_endpoint` (string): S3-compatible endpoint
@@ -413,6 +417,7 @@ await remote_server.update({
413
417
  'azure_blob_storage_hierarchical_namespace': true,
414
418
  'azure_files_storage_account': "storage-account-name",
415
419
  'azure_files_storage_share_name': "share-name",
420
+ 'azure_files_storage_dns_suffix': "file.core.windows.net",
416
421
  's3_compatible_bucket': "my-bucket",
417
422
  's3_compatible_endpoint': "mys3platform.com",
418
423
  's3_compatible_region': "us-east-1",
@@ -479,6 +484,7 @@ await remote_server.update({
479
484
  * `azure_blob_storage_sas_token` (string): Shared Access Signature (SAS) token
480
485
  * `azure_files_storage_account` (string): Azure File Storage Account name
481
486
  * `azure_files_storage_share_name` (string): Azure File Storage Share name
487
+ * `azure_files_storage_dns_suffix` (string): Custom DNS suffix
482
488
  * `azure_files_storage_sas_token` (string): Shared Access Signature (SAS) token
483
489
  * `s3_compatible_bucket` (string): S3-compatible Bucket name
484
490
  * `s3_compatible_endpoint` (string): S3-compatible endpoint
@@ -543,6 +549,7 @@ await remote_server.update({
543
549
  "azure_blob_storage_hierarchical_namespace": true,
544
550
  "azure_files_storage_account": "storage-account-name",
545
551
  "azure_files_storage_share_name": "share-name",
552
+ "azure_files_storage_dns_suffix": "file.core.windows.net",
546
553
  "s3_compatible_bucket": "my-bucket",
547
554
  "s3_compatible_endpoint": "mys3platform.com",
548
555
  "s3_compatible_region": "us-east-1",
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.199';
14
+ var version = '1.2.201';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -316,7 +316,7 @@ var Folder = /*#__PURE__*/(0, _createClass2.default)(function Folder() {
316
316
  // path (required) - string - Path to operate on.
317
317
  // preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
318
318
  // sort_by - object - Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
319
- // search - string - If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be trunacted if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
319
+ // search - string - If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be truncated if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
320
320
  // search_all - boolean - Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
321
321
  // with_previews - boolean - Include file previews?
322
322
  // with_priority_color - boolean - Include file priority color information?
@@ -292,6 +292,13 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
292
292
  (0, _defineProperty2.default)(this, "setAzureFilesStorageShareName", function (value) {
293
293
  _this.attributes.azure_files_storage_share_name = value;
294
294
  });
295
+ // string # Custom DNS suffix
296
+ (0, _defineProperty2.default)(this, "getAzureFilesStorageDnsSuffix", function () {
297
+ return _this.attributes.azure_files_storage_dns_suffix;
298
+ });
299
+ (0, _defineProperty2.default)(this, "setAzureFilesStorageDnsSuffix", function (value) {
300
+ _this.attributes.azure_files_storage_dns_suffix = value;
301
+ });
295
302
  // string # S3-compatible Bucket name
296
303
  (0, _defineProperty2.default)(this, "getS3CompatibleBucket", function () {
297
304
  return _this.attributes.s3_compatible_bucket;
@@ -736,6 +743,7 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
736
743
  // azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
737
744
  // azure_files_storage_account - string - Azure File Storage Account name
738
745
  // azure_files_storage_share_name - string - Azure File Storage Share name
746
+ // azure_files_storage_dns_suffix - string - Custom DNS suffix
739
747
  // azure_files_storage_sas_token - string - Shared Access Signature (SAS) token
740
748
  // s3_compatible_bucket - string - S3-compatible Bucket name
741
749
  // s3_compatible_endpoint - string - S3-compatible endpoint
@@ -1025,146 +1033,152 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
1025
1033
  }
1026
1034
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_share_name must be of type String, received ".concat((0, _utils.getType)(params.azure_files_storage_share_name)));
1027
1035
  case 88:
1028
- if (!(params.azure_files_storage_sas_token && !(0, _utils.isString)(params.azure_files_storage_sas_token))) {
1036
+ if (!(params.azure_files_storage_dns_suffix && !(0, _utils.isString)(params.azure_files_storage_dns_suffix))) {
1029
1037
  _context2.next = 90;
1030
1038
  break;
1031
1039
  }
1032
- throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params.azure_files_storage_sas_token)));
1040
+ throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_dns_suffix must be of type String, received ".concat((0, _utils.getType)(params.azure_files_storage_dns_suffix)));
1033
1041
  case 90:
1034
- if (!(params.s3_compatible_bucket && !(0, _utils.isString)(params.s3_compatible_bucket))) {
1042
+ if (!(params.azure_files_storage_sas_token && !(0, _utils.isString)(params.azure_files_storage_sas_token))) {
1035
1043
  _context2.next = 92;
1036
1044
  break;
1037
1045
  }
1038
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_bucket)));
1046
+ throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params.azure_files_storage_sas_token)));
1039
1047
  case 92:
1040
- if (!(params.s3_compatible_endpoint && !(0, _utils.isString)(params.s3_compatible_endpoint))) {
1048
+ if (!(params.s3_compatible_bucket && !(0, _utils.isString)(params.s3_compatible_bucket))) {
1041
1049
  _context2.next = 94;
1042
1050
  break;
1043
1051
  }
1044
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_endpoint)));
1052
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_bucket)));
1045
1053
  case 94:
1046
- if (!(params.s3_compatible_region && !(0, _utils.isString)(params.s3_compatible_region))) {
1054
+ if (!(params.s3_compatible_endpoint && !(0, _utils.isString)(params.s3_compatible_endpoint))) {
1047
1055
  _context2.next = 96;
1048
1056
  break;
1049
1057
  }
1050
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_region)));
1058
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_endpoint)));
1051
1059
  case 96:
1052
- if (!(params.s3_compatible_access_key && !(0, _utils.isString)(params.s3_compatible_access_key))) {
1060
+ if (!(params.s3_compatible_region && !(0, _utils.isString)(params.s3_compatible_region))) {
1053
1061
  _context2.next = 98;
1054
1062
  break;
1055
1063
  }
1056
- 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)));
1064
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_region)));
1057
1065
  case 98:
1058
- if (!(params.s3_compatible_secret_key && !(0, _utils.isString)(params.s3_compatible_secret_key))) {
1066
+ if (!(params.s3_compatible_access_key && !(0, _utils.isString)(params.s3_compatible_access_key))) {
1059
1067
  _context2.next = 100;
1060
1068
  break;
1061
1069
  }
1062
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_secret_key)));
1070
+ 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)));
1063
1071
  case 100:
1064
- if (!(params.files_agent_root && !(0, _utils.isString)(params.files_agent_root))) {
1072
+ if (!(params.s3_compatible_secret_key && !(0, _utils.isString)(params.s3_compatible_secret_key))) {
1065
1073
  _context2.next = 102;
1066
1074
  break;
1067
1075
  }
1068
- throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(params.files_agent_root)));
1076
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_secret_key)));
1069
1077
  case 102:
1070
- if (!(params.files_agent_permission_set && !(0, _utils.isString)(params.files_agent_permission_set))) {
1078
+ if (!(params.files_agent_root && !(0, _utils.isString)(params.files_agent_root))) {
1071
1079
  _context2.next = 104;
1072
1080
  break;
1073
1081
  }
1074
- throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(params.files_agent_permission_set)));
1082
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(params.files_agent_root)));
1075
1083
  case 104:
1076
- if (!(params.files_agent_version && !(0, _utils.isString)(params.files_agent_version))) {
1084
+ if (!(params.files_agent_permission_set && !(0, _utils.isString)(params.files_agent_permission_set))) {
1077
1085
  _context2.next = 106;
1078
1086
  break;
1079
1087
  }
1080
- throw new errors.InvalidParameterError("Bad parameter: files_agent_version must be of type String, received ".concat((0, _utils.getType)(params.files_agent_version)));
1088
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(params.files_agent_permission_set)));
1081
1089
  case 106:
1082
- if (!(params.filebase_access_key && !(0, _utils.isString)(params.filebase_access_key))) {
1090
+ if (!(params.files_agent_version && !(0, _utils.isString)(params.files_agent_version))) {
1083
1091
  _context2.next = 108;
1084
1092
  break;
1085
1093
  }
1086
- throw new errors.InvalidParameterError("Bad parameter: filebase_access_key must be of type String, received ".concat((0, _utils.getType)(params.filebase_access_key)));
1094
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_version must be of type String, received ".concat((0, _utils.getType)(params.files_agent_version)));
1087
1095
  case 108:
1088
- if (!(params.filebase_secret_key && !(0, _utils.isString)(params.filebase_secret_key))) {
1096
+ if (!(params.filebase_access_key && !(0, _utils.isString)(params.filebase_access_key))) {
1089
1097
  _context2.next = 110;
1090
1098
  break;
1091
1099
  }
1092
- throw new errors.InvalidParameterError("Bad parameter: filebase_secret_key must be of type String, received ".concat((0, _utils.getType)(params.filebase_secret_key)));
1100
+ throw new errors.InvalidParameterError("Bad parameter: filebase_access_key must be of type String, received ".concat((0, _utils.getType)(params.filebase_access_key)));
1093
1101
  case 110:
1094
- if (!(params.filebase_bucket && !(0, _utils.isString)(params.filebase_bucket))) {
1102
+ if (!(params.filebase_secret_key && !(0, _utils.isString)(params.filebase_secret_key))) {
1095
1103
  _context2.next = 112;
1096
1104
  break;
1097
1105
  }
1098
- throw new errors.InvalidParameterError("Bad parameter: filebase_bucket must be of type String, received ".concat((0, _utils.getType)(params.filebase_bucket)));
1106
+ throw new errors.InvalidParameterError("Bad parameter: filebase_secret_key must be of type String, received ".concat((0, _utils.getType)(params.filebase_secret_key)));
1099
1107
  case 112:
1100
- if (!(params.cloudflare_access_key && !(0, _utils.isString)(params.cloudflare_access_key))) {
1108
+ if (!(params.filebase_bucket && !(0, _utils.isString)(params.filebase_bucket))) {
1101
1109
  _context2.next = 114;
1102
1110
  break;
1103
1111
  }
1104
- throw new errors.InvalidParameterError("Bad parameter: cloudflare_access_key must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_access_key)));
1112
+ throw new errors.InvalidParameterError("Bad parameter: filebase_bucket must be of type String, received ".concat((0, _utils.getType)(params.filebase_bucket)));
1105
1113
  case 114:
1106
- if (!(params.cloudflare_secret_key && !(0, _utils.isString)(params.cloudflare_secret_key))) {
1114
+ if (!(params.cloudflare_access_key && !(0, _utils.isString)(params.cloudflare_access_key))) {
1107
1115
  _context2.next = 116;
1108
1116
  break;
1109
1117
  }
1110
- throw new errors.InvalidParameterError("Bad parameter: cloudflare_secret_key must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_secret_key)));
1118
+ throw new errors.InvalidParameterError("Bad parameter: cloudflare_access_key must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_access_key)));
1111
1119
  case 116:
1112
- if (!(params.cloudflare_bucket && !(0, _utils.isString)(params.cloudflare_bucket))) {
1120
+ if (!(params.cloudflare_secret_key && !(0, _utils.isString)(params.cloudflare_secret_key))) {
1113
1121
  _context2.next = 118;
1114
1122
  break;
1115
1123
  }
1116
- throw new errors.InvalidParameterError("Bad parameter: cloudflare_bucket must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_bucket)));
1124
+ throw new errors.InvalidParameterError("Bad parameter: cloudflare_secret_key must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_secret_key)));
1117
1125
  case 118:
1118
- if (!(params.cloudflare_endpoint && !(0, _utils.isString)(params.cloudflare_endpoint))) {
1126
+ if (!(params.cloudflare_bucket && !(0, _utils.isString)(params.cloudflare_bucket))) {
1119
1127
  _context2.next = 120;
1120
1128
  break;
1121
1129
  }
1122
- throw new errors.InvalidParameterError("Bad parameter: cloudflare_endpoint must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_endpoint)));
1130
+ throw new errors.InvalidParameterError("Bad parameter: cloudflare_bucket must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_bucket)));
1123
1131
  case 120:
1124
- if (!(params.linode_access_key && !(0, _utils.isString)(params.linode_access_key))) {
1132
+ if (!(params.cloudflare_endpoint && !(0, _utils.isString)(params.cloudflare_endpoint))) {
1125
1133
  _context2.next = 122;
1126
1134
  break;
1127
1135
  }
1128
- throw new errors.InvalidParameterError("Bad parameter: linode_access_key must be of type String, received ".concat((0, _utils.getType)(params.linode_access_key)));
1136
+ throw new errors.InvalidParameterError("Bad parameter: cloudflare_endpoint must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_endpoint)));
1129
1137
  case 122:
1130
- if (!(params.linode_secret_key && !(0, _utils.isString)(params.linode_secret_key))) {
1138
+ if (!(params.linode_access_key && !(0, _utils.isString)(params.linode_access_key))) {
1131
1139
  _context2.next = 124;
1132
1140
  break;
1133
1141
  }
1134
- throw new errors.InvalidParameterError("Bad parameter: linode_secret_key must be of type String, received ".concat((0, _utils.getType)(params.linode_secret_key)));
1142
+ throw new errors.InvalidParameterError("Bad parameter: linode_access_key must be of type String, received ".concat((0, _utils.getType)(params.linode_access_key)));
1135
1143
  case 124:
1136
- if (!(params.linode_bucket && !(0, _utils.isString)(params.linode_bucket))) {
1144
+ if (!(params.linode_secret_key && !(0, _utils.isString)(params.linode_secret_key))) {
1137
1145
  _context2.next = 126;
1138
1146
  break;
1139
1147
  }
1140
- throw new errors.InvalidParameterError("Bad parameter: linode_bucket must be of type String, received ".concat((0, _utils.getType)(params.linode_bucket)));
1148
+ throw new errors.InvalidParameterError("Bad parameter: linode_secret_key must be of type String, received ".concat((0, _utils.getType)(params.linode_secret_key)));
1141
1149
  case 126:
1142
- if (!(params.linode_region && !(0, _utils.isString)(params.linode_region))) {
1150
+ if (!(params.linode_bucket && !(0, _utils.isString)(params.linode_bucket))) {
1143
1151
  _context2.next = 128;
1144
1152
  break;
1145
1153
  }
1146
- throw new errors.InvalidParameterError("Bad parameter: linode_region must be of type String, received ".concat((0, _utils.getType)(params.linode_region)));
1154
+ throw new errors.InvalidParameterError("Bad parameter: linode_bucket must be of type String, received ".concat((0, _utils.getType)(params.linode_bucket)));
1147
1155
  case 128:
1156
+ if (!(params.linode_region && !(0, _utils.isString)(params.linode_region))) {
1157
+ _context2.next = 130;
1158
+ break;
1159
+ }
1160
+ throw new errors.InvalidParameterError("Bad parameter: linode_region must be of type String, received ".concat((0, _utils.getType)(params.linode_region)));
1161
+ case 130:
1148
1162
  if (params.id) {
1149
- _context2.next = 134;
1163
+ _context2.next = 136;
1150
1164
  break;
1151
1165
  }
1152
1166
  if (!_this.attributes.id) {
1153
- _context2.next = 133;
1167
+ _context2.next = 135;
1154
1168
  break;
1155
1169
  }
1156
1170
  params.id = _this.id;
1157
- _context2.next = 134;
1171
+ _context2.next = 136;
1158
1172
  break;
1159
- case 133:
1173
+ case 135:
1160
1174
  throw new errors.MissingParameterError('Parameter missing: id');
1161
- case 134:
1162
- _context2.next = 136;
1163
- return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
1164
1175
  case 136:
1176
+ _context2.next = 138;
1177
+ return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
1178
+ case 138:
1165
1179
  response = _context2.sent;
1166
1180
  return _context2.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, _this.options));
1167
- case 138:
1181
+ case 140:
1168
1182
  case "end":
1169
1183
  return _context2.stop();
1170
1184
  }
@@ -1456,6 +1470,7 @@ _RemoteServer = RemoteServer;
1456
1470
  // azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
1457
1471
  // azure_files_storage_account - string - Azure File Storage Account name
1458
1472
  // azure_files_storage_share_name - string - Azure File Storage Share name
1473
+ // azure_files_storage_dns_suffix - string - Custom DNS suffix
1459
1474
  // azure_files_storage_sas_token - string - Shared Access Signature (SAS) token
1460
1475
  // s3_compatible_bucket - string - S3-compatible Bucket name
1461
1476
  // s3_compatible_endpoint - string - S3-compatible endpoint
@@ -1728,132 +1743,138 @@ _RemoteServer = RemoteServer;
1728
1743
  }
1729
1744
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_share_name must be of type String, received ".concat((0, _utils.getType)(params.azure_files_storage_share_name)));
1730
1745
  case 82:
1731
- if (!(params.azure_files_storage_sas_token && !(0, _utils.isString)(params.azure_files_storage_sas_token))) {
1746
+ if (!(params.azure_files_storage_dns_suffix && !(0, _utils.isString)(params.azure_files_storage_dns_suffix))) {
1732
1747
  _context8.next = 84;
1733
1748
  break;
1734
1749
  }
1735
- throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params.azure_files_storage_sas_token)));
1750
+ throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_dns_suffix must be of type String, received ".concat((0, _utils.getType)(params.azure_files_storage_dns_suffix)));
1736
1751
  case 84:
1737
- if (!(params.s3_compatible_bucket && !(0, _utils.isString)(params.s3_compatible_bucket))) {
1752
+ if (!(params.azure_files_storage_sas_token && !(0, _utils.isString)(params.azure_files_storage_sas_token))) {
1738
1753
  _context8.next = 86;
1739
1754
  break;
1740
1755
  }
1741
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_bucket)));
1756
+ throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params.azure_files_storage_sas_token)));
1742
1757
  case 86:
1743
- if (!(params.s3_compatible_endpoint && !(0, _utils.isString)(params.s3_compatible_endpoint))) {
1758
+ if (!(params.s3_compatible_bucket && !(0, _utils.isString)(params.s3_compatible_bucket))) {
1744
1759
  _context8.next = 88;
1745
1760
  break;
1746
1761
  }
1747
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_endpoint)));
1762
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_bucket)));
1748
1763
  case 88:
1749
- if (!(params.s3_compatible_region && !(0, _utils.isString)(params.s3_compatible_region))) {
1764
+ if (!(params.s3_compatible_endpoint && !(0, _utils.isString)(params.s3_compatible_endpoint))) {
1750
1765
  _context8.next = 90;
1751
1766
  break;
1752
1767
  }
1753
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_region)));
1768
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_endpoint)));
1754
1769
  case 90:
1755
- if (!(params.s3_compatible_access_key && !(0, _utils.isString)(params.s3_compatible_access_key))) {
1770
+ if (!(params.s3_compatible_region && !(0, _utils.isString)(params.s3_compatible_region))) {
1756
1771
  _context8.next = 92;
1757
1772
  break;
1758
1773
  }
1759
- 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)));
1774
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_region)));
1760
1775
  case 92:
1761
- if (!(params.s3_compatible_secret_key && !(0, _utils.isString)(params.s3_compatible_secret_key))) {
1776
+ if (!(params.s3_compatible_access_key && !(0, _utils.isString)(params.s3_compatible_access_key))) {
1762
1777
  _context8.next = 94;
1763
1778
  break;
1764
1779
  }
1765
- throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_secret_key)));
1780
+ 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)));
1766
1781
  case 94:
1767
- if (!(params.files_agent_root && !(0, _utils.isString)(params.files_agent_root))) {
1782
+ if (!(params.s3_compatible_secret_key && !(0, _utils.isString)(params.s3_compatible_secret_key))) {
1768
1783
  _context8.next = 96;
1769
1784
  break;
1770
1785
  }
1771
- throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(params.files_agent_root)));
1786
+ throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(params.s3_compatible_secret_key)));
1772
1787
  case 96:
1773
- if (!(params.files_agent_permission_set && !(0, _utils.isString)(params.files_agent_permission_set))) {
1788
+ if (!(params.files_agent_root && !(0, _utils.isString)(params.files_agent_root))) {
1774
1789
  _context8.next = 98;
1775
1790
  break;
1776
1791
  }
1777
- throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(params.files_agent_permission_set)));
1792
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(params.files_agent_root)));
1778
1793
  case 98:
1779
- if (!(params.files_agent_version && !(0, _utils.isString)(params.files_agent_version))) {
1794
+ if (!(params.files_agent_permission_set && !(0, _utils.isString)(params.files_agent_permission_set))) {
1780
1795
  _context8.next = 100;
1781
1796
  break;
1782
1797
  }
1783
- throw new errors.InvalidParameterError("Bad parameter: files_agent_version must be of type String, received ".concat((0, _utils.getType)(params.files_agent_version)));
1798
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(params.files_agent_permission_set)));
1784
1799
  case 100:
1785
- if (!(params.filebase_access_key && !(0, _utils.isString)(params.filebase_access_key))) {
1800
+ if (!(params.files_agent_version && !(0, _utils.isString)(params.files_agent_version))) {
1786
1801
  _context8.next = 102;
1787
1802
  break;
1788
1803
  }
1789
- throw new errors.InvalidParameterError("Bad parameter: filebase_access_key must be of type String, received ".concat((0, _utils.getType)(params.filebase_access_key)));
1804
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_version must be of type String, received ".concat((0, _utils.getType)(params.files_agent_version)));
1790
1805
  case 102:
1791
- if (!(params.filebase_secret_key && !(0, _utils.isString)(params.filebase_secret_key))) {
1806
+ if (!(params.filebase_access_key && !(0, _utils.isString)(params.filebase_access_key))) {
1792
1807
  _context8.next = 104;
1793
1808
  break;
1794
1809
  }
1795
- throw new errors.InvalidParameterError("Bad parameter: filebase_secret_key must be of type String, received ".concat((0, _utils.getType)(params.filebase_secret_key)));
1810
+ throw new errors.InvalidParameterError("Bad parameter: filebase_access_key must be of type String, received ".concat((0, _utils.getType)(params.filebase_access_key)));
1796
1811
  case 104:
1797
- if (!(params.filebase_bucket && !(0, _utils.isString)(params.filebase_bucket))) {
1812
+ if (!(params.filebase_secret_key && !(0, _utils.isString)(params.filebase_secret_key))) {
1798
1813
  _context8.next = 106;
1799
1814
  break;
1800
1815
  }
1801
- throw new errors.InvalidParameterError("Bad parameter: filebase_bucket must be of type String, received ".concat((0, _utils.getType)(params.filebase_bucket)));
1816
+ throw new errors.InvalidParameterError("Bad parameter: filebase_secret_key must be of type String, received ".concat((0, _utils.getType)(params.filebase_secret_key)));
1802
1817
  case 106:
1803
- if (!(params.cloudflare_access_key && !(0, _utils.isString)(params.cloudflare_access_key))) {
1818
+ if (!(params.filebase_bucket && !(0, _utils.isString)(params.filebase_bucket))) {
1804
1819
  _context8.next = 108;
1805
1820
  break;
1806
1821
  }
1807
- throw new errors.InvalidParameterError("Bad parameter: cloudflare_access_key must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_access_key)));
1822
+ throw new errors.InvalidParameterError("Bad parameter: filebase_bucket must be of type String, received ".concat((0, _utils.getType)(params.filebase_bucket)));
1808
1823
  case 108:
1809
- if (!(params.cloudflare_secret_key && !(0, _utils.isString)(params.cloudflare_secret_key))) {
1824
+ if (!(params.cloudflare_access_key && !(0, _utils.isString)(params.cloudflare_access_key))) {
1810
1825
  _context8.next = 110;
1811
1826
  break;
1812
1827
  }
1813
- throw new errors.InvalidParameterError("Bad parameter: cloudflare_secret_key must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_secret_key)));
1828
+ throw new errors.InvalidParameterError("Bad parameter: cloudflare_access_key must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_access_key)));
1814
1829
  case 110:
1815
- if (!(params.cloudflare_bucket && !(0, _utils.isString)(params.cloudflare_bucket))) {
1830
+ if (!(params.cloudflare_secret_key && !(0, _utils.isString)(params.cloudflare_secret_key))) {
1816
1831
  _context8.next = 112;
1817
1832
  break;
1818
1833
  }
1819
- throw new errors.InvalidParameterError("Bad parameter: cloudflare_bucket must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_bucket)));
1834
+ throw new errors.InvalidParameterError("Bad parameter: cloudflare_secret_key must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_secret_key)));
1820
1835
  case 112:
1821
- if (!(params.cloudflare_endpoint && !(0, _utils.isString)(params.cloudflare_endpoint))) {
1836
+ if (!(params.cloudflare_bucket && !(0, _utils.isString)(params.cloudflare_bucket))) {
1822
1837
  _context8.next = 114;
1823
1838
  break;
1824
1839
  }
1825
- throw new errors.InvalidParameterError("Bad parameter: cloudflare_endpoint must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_endpoint)));
1840
+ throw new errors.InvalidParameterError("Bad parameter: cloudflare_bucket must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_bucket)));
1826
1841
  case 114:
1827
- if (!(params.linode_access_key && !(0, _utils.isString)(params.linode_access_key))) {
1842
+ if (!(params.cloudflare_endpoint && !(0, _utils.isString)(params.cloudflare_endpoint))) {
1828
1843
  _context8.next = 116;
1829
1844
  break;
1830
1845
  }
1831
- throw new errors.InvalidParameterError("Bad parameter: linode_access_key must be of type String, received ".concat((0, _utils.getType)(params.linode_access_key)));
1846
+ throw new errors.InvalidParameterError("Bad parameter: cloudflare_endpoint must be of type String, received ".concat((0, _utils.getType)(params.cloudflare_endpoint)));
1832
1847
  case 116:
1833
- if (!(params.linode_secret_key && !(0, _utils.isString)(params.linode_secret_key))) {
1848
+ if (!(params.linode_access_key && !(0, _utils.isString)(params.linode_access_key))) {
1834
1849
  _context8.next = 118;
1835
1850
  break;
1836
1851
  }
1837
- throw new errors.InvalidParameterError("Bad parameter: linode_secret_key must be of type String, received ".concat((0, _utils.getType)(params.linode_secret_key)));
1852
+ throw new errors.InvalidParameterError("Bad parameter: linode_access_key must be of type String, received ".concat((0, _utils.getType)(params.linode_access_key)));
1838
1853
  case 118:
1839
- if (!(params.linode_bucket && !(0, _utils.isString)(params.linode_bucket))) {
1854
+ if (!(params.linode_secret_key && !(0, _utils.isString)(params.linode_secret_key))) {
1840
1855
  _context8.next = 120;
1841
1856
  break;
1842
1857
  }
1843
- throw new errors.InvalidParameterError("Bad parameter: linode_bucket must be of type String, received ".concat((0, _utils.getType)(params.linode_bucket)));
1858
+ throw new errors.InvalidParameterError("Bad parameter: linode_secret_key must be of type String, received ".concat((0, _utils.getType)(params.linode_secret_key)));
1844
1859
  case 120:
1845
- if (!(params.linode_region && !(0, _utils.isString)(params.linode_region))) {
1860
+ if (!(params.linode_bucket && !(0, _utils.isString)(params.linode_bucket))) {
1846
1861
  _context8.next = 122;
1847
1862
  break;
1848
1863
  }
1849
- throw new errors.InvalidParameterError("Bad parameter: linode_region must be of type String, received ".concat((0, _utils.getType)(params.linode_region)));
1864
+ throw new errors.InvalidParameterError("Bad parameter: linode_bucket must be of type String, received ".concat((0, _utils.getType)(params.linode_bucket)));
1850
1865
  case 122:
1851
- _context8.next = 124;
1852
- return _Api.default.sendRequest('/remote_servers', 'POST', params, options);
1866
+ if (!(params.linode_region && !(0, _utils.isString)(params.linode_region))) {
1867
+ _context8.next = 124;
1868
+ break;
1869
+ }
1870
+ throw new errors.InvalidParameterError("Bad parameter: linode_region must be of type String, received ".concat((0, _utils.getType)(params.linode_region)));
1853
1871
  case 124:
1872
+ _context8.next = 126;
1873
+ return _Api.default.sendRequest('/remote_servers', 'POST', params, options);
1874
+ case 126:
1854
1875
  response = _context8.sent;
1855
1876
  return _context8.abrupt("return", new _RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
1856
- case 126:
1877
+ case 128:
1857
1878
  case "end":
1858
1879
  return _context8.stop();
1859
1880
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.199",
3
+ "version": "1.2.201",
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.199'
8
+ const version = '1.2.201'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -288,7 +288,7 @@ class Folder {
288
288
  // path (required) - string - Path to operate on.
289
289
  // preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
290
290
  // sort_by - object - Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
291
- // search - string - If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be trunacted if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
291
+ // search - string - If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be truncated if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
292
292
  // search_all - boolean - Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
293
293
  // with_previews - boolean - Include file previews?
294
294
  // with_priority_color - boolean - Include file priority color information?
@@ -287,6 +287,13 @@ class RemoteServer {
287
287
  this.attributes.azure_files_storage_share_name = value
288
288
  }
289
289
 
290
+ // string # Custom DNS suffix
291
+ getAzureFilesStorageDnsSuffix = () => this.attributes.azure_files_storage_dns_suffix
292
+
293
+ setAzureFilesStorageDnsSuffix = value => {
294
+ this.attributes.azure_files_storage_dns_suffix = value
295
+ }
296
+
290
297
  // string # S3-compatible Bucket name
291
298
  getS3CompatibleBucket = () => this.attributes.s3_compatible_bucket
292
299
 
@@ -683,6 +690,7 @@ class RemoteServer {
683
690
  // azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
684
691
  // azure_files_storage_account - string - Azure File Storage Account name
685
692
  // azure_files_storage_share_name - string - Azure File Storage Share name
693
+ // azure_files_storage_dns_suffix - string - Custom DNS suffix
686
694
  // azure_files_storage_sas_token - string - Shared Access Signature (SAS) token
687
695
  // s3_compatible_bucket - string - S3-compatible Bucket name
688
696
  // s3_compatible_endpoint - string - S3-compatible endpoint
@@ -879,6 +887,10 @@ class RemoteServer {
879
887
  throw new errors.InvalidParameterError(`Bad parameter: azure_files_storage_share_name must be of type String, received ${getType(params.azure_files_storage_share_name)}`)
880
888
  }
881
889
 
890
+ if (params.azure_files_storage_dns_suffix && !isString(params.azure_files_storage_dns_suffix)) {
891
+ throw new errors.InvalidParameterError(`Bad parameter: azure_files_storage_dns_suffix must be of type String, received ${getType(params.azure_files_storage_dns_suffix)}`)
892
+ }
893
+
882
894
  if (params.azure_files_storage_sas_token && !isString(params.azure_files_storage_sas_token)) {
883
895
  throw new errors.InvalidParameterError(`Bad parameter: azure_files_storage_sas_token must be of type String, received ${getType(params.azure_files_storage_sas_token)}`)
884
896
  }
@@ -1127,6 +1139,7 @@ class RemoteServer {
1127
1139
  // azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
1128
1140
  // azure_files_storage_account - string - Azure File Storage Account name
1129
1141
  // azure_files_storage_share_name - string - Azure File Storage Share name
1142
+ // azure_files_storage_dns_suffix - string - Custom DNS suffix
1130
1143
  // azure_files_storage_sas_token - string - Shared Access Signature (SAS) token
1131
1144
  // s3_compatible_bucket - string - S3-compatible Bucket name
1132
1145
  // s3_compatible_endpoint - string - S3-compatible endpoint
@@ -1310,6 +1323,10 @@ class RemoteServer {
1310
1323
  throw new errors.InvalidParameterError(`Bad parameter: azure_files_storage_share_name must be of type String, received ${getType(params.azure_files_storage_share_name)}`)
1311
1324
  }
1312
1325
 
1326
+ if (params.azure_files_storage_dns_suffix && !isString(params.azure_files_storage_dns_suffix)) {
1327
+ throw new errors.InvalidParameterError(`Bad parameter: azure_files_storage_dns_suffix must be of type String, received ${getType(params.azure_files_storage_dns_suffix)}`)
1328
+ }
1329
+
1313
1330
  if (params.azure_files_storage_sas_token && !isString(params.azure_files_storage_sas_token)) {
1314
1331
  throw new errors.InvalidParameterError(`Bad parameter: azure_files_storage_sas_token must be of type String, received ${getType(params.azure_files_storage_sas_token)}`)
1315
1332
  }