Skip to the content.

Table of contents

Cozy Todos doctypes

io.cozy.todos.list

This doctype represents a todo list:

Relationships

Example

{
  "_id": "2165d9a310deadbeeffc08d54c45102",
  "title": "Create a loan file",
  "description": "Loan money to buy a house.",
  "limitDate": "2020-02-01T23:59:59Z",
  "relationships": {
    "items": {
      "data": [
        {
          "_id": "8bffbc24e67716b63e08c71bd0059fea",
          "_type": "io.cozy.todos.item"
        },
        {
          "_id": "68a74e03722f02b1a6fc6a4508015de0",
          "_type": "io.cozy.todos.item"
        }
      ]
    }
  }
}

io.cozy.todos.item

This doctype represents a todo item:

Relationships

DocRules

When a document has been linked to a todo through the use of a rule, the rule that was used to find the document is saved in the metadata of the relationship.

In the example below, a docrule is targeting the last 3 files payslips from a given date.

Example

{
  "_id": "8bffbc24e67716b63e08c71bd0059fea",
  "label": "Get the last 3 payslips",
  "description": "This is required to prove the income",
  "done": false,
  "limitDate": "2020-01-31T23:59:59Z",
  "completionDate": null,
  "relationships": {
    "files": {
      "data": [
        {
          "_id": "8bffbc24e67716b63e08c71bd0059fea",
          "_type": "io.cozy.files",
          "metadata": {
            "docrules": {
              "matchedBy": "io.cozy.docrules/payslip",
              "date": "2020-01-01T23:59:59Z",
              "limit": 3
            }
          }
        },
        {
          "_id": "8bffbc24e67716b63e08c71bd0068f52",
          "_type": "io.cozy.files",
          "metadata": {
            "docrules": {
              "matchedBy": "io.cozy.docrules/payslip",
              "date": "2020-01-01T23:59:59Z",
              "limit": 3
            }
          }
        }
      ]
    },
    "contacts": {
      "data": [
        {
          "_id": "d5fb210882d78ab30dd991fb021ae450",
          "_type": "io.cozy.contacts"
        }
      ]
    },
    "docrules": {
      "data": [
        {
          "_id": "io.cozy.docrules/payslips",
          "_type": "io.cozy.docrules"
        }
      ]
    }
  }
}