@@ -58,8 +58,8 @@ enum FileStatus {
5858
5959// File: Message to represent stored files with comprehensive metadata
6060message File {
61- // id : Unique identifier for the file (UUID)
62- string id = 1 [(buf.validate.field ).required = true , (buf.validate.field ) .string.uuid = true ];
61+ // file_id : Unique identifier for the file (UUID)
62+ string file_id = 1 [(buf.validate.field ).required = true , (buf.validate.field ) .string.uuid = true ];
6363
6464 // context: Context ID linked to the file
6565 string context = 2 [(buf.validate.field ).required = true , (buf.validate.field ) .string.pattern = "^(missions:|setups:).*$" ];
@@ -79,32 +79,26 @@ message File {
7979 // checksum: SHA-256 checksum of the file content
8080 string checksum = 7 [(buf.validate.field ).required = true ];
8181
82- // created: Timestamp when the file was created
83- google.protobuf.Timestamp created = 8 [(buf.validate.field ).required = true ];
84-
85- // updated: Timestamp when the file was last updated
86- google.protobuf.Timestamp updated = 9 [(buf.validate.field ).required = true ];
87-
8882 // metadata: Flexible metadata for additional file properties
89- google.protobuf.Struct metadata = 10 ;
83+ google.protobuf.Struct metadata = 8 ;
9084
9185 // storage_url: Internal URL for accessing the file content
92- string storage_url = 11 [(buf.validate.field ).required = true ];
86+ string storage_url = 9 [(buf.validate.field ).required = true ];
9387
9488 // status: Current status of the file
95- FileStatus status = 12 [(buf.validate.field ).required = true , (buf.validate.field ) .enum.not_in = 0 ];
89+ FileStatus status = 10 [(buf.validate.field ).required = true , (buf.validate.field ) .enum.not_in = 0 ];
9690
9791 // content: The content of the file
98- bytes content = 13 ;
92+ bytes content = 11 ;
9993}
10094
10195// FileFilter: Filter criteria for querying files
10296message FileFilter {
10397 // names: Filter by file names (exact matches)
10498 repeated string names = 1 ;
10599
106- // ids : Filter by file IDs
107- repeated string ids = 2 [(buf.validate.field ) .repeated.items.string.uuid = true ];
100+ // file_ids : Filter by file IDs
101+ repeated string file_ids = 2 [(buf.validate.field ) .repeated.items.string.uuid = true ];
108102
109103 // file_types: Filter by file types
110104 repeated FileType file_types = 3 [(buf.validate.field ) .repeated.items.enum.not_in = 0 ];
@@ -203,15 +197,11 @@ message GetFileRequest {
203197 // context: Context ID for the file
204198 string context = 1 [(buf.validate.field ).required = true , (buf.validate.field ) .string.pattern = "^(missions:|setups:).*$" ];
205199
206- oneof identifier {
207- // id: File ID
208- string id = 2 [(buf.validate.field ) .string.uuid = true ];
209- // name: File name
210- string name = 3 [(buf.validate.field ) .string.min_len = 1 ];
211- }
200+ // file_id: File ID
201+ string file_id = 2 [(buf.validate.field ).required = true , (buf.validate.field ) .string.uuid = true ];
212202
213203 // include_content: Whether to include file content in response
214- bool include_content = 4 ;
204+ bool include_content = 3 ;
215205}
216206
217207// GetFileResponse: Response containing file information
@@ -228,8 +218,8 @@ message UpdateFileRequest {
228218 // context: Context ID for the file
229219 string context = 1 [(buf.validate.field ).required = true , (buf.validate.field ) .string.pattern = "^(missions:|setups:).*$" ];
230220
231- // id : Current id of the file
232- string id = 2 [(buf.validate.field ).required = true ];
221+ // file_id : Current id of the file
222+ string file_id = 2 [(buf.validate.field ).required = true , (buf.validate .field ) .string .uuid = true ];
233223
234224 // new_name: New name for the file (optional)
235225 string new_name = 3 ;
@@ -256,25 +246,13 @@ message UpdateFileResponse {
256246 FileResult result = 1 ;
257247}
258248
259- // FileIdentifier: Common filter for identifying files
260- message FileIdentifier {
261- // ids: Get files by their IDs
262- repeated string ids = 1 [(buf.validate.field ) .repeated.items.string.uuid = true ];
263-
264- // names: Get files by their names
265- repeated string names = 2 ;
266-
267- // prefix: Get files by path prefix (e.g., "folder1/")
268- string prefix = 3 [(buf.validate.field ) .string.pattern = "^[^/]*/?[^/]*$" ];
269- }
270-
271249// GetFilesRequest: Request to get multiple files by various criteria
272250message GetFilesRequest {
273251 // context: Context ID for the files
274252 string context = 1 [(buf.validate.field ).required = true , (buf.validate.field ) .string.pattern = "^(missions:|setups:).*$" ];
275253
276- // filter : How to identify the files
277- FileIdentifier filter = 2 [(buf.validate.field ).required = true ];
254+ // filters : How to identify the files
255+ FileFilter filters = 2 [(buf.validate.field ).required = true ];
278256
279257 // list_size: Number of files to return per page
280258 int32 list_size = 3 [(buf.validate.field ) .int32.gte = 1 , (buf.validate.field ) .int32.lte = 1000 ];
@@ -303,8 +281,8 @@ message DeleteFilesRequest {
303281 // context: Context ID for the files
304282 string context = 1 [(buf.validate.field ).required = true , (buf.validate.field ) .string.pattern = "^(missions:|setups:).*$" ];
305283
306- // filter : How to identify the files
307- FileIdentifier filter = 2 [(buf.validate.field ).required = true ];
284+ // filters : How to identify the files
285+ FileFilter filters = 2 [(buf.validate.field ).required = true ];
308286
309287 // force: Whether to force delete even if file is in use
310288 bool force = 3 ;
0 commit comments