You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c735ded
Browse filesBrowse the repository at this point in the historyBrowse files
improvement(cli): accept the file references, list shapes and multi-file values models send (#9589)
* improvement(cli): accept the file references, list shapes and multi-file values models send
files batch-delete answers to --ids and --paths, reads a JSON array or a comma-joined run of ids as its entries, and the v2 bulk delete resolves files/ VFS paths through the canonical resolver after authorization, refusing the whole batch when one path names no single live file. tables rows batch-delete answers to --row-ids and the log reads to --workflow-ids, the request fields behind their shortened flags.
Workflow edits store a multi-file upload field as the list of file objects the editor writes, and an empty list clears it. A document page selection that lists separate pages says to read one range per call.
* refactor(cli): share the path predicate and other-spellings list
* test(files): drop unit cases the bulk-delete integration suite proves
* test(cli): use a flag batch-delete still refuses as the guessed-flag example
* fix(cli): refuse an empty entry in a joined file-reference list
* improvement(cli): name the metadata command when an embedded download refuses binary output
|`file-ids...`| No |File identifiers to delete. Same as --file-ids. |
646
+
|`file-ids...`| No |Files to delete, each by identifier or by the VFS path of a live file: `files/<folder>/<name>`. Pass the id when two files in a folder have names that display alike. At most 100 entries may be paths. Same as --file-ids. |
|`--file-ids <value...>`| No |File identifiers to delete. (space-separated, or @path / @- with one value per line; @@value for a literal leading @) (required, or pass the values as arguments). |
656
+
|`--file-ids <value...>`| No |Files to delete, each by identifier or by the VFS path of a live file: `files/<folder>/<name>`. Pass the id when two files in a folder have names that display alike. At most 100 entries may be paths. (space-separated, or @path / @- with one value per line; @@value for a literal leading @) (required, or pass the values as arguments). |
|`file-ids...`| No |File identifiers to delete. Same as --file-ids. |
984
+
|`file-ids...`| No |Files to delete, each by identifier or by the VFS path of a live file: `files/<folder>/<name>`. Pass the id when two files in a folder have names that display alike. At most 100 entries may be paths. Same as --file-ids. |
|`--file-ids <value...>`| No |File identifiers to delete. (space-separated, or @path / @- with one value per line; @@value for a literal leading @) (required, or pass the values as arguments). |
994
+
|`--file-ids <value...>`| No |Files to delete, each by identifier or by the VFS path of a live file: `files/<folder>/<name>`. Pass the id when two files in a folder have names that display alike. At most 100 entries may be paths. (space-separated, or @path / @- with one value per line; @@value for a literal leading @) (required, or pass the values as arguments). |
Copy file name to clipboardExpand all lines: apps/docs/openapi-v2-files-audit.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7369,7 +7369,7 @@
7369
7369
"type": "string",
7370
7370
"minLength": 1
7371
7371
},
7372
-
"description": "File identifiers to delete."
7372
+
"description": "Files to delete, each by identifier or by the VFS path of a live file: `files/<folder>/<name>`. Pass the id when two files in a folder have names that display alike. At most 100 entries may be paths."
@@ -527,7 +530,9 @@ export type V2MoveFileItemsResult = z.output<typeof v2MoveFileItemsResultSchema>
527
530
exportconstv2BulkDeleteFilesBodySchema=z
528
531
.object({
529
532
workspaceId: workspaceIdSchema.describe('Workspace containing the files.'),
530
-
fileIds: fileIdsSchema.describe('File identifiers to delete.'),
533
+
fileIds: fileIdsSchema.describe(
534
+
`Files to delete, each by identifier or by the VFS path of a live file: \`files/<folder>/<name>\`. Pass the id when two files in a folder have names that display alike. At most ${MAX_WORKSPACE_FILE_BULK_REQUEST_PATHS} entries may be paths.`
error: `Invalid file-upload value for field "${fieldName}" - expected object with name and path properties, or null`,
629
+
error: `Invalid file-upload entry ${fieldName}[${index}] - each file must be an object with "name" and "path" properties`,
623
630
},
624
631
}
625
632
}
626
-
// Validate file object has required properties
627
-
if(value&&(!value.name||!value.path)){
633
+
if(!isStoredFile(value)){
628
634
return{
629
635
valid: false,
630
636
error: {
631
637
blockId,
632
638
blockType,
633
639
field: fieldName,
634
640
value,
635
-
error: `Invalid file-upload object for field "${fieldName}" - must have "name" and "path" properties`,
641
+
error: `Invalid file-upload value for field "${fieldName}" - expected ${subBlockConfig.multiple ? 'a list of objects' : 'one object'} with "name" and "path" properties, or null`,
0 commit comments