files.com 1.1.774 → 1.1.776

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4f2c94de7f8460dbc6ebdc3ebfe0d3acac9e51a73ba8e8bb1b6fdeb4c209cf2
4
- data.tar.gz: 021a97a67cc851eda338a4648d23fd98123062630359ffe889c6d5ce4621c624
3
+ metadata.gz: f3ab164ab21a32d6176ed0ec790bcc8f3a51550fcc897807b4f6fd1659ce652f
4
+ data.tar.gz: e95e649aaa0a06b10f5ed46ef5ec75d9f4489ba4d3d63ed77caed4d15c158f8c
5
5
  SHA512:
6
- metadata.gz: 34e69220a7b56baed94b097b29f252091b878d09bbc8c18d2c48b814d4621242f387a678e556ec2649ea47d5f0afbbc657f18795823bbd0547e78c28d0b43c86
7
- data.tar.gz: 0130c0988d60aeee05ea50a51ba9289434e336c6dbbb6a34532462fcc4d52a2a00fd869446428d3bd84b06851436784ed5377de1519bf960045ebcb50930dc9c
6
+ metadata.gz: d1e8fc4e3d370b84af05d117ca01cd21f3b7666f634f702611117fba7db44c539812ceed799a293aa3745e5257c83847ae9c20260b5cbd99b98314cae84b3ead
7
+ data.tar.gz: 3b2ea8663239164d966481d460432211b5875cde298d535aaa9f199a93e41be971a7202357b69f22c8da05770b1f6ca445a6901e97bca31141965c433ae0dea9
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.774
1
+ 1.1.776
data/docs/file.md CHANGED
@@ -282,6 +282,22 @@ Files::File.zip_list_contents(path)
282
282
  * `path` (string): Required - Path to operate on.
283
283
 
284
284
 
285
+ ---
286
+
287
+ ## Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion
288
+
289
+ ```
290
+ Files::File.begin_delete(path,
291
+ recursive: false
292
+ )
293
+ ```
294
+
295
+ ### Parameters
296
+
297
+ * `path` (string): Required - Path to operate on.
298
+ * `recursive` (boolean): If true, will recursively delete folders. Otherwise, will error on non-empty folders.
299
+
300
+
285
301
  ---
286
302
 
287
303
  ## Copy File/Folder
@@ -548,6 +564,24 @@ file.zip_list_contents
548
564
  * `path` (string): Required - Path to operate on.
549
565
 
550
566
 
567
+ ---
568
+
569
+ ## Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion
570
+
571
+ ```
572
+ file = Files::File.find(path)
573
+
574
+ file.begin_delete(
575
+ recursive: false
576
+ )
577
+ ```
578
+
579
+ ### Parameters
580
+
581
+ * `path` (string): Required - Path to operate on.
582
+ * `recursive` (boolean): If true, will recursively delete folders. Otherwise, will error on non-empty folders.
583
+
584
+
551
585
  ---
552
586
 
553
587
  ## Copy File/Folder
