|
2791 | 2791 | "content": { |
2792 | 2792 | "application/json": { |
2793 | 2793 | "schema": { |
2794 | | - "$ref": "#/components/schemas/V2FileResponse" |
| 2794 | + "$ref": "#/components/schemas/V2WrittenFileResponse" |
2795 | 2795 | } |
2796 | 2796 | } |
2797 | 2797 | } |
|
5810 | 5810 | "minimum": 0, |
5811 | 5811 | "maximum": 9007199254740991, |
5812 | 5812 | "description": "Lines the file holds after the edit." |
| 5813 | + }, |
| 5814 | + "revision": { |
| 5815 | + "description": "Opaque token for the content this write produced. Send it back as `expectedRevision` on the next write. Absent for a file with no recorded content version.", |
| 5816 | + "type": "string" |
5813 | 5817 | } |
5814 | 5818 | }, |
5815 | 5819 | "required": ["file", "lineCount"], |
|
6137 | 6141 | } |
6138 | 6142 | ] |
6139 | 6143 | }, |
| 6144 | + "V2WrittenFile": { |
| 6145 | + "type": "object", |
| 6146 | + "properties": { |
| 6147 | + "id": { |
| 6148 | + "type": "string", |
| 6149 | + "description": "Unique file identifier.", |
| 6150 | + "examples": ["wf_V1StGXR8z5jdHi6BmyT91"] |
| 6151 | + }, |
| 6152 | + "webUrl": { |
| 6153 | + "type": "string", |
| 6154 | + "format": "uri", |
| 6155 | + "description": "Canonical absolute URL for opening this resource in the Sim web application." |
| 6156 | + }, |
| 6157 | + "name": { |
| 6158 | + "type": "string", |
| 6159 | + "description": "Original file name.", |
| 6160 | + "examples": ["data.csv"] |
| 6161 | + }, |
| 6162 | + "size": { |
| 6163 | + "type": "number", |
| 6164 | + "minimum": 0, |
| 6165 | + "description": "Size in bytes of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source, not the rendered document, so it does not predict how many bytes downloading the file returns.", |
| 6166 | + "examples": [1024] |
| 6167 | + }, |
| 6168 | + "type": { |
| 6169 | + "type": "string", |
| 6170 | + "description": "MIME type of the stored file. For a generated document (docx, pptx, pdf, xlsx) this is the generation source type, not the rendered document type a download serves.", |
| 6171 | + "examples": ["text/csv"] |
| 6172 | + }, |
| 6173 | + "key": { |
| 6174 | + "type": "string", |
| 6175 | + "description": "Storage key for the file.", |
| 6176 | + "examples": ["workspace/example/data.csv"] |
| 6177 | + }, |
| 6178 | + "folderPath": { |
| 6179 | + "type": "string", |
| 6180 | + "title": "Folder path", |
| 6181 | + "description": "Canonical containing-folder path. `/` is the workspace root.", |
| 6182 | + "maxLength": 4096 |
| 6183 | + }, |
| 6184 | + "uploadedByEmail": { |
| 6185 | + "type": "string", |
| 6186 | + "format": "email", |
| 6187 | + "pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", |
| 6188 | + "description": "Current email address of the uploader.", |
| 6189 | + "examples": ["jane@example.com"] |
| 6190 | + }, |
| 6191 | + "uploadedAt": { |
| 6192 | + "type": "string", |
| 6193 | + "description": "ISO 8601 timestamp when the file was uploaded.", |
| 6194 | + "format": "date-time", |
| 6195 | + "examples": ["2026-01-15T10:30:00Z"] |
| 6196 | + }, |
| 6197 | + "updatedAt": { |
| 6198 | + "type": "string", |
| 6199 | + "description": "ISO 8601 timestamp of the last content or metadata write.", |
| 6200 | + "format": "date-time", |
| 6201 | + "examples": ["2026-01-15T10:30:00Z"] |
| 6202 | + }, |
| 6203 | + "deletedAt": { |
| 6204 | + "anyOf": [ |
| 6205 | + { |
| 6206 | + "type": "string" |
| 6207 | + }, |
| 6208 | + { |
| 6209 | + "type": "null" |
| 6210 | + } |
| 6211 | + ], |
| 6212 | + "description": "ISO 8601 timestamp when the file was archived by deleting it, or null while the file is active. Only an archived-scope file list returns files with a non-null value.", |
| 6213 | + "format": "date-time", |
| 6214 | + "examples": ["2026-01-16T09:00:00Z"] |
| 6215 | + }, |
| 6216 | + "revision": { |
| 6217 | + "description": "Opaque token for the content this write produced. Send it back as `expectedRevision` on the next write. Absent for a file with no recorded content version.", |
| 6218 | + "type": "string" |
| 6219 | + } |
| 6220 | + }, |
| 6221 | + "required": [ |
| 6222 | + "id", |
| 6223 | + "webUrl", |
| 6224 | + "name", |
| 6225 | + "size", |
| 6226 | + "type", |
| 6227 | + "key", |
| 6228 | + "folderPath", |
| 6229 | + "uploadedByEmail", |
| 6230 | + "uploadedAt", |
| 6231 | + "updatedAt", |
| 6232 | + "deletedAt" |
| 6233 | + ], |
| 6234 | + "additionalProperties": false, |
| 6235 | + "title": "Written file", |
| 6236 | + "description": "A workspace file after a content replacement, with the revision it produced." |
| 6237 | + }, |
| 6238 | + "V2WrittenFileResponse": { |
| 6239 | + "type": "object", |
| 6240 | + "properties": { |
| 6241 | + "data": { |
| 6242 | + "description": "Response data.", |
| 6243 | + "$ref": "#/components/schemas/V2WrittenFile" |
| 6244 | + } |
| 6245 | + }, |
| 6246 | + "required": ["data"], |
| 6247 | + "additionalProperties": false, |
| 6248 | + "title": "Written file response", |
| 6249 | + "description": "A workspace file after a content replacement, with the revision the write produced.", |
| 6250 | + "examples": [ |
| 6251 | + { |
| 6252 | + "data": { |
| 6253 | + "id": "wf_V1StGXR8z5jdHi6BmyT91", |
| 6254 | + "webUrl": "https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91", |
| 6255 | + "name": "data.csv", |
| 6256 | + "size": 1024, |
| 6257 | + "type": "text/csv", |
| 6258 | + "key": "workspace/example/data.csv", |
| 6259 | + "folderPath": "/Engineering", |
| 6260 | + "uploadedByEmail": "jane@example.com", |
| 6261 | + "uploadedAt": "2026-01-15T10:30:00Z", |
| 6262 | + "updatedAt": "2026-01-15T10:30:00Z", |
| 6263 | + "deletedAt": null, |
| 6264 | + "revision": "d2ZfVjFTdEdYUjh6NWpkSGk2Qm15VDkxOjIwMjYtMDEtMTVUMTA6MzA6MDAuMDAwWg" |
| 6265 | + } |
| 6266 | + } |
| 6267 | + ] |
| 6268 | + }, |
6140 | 6269 | "UpdateFileContentRequest": { |
6141 | 6270 | "type": "object", |
6142 | 6271 | "properties": { |
|
0 commit comments