{"openapi":"3.1.0","info":{"title":"Sharer control API","version":"1.0.0-stage14","description":"JSON control API (Stages 04-14) for the file catalog, uploads, download starts, public report intake, imports and operator reads. Two ways to authenticate: the browser session cookie, or (Stage 09) a publisher API key sent as `Authorization: Bearer sharer_sk_…` on the file-API operations that list `bearerAuth` (each names its `x-required-scope`). A request with an Authorization header is authenticated by the key alone: cookies are ignored and no same-origin check applies. A key acts for its workspace as its custodian and can never set passwords, withdraw files, manage the team, branding, settings or keys. Guide: /docs/api. File bytes never pass through these endpoints. Every response is JSON with Cache-Control: no-store (the import report is CSV, also no-store). Session requests with unsafe methods require Sec-Fetch-Site: same-origin, or, when that header is absent, an Origin equal to the API origin; otherwise 403 forbidden. Download starts answer a bearer byte URL on the download origin (bytes never pass through this API) and also carry Referrer-Policy: no-referrer. Rate limits (Proposed): sessions per person 600 reads and 120 writes per 10 minutes; API keys per credential 1,200 reads and 300 writes per 10 minutes (writes fail closed); upload writes 600 and import writes 120 per 10 minutes per person or per key (failing closed); invalid API keys 20 per client IP per 10 minutes, after which every bearer request from that IP gets 429 until the window resets. Byte counts are decimal JSON integers; nullable fields are always present with null. Listing cursors are opaque strings bound to the listing (folder, sort, direction, query) that issued them. Imports (Stage 08): source reads and copies run only in the isolated runner, never in these handlers and never on GET; source credentials and signed source links are sealed before storage and never returned; local helper calls are limited to 1,200 per import per 10 minutes (Proposed, failing closed)."},"servers":[{"url":"/"}],"security":[{"sessionCookie":[]}],"paths":{"/api/v1/files":{"get":{"operationId":"listFiles","summary":"List a folder's direct children, or search","description":"Without `search`: one keyset page of the folder's children (folders first). With `search`: ranked results within `scope` (`folderId`, `sort`, `dir`, `q`, `cursor`, `reverse` are ignored).","parameters":[{"name":"folderId","in":"query","description":"Folder to list; omitted = workspace root.","schema":{"type":"string","format":"uuid"}},{"name":"sort","in":"query","schema":{"enum":["name","size","updated","type"],"default":"name"}},{"name":"dir","in":"query","schema":{"enum":["asc","desc"],"default":"asc"}},{"name":"q","in":"query","description":"Filter within the folder.","schema":{"type":"string","maxLength":200}},{"name":"cursor","in":"query","description":"nextCursor or prevCursor from a previous page of the same listing.","schema":{"type":"string","maxLength":1024}},{"name":"reverse","in":"query","description":"Page backwards from `cursor` (use with prevCursor).","schema":{"enum":["true","false","1","0"]}},{"name":"limit","in":"query","description":"Listing: 1–100, default 50. Search: 1–50, default 50.","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"search","in":"query","description":"Search query (1–200 characters).","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"scope","in":"query","description":"Search scope folder; omitted = whole workspace.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Listing page, or search result when `search` is given.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ListPage"},{"$ref":"#/components/schemas/SearchResult"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-required-scope":"files:read"}},"/api/v1/files/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"File id. Malformed ids return 404.","schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getFile","summary":"Get one file","responses":{"200":{"description":"The file.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-required-scope":"files:read"},"patch":{"operationId":"updateFile","summary":"Change one field group of a file","description":"Exactly one group per request: `name` | `tags`+`description` (either or both; an omitted one is kept) | `folderId` (move) | `password` (string sets, null removes) | `state: \"withdrawn\"`. Other combinations return 400. If-Match is checked against the revision, or, for `password`, against the policy revision (the `p` part of the ETag). The password is never echoed: the response is only the resulting policy state. With an API key: name, tags/description and folderId changes only (a partial tags/description change also reads the file, so it needs files:read too); password and state are session-only and answer 403 forbidden.","parameters":[{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchFileBody"}}}},"responses":{"200":{"description":"The updated file (with its new ETag), or the policy state after a password change (no ETag; re-read the file).","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/File"},{"$ref":"#/components/schemas/PasswordResult"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"412":{"$ref":"#/components/responses/E412"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"428":{"$ref":"#/components/responses/E428"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-required-scope":"files:write"},"delete":{"operationId":"deleteFile","summary":"Delete a file","parameters":[{"$ref":"#/components/parameters/IfMatch"}],"responses":{"200":{"description":"The file in its deleted state.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"412":{"$ref":"#/components/responses/E412"},"428":{"$ref":"#/components/responses/E428"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-required-scope":"files:write"}},"/api/v1/files/{id}/downloads":{"parameters":[{"name":"id","in":"path","required":true,"description":"File id. Malformed ids return 404.","schema":{"type":"string","format":"uuid"}}],"post":{"operationId":"startFileDownload","summary":"Start a file download","description":"Starts a download of one file for a member of the active workspace (`files.read`), through the same start flow as public pages: current policy is checked in the database, a short-lived start capability is redeemed at the download Worker, and the answer carries the byte URL. There is no password bypass: password gates need the same unlock proofs (`sharer_unlock` cookie). Uses the `catalogRead` limit. 503 (retryable) when the download service is unreachable or not configured. With an API key: the same flow and password gates apply; unlock proofs come only from this request.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadStartBody"}}}},"responses":{"200":{"description":"Download start outcome.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"description":"Always no-referrer.","schema":{"const":"no-referrer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadGrant"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"downloads:read"}},"/api/v1/folders":{"get":{"operationId":"listTreeChildren","summary":"Child folders for the tree","parameters":[{"name":"parentId","in":"query","description":"omitted = workspace root.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Child folders.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TreeChildren"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-required-scope":"files:read"},"post":{"operationId":"createFolder","summary":"Create a folder","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFolderBody"}}}},"responses":{"201":{"description":"Created (or the replay of an earlier identical request).","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"ETag":{"$ref":"#/components/headers/ETag"},"Location":{"description":"/api/v1/folders/{id}","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-required-scope":"files:write"}},"/api/v1/folders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Folder id. Malformed ids return 404.","schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getFolder","summary":"Get a folder and its ancestors","responses":{"200":{"description":"The folder; ETag is the folder's.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderView"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-required-scope":"files:read"},"patch":{"operationId":"updateFolder","summary":"Rename, move, or set the password of a folder","description":"Exactly one of `name` | `parentId` (move) | `password` per request. Password changes are checked against the policy revision in If-Match and are never echoed. With an API key: name and parentId changes only; password changes are session-only and answer 403 forbidden.","parameters":[{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchFolderBody"}}}},"responses":{"200":{"description":"The updated folder (with ETag), or the policy state after a password change.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"ETag":{"$ref":"#/components/headers/ETag"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Folder"},{"$ref":"#/components/schemas/PasswordResult"}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"412":{"$ref":"#/components/responses/E412"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"428":{"$ref":"#/components/responses/E428"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-required-scope":"files:write"},"delete":{"operationId":"deleteFolder","summary":"Delete a folder and its subtree","parameters":[{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Finished within the request (state succeeded).","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderDeleteResult"}}}},"202":{"description":"Continues as a background job; poll with jobId.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderDeleteResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"412":{"$ref":"#/components/responses/E412"},"428":{"$ref":"#/components/responses/E428"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"security":[{"sessionCookie":[]},{"bearerAuth":[]}],"x-required-scope":"files:write"}},"/api/v1/folders/{id}/downloads":{"parameters":[{"name":"id","in":"path","required":true,"description":"Folder id. Malformed ids return 404.","schema":{"type":"string","format":"uuid"}}],"post":{"operationId":"startFolderDownload","summary":"Start a folder download","description":"Starts a ZIP download of one folder for a member of the active workspace (`files.read`). `preparing` while the ZIP builds: poll with the same intent. `member_locked` when a member has its own password; failed authorization never builds a partial ZIP. Otherwise as the file endpoint. With an API key: the same flow and password gates apply; unlock proofs come only from this request.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadStartBody"}}}},"responses":{"200":{"description":"Download start outcome.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"description":"Always no-referrer.","schema":{"const":"no-referrer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadGrant"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"downloads:read"}},"/api/v1/download-grants":{"post":{"operationId":"startPublicDownload","summary":"Start a public download","description":"Anonymous start of a download from a public file or folder page. Same-origin only (Sec-Fetch-Site: same-origin, or a matching Origin): cross-site requests get 403. Per-IP limit `downloadGrant` (Proposed: 120 per 10 minutes, failing open). Password gates are satisfied by signed unlock proofs in the httpOnly `sharer_unlock` cookie, set by the page's password form. Also accepts an HTML form post (`application/x-www-form-urlencoded`, fields `slug` and `intentId`) for browsers without JavaScript: `ready` answers 303 with Location set to the byte URL; every other outcome answers 303 to `/<slug>?download=<outcome>` (locked, member_locked, preparing, not_found, retired, paused, expired, throttled, error), which the page explains. While downloads are paused (DOWNLOADS_PAUSED) the state is `paused`; when the download service is not configured the answer is 503 service_unavailable.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadGrantBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/DownloadGrantBody"}}}},"responses":{"200":{"description":"Download start outcome (JSON requests).","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"description":"Always no-referrer.","schema":{"const":"no-referrer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadGrant"}}}},"303":{"description":"Form posts only: Location is the byte URL (ready) or `/<slug>?download=<outcome>`.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"description":"Always no-referrer.","schema":{"const":"no-referrer"}},"Location":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/uploads":{"get":{"operationId":"listUploads","summary":"Live and recent upload sessions","description":"Sessions still transferring plus the last 7 days of finished ones (at most 100), newest first.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"The sessions.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadList"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"uploads:write"},"post":{"operationId":"createUpload","summary":"Start an upload session","description":"Validates the name and destination, reserves the declared bytes against the workspace quota before any storage call, and returns the transfer mode and part plan. Single PUT (declared size up to 100 MiB, Proposed): `contentMd5` is required and `put` is the signed request; send exactly its headers (the URL also signs the exact Content-Length and `If-None-Match: *`, so it can only create the object once). Multipart: request part URLs from /parts. Bytes go straight to private storage and never pass through this API. A replay with the same Idempotency-Key returns the same session. With an API key: purpose must be `file` (branding uploads are session-only).","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadBody"}}}},"responses":{"201":{"description":"Created (or the replay of an earlier identical request).","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Location":{"description":"/api/v1/uploads/{id}","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUploadResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"uploads:write"}},"/api/v1/uploads/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getUpload","summary":"One upload session","description":"The session and, for live multipart sessions, the provider's authoritative part receipts (`parts`, quoted MD5 ETags), or null when they couldn't be read. Clients resume by comparing these with their own part digests.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"The session.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDetail"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"uploads:write"},"delete":{"operationId":"cancelUpload","summary":"Cancel an upload","description":"Stops signing at once. The reservation is released only after the storage state is settled (multipart aborted; a single PUT waits for its URL to expire plus a grace period). Completed sessions can't be cancelled; delete the file instead.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"The cancelled session (or the replay).","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSession"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"uploads:write"}},"/api/v1/uploads/{id}/parts":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"operationId":"signUploadParts","summary":"Sign part requests","description":"Signs up to 8 exact part requests (the single PUT re-signs as part 1). Each URL signs the part's exact length and Content-MD5 and lives at most an hour, never past the session's absolute deadline. Retries of a part re-upload only that part.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignPartsBody"}}}},"responses":{"200":{"description":"Signed requests.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignPartsResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"410":{"$ref":"#/components/responses/E410"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"uploads:write"}},"/api/v1/uploads/{id}/complete":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"operationId":"completeUpload","summary":"Complete an upload","description":"Reads the authoritative storage receipt (the single object, or every planned part with its exact size, then completes the multipart upload and checks its composite ETag) and commits one file with a new ID and random public slug. Retries return the same file. The file stays processing until the server verifies its size and SHA-256 (`sha256`, when sent, must match). Virus scanning is currently off by operator decision (scan state `waived`). upload_incomplete means parts are missing and the session reopened for them.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteUploadBody"}}}},"responses":{"200":{"description":"The completed (or failed) session.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSession"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"410":{"$ref":"#/components/responses/E410"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"uploads:write"}},"/api/v1/branding":{"get":{"operationId":"getBranding","summary":"Workspace branding image","description":"The latest branding image and its derivative sizes. New images upload through /api/v1/uploads with purpose `branding` (owner only; PNG, JPEG or WebP up to 5 MiB, Proposed) and are re-encoded in an isolated runner.","security":[{"sessionCookie":[]}],"responses":{"200":{"description":"The branding state.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}},"delete":{"operationId":"clearBranding","summary":"Remove the branding image","description":"Owner only.","security":[{"sessionCookie":[]}],"responses":{"200":{"description":"The cleared state.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branding"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/admin/files/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"File id. Malformed ids return 404.","schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"adminGetFile","summary":"Operator view of a file (redacted, audited)","description":"Requires operator capability catalog.read and aal2. Everyone else gets 404.","responses":{"200":{"description":"Redacted operator view.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminFile"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/admin/folders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Folder id. Malformed ids return 404.","schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"adminGetFolder","summary":"Operator view of a folder (redacted, audited)","description":"Requires operator capability catalog.read and aal2. Everyone else gets 404.","responses":{"200":{"description":"Redacted operator view.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminFolder"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/admin/publishers":{"get":{"operationId":"adminListPublishers","summary":"Operator list of publisher workspaces","description":"Requires operator capability operations.read and aal2. Everyone else gets 404. Global operators only (tenant-scoped operators get 403 forbidden). Pages of 50, newest first. Unknown `access`/`distribution` values are ignored.","parameters":[{"name":"access","in":"query","description":"Publisher access state filter.","schema":{"enum":["pending_claim","active","suspended","revoked"]}},{"name":"distribution","in":"query","description":"Distribution state filter.","schema":{"enum":["disabled","enabled","blocked"]}},{"name":"q","in":"query","description":"Exact workspace id, or a case-insensitive substring of the workspace name (trimmed, first 100 characters).","schema":{"type":"string"}},{"name":"before","in":"query","description":"Keyset cursor: `nextBefore` from the previous page, `<ISO timestamp>~<uuid>` (src/lib/keyset.ts). Any other value is ignored (first page).","schema":{"type":"string"}}],"responses":{"200":{"description":"One page of publishers.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPublisherPage"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/admin/publishers/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Workspace (org) id. Malformed ids return 404.","schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"adminGetPublisher","summary":"Operator view of a publisher workspace (redacted, audited)","description":"Requires operator capability operations.read and aal2. Tenant-scoped operators see only their own workspaces; everyone else, and workspaces outside the operator's scope, get 404. Addresses are masked; no secrets.","responses":{"200":{"description":"Redacted operator view.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPublisherDetail"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/admin/files":{"get":{"operationId":"adminListFiles","summary":"Operator list of files across workspaces","description":"Requires operator capability operations.read and aal2. Everyone else gets 404. Tenant-scoped operators must filter by one of their workspaces (`org`). Pages of 50, newest first. Unknown `org`/`availability` values are ignored; no name search across workspaces.","parameters":[{"name":"org","in":"query","description":"Workspace id filter.","schema":{"type":"string","format":"uuid"}},{"name":"availability","in":"query","description":"File availability filter.","schema":{"enum":["processing","available","withdrawn","deletion_pending","deleted","rejected"]}},{"name":"q","in":"query","description":"Exact file id or public slug (a leading `/` is allowed). Anything else returns 400 invalid_input.","schema":{"type":"string"}},{"name":"before","in":"query","description":"Keyset cursor: `nextBefore` from the previous page, `<ISO timestamp>~<uuid>` (src/lib/keyset.ts). Any other value is ignored (first page).","schema":{"type":"string"}}],"responses":{"200":{"description":"One page of files. Details: GET /api/v1/admin/files/{id}.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminFilePage"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/admin/analytics":{"get":{"operationId":"adminGetAnalytics","summary":"Platform analytics overview","description":"Requires operator capability analytics.read and aal2. Everyone else gets 404. Without `from`/`to`: the last 30 days, ending at the next local midnight in `tz` (daily buckets). Read model admin_analytics_overview (ADR-006).","parameters":[{"name":"from","in":"query","description":"Range start (ISO 8601 instant). Send with `to`; both omitted = the default range.","schema":{"type":"string","maxLength":40}},{"name":"to","in":"query","description":"Range end, exclusive (ISO 8601 instant). Must be after `from` and at most 400 days later; otherwise 400 invalid_input.","schema":{"type":"string","maxLength":40}},{"name":"tz","in":"query","description":"IANA time zone for buckets (default UTC). Unknown zones return 400 invalid_input.","schema":{"type":"string","maxLength":64,"default":"UTC"}}],"responses":{"200":{"description":"Analytics overview.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAnalytics"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/admin/downloads":{"get":{"operationId":"adminGetDownloadHealth","summary":"Download delivery health","description":"Requires operator capability operations.read and aal2. Everyone else gets 404. Without `from`/`to`: the last 30 days in UTC. `outcomes` is null unless the operator also holds analytics.read.","parameters":[{"name":"from","in":"query","description":"Range start (ISO 8601 instant). Send with `to`; both omitted = the default range.","schema":{"type":"string","maxLength":40}},{"name":"to","in":"query","description":"Range end, exclusive (ISO 8601 instant). Must be after `from` and at most 400 days later; otherwise 400 invalid_input.","schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"Delivery health.","headers":{"Cache-Control":{"$ref":"#/components/headers/PrivateNoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDownloadHealth"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/report-intents":{"post":{"operationId":"createReportIntent","summary":"Start a public report","description":"Binds a 30-minute report intent to the page's slug. Anonymous; same-origin only (Sec-Fetch-Site: same-origin, or a matching Origin): cross-site requests get 403. Every response, errors included, is no-store with Referrer-Policy: no-referrer. Request bodies are never logged. Rate limits fail closed (Proposed G04). Per-IP `reportIntent` limit (30 per 10 minutes). Each intent also counts against the per-target soft limit `reportTargetSoft` (30 per hour); an intent created over it needs a Turnstile check on submit. Body ≤ 256 bytes. Unknown, blocked, withdrawn, processing and non-distributing slugs all answer the same 404.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportIntentBody"}}}},"responses":{"201":{"description":"Intent created.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"description":"Always no-referrer.","schema":{"const":"no-referrer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportIntent"}}}},"400":{"$ref":"#/components/responses/E400"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/reports":{"post":{"operationId":"submitReport","summary":"Submit a public report","description":"Files a report against the intent's target. Anonymous; same-origin only (Sec-Fetch-Site: same-origin, or a matching Origin): cross-site requests get 403. Every response, errors included, is no-store with Referrer-Policy: no-referrer. Request bodies are never logged. Rate limits fail closed (Proposed G04). Order: same-origin, bounded body (JSON ≤ 8 KiB), hard limits `reportSubmit` (20 per hour per IP) and `reportGlobal` (2,000 per hour), soft limits `reportSoft` (3 per hour per IP) and the intent's target mark decide whether a Turnstile check is due, the token is verified (action `report`, exact hostname allowlist) whenever one is sent or due, then the database. A due check without a configured widget answers 429. Replaying the same intent returns the same receipt. Intake never changes access. Also accepts an HTML form post (`application/x-www-form-urlencoded`, fields `slug`, `nonce`, `reason`, `description`, `contact`, optional `cf-turnstile-response`) from /report without JavaScript: it makes and consumes the intent in one request and answers 303 to `/report?target=<slug>&status=received&receipt=<receipt>`, or `status=invalid|unavailable|challenge|throttled|failed`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ReportForm"}}}},"responses":{"201":{"description":"Report received (JSON).","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"description":"Always no-referrer.","schema":{"const":"no-referrer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportReceipt"}}}},"303":{"description":"Form posts only: back to /report with the outcome.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"description":"Always no-referrer.","schema":{"const":"no-referrer"}},"Location":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"403":{"description":"forbidden (cross-site), or challenge_required: complete the Turnstile check and resend with `turnstileToken`.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Referrer-Policy":{"description":"Always no-referrer.","schema":{"const":"no-referrer"}}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/ChallengeError"}]}}}},"404":{"$ref":"#/components/responses/E404"},"410":{"$ref":"#/components/responses/E410"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations":{"get":{"operationId":"listMigrations","summary":"Imports of the active workspace","description":"Newest first, 20 per page; pass the previous page's `nextBefore` as `before`.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"The imports.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJobList"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:read"},"post":{"operationId":"createMigration","summary":"Inspect a source (start an import)","description":"The protected, explicit submission that starts inspection: validates and classifies the source (S3/R2 bucket, HTTPS link or CSV/JSON manifest of direct links, or the local helper), seals credentials and signed links, and queues inspection in the isolated runner. Pilot hosts (Drive, Dropbox, MEGA, ...) answer source_unsupported. Nothing is fetched in this request. A replay with the same Idempotency-Key returns the same import (200).","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMigrationBody"}}}},"responses":{"200":{"description":"Replay of an earlier identical request.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"201":{"description":"Created.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Location":{"description":"/api/v1/migrations/{id}","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:write"}},"/api/v1/migrations/{id}":{"get":{"operationId":"getMigration","summary":"One import","description":"State, inventory and flag counts, the dry-run plan under current decisions, quota fit, progress (ETA null until a rate is measured), retention policy and the redacted source. Poll every 5 s while inspecting, copying or verifying.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The import.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:read"}},"/api/v1/migrations/{id}/items":{"get":{"operationId":"listMigrationItems","summary":"Item outcomes (keyset pages)","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"flag","in":"query","required":false,"schema":{"type":"string","enum":["duplicate","collision","renamed"]}},{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":-1,"default":-1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"One page; nextAfter null ends the listing.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationItemPage"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:read"}},"/api/v1/migrations/{id}/decisions":{"post":{"operationId":"setMigrationDecisions","summary":"Per-item decisions before start","description":"Up to 500 explicit choices per call: import, rename (with name), skip, or import separately. Existing destination files are never replaced. Each call bumps the inventory revision.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationDecisionsBody"}}}},"responses":{"200":{"description":"The import.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:write"}},"/api/v1/migrations/{id}/start":{"post":{"operationId":"startMigration","summary":"Confirm the dry run and start copying","description":"Binds the reviewed inventory revision and the byte total shown (412 revision_conflict when either changed); defaults resolve flagged items. A plan above the workspace hard limit answers quota_exceeded; the soft limit only warns. imports_paused while MIGRATIONS_PAUSED is set.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartMigrationBody"}}}},"responses":{"200":{"description":"The import.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"412":{"$ref":"#/components/responses/E412"},"415":{"$ref":"#/components/responses/E415"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:write"}},"/api/v1/migrations/{id}/pause":{"post":{"operationId":"pauseMigration","summary":"Pause an import","description":"Pause at the next safe point; checkpoints, items and files stay.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The import.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:write"}},"/api/v1/migrations/{id}/resume":{"post":{"operationId":"resumeMigration","summary":"Resume an import","description":"Continue a paused inspection or copy from its checkpoint (imports_paused while paused globally).","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The import.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:write"}},"/api/v1/migrations/{id}/cancel":{"post":{"operationId":"cancelMigration","summary":"Cancel an import","description":"Stop for good. Imported files stay; queued and in-flight items are skipped and their attempts settled.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The import.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:write"}},"/api/v1/migrations/{id}/disconnect":{"post":{"operationId":"disconnectMigration","summary":"Disconnect an import","description":"Destroy the sealed source credentials now and pause active work.","security":[{"sessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The import.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations/{id}/reinspect":{"post":{"operationId":"reinspectMigration","summary":"Reinspect an import","description":"Read the source again before any item has been copied (new revision).","security":[{"sessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The import.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrationJob"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations/{id}/report":{"get":{"operationId":"migrationReport","summary":"Completion report (CSV)","description":"One row per item: source (redacted), destination_path, state, reason, size_bytes, sha256, new_url. Publishers use it to update their own links; nothing is redirected. Spreadsheet formulas are neutralised with a leading apostrophe. A failure mid-stream aborts the download.","security":[{"sessionCookie":[]},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"CSV","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}},"x-required-scope":"imports:read"}},"/api/v1/migrations/{id}/local-token":{"post":{"operationId":"issueLocalToken","summary":"Key for the local helper","description":"Shown once; only its SHA-256 is stored. Re-issuing replaces the earlier key. Local imports only.","security":[{"sessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Created.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalToken"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations/{id}/local":{"get":{"operationId":"localStatus","summary":"Import status for the local helper","security":[{"importKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Status.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalStatus"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations/{id}/local/inventory":{"post":{"operationId":"localInventory","summary":"Local inventory page","description":"≤ 1,000 items (size and modified time). Stored only when afterCursor equals the checkpoint; otherwise outcome checkpoint names it.","security":[{"importKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalInventoryBody"}}}},"responses":{"200":{"description":"Result.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalInventoryResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations/{id}/local/items":{"get":{"operationId":"localNextItems","summary":"Queued items to upload","security":[{"importKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":16,"default":16}}],"responses":{"200":{"description":"Items.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalQueuedPage"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations/{id}/local/items/{itemId}/begin":{"post":{"operationId":"localBeginItem","summary":"Start or resume an item's upload","description":"Reserves quota and answers the session, the signed single PUT (contentMd5 required up to 100 MiB), or the provider part receipts for multipart resume.","security":[{"importKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalBeginItemBody"}}}},"responses":{"200":{"description":"Begun.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalBeginItemResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations/{id}/local/items/{itemId}/failed":{"post":{"operationId":"localItemFailed","summary":"Report a local file that changed or vanished","security":[{"importKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"itemId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocalItemFailedBody"}}}},"responses":{"200":{"description":"Recorded.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations/{id}/local/uploads/{sessionId}/parts":{"post":{"operationId":"localSignParts","summary":"Sign part PUTs for an item attempt","security":[{"importKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignPartsBody"}}}},"responses":{"200":{"description":"Signed requests.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignPartsResult"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/v1/migrations/{id}/local/uploads/{sessionId}/complete":{"post":{"operationId":"localCompleteUpload","summary":"Complete an item attempt","description":"Same rules as /api/v1/uploads/{id}/complete; verification then recomputes the SHA-256 from storage.","security":[{"importKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteUploadBody"}}}},"responses":{"200":{"description":"The session.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSession"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}}},"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"sb-<project>-auth-token","description":"Supabase session cookie (host-only)."},"importKey":{"type":"http","scheme":"bearer","description":"Local helper key `smt_<migrationId>.<secret>` from POST /api/v1/migrations/{id}/local-token: upload-only, one import, 12 hours (Proposed). Never a cookie, so no CSRF check applies; the database checks its digest, expiry, the import state and the issuer's current files.write membership on every call."},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sharer_sk_<43 base64url characters>","description":"Publisher API key from /api-keys (Stage 09, ADR-005). Scoped (files:read, files:write, uploads:write, downloads:read, imports:read, imports:write), expiring (30-365 days) and revocable; the server stores only its SHA-256. Failures: 401 invalid_api_key, 403 api_key_suspended or insufficient_scope, each with a WWW-Authenticate: Bearer challenge (RFC 6750). No CSRF check applies; cookies on the same request are ignored."}},"headers":{"NoStore":{"description":"Always no-store.","schema":{"const":"no-store"}},"PrivateNoStore":{"description":"Always `private, no-store` (operator analytics and delivery health).","schema":{"const":"private, no-store"}},"ETag":{"description":"Strong ETag `\"r<revision>-p<policyRevision>\"`, or `\"r<revision>\"` for a folder without a public route (the workspace root). Send it back as If-Match.","schema":{"type":"string","pattern":"^\"r\\d+(-p\\d+)?\"$"}},"RetryAfter":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"WWWAuthenticate":{"description":"API-key failures only: `Bearer realm=\"sharer\", error=\"invalid_token\"` (invalid or suspended key) or `error=\"insufficient_scope\"`.","schema":{"type":"string"}}},"parameters":{"IfMatch":{"name":"If-Match","in":"header","required":true,"description":"A single strong ETag from a previous read: `\"r<revision>-p<policyRevision>\"`, `\"r<revision>\"` or `\"<revision>\"`. Weak tags, lists and `*` are rejected (400). Missing → 428. Stale → 412 revision_conflict. Password changes need the `-p<policyRevision>` part.","schema":{"type":"string"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"8–128 characters of [A-Za-z0-9_-]. Replaying the same key with the same request returns the original outcome; a different request with the same key is 409 idempotency_conflict.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,128}$"}}},"responses":{"E400":{"description":"invalid_input, invalid_name, invalid_tags, invalid_idempotency_key, selection_too_large","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"not_authenticated, session_revoked; Stage 09: invalid_api_key (missing, malformed, unknown, expired or revoked key)","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E403":{"description":"forbidden (also CSRF refusal and no active workspace), account_suspended, mfa_required, step_up_required; Stage 09: api_key_suspended (the key's custodian can no longer manage keys here), insufficient_scope (the key lacks the operation's scope), forbidden (a session-only operation, such as a password change, requested with a key)","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"not_found (also malformed ids, and admin routes for non-operators)","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E409":{"description":"conflict, name_taken, idempotency_conflict, folder_cycle, depth_exceeded, invalid_destination, invalid_state, not_editable, selection_expired, path_collision, quota_exceeded (409 rather than 507: the workspace is out of quota, not the server); Stage 05: upload_incomplete (parts missing; the session reopens); Stage 09: api_key_limit (console only)","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E412":{"description":"revision_conflict: If-Match no longer matches","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E413":{"description":"invalid_input: body larger than 262144 bytes; Stage 05: upload_too_large (declared size over the current maximum)","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E415":{"description":"invalid_input: Content-Type is not application/json (UTF-8); Stage 05: unsupported_image (branding sources: PNG, JPEG or WebP)","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E428":{"description":"invalid_input: If-Match missing (or, for password changes, without the policy revision)","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E429":{"description":"rate_limited; see Retry-After","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E503":{"description":"service_unavailable, api_not_ready, unavailable; Retry-After: 5, imports_paused","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E410":{"description":"upload_expired: the session passed its idle or absolute deadline; start a new upload.","headers":{"Cache-Control":{"$ref":"#/components/headers/NoStore"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["code","message","retryable","requestId"],"additionalProperties":false,"properties":{"code":{"type":"string","description":"Stable code (COMMAND_ERROR_MESSAGES in src/lib/dal/result.ts)."},"message":{"type":"string","description":"Safe, human-readable message for the code. Never database text or request data."},"retryable":{"type":"boolean"},"requestId":{"type":"string"}}}}},"Folder":{"type":"object","required":["kind","id","name","parentId","slug","status","revision","policyRevision","childFolderCount","childFileCount","passwordProtected","inheritedPassword","createdAt","updatedAt"],"properties":{"kind":{"const":"folder"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"parentId":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"null for the workspace root."},"slug":{"oneOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["live","deleting","deleted"]},"revision":{"type":"integer","format":"int64"},"policyRevision":{"oneOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"childFolderCount":{"type":"integer","format":"int64","description":"Capped at 1000 (means 1000 or more)."},"childFileCount":{"type":"integer","format":"int64","description":"Capped at 1000 (means 1000 or more)."},"passwordProtected":{"type":"boolean"},"inheritedPassword":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"File":{"type":"object","required":["kind","id","name","folderId","slug","sizeBytes","sha256","availability","scan","moderation","denyStatus","tags","description","revision","policyRevision","passwordProtected","inheritedPassword","availableAt","createdAt","updatedAt"],"properties":{"kind":{"const":"file"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"folderId":{"type":"string","format":"uuid"},"slug":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"sha256":{"oneOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}],"description":"Hex; null until verified."},"availability":{"type":"string","description":"FILE_AVAILABILITY_STATES (packages/contracts/src/states.ts)."},"scan":{"enum":["pending","running","passed","detected","inconclusive","error"]},"moderation":{"enum":["allowed","under_review","blocked"]},"denyStatus":{"enum":["none","pending_propagation","acknowledged"]},"tags":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"revision":{"type":"integer","format":"int64"},"policyRevision":{"type":"integer","format":"int64"},"passwordProtected":{"type":"boolean"},"inheritedPassword":{"type":"boolean"},"availableAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CatalogItem":{"oneOf":[{"$ref":"#/components/schemas/Folder"},{"$ref":"#/components/schemas/File"}],"discriminator":{"propertyName":"kind"}},"ListPage":{"type":"object","required":["items","total","totalCapped","nextCursor","prevCursor"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CatalogItem"}},"total":{"type":"integer","format":"int64","description":"Capped at 10000."},"totalCapped":{"type":"boolean","description":"true: total means at least."},"nextCursor":{"oneOf":[{"type":"string"},{"type":"null"}],"description":"Opaque."},"prevCursor":{"oneOf":[{"type":"string"},{"type":"null"}],"description":"Opaque; pass with reverse=true."}}},"SearchResult":{"type":"object","required":["items","total"],"properties":{"items":{"type":"array","items":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Folder"},{"type":"object","required":["matchTier"],"properties":{"matchTier":{"type":"integer","format":"int64","description":"0 id/slug, 1 exact name, 2 prefix, 3 token, 4 substring, 5 tag."}}}]},{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","required":["matchTier"],"properties":{"matchTier":{"type":"integer","format":"int64","description":"0 id/slug, 1 exact name, 2 prefix, 3 token, 4 substring, 5 tag."}}}]}]}},"total":{"type":"integer","format":"int64"}}},"FolderView":{"type":"object","required":["folder","ancestors"],"properties":{"folder":{"$ref":"#/components/schemas/Folder"},"ancestors":{"type":"array","items":{"$ref":"#/components/schemas/Folder"},"description":"Root first; excludes the folder itself."}}},"TreeChildren":{"type":"object","required":["items","hasMore"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Folder"}},"hasMore":{"type":"boolean"}}},"PasswordResult":{"type":"object","required":["policyRevision","passwordProtected"],"properties":{"policyRevision":{"type":"integer","format":"int64"},"passwordProtected":{"type":"boolean"}}},"BulkResult":{"type":"object","required":["kind","requested","applied","conflicts","excluded"],"properties":{"kind":{"type":"string"},"requested":{"type":"integer","format":"int64"},"applied":{"type":"integer","format":"int64"},"conflicts":{"type":"object","required":["count","sample"],"properties":{"count":{"type":"integer","format":"int64"},"sample":{"type":"array","items":{"type":"object","required":["id","name","reason"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"reason":{"oneOf":[{"type":"string"},{"type":"null"}]}}}}}},"excluded":{"type":"object","required":["count","sample"],"properties":{"count":{"type":"integer","format":"int64"},"sample":{"type":"array","items":{"type":"object","required":["id","name","reason"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"reason":{"oneOf":[{"type":"string"},{"type":"null"}]}}}}}}}},"FolderDeleteResult":{"type":"object","required":["jobId","folderId","state","progress","result","error"],"properties":{"jobId":{"type":"string","format":"uuid"},"folderId":{"type":"string","format":"uuid"},"state":{"type":"string","description":"JOB_STATES (packages/contracts/src/states.ts)."},"progress":{"type":"object","properties":{"processed":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"}}},"result":{"oneOf":[{"$ref":"#/components/schemas/BulkResult"},{"type":"null"}]},"error":{"oneOf":[{"type":"string"},{"type":"null"}],"description":"Stable code, never database text."}}},"CreateFolderBody":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"parentId":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"omitted or null = workspace root."},"name":{"type":"string","minLength":1,"maxLength":255}}},"PatchFileBody":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":255},"tags":{"type":"array","maxItems":16,"items":{"type":"string","maxLength":64}},"description":{"type":"string","maxLength":2000},"folderId":{"type":"string","format":"uuid"},"password":{"oneOf":[{"type":"string","minLength":8,"maxLength":256,"writeOnly":true},{"type":"null"}],"description":"Plaintext, hashed by the server before any storage; never echoed or logged. null removes the file's own password."},"state":{"const":"withdrawn"}}},"PatchFolderBody":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":255},"parentId":{"type":"string","format":"uuid"},"password":{"oneOf":[{"type":"string","minLength":8,"maxLength":256,"writeOnly":true},{"type":"null"}],"description":"null removes the folder's own password."}}},"AdminFile":{"type":"object","required":["id","orgId","orgName","route","file","blob","retirement","gates","timeline"],"properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"orgName":{"type":"string"},"route":{"type":"object","required":["slug","state","policyRevision"],"properties":{"slug":{"type":"string"},"state":{"enum":["live","retired","blocked"]},"policyRevision":{"type":"integer","format":"int64"}}},"file":{"oneOf":[{"type":"object","required":["folderId","name","sizeBytes","sha256","availability","moderation","denyStatus","revision","createdAt","availableAt"],"properties":{"folderId":{"type":"string","format":"uuid"},"name":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"sha256":{"oneOf":[{"type":"string"},{"type":"null"}]},"availability":{"type":"string"},"moderation":{"type":"string"},"denyStatus":{"type":"string"},"revision":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"availableAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},{"type":"null"}]},"blob":{"oneOf":[{"type":"object","required":["state","integrity","scan","promotion","sizeBytes"],"properties":{"state":{"type":"string"},"integrity":{"oneOf":[{"type":"string"},{"type":"null"}]},"scan":{"type":"string"},"promotion":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."}}},{"type":"null"}]},"retirement":{"oneOf":[{"type":"object","required":["reason","at"],"properties":{"reason":{"type":"string"},"at":{"type":"string","format":"date-time"}}},{"type":"null"}]},"gates":{"type":"integer","format":"int64"},"timeline":{"type":"array","items":{"type":"object","required":["at","action","actorKind","result","beforeRevision","afterRevision"],"properties":{"at":{"type":"string","format":"date-time"},"action":{"type":"string"},"actorKind":{"type":"string"},"result":{"type":"string"},"beforeRevision":{"oneOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"afterRevision":{"oneOf":[{"type":"integer","format":"int64"},{"type":"null"}]}}}}}},"AdminFolder":{"type":"object","required":["id","orgId","orgName","name","parentId","status","revision","route","passwordProtected","inheritedPassword","descendantFolders","descendantFiles","timeline"],"properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"orgName":{"type":"string"},"name":{"type":"string"},"parentId":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"type":"string"},"revision":{"type":"integer","format":"int64"},"route":{"oneOf":[{"type":"object","required":["slug","state","policyRevision"],"properties":{"slug":{"type":"string"},"state":{"enum":["live","retired","blocked"]},"policyRevision":{"type":"integer","format":"int64"}}},{"type":"null"}]},"passwordProtected":{"type":"boolean"},"inheritedPassword":{"type":"boolean"},"descendantFolders":{"type":"integer","format":"int64"},"descendantFiles":{"type":"integer","format":"int64"},"timeline":{"type":"array","items":{"type":"object","required":["at","action","actorKind","result","beforeRevision","afterRevision"],"properties":{"at":{"type":"string","format":"date-time"},"action":{"type":"string"},"actorKind":{"type":"string"},"result":{"type":"string"},"beforeRevision":{"oneOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"afterRevision":{"oneOf":[{"type":"integer","format":"int64"},{"type":"null"}]}}}}}},"AdminPublisherPage":{"type":"object","required":["items","nextBefore"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","name","access","distribution","quotaBytes","usedBytes","fileCount","memberCount","openCases","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"access":{"enum":["pending_claim","active","suspended","revoked"]},"distribution":{"enum":["disabled","enabled","blocked"]},"quotaBytes":{"oneOf":[{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},{"type":"null"}]},"usedBytes":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"fileCount":{"type":"integer","format":"int64","minimum":0},"memberCount":{"type":"integer","format":"int64","minimum":0},"openCases":{"type":"integer","format":"int64","minimum":0},"createdAt":{"type":"string","format":"date-time"}}}},"nextBefore":{"oneOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page (`before`); null on the last page."}}},"AdminPublisherDetail":{"type":"object","required":["org","storage","rootFolderId","members","apiKeys","containments","openCases","recentJobs","timeline"],"properties":{"org":{"type":"object","required":["id","name","access","distribution","quotaBytes","revision","createdAt","closing","distributionBlockedByCase"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"access":{"enum":["pending_claim","active","suspended","revoked"]},"distribution":{"enum":["disabled","enabled","blocked"]},"quotaBytes":{"oneOf":[{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},{"type":"null"}]},"revision":{"type":"integer","format":"int64","minimum":1},"createdAt":{"type":"string","format":"date-time"},"closing":{"type":"boolean","description":"A closure in progress owns the write suspension."},"distributionBlockedByCase":{"type":"boolean","description":"An active moderation enforcement owns the distribution block."}}},"storage":{"type":"object","required":["usedBytes","reservedBytes","fileCount","folderCount","liveRoutes"],"properties":{"usedBytes":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"reservedBytes":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"fileCount":{"type":"integer","format":"int64","minimum":0},"folderCount":{"type":"integer","format":"int64","minimum":0},"liveRoutes":{"type":"integer","format":"int64","minimum":0}}},"rootFolderId":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"members":{"type":"array","items":{"type":"object","required":["membershipId","userId","displayName","emailMasked","role","status"],"properties":{"membershipId":{"type":"string","format":"uuid"},"userId":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"displayName":{"oneOf":[{"type":"string"},{"type":"null"}]},"emailMasked":{"oneOf":[{"type":"string"},{"type":"null"}],"description":"Masked address (\"a•••@example.com\")."},"role":{"enum":["owner","admin"]},"status":{"enum":["pending_claim","active","suspended","removed"]}}}},"apiKeys":{"type":"array","items":{"type":"object","required":["id","name","prefix","status","createdAt","lastUsedAt"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}}},"containments":{"type":"array","items":{"type":"object","required":["id","kind","reason","placedAt","placedByViewer"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"enum":["writes","distribution"]},"reason":{"type":"string"},"placedAt":{"type":"string","format":"date-time"},"placedByViewer":{"type":"boolean","description":"true: the viewing operator placed it (and cannot lift it)."}}}},"openCases":{"type":"array","items":{"type":"object","required":["id","state","priority","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string"},"priority":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}}},"recentJobs":{"type":"array","items":{"type":"object","required":["id","orgId","kind","workloadClass","state","attempt","maxAttempts","leaseUntil","nextRunAt","deadlineAt","lastError","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"orgId":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"kind":{"type":"string"},"workloadClass":{"enum":["urgent_deny","interactive","bulk","import","scan","export"]},"state":{"type":"string"},"attempt":{"type":"integer","format":"int64","minimum":0},"maxAttempts":{"type":"integer","format":"int64","minimum":0},"leaseUntil":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"nextRunAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deadlineAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastError":{"oneOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"timeline":{"type":"array","items":{"type":"object","required":["at","action","actorKind","result","beforeRevision","afterRevision"],"properties":{"at":{"type":"string","format":"date-time"},"action":{"type":"string"},"actorKind":{"type":"string"},"result":{"type":"string"},"beforeRevision":{"oneOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"afterRevision":{"oneOf":[{"type":"integer","format":"int64"},{"type":"null"}]}}}}}},"AdminFilePage":{"type":"object","required":["items","nextBefore"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","orgId","orgName","folderId","name","sizeBytes","availability","moderation","denyStatus","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"orgId":{"type":"string","format":"uuid"},"orgName":{"type":"string"},"folderId":{"oneOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"name":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"availability":{"enum":["processing","available","withdrawn","deletion_pending","deleted","rejected"]},"moderation":{"enum":["allowed","under_review","blocked"]},"denyStatus":{"enum":["none","pending_propagation","acknowledged"]},"createdAt":{"type":"string","format":"date-time"}}}},"nextBefore":{"oneOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page (`before`); null on the last page."}}},"AdminAnalytics":{"type":"object","description":"adminAnalyticsSchema in packages/contracts/src/analytics.ts (ADR-006 §6). Buckets after range.completeThrough, or inside a suppressed incident, are null.","required":["range","series","totals","bySource","topOrgs","downloadFunnel","admission","storage","jobs","outbox","trust","api","delivery","pipeline","annotations"],"properties":{"range":{"type":"object","required":["from","to","prevFrom","prevTo","tz","bucket"],"properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"prevFrom":{"type":"string","format":"date-time"},"prevTo":{"type":"string","format":"date-time"},"tz":{"type":"string"},"bucket":{"enum":["hour","day"]}}},"series":{"type":"array","items":{"type":"object","required":["t","starts","startsPrev","bytesObserved","bytesExpected"],"properties":{"t":{"type":"string","format":"date-time"},"starts":{"oneOf":[{"type":"integer","format":"int64","minimum":0},{"type":"null"}]},"startsPrev":{"oneOf":[{"type":"integer","format":"int64","minimum":0},{"type":"null"}]},"bytesObserved":{"oneOf":[{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},{"type":"null"}]},"bytesExpected":{"oneOf":[{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},{"type":"null"}]}}}},"totals":{"type":"object","required":["starts","startsPrev","bytesObserved","bytesExpected","activeOrgs"],"properties":{"starts":{"type":"integer","format":"int64","minimum":0},"startsPrev":{"type":"integer","format":"int64","minimum":0},"bytesObserved":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"bytesExpected":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"activeOrgs":{"type":"integer","format":"int64","minimum":0}}},"bySource":{"type":"array","items":{"type":"object","required":["source","starts"],"properties":{"source":{"enum":["public","member","api"]},"starts":{"type":"integer","format":"int64","minimum":0}}}},"topOrgs":{"type":"array","items":{"type":"object","required":["orgId","name","starts","bytesObserved"],"properties":{"orgId":{"type":"string","format":"uuid"},"name":{"type":"string"},"starts":{"type":"integer","format":"int64","minimum":0},"bytesObserved":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."}}}},"downloadFunnel":{"type":"object","required":["intents","grantsIssued","accepted"],"properties":{"intents":{"type":"integer","format":"int64","minimum":0},"grantsIssued":{"type":"integer","format":"int64","minimum":0},"accepted":{"type":"integer","format":"int64","minimum":0}}},"admission":{"type":"object","required":["submitted","approved","rejected","needsInformation","provisioned","claimed"],"properties":{"submitted":{"type":"integer","format":"int64","minimum":0},"approved":{"type":"integer","format":"int64","minimum":0},"rejected":{"type":"integer","format":"int64","minimum":0},"needsInformation":{"type":"integer","format":"int64","minimum":0},"provisioned":{"type":"integer","format":"int64","minimum":0},"claimed":{"type":"integer","format":"int64","minimum":0}}},"storage":{"type":"object","required":["orgs","files","committedBytes","reservedBytes","heldFiles","cleanupCandidates","reclaimedBytes"],"properties":{"orgs":{"type":"integer","format":"int64","minimum":0},"files":{"type":"integer","format":"int64","minimum":0},"committedBytes":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"reservedBytes":{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},"heldFiles":{"oneOf":[{"type":"integer","format":"int64","minimum":0},{"type":"null"}]},"cleanupCandidates":{"oneOf":[{"type":"integer","format":"int64","minimum":0},{"type":"null"}]},"reclaimedBytes":{"oneOf":[{"type":"integer","format":"int64","minimum":0,"description":"Decimal byte count (JSON integer, never a string or float)."},{"type":"null"}]}}},"jobs":{"type":"object","required":["queued","running","retryWait","deadLetter","oldestQueuedAt"],"properties":{"queued":{"type":"integer","format":"int64","minimum":0},"running":{"type":"integer","format":"int64","minimum":0},"retryWait":{"type":"integer","format":"int64","minimum":0},"deadLetter":{"type":"integer","format":"int64","minimum":0},"oldestQueuedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"outbox":{"type":"object","required":["pending","quarantined","oldestPendingAt"],"properties":{"pending":{"type":"integer","format":"int64","minimum":0},"quarantined":{"type":"integer","format":"int64","minimum":0},"oldestPendingAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"trust":{"type":"object","required":["reportsReceived","casesOpen","enforcements"],"properties":{"reportsReceived":{"type":"integer","format":"int64","minimum":0},"casesOpen":{"type":"integer","format":"int64","minimum":0},"enforcements":{"type":"integer","format":"int64","minimum":0}}},"api":{"type":"object","required":["calls","activeKeys"],"properties":{"calls":{"type":"integer","format":"int64","minimum":0},"activeKeys":{"type":"integer","format":"int64","minimum":0}}},"delivery":{"type":"object","required":["partitionsLive","partitionsStale","unknownLeases"],"properties":{"partitionsLive":{"type":"integer","format":"int64","minimum":0},"partitionsStale":{"type":"integer","format":"int64","minimum":0},"unknownLeases":{"type":"integer","format":"int64","minimum":0}}},"outcomes":{"type":"object","required":["denied","limited","deliveryErrors","retiredAttempts"],"properties":{"denied":{"type":"integer","format":"int64","minimum":0},"limited":{"type":"integer","format":"int64","minimum":0},"deliveryErrors":{"type":"integer","format":"int64","minimum":0},"retiredAttempts":{"type":"integer","format":"int64","minimum":0}},"description":"Stage 13 outcome counters over the range; absent before the Stage 13 migration."},"pipeline":{"type":"object","required":["freshness","quarantined","reconciliation","archive","retentionMode"],"properties":{"freshness":{"type":"object","description":"Pipeline freshness (freshnessSchema): asOf, completeThrough, lastAppliedAt, queueDepth, oldestQueuedAt, lagSeconds, status."},"quarantined":{"type":"integer","format":"int64","minimum":0},"reconciliation":{"type":"object","description":"Event reconciliation counts over the range (reconciliationSchema); `unexplained` other than 0 is an alert."},"archive":{"type":"object","required":["batches","lastArchivedAt","archivedThrough"],"properties":{"batches":{"type":"integer","format":"int64","minimum":0},"lastArchivedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedThrough":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"retentionMode":{"enum":["off","enforce"]}}},"annotations":{"type":"array","items":{"type":"object","required":["at","endsAt","label","kind","suppressed"],"properties":{"at":{"type":"string","format":"date-time"},"endsAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"label":{"type":"string"},"kind":{"enum":["incident","change"]},"suppressed":{"type":"boolean"}}}}}},"AdminDownloadHealth":{"type":"object","required":["generatedAt","range","delivery","lagThresholdMinutes","deny","outcomes"],"properties":{"generatedAt":{"type":"string","format":"date-time"},"range":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"delivery":{"type":"object","required":["pendingPropagation","oldestPendingAt"],"properties":{"pendingPropagation":{"type":"integer","format":"int64","minimum":0},"oldestPendingAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"lagThresholdMinutes":{"type":"integer","minimum":1,"maximum":1440,"description":"Operator alert threshold both lags are judged against."},"deny":{"type":"object","required":["unacknowledged","oldestSentAt","conflicts","failuresQuarantined"],"properties":{"unacknowledged":{"type":"integer","format":"int64","minimum":0},"oldestSentAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"conflicts":{"type":"integer","format":"int64","minimum":0},"failuresQuarantined":{"type":"integer","format":"int64","minimum":0}}},"outcomes":{"oneOf":[{"type":"object","required":["denied","limited","deliveryErrors","retiredAttempts"],"properties":{"denied":{"type":"integer","format":"int64","minimum":0},"limited":{"type":"integer","format":"int64","minimum":0},"deliveryErrors":{"type":"integer","format":"int64","minimum":0},"retiredAttempts":{"type":"integer","format":"int64","minimum":0}}},{"type":"null"}],"description":"null when the operator lacks analytics.read."}}},"CreateUploadBody":{"type":"object","properties":{"purpose":{"default":"file","type":"string","enum":["file","branding"]},"folderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":1024},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentMd5":{"type":"string","pattern":"^[A-Za-z0-9+/]{22}==$"},"contentType":{"type":"string","maxLength":100}},"required":["name","sizeBytes"],"additionalProperties":false},"SignPartsBody":{"type":"object","properties":{"parts":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":10000},"contentMd5":{"type":"string","pattern":"^[A-Za-z0-9+/]{22}==$"}},"required":["partNumber","contentMd5"],"additionalProperties":false}}},"required":["parts"],"additionalProperties":false},"CompleteUploadBody":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"additionalProperties":false},"UploadSession":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"purpose":{"type":"string","enum":["file","branding"]},"state":{"type":"string","enum":["reserved","uploading","completing","completed","aborted","expired","failed"]},"mode":{"type":"string","enum":["single_put","multipart"]},"name":{"type":"string"},"folderId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partSizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","minLength":1},"lastActivityAt":{"type":"string","minLength":1},"idleExpiresAt":{"type":"string","minLength":1},"absoluteExpiresAt":{"type":"string","minLength":1},"fileId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"slug":{"type":["string","null"]},"assetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"processing":{"type":"object","properties":{"blob":{"anyOf":[{"type":"string","enum":["quarantined","verifying","scanning","approved","rejected","scan_failed","deletion_pending","deleted"]},{"type":"null"}]},"integrity":{"anyOf":[{"type":"string","enum":["verified","failed"]},{"type":"null"}]},"scan":{"anyOf":[{"type":"string","enum":["pending","running","passed","detected","inconclusive","error","waived"]},{"type":"null"}]},"availability":{"anyOf":[{"type":"string","enum":["processing","available","withdrawn","deletion_pending","deleted","rejected"]},{"type":"null"}]}},"required":["blob","integrity","scan","availability"],"additionalProperties":false},"failure":{"type":["string","null"]},"previousAttemptId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","purpose","state","mode","name","folderId","sizeBytes","partSizeBytes","partCount","createdAt","lastActivityAt","idleExpiresAt","absoluteExpiresAt","fileId","slug","assetId","processing","failure","previousAttemptId"],"additionalProperties":false},"CreateUploadResult":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"purpose":{"type":"string","enum":["file","branding"]},"state":{"type":"string","enum":["reserved","uploading","completing","completed","aborted","expired","failed"]},"mode":{"type":"string","enum":["single_put","multipart"]},"name":{"type":"string"},"folderId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partSizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","minLength":1},"lastActivityAt":{"type":"string","minLength":1},"idleExpiresAt":{"type":"string","minLength":1},"absoluteExpiresAt":{"type":"string","minLength":1},"fileId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"slug":{"type":["string","null"]},"assetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"processing":{"type":"object","properties":{"blob":{"anyOf":[{"type":"string","enum":["quarantined","verifying","scanning","approved","rejected","scan_failed","deletion_pending","deleted"]},{"type":"null"}]},"integrity":{"anyOf":[{"type":"string","enum":["verified","failed"]},{"type":"null"}]},"scan":{"anyOf":[{"type":"string","enum":["pending","running","passed","detected","inconclusive","error","waived"]},{"type":"null"}]},"availability":{"anyOf":[{"type":"string","enum":["processing","available","withdrawn","deletion_pending","deleted","rejected"]},{"type":"null"}]}},"required":["blob","integrity","scan","availability"],"additionalProperties":false},"failure":{"type":["string","null"]},"previousAttemptId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","purpose","state","mode","name","folderId","sizeBytes","partSizeBytes","partCount","createdAt","lastActivityAt","idleExpiresAt","absoluteExpiresAt","fileId","slug","assetId","processing","failure","previousAttemptId"],"additionalProperties":false},"put":{"anyOf":[{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":10000},"url":{"type":"string","format":"uri"},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","minLength":1}},"required":["partNumber","url","method","headers","expiresAt"],"additionalProperties":false},{"type":"null"}]}},"required":["session","put"],"additionalProperties":false},"UploadDetail":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"purpose":{"type":"string","enum":["file","branding"]},"state":{"type":"string","enum":["reserved","uploading","completing","completed","aborted","expired","failed"]},"mode":{"type":"string","enum":["single_put","multipart"]},"name":{"type":"string"},"folderId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partSizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","minLength":1},"lastActivityAt":{"type":"string","minLength":1},"idleExpiresAt":{"type":"string","minLength":1},"absoluteExpiresAt":{"type":"string","minLength":1},"fileId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"slug":{"type":["string","null"]},"assetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"processing":{"type":"object","properties":{"blob":{"anyOf":[{"type":"string","enum":["quarantined","verifying","scanning","approved","rejected","scan_failed","deletion_pending","deleted"]},{"type":"null"}]},"integrity":{"anyOf":[{"type":"string","enum":["verified","failed"]},{"type":"null"}]},"scan":{"anyOf":[{"type":"string","enum":["pending","running","passed","detected","inconclusive","error","waived"]},{"type":"null"}]},"availability":{"anyOf":[{"type":"string","enum":["processing","available","withdrawn","deletion_pending","deleted","rejected"]},{"type":"null"}]}},"required":["blob","integrity","scan","availability"],"additionalProperties":false},"failure":{"type":["string","null"]},"previousAttemptId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","purpose","state","mode","name","folderId","sizeBytes","partSizeBytes","partCount","createdAt","lastActivityAt","idleExpiresAt","absoluteExpiresAt","fileId","slug","assetId","processing","failure","previousAttemptId"],"additionalProperties":false},"parts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":10000},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"etag":{"type":"string"}},"required":["partNumber","sizeBytes","etag"],"additionalProperties":false}},{"type":"null"}]}},"required":["session","parts"],"additionalProperties":false},"SignPartsResult":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":10000},"url":{"type":"string","format":"uri"},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","minLength":1}},"required":["partNumber","url","method","headers","expiresAt"],"additionalProperties":false}}},"required":["requests"],"additionalProperties":false},"UploadList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"purpose":{"type":"string","enum":["file","branding"]},"state":{"type":"string","enum":["reserved","uploading","completing","completed","aborted","expired","failed"]},"mode":{"type":"string","enum":["single_put","multipart"]},"name":{"type":"string"},"folderId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partSizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","minLength":1},"lastActivityAt":{"type":"string","minLength":1},"idleExpiresAt":{"type":"string","minLength":1},"absoluteExpiresAt":{"type":"string","minLength":1},"fileId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"slug":{"type":["string","null"]},"assetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"processing":{"type":"object","properties":{"blob":{"anyOf":[{"type":"string","enum":["quarantined","verifying","scanning","approved","rejected","scan_failed","deletion_pending","deleted"]},{"type":"null"}]},"integrity":{"anyOf":[{"type":"string","enum":["verified","failed"]},{"type":"null"}]},"scan":{"anyOf":[{"type":"string","enum":["pending","running","passed","detected","inconclusive","error","waived"]},{"type":"null"}]},"availability":{"anyOf":[{"type":"string","enum":["processing","available","withdrawn","deletion_pending","deleted","rejected"]},{"type":"null"}]}},"required":["blob","integrity","scan","availability"],"additionalProperties":false},"failure":{"type":["string","null"]},"previousAttemptId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","purpose","state","mode","name","folderId","sizeBytes","partSizeBytes","partCount","createdAt","lastActivityAt","idleExpiresAt","absoluteExpiresAt","fileId","slug","assetId","processing","failure","previousAttemptId"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"Branding":{"type":"object","properties":{"assetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"state":{"type":"string","enum":["none","processing","ready","rejected"]},"variants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["name","width","height"],"additionalProperties":false}},"updatedAt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["assetId","state","variants","updatedAt"],"additionalProperties":false},"DownloadStartBody":{"type":"object","additionalProperties":false,"required":["intentId"],"properties":{"intentId":{"type":"string","format":"uuid","description":"Client-generated start intent. Every step is idempotent by intent: retrying the same intent (for example after a lost response) returns the same URL. Poll `preparing` with the same intent; mint a new one after `expired`."}}},"DownloadGrantBody":{"type":"object","additionalProperties":false,"required":["slug","intentId"],"properties":{"slug":{"type":"string","pattern":"^[A-Za-z0-9_-]{21}[AQgw]$","description":"Public slug of the file or folder."},"intentId":{"$ref":"#/components/schemas/DownloadStartBody/properties/intentId"}}},"DownloadGrant":{"description":"Outcome of a download start. Every state is HTTP 200; failures of the request itself use the error envelope.","oneOf":[{"type":"object","required":["state","url","expiresAt"],"properties":{"state":{"const":"ready"},"url":{"type":"string","format":"uri","description":"Bearer URL `https://<download origin>/d/<session>/<safe name>`. Navigate to it (attachment); it resumes with Range for up to 24 h. Never log or share it."},"expiresAt":{"type":"string","format":"date-time","description":"Session deadline."}}},{"type":"object","required":["state"],"properties":{"state":{"const":"preparing","description":"A folder ZIP is building. Poll with the same intent (2–5 s backoff)."}}},{"type":"object","required":["state","scope","missing"],"properties":{"state":{"const":"locked","description":"A password gate on the chain has no valid unlock proof at its current digest. Public pages clear that slug's stale proofs (Set-Cookie)."},"scope":{"enum":["self","inherited"]},"missing":{"type":"integer","minimum":0}}},{"type":"object","required":["state"],"properties":{"state":{"const":"member_locked","description":"A folder member has its own password, so no ZIP is built."}}},{"type":"object","required":["state"],"properties":{"state":{"const":"expired","description":"The intent's grant window passed. Retry with a new intent."}}},{"type":"object","required":["state"],"properties":{"state":{"enum":["not_found","retired"],"description":"Not downloadable (removed, withdrawn, DMCA, or inactivity-retired). Show \"File not found.\"."}}},{"type":"object","required":["state"],"properties":{"state":{"const":"paused","description":"New downloads are paused (issuance control). Retry later."}}},{"type":"object","required":["state","reason"],"properties":{"state":{"const":"failed"},"reason":{"enum":["member_unavailable","selection_too_large","path_collision","archive_failed"]}}}]},"ReportIntentBody":{"type":"object","additionalProperties":false,"required":["slug"],"properties":{"slug":{"type":"string","description":"Public slug of the file or folder page (22 base64url characters). The only target input; the server resolves the tenant and target."}}},"ReportIntent":{"type":"object","additionalProperties":false,"required":["intent","expiresAt","kind","retired","turnstileSiteKey"],"properties":{"intent":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.[A-Za-z0-9_-]{43}$","description":"`<intentId>.<secret>`. Bearer for one report; valid 30 minutes, consumed once. The server stores only SHA-256 of the secret."},"expiresAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["file","folder"]},"retired":{"type":"boolean"},"turnstileSiteKey":{"type":["string","null"],"description":"Turnstile site key when a widget is configured; used only after a challenge_required answer."}}},"ReportBody":{"type":"object","additionalProperties":false,"required":["intent","reason","description","contact"],"properties":{"intent":{"type":"string","description":"Token from POST /api/v1/report-intents."},"reason":{"type":"string","enum":["illegal","malware","copyright","impersonation","other"]},"description":{"type":"string","maxLength":2000,"description":"Required (non-blank) for `other`."},"contact":{"type":["string","null"],"maxLength":254,"description":"Email a reviewer may reply to; required for `copyright`. Never emailed automatically and never shown to the publisher."},"turnstileToken":{"type":"string","minLength":1,"maxLength":2048,"description":"Send only after a challenge_required answer."}}},"ReportForm":{"type":"object","required":["slug","nonce","reason"],"properties":{"slug":{"type":"string"},"nonce":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","description":"Random per /report render; used as the intent secret, so a double submit replays the same receipt."},"reason":{"type":"string","enum":["illegal","malware","copyright","impersonation","other"]},"description":{"type":"string"},"contact":{"type":"string"},"cf-turnstile-response":{"type":"string"}}},"ReportReceipt":{"type":"object","additionalProperties":false,"required":["receipt"],"properties":{"receipt":{"type":"string","pattern":"^R-[A-HJ-NP-Z2-9]{5}-[A-HJ-NP-Z2-9]{5}$","description":"Opaque; grants no access to the case or the target."}}},"ChallengeError":{"type":"object","required":["error","turnstileSiteKey"],"properties":{"error":{"$ref":"#/components/schemas/Error"},"turnstileSiteKey":{"type":"string"}}},"CreateMigrationBody":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"s3"},"endpoint":{"anyOf":[{"type":"string","maxLength":512,"format":"uri"},{"type":"null"}]},"region":{"type":"string","pattern":"^[a-z0-9-]{2,32}$"},"bucket":{"type":"string","pattern":"^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$"},"prefix":{"type":"string","maxLength":1024},"forcePathStyle":{"default":false,"type":"boolean"},"credentials":{"type":"object","properties":{"accessKeyId":{"type":"string","minLength":1,"maxLength":256},"secretAccessKey":{"type":"string","minLength":1,"maxLength":512},"sessionToken":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}]}},"required":["accessKeyId","secretAccessKey"],"additionalProperties":false},"destination":{"type":"object","properties":{"folderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"newFolderName":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["folderId"],"additionalProperties":false}},"required":["source","endpoint","region","bucket","prefix","credentials","destination"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"https"},"url":{"type":"string","maxLength":2048,"format":"uri"},"format":{"type":"string","enum":["csv","json","file"]},"authorization":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}]},"destination":{"type":"object","properties":{"folderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"newFolderName":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["folderId"],"additionalProperties":false}},"required":["source","url","format","destination"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"local"},"destination":{"type":"object","properties":{"folderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"newFolderName":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["folderId"],"additionalProperties":false}},"required":["source","destination"],"additionalProperties":false}]},"MigrationJob":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["inspecting","awaiting_confirmation","copying","verifying","completed","paused","cancelled","failed"]},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["s3","https","local"]},"adapterVersion":{"type":"string"},"display":{"type":"string"},"connected":{"type":"boolean"}},"required":["kind","adapterVersion","display","connected"],"additionalProperties":false},"destination":{"type":"object","properties":{"folderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folderName":{"type":"string"},"path":{"type":"string"}},"required":["folderId","folderName","path"],"additionalProperties":false},"createdAt":{"type":"string","minLength":1},"updatedAt":{"type":"string","minLength":1},"confirmedAt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"inventory":{"type":"object","properties":{"complete":{"type":"boolean"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"flags":{"type":"object","properties":{"duplicate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"collision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"renamed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["duplicate","collision","renamed"],"additionalProperties":false}},"required":["complete","revision","items","bytes","flags"],"additionalProperties":false},"counts":{"type":"object","properties":{"eligible":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsupported":{"type":"integer","minimum":0,"maximum":9007199254740991},"unauthorized":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued":{"type":"integer","minimum":0,"maximum":9007199254740991},"copying":{"type":"integer","minimum":0,"maximum":9007199254740991},"received":{"type":"integer","minimum":0,"maximum":9007199254740991},"processing":{"type":"integer","minimum":0,"maximum":9007199254740991},"ready":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped_with_reason":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed_with_reason":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["eligible","unsupported","unauthorized","queued","copying","received","processing","ready","skipped_with_reason","failed_with_reason"],"additionalProperties":false},"plan":{"type":"object","properties":{"importItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"importBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipItems":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["importItems","importBytes","skipItems"],"additionalProperties":false},"quota":{"type":"object","properties":{"hardLimitBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"softLimitBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"usedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"reservedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"fits":{"type":"boolean"}},"required":["hardLimitBytes","softLimitBytes","usedBytes","reservedBytes","fits"],"additionalProperties":false},"progress":{"type":"object","properties":{"copiedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"etaSeconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastProgressAt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["copiedBytes","totalBytes","etaSeconds","lastProgressAt"],"additionalProperties":false},"retention":{"type":"object","properties":{"inactivityMode":{"type":"string","enum":["off","shadow","enforce"]},"thresholdDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["inactivityMode","thresholdDays"],"additionalProperties":false},"stalled":{"type":"boolean"},"lastError":{"type":["string","null"]},"local":{"anyOf":[{"type":"object","properties":{"tokenExpiresAt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["tokenExpiresAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","state","source","destination","createdAt","updatedAt","confirmedAt","finishedAt","inventory","counts","plan","quota","progress","retention","stalled","lastError","local"],"additionalProperties":false},"MigrationJobList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["inspecting","awaiting_confirmation","copying","verifying","completed","paused","cancelled","failed"]},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["s3","https","local"]},"adapterVersion":{"type":"string"},"display":{"type":"string"},"connected":{"type":"boolean"}},"required":["kind","adapterVersion","display","connected"],"additionalProperties":false},"destination":{"type":"object","properties":{"folderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folderName":{"type":"string"},"path":{"type":"string"}},"required":["folderId","folderName","path"],"additionalProperties":false},"createdAt":{"type":"string","minLength":1},"updatedAt":{"type":"string","minLength":1},"confirmedAt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"finishedAt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"inventory":{"type":"object","properties":{"complete":{"type":"boolean"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"type":"integer","minimum":0,"maximum":9007199254740991},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"flags":{"type":"object","properties":{"duplicate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"collision":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"renamed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["duplicate","collision","renamed"],"additionalProperties":false}},"required":["complete","revision","items","bytes","flags"],"additionalProperties":false},"counts":{"type":"object","properties":{"eligible":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsupported":{"type":"integer","minimum":0,"maximum":9007199254740991},"unauthorized":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued":{"type":"integer","minimum":0,"maximum":9007199254740991},"copying":{"type":"integer","minimum":0,"maximum":9007199254740991},"received":{"type":"integer","minimum":0,"maximum":9007199254740991},"processing":{"type":"integer","minimum":0,"maximum":9007199254740991},"ready":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped_with_reason":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed_with_reason":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["eligible","unsupported","unauthorized","queued","copying","received","processing","ready","skipped_with_reason","failed_with_reason"],"additionalProperties":false},"plan":{"type":"object","properties":{"importItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"importBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipItems":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["importItems","importBytes","skipItems"],"additionalProperties":false},"quota":{"type":"object","properties":{"hardLimitBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"softLimitBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"usedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"reservedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"fits":{"type":"boolean"}},"required":["hardLimitBytes","softLimitBytes","usedBytes","reservedBytes","fits"],"additionalProperties":false},"progress":{"type":"object","properties":{"copiedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"etaSeconds":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastProgressAt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["copiedBytes","totalBytes","etaSeconds","lastProgressAt"],"additionalProperties":false},"retention":{"type":"object","properties":{"inactivityMode":{"type":"string","enum":["off","shadow","enforce"]},"thresholdDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["inactivityMode","thresholdDays"],"additionalProperties":false},"stalled":{"type":"boolean"},"lastError":{"type":["string","null"]},"local":{"anyOf":[{"type":"object","properties":{"tokenExpiresAt":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["tokenExpiresAt"],"additionalProperties":false},{"type":"null"}]}},"required":["id","state","source","destination","createdAt","updatedAt","confirmedAt","finishedAt","inventory","counts","plan","quota","progress","retention","stalled","lastError","local"],"additionalProperties":false}},"nextBefore":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["items","nextBefore"],"additionalProperties":false},"MigrationItemPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"ordinal":{"type":"integer","minimum":0,"maximum":9007199254740991},"sourcePath":{"type":"string"},"destinationPath":{"type":"string"},"sizeBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"state":{"type":"string","enum":["eligible","unsupported","unauthorized","queued","copying","received","processing","ready","skipped_with_reason","failed_with_reason"]},"flags":{"type":"array","items":{"type":"string","enum":["duplicate","collision","renamed"]}},"decision":{"type":"string","enum":["import","rename","skip","import_separately"]},"reason":{"anyOf":[{"type":"string","enum":["landing_page","size_unknown","too_large","invalid_name","path_too_deep","unsupported_object","archived_storage","duplicate_row","permission_denied","auth_expired","not_found","egress_refused","redirect_refused","source_changed","digest_mismatch","encoding_unsupported","source_unavailable","rate_limited","quota_exceeded","destination_unavailable","verification_failed","attempts_exhausted","skipped_by_publisher","duplicate_skipped","collision_skipped","cancelled"]},{"type":"null"}]},"verification":{"anyOf":[{"type":"string","enum":["strong","weak"]},{"type":"null"}]},"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"file":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"slug":{"type":"string"}},"required":["id","slug"],"additionalProperties":false},{"type":"null"}]}},"required":["id","ordinal","sourcePath","destinationPath","sizeBytes","state","flags","decision","reason","verification","sha256","attempts","file"],"additionalProperties":false}},"nextAfter":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["items","nextAfter"],"additionalProperties":false},"MigrationDecisionsBody":{"type":"object","properties":{"decisions":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"decision":{"type":"string","enum":["import","rename","skip","import_separately"]},"name":{"default":null,"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]}},"required":["itemId","decision"],"additionalProperties":false}}},"required":["decisions"],"additionalProperties":false},"StartMigrationBody":{"type":"object","properties":{"inventoryRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"acceptedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"defaults":{"type":"object","properties":{"duplicate":{"default":"skip","type":"string","enum":["skip","import_separately"]},"collision":{"default":"rename","type":"string","enum":["rename","skip","import_separately"]}},"additionalProperties":false}},"required":["inventoryRevision","acceptedBytes","defaults"],"additionalProperties":false},"LocalToken":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string","minLength":1}},"required":["token","expiresAt"],"additionalProperties":false},"LocalStatus":{"type":"object","properties":{"migrationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["inspecting","awaiting_confirmation","copying","verifying","completed","paused","cancelled","failed"]},"cursor":{"type":["string","null"]},"inventory":{"type":"object","properties":{"complete":{"type":"boolean"},"items":{"type":"integer","minimum":0,"maximum":9007199254740991},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["complete","items","revision"],"additionalProperties":false},"counts":{"type":"object","properties":{"eligible":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsupported":{"type":"integer","minimum":0,"maximum":9007199254740991},"unauthorized":{"type":"integer","minimum":0,"maximum":9007199254740991},"queued":{"type":"integer","minimum":0,"maximum":9007199254740991},"copying":{"type":"integer","minimum":0,"maximum":9007199254740991},"received":{"type":"integer","minimum":0,"maximum":9007199254740991},"processing":{"type":"integer","minimum":0,"maximum":9007199254740991},"ready":{"type":"integer","minimum":0,"maximum":9007199254740991},"skipped_with_reason":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed_with_reason":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["eligible","unsupported","unauthorized","queued","copying","received","processing","ready","skipped_with_reason","failed_with_reason"],"additionalProperties":false},"expiresAt":{"type":"string","minLength":1}},"required":["migrationId","state","cursor","inventory","counts","expiresAt"],"additionalProperties":false},"LocalInventoryBody":{"type":"object","properties":{"afterCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"nextCursor":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}]},"done":{"type":"boolean"},"items":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"locator":{"type":"string","minLength":1,"maxLength":2048},"path":{"type":"string","minLength":1,"maxLength":1024},"sizeBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"revision":{"anyOf":[{"type":"object","properties":{"etag":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"lastModified":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"sha256":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"strength":{"type":"string","enum":["strong","weak"]}},"required":["etag","versionId","lastModified","sha256","strength"],"additionalProperties":false},{"type":"null"}]},"problem":{"anyOf":[{"type":"string","enum":["landing_page","size_unknown","too_large","invalid_name","path_too_deep","unsupported_object","archived_storage","duplicate_row","permission_denied","auth_expired","not_found","egress_refused","redirect_refused","source_changed","digest_mismatch","encoding_unsupported","source_unavailable","rate_limited","quota_exceeded","destination_unavailable","verification_failed","attempts_exhausted","skipped_by_publisher","duplicate_skipped","collision_skipped","cancelled"]},{"type":"null"}]}},"required":["locator","path","sizeBytes","contentType","revision","problem"],"additionalProperties":false}}},"required":["afterCursor","nextCursor","done","items"],"additionalProperties":false},"LocalInventoryResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["accepted","checkpoint"]},"cursor":{"type":["string","null"]},"state":{"type":"string","enum":["inspecting","awaiting_confirmation","copying","verifying","completed","paused","cancelled","failed"]}},"required":["outcome","cursor","state"],"additionalProperties":false},"LocalQueuedPage":{"type":"object","properties":{"items":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"locator":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastModified":{"type":["string","null"]},"sessionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["itemId","locator","sizeBytes","lastModified","sessionId"],"additionalProperties":false}},"done":{"type":"boolean"},"state":{"type":"string","enum":["inspecting","awaiting_confirmation","copying","verifying","completed","paused","cancelled","failed"]}},"required":["items","done","state"],"additionalProperties":false},"LocalBeginItemBody":{"type":"object","properties":{"contentMd5":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9+/]{22}==$"},{"type":"null"}]}},"required":["contentMd5"],"additionalProperties":false},"LocalBeginItemResult":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"purpose":{"type":"string","enum":["file","branding"]},"state":{"type":"string","enum":["reserved","uploading","completing","completed","aborted","expired","failed"]},"mode":{"type":"string","enum":["single_put","multipart"]},"name":{"type":"string"},"folderId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partSizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","minLength":1},"lastActivityAt":{"type":"string","minLength":1},"idleExpiresAt":{"type":"string","minLength":1},"absoluteExpiresAt":{"type":"string","minLength":1},"fileId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"slug":{"type":["string","null"]},"assetId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"processing":{"type":"object","properties":{"blob":{"anyOf":[{"type":"string","enum":["quarantined","verifying","scanning","approved","rejected","scan_failed","deletion_pending","deleted"]},{"type":"null"}]},"integrity":{"anyOf":[{"type":"string","enum":["verified","failed"]},{"type":"null"}]},"scan":{"anyOf":[{"type":"string","enum":["pending","running","passed","detected","inconclusive","error","waived"]},{"type":"null"}]},"availability":{"anyOf":[{"type":"string","enum":["processing","available","withdrawn","deletion_pending","deleted","rejected"]},{"type":"null"}]}},"required":["blob","integrity","scan","availability"],"additionalProperties":false},"failure":{"type":["string","null"]},"previousAttemptId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["id","purpose","state","mode","name","folderId","sizeBytes","partSizeBytes","partCount","createdAt","lastActivityAt","idleExpiresAt","absoluteExpiresAt","fileId","slug","assetId","processing","failure","previousAttemptId"],"additionalProperties":false},"put":{"anyOf":[{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":10000},"url":{"type":"string","format":"uri"},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","minLength":1}},"required":["partNumber","url","method","headers","expiresAt"],"additionalProperties":false},{"type":"null"}]},"parts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":10000},"sizeBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"etag":{"type":"string"}},"required":["partNumber","sizeBytes","etag"],"additionalProperties":false}},{"type":"null"}]}},"required":["session","put","parts"],"additionalProperties":false},"LocalItemFailedBody":{"type":"object","properties":{"reason":{"type":"string","enum":["source_changed","not_found","permission_denied"]}},"required":["reason"],"additionalProperties":false}}}}