data/docs/file_action.md CHANGED
@@ -10,4 +10,4 @@
10
10
  ```
11
11
 
12
12
  * `status` (string): Status of file operation.
13
- * `file_migration_id` (int64): If status is pending, this is the id of the File Migration to check for status updates.
13
+ * `file_migration_id` (int64): If status is pending, this is the id of the File Migration to check for status updates. Delete actions include it whenever the deletion runs as a File Migration, including while it is processing.
data/docs/restore.md CHANGED
@@ -40,9 +40,9 @@
40
40
  * `files_errored` (int64): Number of files that were not able to be restored.
41
41
  * `files_total` (int64): Total number of files processed.
42
42
  * `prefix` (string): Prefix of the files/folders to restore, or a case-insensitive username prefix for a user restore. A trailing slash selects that folder and its contents only; without it, the prefix matches any path beginning with that text. Do not use a leading slash. To restore all deleted items of the selected restoration type within the selected site or workspace scope, specify an empty string (`''`) or omit the field.
43
- * `restoration_type` (string): Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated access/authentication records removed as part of deleting those users.
43
+ * `restoration_type` (string): Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated authentication records, plus permissions when `restore_deleted_permissions=true`. A 5-minute grace period allows for batch deletion processes: associated records deleted within the 5 minutes before the user are included, even if removed independently. Records deleted earlier, or before `earliest_date`, remain deleted.
44
44
  * `restore_in_place` (boolean): If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
45
- * `restore_deleted_permissions` (boolean): If true, a user restore restores permissions removed as part of deleting the selected users. An in-place file restore restores user and group permissions on returned folders and their subfolders that were deleted from the time of the folder's deletion through 24 hours afterward, including permissions removed independently within that window. File restores into a new folder do not restore permissions.
45
+ * `restore_deleted_permissions` (boolean): If true, a user restore restores permissions deleted along with the selected users, including permissions removed independently within the 5 minutes before user deletion. Permissions deleted earlier, or before `earliest_date`, remain deleted. An in-place file restore restores user and group permissions on returned folders and their subfolders that were deleted from the time of the folder's deletion through 24 hours afterward, including permissions removed independently within that window. File restores into a new folder do not restore permissions.
46
46
  * `users_restored` (int64): Number of users successfully restored (only present for `restoration_type=users`).
47
47
  * `users_errored` (int64): Number of users that failed to restore (only present for `restoration_type=users`).
48
48
  * `users_total` (int64): Total number of users processed (only present for `restoration_type=users`).
@@ -91,8 +91,8 @@ Files::Restore.create(
91
91
 
92
92
  * `earliest_date` (string): Required - Restore files or users deleted on or after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
93
93
  * `prefix` (string): Prefix of the files/folders to restore, or a case-insensitive username prefix for a user restore. A trailing slash selects that folder and its contents only; without it, the prefix matches any path beginning with that text. Do not use a leading slash. To restore all deleted items of the selected restoration type within the selected site or workspace scope, specify an empty string (`''`) or omit the field.
94
- * `restoration_type` (string): Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated access/authentication records removed as part of deleting those users.
95
- * `restore_deleted_permissions` (boolean): If true, a user restore restores permissions removed as part of deleting the selected users. An in-place file restore restores user and group permissions on returned folders and their subfolders that were deleted from the time of the folder's deletion through 24 hours afterward, including permissions removed independently within that window. File restores into a new folder do not restore permissions.
94
+ * `restoration_type` (string): Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated authentication records, plus permissions when `restore_deleted_permissions=true`. A 5-minute grace period allows for batch deletion processes: associated records deleted within the 5 minutes before the user are included, even if removed independently. Records deleted earlier, or before `earliest_date`, remain deleted.
95
+ * `restore_deleted_permissions` (boolean): If true, a user restore restores permissions deleted along with the selected users, including permissions removed independently within the 5 minutes before user deletion. Permissions deleted earlier, or before `earliest_date`, remain deleted. An in-place file restore restores user and group permissions on returned folders and their subfolders that were deleted from the time of the folder's deletion through 24 hours afterward, including permissions removed independently within that window. File restores into a new folder do not restore permissions.
96
96
  * `restore_in_place` (boolean): If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
97
97
  * `update_timestamps` (boolean): If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
98
98
  * `workspace_id` (int64): Workspace ID for a workspace-scoped restore. `0` means the default site-wide scope.
@@ -1145,6 +1145,20 @@ module Files
1145
1145
  Api.send_request("/file_actions/zip_list/#{@attributes[:path]}", :get, params, @options)
1146
1146
  end
1147
1147
 
1148
+ # Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion
1149
+ #
1150
+ # Parameters:
1151
+ # recursive - boolean - If true, will recursively delete folders. Otherwise, will error on non-empty folders.
1152
+ def begin_delete(params = {})
1153
+ params ||= {}
1154
+ params[:path] = @attributes[:path]
1155
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
1156
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1157
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1158
+
1159
+ Api.send_request("/file_actions/delete/#{@attributes[:path]}", :post, params, @options)
1160
+ end
1161
+
1148
1162
  # Copy File/Folder
1149
1163
  #
1150
1164
  # Parameters:
@@ -1466,6 +1480,25 @@ module Files
1466
1480
  end
1467
1481
  end
1468
1482
 
1483
+ # Delete File/Folder and return its File Action. A pending or processing deletion continues in the background after this returns; check its File Migration for completion. Waiting for the File Migration does not cancel the deletion
1484
+ #
1485
+ # Parameters:
1486
+ # recursive - boolean - If true, will recursively delete folders. Otherwise, will error on non-empty folders.
1487
+ #
1488
+ # params:: Hash of API operation parameter values.
1489
+ # options:: Hash of optional request configuration passed to Files::Api.send_request.
1490
+ #
1491
+ # Returns a Files::FileAction.
1492
+ def self.begin_delete(path, params = {}, options = {})
1493
+ params ||= {}
1494
+ params[:path] = path
1495
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1496
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1497
+
1498
+ response, options = Api.send_request("/file_actions/delete/#{params[:path]}", :post, params, options) { |reply| reply.require_object("FileAction") }
1499
+ FileAction.new(response.data, options)
1500
+ end
1501
+
1469
1502
  # Copy File/Folder
1470
1503
  #
1471
1504
  # Parameters:
@@ -14,7 +14,7 @@ module Files
14
14
  @attributes[:status]
15
15
  end
16
16
 
17
- # int64 - If status is pending, this is the id of the File Migration to check for status updates.
17
+ # int64 - If status is pending, this is the id of the File Migration to check for status updates. Delete actions include it whenever the deletion runs as a File Migration, including while it is processing.
18
18
  def file_migration_id
19
19
  @attributes[:file_migration_id]
20
20
  end
@@ -90,7 +90,7 @@ module Files
90
90
  @attributes[:prefix] = value
91
91
  end
92
92
 
93
- # string - Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated access/authentication records removed as part of deleting those users.
93
+ # string - Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated authentication records, plus permissions when `restore_deleted_permissions=true`. A 5-minute grace period allows for batch deletion processes: associated records deleted within the 5 minutes before the user are included, even if removed independently. Records deleted earlier, or before `earliest_date`, remain deleted.
94
94
  def restoration_type
95
95
  @attributes[:restoration_type]
96
96
  end
@@ -108,7 +108,7 @@ module Files
108
108
  @attributes[:restore_in_place] = value
109
109
  end
110
110
 
111
- # boolean - If true, a user restore restores permissions removed as part of deleting the selected users. An in-place file restore restores user and group permissions on returned folders and their subfolders that were deleted from the time of the folder's deletion through 24 hours afterward, including permissions removed independently within that window. File restores into a new folder do not restore permissions.
111
+ # boolean - If true, a user restore restores permissions deleted along with the selected users, including permissions removed independently within the 5 minutes before user deletion. Permissions deleted earlier, or before `earliest_date`, remain deleted. An in-place file restore restores user and group permissions on returned folders and their subfolders that were deleted from the time of the folder's deletion through 24 hours afterward, including permissions removed independently within that window. File restores into a new folder do not restore permissions.
112
112
  def restore_deleted_permissions
113
113
  @attributes[:restore_deleted_permissions]
114
114
  end
@@ -246,8 +246,8 @@ module Files
246
246
  # Parameters:
247
247
  # earliest_date (required) - string - Restore files or users deleted on or after this date/time. Don't set this earlier than you need. Can not be greater than 365 days prior to the restore request.
248
248
  # prefix - string - Prefix of the files/folders to restore, or a case-insensitive username prefix for a user restore. A trailing slash selects that folder and its contents only; without it, the prefix matches any path beginning with that text. Do not use a leading slash. To restore all deleted items of the selected restoration type within the selected site or workspace scope, specify an empty string (`''`) or omit the field.
249
- # restoration_type - string - Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated access/authentication records removed as part of deleting those users.
250
- # restore_deleted_permissions - boolean - If true, a user restore restores permissions removed as part of deleting the selected users. An in-place file restore restores user and group permissions on returned folders and their subfolders that were deleted from the time of the folder's deletion through 24 hours afterward, including permissions removed independently within that window. File restores into a new folder do not restore permissions.
249
+ # restoration_type - string - Type of restoration to perform. `files` restores deleted filesystem items. `users` restores deleted users and associated authentication records, plus permissions when `restore_deleted_permissions=true`. A 5-minute grace period allows for batch deletion processes: associated records deleted within the 5 minutes before the user are included, even if removed independently. Records deleted earlier, or before `earliest_date`, remain deleted.
250
+ # restore_deleted_permissions - boolean - If true, a user restore restores permissions deleted along with the selected users, including permissions removed independently within the 5 minutes before user deletion. Permissions deleted earlier, or before `earliest_date`, remain deleted. An in-place file restore restores user and group permissions on returned folders and their subfolders that were deleted from the time of the folder's deletion through 24 hours afterward, including permissions removed independently within that window. File restores into a new folder do not restore permissions.
251
251
  # restore_in_place - boolean - If true, we will restore the files in place (into their original paths). If false, we will create a new restoration folder in the root and restore files there.
252
252
  # update_timestamps - boolean - If true, we will update the last modified timestamp of restored files to today's date. If false, we might trigger File Expiration to delete the file again.
253
253
  # workspace_id - int64 - Workspace ID for a workspace-scoped restore. `0` means the default site-wide scope.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.774"
4
+ VERSION = "1.1.776"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.774
4
+ version: 1.1.776
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-10 00:00:00.000000000 Z
11
+ date: 2026-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable