files.com 1.2.274 → 1.2.276

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.
Files changed (40) hide show
  1. package/_VERSION +1 -1
  2. package/docs/models/ApiRequestLog.md +6 -6
  3. package/docs/models/AutomationLog.md +6 -6
  4. package/docs/models/EmailLog.md +6 -6
  5. package/docs/models/ExavaultApiRequestLog.md +6 -6
  6. package/docs/models/FileMigrationLog.md +6 -6
  7. package/docs/models/FtpActionLog.md +6 -6
  8. package/docs/models/OutboundConnectionLog.md +6 -6
  9. package/docs/models/PublicHostingRequestLog.md +6 -6
  10. package/docs/models/RemoteMountBackend.md +10 -12
  11. package/docs/models/SftpActionLog.md +6 -6
  12. package/docs/models/SyncLog.md +6 -6
  13. package/docs/models/WebDavActionLog.md +6 -6
  14. package/lib/Files.js +1 -1
  15. package/lib/models/ApiRequestLog.js +6 -6
  16. package/lib/models/AutomationLog.js +6 -6
  17. package/lib/models/EmailLog.js +6 -6
  18. package/lib/models/ExavaultApiRequestLog.js +6 -6
  19. package/lib/models/FileMigrationLog.js +6 -6
  20. package/lib/models/FtpActionLog.js +178 -29
  21. package/lib/models/OutboundConnectionLog.js +6 -6
  22. package/lib/models/PublicHostingRequestLog.js +6 -6
  23. package/lib/models/RemoteMountBackend.js +47 -96
  24. package/lib/models/SftpActionLog.js +194 -33
  25. package/lib/models/SyncLog.js +6 -6
  26. package/lib/models/WebDavActionLog.js +6 -6
  27. package/package.json +1 -1
  28. package/src/Files.js +1 -1
  29. package/src/models/ApiRequestLog.js +6 -6
  30. package/src/models/AutomationLog.js +6 -6
  31. package/src/models/EmailLog.js +6 -6
  32. package/src/models/ExavaultApiRequestLog.js +6 -6
  33. package/src/models/FileMigrationLog.js +6 -6
  34. package/src/models/FtpActionLog.js +6 -6
  35. package/src/models/OutboundConnectionLog.js +6 -6
  36. package/src/models/PublicHostingRequestLog.js +6 -6
  37. package/src/models/RemoteMountBackend.js +25 -54
  38. package/src/models/SftpActionLog.js +6 -6
  39. package/src/models/SyncLog.js +6 -6
  40. package/src/models/WebDavActionLog.js +6 -6
@@ -64,12 +64,12 @@ class PublicHostingRequestLog {
64
64
  // Parameters:
65
65
  // 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.
66
66
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
67
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `start_date`, `end_date`, `path`, `remote_ip`, `success` or `created_at`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ start_date, created_at ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ end_date, created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, end_date, created_at ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, path, created_at ]`, `[ start_date, remote_ip, success ]`, `[ start_date, remote_ip, created_at ]`, `[ start_date, success, created_at ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, path, created_at ]`, `[ end_date, remote_ip, success ]`, `[ end_date, remote_ip, created_at ]`, `[ end_date, success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, path, created_at ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, end_date, remote_ip, created_at ]`, `[ start_date, end_date, success, created_at ]`, `[ start_date, path, remote_ip, success ]`, `[ start_date, path, remote_ip, created_at ]`, `[ start_date, path, success, created_at ]`, `[ start_date, remote_ip, success, created_at ]`, `[ end_date, path, remote_ip, success ]`, `[ end_date, path, remote_ip, created_at ]`, `[ end_date, path, success, created_at ]`, `[ end_date, remote_ip, success, created_at ]`, `[ path, remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip, created_at ]`, `[ start_date, end_date, path, success, created_at ]`, `[ start_date, end_date, remote_ip, success, created_at ]`, `[ start_date, path, remote_ip, success, created_at ]` or `[ end_date, path, remote_ip, success, created_at ]`.
68
- // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ start_date, created_at ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ end_date, created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, end_date, created_at ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, path, created_at ]`, `[ start_date, remote_ip, success ]`, `[ start_date, remote_ip, created_at ]`, `[ start_date, success, created_at ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, path, created_at ]`, `[ end_date, remote_ip, success ]`, `[ end_date, remote_ip, created_at ]`, `[ end_date, success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, path, created_at ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, end_date, remote_ip, created_at ]`, `[ start_date, end_date, success, created_at ]`, `[ start_date, path, remote_ip, success ]`, `[ start_date, path, remote_ip, created_at ]`, `[ start_date, path, success, created_at ]`, `[ start_date, remote_ip, success, created_at ]`, `[ end_date, path, remote_ip, success ]`, `[ end_date, path, remote_ip, created_at ]`, `[ end_date, path, success, created_at ]`, `[ end_date, remote_ip, success, created_at ]`, `[ path, remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip, created_at ]`, `[ start_date, end_date, path, success, created_at ]`, `[ start_date, end_date, remote_ip, success, created_at ]`, `[ start_date, path, remote_ip, success, created_at ]` or `[ end_date, path, remote_ip, success, created_at ]`.
69
- // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ start_date, created_at ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ end_date, created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, end_date, created_at ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, path, created_at ]`, `[ start_date, remote_ip, success ]`, `[ start_date, remote_ip, created_at ]`, `[ start_date, success, created_at ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, path, created_at ]`, `[ end_date, remote_ip, success ]`, `[ end_date, remote_ip, created_at ]`, `[ end_date, success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, path, created_at ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, end_date, remote_ip, created_at ]`, `[ start_date, end_date, success, created_at ]`, `[ start_date, path, remote_ip, success ]`, `[ start_date, path, remote_ip, created_at ]`, `[ start_date, path, success, created_at ]`, `[ start_date, remote_ip, success, created_at ]`, `[ end_date, path, remote_ip, success ]`, `[ end_date, path, remote_ip, created_at ]`, `[ end_date, path, success, created_at ]`, `[ end_date, remote_ip, success, created_at ]`, `[ path, remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip, created_at ]`, `[ start_date, end_date, path, success, created_at ]`, `[ start_date, end_date, remote_ip, success, created_at ]`, `[ start_date, path, remote_ip, success, created_at ]` or `[ end_date, path, remote_ip, success, created_at ]`.
70
- // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ start_date, created_at ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ end_date, created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, end_date, created_at ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, path, created_at ]`, `[ start_date, remote_ip, success ]`, `[ start_date, remote_ip, created_at ]`, `[ start_date, success, created_at ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, path, created_at ]`, `[ end_date, remote_ip, success ]`, `[ end_date, remote_ip, created_at ]`, `[ end_date, success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, path, created_at ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, end_date, remote_ip, created_at ]`, `[ start_date, end_date, success, created_at ]`, `[ start_date, path, remote_ip, success ]`, `[ start_date, path, remote_ip, created_at ]`, `[ start_date, path, success, created_at ]`, `[ start_date, remote_ip, success, created_at ]`, `[ end_date, path, remote_ip, success ]`, `[ end_date, path, remote_ip, created_at ]`, `[ end_date, path, success, created_at ]`, `[ end_date, remote_ip, success, created_at ]`, `[ path, remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip, created_at ]`, `[ start_date, end_date, path, success, created_at ]`, `[ start_date, end_date, remote_ip, success, created_at ]`, `[ start_date, path, remote_ip, success, created_at ]` or `[ end_date, path, remote_ip, success, created_at ]`.
71
- // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ start_date, created_at ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ end_date, created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, end_date, created_at ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, path, created_at ]`, `[ start_date, remote_ip, success ]`, `[ start_date, remote_ip, created_at ]`, `[ start_date, success, created_at ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, path, created_at ]`, `[ end_date, remote_ip, success ]`, `[ end_date, remote_ip, created_at ]`, `[ end_date, success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, path, created_at ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, end_date, remote_ip, created_at ]`, `[ start_date, end_date, success, created_at ]`, `[ start_date, path, remote_ip, success ]`, `[ start_date, path, remote_ip, created_at ]`, `[ start_date, path, success, created_at ]`, `[ start_date, remote_ip, success, created_at ]`, `[ end_date, path, remote_ip, success ]`, `[ end_date, path, remote_ip, created_at ]`, `[ end_date, path, success, created_at ]`, `[ end_date, remote_ip, success, created_at ]`, `[ path, remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip, created_at ]`, `[ start_date, end_date, path, success, created_at ]`, `[ start_date, end_date, remote_ip, success, created_at ]`, `[ start_date, path, remote_ip, success, created_at ]` or `[ end_date, path, remote_ip, success, created_at ]`.
72
- // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ start_date ]`, `[ end_date ]`, `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ start_date, end_date ]`, `[ start_date, path ]`, `[ start_date, remote_ip ]`, `[ start_date, success ]`, `[ start_date, created_at ]`, `[ end_date, path ]`, `[ end_date, remote_ip ]`, `[ end_date, success ]`, `[ end_date, created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ start_date, end_date, path ]`, `[ start_date, end_date, remote_ip ]`, `[ start_date, end_date, success ]`, `[ start_date, end_date, created_at ]`, `[ start_date, path, remote_ip ]`, `[ start_date, path, success ]`, `[ start_date, path, created_at ]`, `[ start_date, remote_ip, success ]`, `[ start_date, remote_ip, created_at ]`, `[ start_date, success, created_at ]`, `[ end_date, path, remote_ip ]`, `[ end_date, path, success ]`, `[ end_date, path, created_at ]`, `[ end_date, remote_ip, success ]`, `[ end_date, remote_ip, created_at ]`, `[ end_date, success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip ]`, `[ start_date, end_date, path, success ]`, `[ start_date, end_date, path, created_at ]`, `[ start_date, end_date, remote_ip, success ]`, `[ start_date, end_date, remote_ip, created_at ]`, `[ start_date, end_date, success, created_at ]`, `[ start_date, path, remote_ip, success ]`, `[ start_date, path, remote_ip, created_at ]`, `[ start_date, path, success, created_at ]`, `[ start_date, remote_ip, success, created_at ]`, `[ end_date, path, remote_ip, success ]`, `[ end_date, path, remote_ip, created_at ]`, `[ end_date, path, success, created_at ]`, `[ end_date, remote_ip, success, created_at ]`, `[ path, remote_ip, success, created_at ]`, `[ start_date, end_date, path, remote_ip, success ]`, `[ start_date, end_date, path, remote_ip, created_at ]`, `[ start_date, end_date, path, success, created_at ]`, `[ start_date, end_date, remote_ip, success, created_at ]`, `[ start_date, path, remote_ip, success, created_at ]` or `[ end_date, path, remote_ip, success, created_at ]`.
67
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `remote_ip`, `success` or `created_at`. Valid field combinations are `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
68
+ // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
69
+ // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
70
+ // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`. Valid field combinations are `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
71
+ // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
72
+ // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ path ]`, `[ remote_ip ]`, `[ success ]`, `[ created_at ]`, `[ path, remote_ip ]`, `[ path, success ]`, `[ path, created_at ]`, `[ remote_ip, success ]`, `[ remote_ip, created_at ]`, `[ success, created_at ]`, `[ path, remote_ip, success ]`, `[ path, remote_ip, created_at ]`, `[ path, success, created_at ]`, `[ remote_ip, success, created_at ]` or `[ path, remote_ip, success, created_at ]`.
73
73
  static list = async (params = {}, options = {}) => {
74
74
  if (params.cursor && !isString(params.cursor)) {
75
75
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
@@ -167,9 +167,6 @@ class RemoteMountBackend {
167
167
  }
168
168
 
169
169
  // Parameters:
170
- // canary_file_path (required) - string - Path to the canary file used for health checks.
171
- // remote_server_mount_id (required) - int64 - The mount ID of the Remote Server Mount that this backend is associated with.
172
- // remote_server_id (required) - int64 - The remote server that this backend is associated with.
173
170
  // enabled - boolean - True if this backend is enabled.
174
171
  // fall - int64 - Number of consecutive failures before considering the backend unhealthy.
175
172
  // health_check_enabled - boolean - True if health checks are enabled for this backend.
@@ -180,6 +177,8 @@ class RemoteMountBackend {
180
177
  // priority - int64 - Priority of this backend.
181
178
  // remote_path - string - Path on the remote server to treat as the root of this mount.
182
179
  // rise - int64 - Number of consecutive successes before considering the backend healthy.
180
+ // canary_file_path - string - Path to the canary file used for health checks.
181
+ // remote_server_id - int64 - The remote server that this backend is associated with.
183
182
  update = async (params = {}) => {
184
183
  if (!this.attributes.id) {
185
184
  throw new errors.EmptyPropertyError('Current object has no id')
@@ -194,18 +193,6 @@ class RemoteMountBackend {
194
193
  throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params.id)}`)
195
194
  }
196
195
 
197
- if (params.canary_file_path && !isString(params.canary_file_path)) {
198
- throw new errors.InvalidParameterError(`Bad parameter: canary_file_path must be of type String, received ${getType(params.canary_file_path)}`)
199
- }
200
-
201
- if (params.remote_server_mount_id && !isInt(params.remote_server_mount_id)) {
202
- throw new errors.InvalidParameterError(`Bad parameter: remote_server_mount_id must be of type Int, received ${getType(params.remote_server_mount_id)}`)
203
- }
204
-
205
- if (params.remote_server_id && !isInt(params.remote_server_id)) {
206
- throw new errors.InvalidParameterError(`Bad parameter: remote_server_id must be of type Int, received ${getType(params.remote_server_id)}`)
207
- }
208
-
209
196
  if (params.fall && !isInt(params.fall)) {
210
197
  throw new errors.InvalidParameterError(`Bad parameter: fall must be of type Int, received ${getType(params.fall)}`)
211
198
  }
@@ -230,35 +217,19 @@ class RemoteMountBackend {
230
217
  throw new errors.InvalidParameterError(`Bad parameter: rise must be of type Int, received ${getType(params.rise)}`)
231
218
  }
232
219
 
233
- if (!params.id) {
234
- if (this.attributes.id) {
235
- params.id = this.id
236
- } else {
237
- throw new errors.MissingParameterError('Parameter missing: id')
238
- }
239
- }
240
-
241
- if (!params.canary_file_path) {
242
- if (this.attributes.canary_file_path) {
243
- params.canary_file_path = this.canary_file_path
244
- } else {
245
- throw new errors.MissingParameterError('Parameter missing: canary_file_path')
246
- }
220
+ if (params.canary_file_path && !isString(params.canary_file_path)) {
221
+ throw new errors.InvalidParameterError(`Bad parameter: canary_file_path must be of type String, received ${getType(params.canary_file_path)}`)
247
222
  }
248
223
 
249
- if (!params.remote_server_mount_id) {
250
- if (this.attributes.remote_server_mount_id) {
251
- params.remote_server_mount_id = this.remote_server_mount_id
252
- } else {
253
- throw new errors.MissingParameterError('Parameter missing: remote_server_mount_id')
254
- }
224
+ if (params.remote_server_id && !isInt(params.remote_server_id)) {
225
+ throw new errors.InvalidParameterError(`Bad parameter: remote_server_id must be of type Int, received ${getType(params.remote_server_id)}`)
255
226
  }
256
227
 
257
- if (!params.remote_server_id) {
258
- if (this.attributes.remote_server_id) {
259
- params.remote_server_id = this.remote_server_id
228
+ if (!params.id) {
229
+ if (this.attributes.id) {
230
+ params.id = this.id
260
231
  } else {
261
- throw new errors.MissingParameterError('Parameter missing: remote_server_id')
232
+ throw new errors.MissingParameterError('Parameter missing: id')
262
233
  }
263
234
  }
264
235
 
@@ -354,9 +325,6 @@ class RemoteMountBackend {
354
325
  RemoteMountBackend.find(id, params, options)
355
326
 
356
327
  // Parameters:
357
- // canary_file_path (required) - string - Path to the canary file used for health checks.
358
- // remote_server_mount_id (required) - int64 - The mount ID of the Remote Server Mount that this backend is associated with.
359
- // remote_server_id (required) - int64 - The remote server that this backend is associated with.
360
328
  // enabled - boolean - True if this backend is enabled.
361
329
  // fall - int64 - Number of consecutive failures before considering the backend unhealthy.
362
330
  // health_check_enabled - boolean - True if health checks are enabled for this backend.
@@ -367,6 +335,9 @@ class RemoteMountBackend {
367
335
  // priority - int64 - Priority of this backend.
368
336
  // remote_path - string - Path on the remote server to treat as the root of this mount.
369
337
  // rise - int64 - Number of consecutive successes before considering the backend healthy.
338
+ // canary_file_path (required) - string - Path to the canary file used for health checks.
339
+ // remote_server_mount_id (required) - int64 - The mount ID of the Remote Server Mount that this backend is associated with.
340
+ // remote_server_id (required) - int64 - The remote server that this backend is associated with.
370
341
  static create = async (params = {}, options = {}) => {
371
342
  if (!params.canary_file_path) {
372
343
  throw new errors.MissingParameterError('Parameter missing: canary_file_path')
@@ -380,18 +351,6 @@ class RemoteMountBackend {
380
351
  throw new errors.MissingParameterError('Parameter missing: remote_server_id')
381
352
  }
382
353
 
383
- if (params.canary_file_path && !isString(params.canary_file_path)) {
384
- throw new errors.InvalidParameterError(`Bad parameter: canary_file_path must be of type String, received ${getType(params.canary_file_path)}`)
385
- }
386
-
387
- if (params.remote_server_mount_id && !isInt(params.remote_server_mount_id)) {
388
- throw new errors.InvalidParameterError(`Bad parameter: remote_server_mount_id must be of type Int, received ${getType(params.remote_server_mount_id)}`)
389
- }
390
-
391
- if (params.remote_server_id && !isInt(params.remote_server_id)) {
392
- throw new errors.InvalidParameterError(`Bad parameter: remote_server_id must be of type Int, received ${getType(params.remote_server_id)}`)
393
- }
394
-
395
354
  if (params.fall && !isInt(params.fall)) {
396
355
  throw new errors.InvalidParameterError(`Bad parameter: fall must be of type Int, received ${getType(params.fall)}`)
397
356
  }
@@ -416,6 +375,18 @@ class RemoteMountBackend {
416
375
  throw new errors.InvalidParameterError(`Bad parameter: rise must be of type Int, received ${getType(params.rise)}`)
417
376
  }
418
377
 
378
+ if (params.canary_file_path && !isString(params.canary_file_path)) {
379
+ throw new errors.InvalidParameterError(`Bad parameter: canary_file_path must be of type String, received ${getType(params.canary_file_path)}`)
380
+ }
381
+
382
+ if (params.remote_server_mount_id && !isInt(params.remote_server_mount_id)) {
383
+ throw new errors.InvalidParameterError(`Bad parameter: remote_server_mount_id must be of type Int, received ${getType(params.remote_server_mount_id)}`)
384
+ }
385
+
386
+ if (params.remote_server_id && !isInt(params.remote_server_id)) {
387
+ throw new errors.InvalidParameterError(`Bad parameter: remote_server_id must be of type Int, received ${getType(params.remote_server_id)}`)
388
+ }
389
+
419
390
  const response = await Api.sendRequest('/remote_mount_backends', 'POST', params, options)
420
391
 
421
392
  return new RemoteMountBackend(response?.data, options)