{
  "setup": "Start the delivered service on localhost with an empty test database. Apply these steps in order. Compare counts using the report format documented by the implementation.",
  "steps": [
    {
      "method": "POST",
      "path": "/events",
      "json": {
        "id": "a",
        "type": "signup",
        "date": "2026-04-02"
      },
      "expectStatus": "2xx"
    },
    {
      "method": "POST",
      "path": "/events",
      "json": {
        "id": "b",
        "type": "signup",
        "date": "2026-04-02"
      },
      "expectStatus": "2xx"
    },
    {
      "method": "POST",
      "path": "/events",
      "json": {
        "id": "c",
        "type": "purchase",
        "date": "2026-04-02"
      },
      "expectStatus": "2xx"
    },
    {
      "method": "POST",
      "path": "/events",
      "json": {
        "id": "a",
        "type": "signup",
        "date": "2026-04-02"
      },
      "expectStatus": 200
    },
    {
      "method": "POST",
      "path": "/events",
      "json": {
        "id": "a",
        "type": "purchase",
        "date": "2026-04-02"
      },
      "expectStatus": 409
    },
    {
      "method": "POST",
      "path": "/events",
      "json": {
        "id": "d",
        "type": "purchase",
        "date": "2026-02-30"
      },
      "expectStatus": 400
    },
    {
      "method": "GET",
      "path": "/reports/2026-04-02",
      "expectStatus": 200,
      "expectedCounts": {
        "signup": 2,
        "purchase": 1
      }
    },
    {
      "action": "restart",
      "database": "same"
    },
    {
      "method": "GET",
      "path": "/reports/2026-04-02",
      "expectStatus": 200,
      "expectedCounts": {
        "signup": 2,
        "purchase": 1
      }
    }
  ]
}
