{"id":28521421,"url":"https://github.com/cozy/cozy-doctypes","last_synced_at":"2026-02-01T19:34:35.200Z","repository":{"id":20969124,"uuid":"91442712","full_name":"cozy/cozy-doctypes","owner":"cozy","description":"The doctypes used in cozy-stack","archived":false,"fork":false,"pushed_at":"2025-10-28T13:58:59.000Z","size":691,"stargazers_count":3,"open_issues_count":7,"forks_count":31,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-10-28T15:35:21.530Z","etag":null,"topics":["cozy","cozy-v3","documentation"],"latest_commit_sha":null,"homepage":"https://docs.cozy.io/en/cozy-doctypes/docs/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cozy.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-05-16T09:51:27.000Z","updated_at":"2025-10-28T13:59:01.000Z","dependencies_parsed_at":"2023-12-19T14:57:10.272Z","dependency_job_id":"497e9913-b033-4720-a473-944cc0f25fb5","html_url":"https://github.com/cozy/cozy-doctypes","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cozy/cozy-doctypes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cozy%2Fcozy-doctypes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cozy%2Fcozy-doctypes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cozy%2Fcozy-doctypes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cozy%2Fcozy-doctypes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cozy","download_url":"https://codeload.github.com/cozy/cozy-doctypes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cozy%2Fcozy-doctypes/sbom","scorecard":{"id":306416,"data":{"date":"2025-08-11","repo":{"name":"github.com/cozy/cozy-doctypes","commit":"d01f2766006bad3b80560323c4a024af73c6d4ab"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Code-Review","score":7,"reason":"Found 11/14 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Affero General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T22:09:45.854Z","repository_id":20969124,"created_at":"2025-08-17T22:09:45.854Z","updated_at":"2025-08-17T22:09:45.854Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28987279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T18:17:03.387Z","status":"ssl_error","status_checked_at":"2026-02-01T18:16:57.287Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cozy","cozy-v3","documentation"],"created_at":"2025-06-09T07:36:17.580Z","updated_at":"2026-02-01T19:34:35.196Z","avatar_url":"https://github.com/cozy.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Doctypes\n\nDoctypes represent different types of data. Their primary use is for permissions: an app or konnector will request permissions\nfor one or several doctypes and will not be able to access other doctypes.\n\n!!! note\n    Example: A banking application requests permissions for banking doctypes (`io.cozy.bank.accounts`, `io.cozy.bank.operations` etc..)\n    but cannot access files (`io.cozy.files`).\nThis ensure the segregation and security of your data.\n\nIn this repository, every (known) doctype and the fields that they contain is described. If you feel the need\nfor another doctype, feel free to open a PR with the description and role of your doctype.\n\n## Cozy doctypes\n\n- [io.cozy.accounts](io.cozy.accounts.md): Konnector accounts\n- [io.cozy.ai.chat.conversations](io.cozy.ai.chat.conversations.md): Chat conversations with an assistant (AI)\n- [io.cozy.apps](io.cozy.apps.md): Apps installed in the Cozy\n  - [io.cozy.apps.suggestions](io.cozy.apps.suggestions.md): Suggestions for apps that the user might find useful\n- [io.cozy.bank](io.cozy.bank.md): Banking related data\n  - [io.cozy.bank.settings](io.cozy.bank.md#iocozybanksettings): Bank application settings\n  - [io.cozy.bank.accounts](io.cozy.bank.md#iocozybankaccounts): Bank accounts\n    - [io.cozy.bank.accounts.stats](io.cozy.bank.md#iocozybankaccountsstats): Aggregated data about bank accounts\n  - [io.cozy.bank.operations](io.cozy.bank.md#iocozybankoperations): Bank transaction\n  - [io.cozy.bank.balancehistories](io.cozy.bank.md#iocozybankbalancehistories): Daily balances\n  - [io.cozy.bank.recurrence](io.cozy.bank.md#iocozybankrecurrence): Recurrence group information\n  - [io.cozy.bank.groups](io.cozy.bank.md#iocozybankgroups): Group of bank accounts\n  - [io.cozy.bank.recipients](io.cozy.bank.md#iocozybankrecipients): Recipients for transfert\n- [io.cozy.bills](io.cozy.bills.md): Bills\n- [io.cozy.calendar](io.cozy.calendar.md): Calendar\n- [io.cozy.coachco2.settings](io.cozy.coachco2.md): CoachCO2 application settings\n- [io.cozy.contacts](io.cozy.contacts.md): Contacts\n  - [io.cozy.contacts.groups](io.cozy.contacts.md#iocozycontactsgroups): Contacts groups\n  - [io.cozy.contacts.accounts](io.cozy.contacts.md#iocozycontactsaccounts): Vendors account\n- [io.cozy.files](io.cozy.files.md): Files\n  - [Files_metadatas](io.cozy.files_metadata.md): Metadatas about files\n  - [io.cozy.files.settings](io.cozy.files.md#iocozyfilessettings): Files settings\n  - [io.cozy.files.encryption](io.cozy.files.md#iocozyfilesencryption): Files encryption\n- [io.cozy.home.settings](io.cozy.home.settings.md): Home settings\n- [io.cozy.konnectors](io.cozy.konnectors.md): Connectors installed in the cozy\n- [io.cozy.identities](io.cozy.identities.md): Instance owner identities\n- [io.cozy.notes](io.cozy.notes.md): Notes with collaborative edition\n  - [io.cozy.notes.steps](io.cozy.notes.md#iocozynotessteps)\n  - [io.cozy.notes.events](io.cozy.notes.md#iocozynotesevents)\n  - [io.cozy.notes.images](io.cozy.notes.md#iocozynotesimages)\n- [io.cozy.notifications](io.cozy.notifications.md): Notifications made by the apps (Email or Push notifications)\n- [io.cozy.permissions](io.cozy.permissions.md): Permissions of the instance\n- [io.cozy.photos](io.cozy.photos.md): Photos\n  - [io.cozy.photos.settings](io.cozy.photos.md#iocozyphotossettings): Photos settings\n- [io.cozy.procedures](io.cozy.procedures.md): Administrative procedures\n- [io.cozy.docrules](io.cozy.docrules.md): Rules to retrieve documents\n- [io.cozy.remote.nextcloud.files](io.cozy.remote.nextcloud.files.md): Files on a remote NextCloud (via WebDAV)\n- [io.cozy.sessions.logins](io.cozy.sessions.logins.md): Sessions logins entry\n- [io.cozy.settings](io.cozy.settings.md): Instance settings\n- [io.cozy.sharings](io.cozy.sharings.md): Documents used for Cozy to Cozy sharings\n- [io.cozy.tags](io.cozy.tags.md): Tags\n- [io.cozy.timeseries](io.cozy.timeseries.md): Time Series\n  - [io.cozy.timeseries.geojson](io.cozy.timeseries.md#iocozytimeseriesgeojson): GeoJSON time series\n  - [io.cozy.timeseries.grades](io.cozy.timeseries.md#iocozytimeseriesgrades): Grades time series\n- [io.cozy.todos](io.cozy.todos.md): Todos\n  - [io.cozy.todos.list](io.cozy.todos.md#iocozytodoslist): Todos list\n  - [io.cozy.todos.item](io.cozy.todos.md#iocozytodositem): Todos item\n- [io.cozy.drive.settings](io.cozy.drive.settings.md): Drives Settings\n\n## Technical doctypes\n\n- [Accounts Types: io.cozy.account_types\n  ](io.cozy.account_types.md): OAuth informations and secrets\n    for apps \u0026 konnectors\n- [cc.cozycloud.autocategorization](cc.cozycloud.autocategorization.md): Auto categorization remote doctype\n- [cc.cozycloud.announcements](cc.cozycloud.announcements.md): Announcements remote doctype\n- [io.cozy.exports](io.cozy.exports.md): Instances exports\n- [io.cozy.jobs](io.cozy.jobs.md): Instance jobs\n- [io.cozy.oauth.clients](io.cozy.oauth.clients.md): OAuth clients informations of the stack\n- [io.cozy.oauth.access_codes](io.cozy.oauth.access_codes.md): Access codes specific to OAuth flow\n- [io.cozy.triggers](io.cozy.triggers.md): Job triggers\n  - [io.cozy.triggers.state](io.cozy.triggers.state.md): Job triggers states\n- [io.cozy.remote.requests](io.cozy.remote.requests.md): logs of requests via the remote doctypes\n- [io.cozy.sessions](io.cozy.sessions.md): cozy-stack sessions\n- [io.cozy.shared](io.cozy.shared.md): cozy-stack doctype for sharings\n- [io.cozy.terms](io.cozy.terms.md): Contains terms of services the user has signed\n\n## Remote doctypes\n\nThis repository is where the declaration of remote doctypes is done. Read more about remote doctypes in the [cozy stack repository](https://github.com/cozy/cozy-stack/blob/51f99a890dba85ff9c4b09124ee3b5bdd3d83300/docs/remote.md#declaring-a-remote-doctype).\n\n## External doctypes\n\n- [com.bitwarden.ciphers](com.bitwarden.ciphers.md): Ciphers for bitwarden clients\n- [com.bitwarden.folders](com.bitwarden.folders.md): Folders for bitwarden clients\n- [com.unibet.bets](com.unibet.bets.md): Bets from Unibet website\n\n## Generic model\n\n### Relationships\n\nRelations between documents are under a `relationships` object at the root of the document. Relations are referenced by their names.\n\nEach relation is an object with a `data` property containing either `null`, one reference or an array of references.\n\nA reference is an object containing at least a `_type` with the name of the referenced doctype and an `_id` with the id of the referenced document inside its doctype.\n\n```json\n{\n  \"_id\": \"mobydick\",\n  \"relationships\": {\n    \"authors\": {\n      \"data\": [{ \"_id\": \"hermanmelville\", \"_type\": \"io.cozy.contacts\" }]\n    }\n  }\n}\n```\n\n#### External relationships\n\nRelationships that reference a document that lives outside the couchdb of the user will have a `_type` in a different namespace than `io.cozy.*`, and will have an additional `_protocol` field.\n\nAt the moment the only available external relationship is `bitwarden` with the following format:\n\n```json\n{\n  \"_id\": \"secretsafe\",\n  \"relationships\": {\n    \"vaultCipher\": {\n      \"data\": [{ \"_id\": \"123abc\", \"_type\": \"com.bitwarden.ciphers\", \"_protocol\": \"bitwarden\" }]\n    }\n  }\n}\n```\n\n#### Relationships with metadata\n\n\nA relationship can store additional information, in the `metadata` attribute. For instance, see the [contracts](https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.accounts/#contracts-contracts) relationship for the accounts.\n\n```json\n\"relationships\": {\n  \"contracts\": {\n    \"data\": [\n      {\n        \"_id\": \"77b662b903f1bac7a78cf8cc12806479\",\n        \"_type\": \"io.cozy.bank.accounts\",\n        \"metadata\": {\n          \"deletedByVendor\": false,\n          \"imported\": true,\n          \"label\": \"Compte chèque\",\n          \"vendorId\": \"1337\"\n        }\n      }\n    ]\n  }\n}\n\n```\n\n### Document metadata\n\nWe distinguish three levels of attributes:\n\n1. The data (e.g. a list of songs from a playlist)\n2. The metadata about the data (e.g. the creation date of the playlist itself)\n3. The metadata of the cozy document (e.g. the creation date of the cozy document describing the playlist).\n\nThe third level is described by an object named `cozyMetadata` at the root of the document. This object structure is common to all Cozy doctypes. \n\nThe expected `cozyMetadata` attributes are the following:\n\n- `doctypeVersion`: Name or identifier for the version of the schema used by this document (ie: `doctypeVersion: 2` for \"This document conforms to io.cozy.contacts in its version 2\")\n- `metadataVersion`: Version of the `cozyMetadata`\n- `createdAt`: Creation date of the cozy document\n- `createdByApp`: Slug of the app or connector which created the document\n- `createdByAppVersion`: Version identifier of the app\n- `updatedAt`: Last modification date of the cozy document\n- `updatedByApps`: List of objects representing the applications (slugs and versions) which modified the cozy document in its life and the last update date for each of those apps (one entry per slug, apps should just update the value)\n- `sourceAccount`: When the document was imported from a connector, identifier of the account in io.cozy.accounts\n- `sourceAccountIdentifier`: When the document was imported from a connector, identifier of the account on targeted web service (the email address most of the time)\n- `favorite`: {boolean} whether or not the document is a favorite.\n\nℹ️ All these attributes are optional and taken care by the apps modifying the document. Unless specified otherwise in the documentation of the doctype, all these attributes may not be present or may have a `null` value.\n\nℹ️ For doctypes protected by the stack such as `io.cozy.files`, any non-expected attribute in `cozyMetadata` will be refused by the stack. \n\n```json\n{\n  \"_id\": \"xxxx\",\n  \"cozyMetadata\": {\n    \"doctypeVersion\": 4,\n    \"metadataVersion\": 1,\n    \"createdAt\": \"xxxxx\",\n    \"createdByApp\": \"xxxx\",\n    \"createdByAppVersion\": \"xxxx\",\n    \"updatedAt\": \"xxxxx\",\n    \"updatedByApps\": [\n      {\n        \"slug\": \"xxxxx\",\n        \"date\": \"xxxxx\",\n        \"version\": 3\n      }\n    ],\n    \"sourceAccount\": \"xxxxx\",\n    \"sourceAccountIdentifier\": \"test@mail.fr\"\n  }\n}\n```\n\n### Date format\n\nDate should be formatted in [ISO8601](https://fr.wikipedia.org/wiki/ISO_8601) :\n\n- `2017-04-22T01:00:00-05:00` ✅\n- `2017-04-22T01:00:00Z` ✅\n- `2017-04-22` ✅\n- `2017-04-22 01:00` ❌\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcozy%2Fcozy-doctypes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcozy%2Fcozy-doctypes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcozy%2Fcozy-doctypes/lists"}