{"openapi":"3.1.0","info":{"title":"device.list API","version":"0.2.1","description":"Private device inventory and app-status hub. Invited user accounts own their uploads. Only the uploader, explicit read/edit recipients, and explicitly scoped app credentials can access records. All record and image requests require authentication."},"security":[{"bearerAuth":[]}],"paths":{"/v1/me":{"get":{"summary":"Read credential identity","description":"Any authenticated credential.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}}}},"/v1/devices":{"get":{"summary":"List device references","description":"devices:read, or owner. Owner sees archived references.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"string"}}]}},"/v1/devices/{id}":{"get":{"summary":"Read a reference","description":"devices:read and explicit device grant, or owner.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]},"put":{"summary":"Create, update or restore a reference","description":"Owner only. Existing references require If-Match revision. No private device fields accepted.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceLabel"}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"}}]},"delete":{"summary":"Archive a reference","description":"Owner only. Retains reports; blocks new client access.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/v1/clients":{"get":{"summary":"List client grants","description":"Owner only. Does not return secret keys.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}}},"post":{"summary":"Issue a scoped client key","description":"Owner only. Token returned once; replay returns token null. Default expiry 90 days, maximum 366 days.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"201":{"description":"Client grant created. Secret token returned once."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}]}},"/v1/clients/{id}":{"delete":{"summary":"Revoke a client key","description":"Owner only. Historical reports retained.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/v1/reports":{"get":{"summary":"List latest reports by source and device","description":"reports:read and explicit device grant, or owner.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"parameters":[{"name":"after","in":"query","required":false,"schema":{"type":"string"}},{"name":"deviceId","in":"query","required":false,"schema":{"type":"string"}}]},"post":{"summary":"Report this client app’s status","description":"reports:write with explicit device grant. App identity bound to credential. Older observations rejected.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportInput"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}]}},"/v1/changes":{"get":{"summary":"Poll changes","description":"reports:read and explicit device grant, or owner. Save nextCursor after processing; hasMore indicates another page.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}]}},"/health":{"get":{"summary":"Public service metadata","description":"No authentication.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"security":[]}},"/openapi.json":{"get":{"summary":"Public service metadata","description":"No authentication.","responses":{"200":{"description":"Success; see API README and SDK DTOs for response fields."},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Scope or device denied"},"409":{"description":"Revision, observation time or idempotency conflict"},"429":{"description":"Rate limit; Retry-After header in seconds"}},"security":[]}},"/v1/auth/login":{"post":{"summary":"Sign in","description":"Returns an eight-hour account session. Passwords use salted scrypt; credentials are never logged.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}}}},"/v1/auth/register":{"post":{"summary":"Accept an invitation","description":"Invitation is email-bound, single-use and valid for 48 hours. Password minimum 14 characters.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Register"}}}}}},"/v1/auth/device":{"post":{"summary":"Authorize the trusted native app","description":"Account credentials only. Returns a 90-day device session. Store in platform secure storage.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceSession"}}}}}},"/v1/auth/logout":{"post":{"summary":"End this session","description":"Revokes account/device sessions. Bootstrap and limited app keys are not revoked by browser logout.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}}}},"/v1/account":{"get":{"summary":"Read current account","description":"Account session only; app keys cannot enumerate account information.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}}}},"/v1/invitations":{"post":{"summary":"Invite an account","description":"Administrator only. Returns a one-time code; no email is sent automatically.","responses":{"201":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}}}},"/v1/records":{"get":{"summary":"List owned and shared record summaries","description":"Returns only authorised summaries with opaque pagination; does not expose full IMEI or notes. App keys additionally require records:read and an explicit device allowlist.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"after","in":"query","schema":{"type":"string"},"description":"Opaque cursor returned by the prior page; preserve its spelling."},{"name":"includeArchived","in":"query","schema":{"type":"boolean"},"description":"Only the uploader can include their own archived records."}]}},"/v1/records/{ownerId}/{id}":{"get":{"summary":"Read full private record","description":"Uploader, active read/edit recipients, or a scoped app acting for an authorised user. Read permission includes retained photos. Archived records are hidden from recipients.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullRecord"}}}},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"includeArchived","in":"query","schema":{"type":"boolean"},"description":"Only the uploader can include their own archived records."}]},"put":{"summary":"Create, replace or restore full record","description":"Use a stable UUID. Only the authenticated uploader can create a new record; explicit edit shares can update it. Existing records require the current revision. The entire payload is replaced; retain fields not being changed. Limit 2 MiB JSON. Earlier record payload versions are retained encrypted.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullRecord"}}}},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"Current record/asset revision. Required for replacing existing values."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordData"}}}}},"delete":{"summary":"Archive private record","description":"Uploader only. Soft archive blocks server access and advances the revision. Retained local/iCloud copies are not remotely erased. Restore using PUT and the archived revision.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"Current record/asset revision. Required for replacing existing values."}]}},"/v1/records/{ownerId}/{id}/sharing":{"get":{"summary":"List record recipients","description":"Uploader only.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]},"post":{"summary":"Grant or change private sharing","description":"Uploader only. Recipient must have an invited account. Sharing never changes upload ownership. Downloaded/offline/exported copies cannot be recalled.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Share"}}}}}},"/v1/records/{ownerId}/{id}/sharing/{recipientId}":{"delete":{"summary":"Revoke private sharing","description":"Uploader only. Subsequent record and image requests are denied immediately.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"recipientId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}]}},"/v1/records/{ownerId}/{id}/assets/{name}":{"get":{"summary":"Download private image bytes","description":"The same record permission is enforced for every download. Bytes are encrypted at rest and returned as an attachment; no public image URLs.","responses":{"200":{"description":"Success","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","pattern":"^(label-photo|device-photo|app-[0-9a-fA-F-]{36})$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"Current record/asset revision. Required for replacing existing values."}]},"put":{"summary":"Upload retained image or app logo","description":"Uploader/edit recipient, or records:write app key with explicit device access. Limit 25 MiB per asset. Default per-account media quota 1 GiB; administrator-configurable. Preserve UUID/name and revision for safe retries.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","pattern":"^(label-photo|device-photo|app-[0-9a-fA-F-]{36})$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"Current record/asset revision. Required for replacing existing values."}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"delete":{"summary":"Remove retained image from active record","description":"Requires editing permission and the current asset revision. The active download is removed; encrypted data may remain in recovery storage/backups.","responses":{"200":{"description":"Success"},"400":{"description":"Invalid request"},"401":{"description":"Missing, expired or revoked credential"},"403":{"description":"Operation not allowed"},"404":{"description":"Not found or not accessible to this account"},"409":{"description":"Revision conflict; refresh and preserve the current draft"},"413":{"description":"Upload or storage limit reached; local copy remains intact"},"429":{"description":"Rate limited; respect Retry-After"}},"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","pattern":"^(label-photo|device-photo|app-[0-9a-fA-F-]{36})$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ownerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"Current record/asset revision. Required for replacing existing values."}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Device":{"type":"object","required":["id","label","revision","active","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"label":{"type":"string","maxLength":120},"revision":{"type":"integer"},"active":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}}},"ReportInput":{"type":"object","additionalProperties":false,"required":["deviceId","installation","utilisation","observedAt"],"properties":{"deviceId":{"type":"string","format":"uuid"},"installation":{"type":"string","enum":["installed","not_installed","unknown"]},"utilisation":{"type":"string","enum":["used","not_used","unknown"]},"observedAt":{"type":"string","format":"date-time"},"appVersion":{"type":"string","maxLength":64}}},"ClientInput":{"type":"object","additionalProperties":false,"required":["name","appId","scopes","deviceIds"],"properties":{"name":{"type":"string","maxLength":120},"appId":{"type":"string","maxLength":160},"scopes":{"type":"array","items":{"type":"string","enum":["devices:read","reports:read","reports:write","records:read","records:write"]}},"deviceIds":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","format":"uuid"}},"expiresAt":{"type":"string","format":"date-time"}}},"DeviceLabel":{"type":"object","additionalProperties":false,"required":["label"],"properties":{"label":{"type":"string","maxLength":120}}},"Login":{"type":"object","additionalProperties":false,"required":["email","password"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","maxLength":256}}},"Register":{"type":"object","additionalProperties":false,"required":["invitation","email","name","password"],"properties":{"invitation":{"type":"string"},"email":{"type":"string","format":"email"},"name":{"type":"string","maxLength":120},"password":{"type":"string","minLength":14,"maxLength":256}}},"Invitation":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string","format":"email"},"administrator":{"type":"boolean","default":false},"claimCurrentAccount":{"type":"boolean","default":false,"description":"Administrator only: establish sign-in for the current bootstrap owner, preserving existing uploads."}}},"DeviceSession":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","maxLength":100}}},"RecordChecklistItem":{"type":"object","additionalProperties":false,"required":["id","name","checked"],"properties":{"id":{"type":"string","format":"uuid"},"catalogueId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"name":{"type":"string","maxLength":200},"checked":{"type":"boolean"},"notes":{"type":"string","maxLength":20000}}},"CatalogueItem":{"type":"object","additionalProperties":false,"required":["id","name","notes","archived"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","maxLength":200},"notes":{"type":"string","maxLength":20000},"archived":{"type":"boolean"}}},"DeviceData":{"type":"object","additionalProperties":false,"required":["kind","checklist"],"properties":{"kind":{"const":"device"},"model":{"type":"string","maxLength":200},"imei":{"type":"string","maxLength":100,"description":"Stored exactly as supplied. Format/checksum warnings are advisory; never silently correct OCR characters."},"nickname":{"type":"string","maxLength":200},"manufacturer":{"type":"string","maxLength":200},"notes":{"type":"string","maxLength":20000},"purchaseDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Calendar date YYYY-MM-DD. Legacy ISO timestamps are accepted for compatibility."},"createdAt":{"type":"string","format":"date-time"},"checklist":{"type":"array","maxItems":2000,"items":{"$ref":"#/components/schemas/RecordChecklistItem"}}}},"CatalogueData":{"type":"object","additionalProperties":false,"required":["kind","apps"],"properties":{"kind":{"const":"catalogue"},"apps":{"type":"array","maxItems":2000,"items":{"$ref":"#/components/schemas/CatalogueItem"}}}},"RecordData":{"oneOf":[{"$ref":"#/components/schemas/DeviceData"},{"$ref":"#/components/schemas/CatalogueData"}]},"Asset":{"type":"object","required":["name","revision","bytes","updatedAt","deleted"],"properties":{"name":{"type":"string"},"revision":{"type":"integer"},"bytes":{"type":"integer"},"updatedAt":{"type":"string","format":"date-time"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"deleted":{"type":"boolean"}}},"FullRecord":{"type":"object","required":["ownerId","id","permission","revision","updatedAt","deleted","data","assets"],"properties":{"ownerId":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"permission":{"enum":["owner","read","edit"]},"revision":{"type":"integer","minimum":1},"updatedAt":{"type":"string","format":"date-time"},"deleted":{"type":"boolean"},"data":{"$ref":"#/components/schemas/RecordData"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}}},"Share":{"type":"object","additionalProperties":false,"required":["email","permission"],"properties":{"email":{"type":"string","format":"email"},"permission":{"enum":["read","edit"]}}}}}}