{
  "$id": "https://intentschema.org/intents/productivity/tasks/item/complete/v1.json",
  "fqdn": "org.intentschema.productivity.tasks.item.complete.v1",
  "title": "Complete task item",
  "description": "Mark a task as completed.",
  "payload": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": [
      "target"
    ],
    "properties": {
      "target": {
        "allOf": [
          {
            "$ref": "https://intentschema.org/common/target/v1.json"
          },
          {
            "required": [
              "external_id"
            ]
          }
        ]
      },
      "object": {
        "type": "object",
        "properties": {
          "completion_note": {
            "type": "string"
          }
        }
      },
      "idempotency_key": {
        "type": "string"
      }
    }
  },
  "result": {
    "type": "object",
    "properties": {
      "external_id": {
        "type": "string"
      },
      "completed_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  },
  "examples": [
    {
      "name": "mark done",
      "value": {
        "target": {
          "system": "asana",
          "external_id": "task_abc"
        }
      }
    }
  ]
}
