{
  "ok": true,
  "configured": {
    "iugu_token": true,
    "admin_token": true,
    "report_token": true,
    "saas_code": true,
    "webhook_secret": true,
    "webhook_require_auth": false
  },
  "meta_nf_cents": 3500000,
  "counts": {
    "invoices": 15244,
    "subscriptions": 0,
    "customers": 1642,
    "events": 86,
    "events_pending": 0,
    "events_failed": 0
  },
  "last_sync_runs": [
    {
      "id": 101,
      "started_at": "2026-10-16T06:00:08.579Z",
      "finished_at": "2026-10-16T06:01:07.157Z",
      "kind": "cron 0 6 * * *",
      "error": null,
      "params": {
        "from": "2026-10-14T06:00:08.579Z",
        "to": "2026-10-16T06:00:08.579Z"
      },
      "result": {
        "customers": {
          "resource": "customers",
          "mode": "updated",
          "from": "2026-10-14T06:00:08.579Z",
          "to": "2026-10-16T06:00:08.579Z",
          "records": 12,
          "pages": 1,
          "windows": 1,
          "next": null,
          "warnings": []
        },
        "subscriptions": {
          "resource": "subscriptions",
          "mode": "updated",
          "from": "2026-10-14T06:00:08.579Z",
          "to": "2026-10-16T06:00:08.579Z",
          "records": 0,
          "pages": 1,
          "windows": 1,
          "next": null,
          "warnings": []
        },
        "invoices": {
          "resource": "invoices",
          "mode": "updated",
          "from": "2026-10-14T06:00:08.579Z",
          "to": "2026-10-16T06:00:08.579Z",
          "records": 165,
          "pages": 2,
          "windows": 1,
          "next": null,
          "warnings": []
        },
        "missing_customers": {
          "fetched": 0,
          "remaining": 0,
          "errors": []
        },
        "events": {
          "tried": 8,
          "ok": 8,
          "failed": 0
        },
        "saas": {
          "gerado_em": "2026-10-16T06:00:46.235Z",
          "hoje": "2026-10-16",
          "de": "2024-09",
          "ate": "2026-10",
          "faturas_pagas": 12510,
          "clientes": 1534,
          "ciclos": 12363,
          "duracao_ms": 20922,
          "fases_ms": {
            "leitura": 3994,
            "calculo": 0,
            "snapshot": 357,
            "ciclos": 16571
          },
          "avisos": []
        }
      }
    },
    {
      "id": 100,
      "started_at": "2026-10-15T22:08:58.384Z",
      "finished_at": "2026-10-15T22:09:29.644Z",
      "kind": "admin",
      "error": null,
      "params": {
        "resource": "invoices",
        "mode": "created",
        "from": "2026-09-17T03:00:00.000Z",
        "to": "2026-10-15T22:08:58.384Z",
        "windowDays": 30,
        "maxPages": 3,
        "pageSize": 100,
        "start": 900
      },
      "result": {
        "resource": "invoices",
        "mode": "created",
        "from": "2026-09-17T03:00:00.000Z",
        "to": "2026-10-15T22:08:58.384Z",
        "records": 172,
        "pages": 2,
        "windows": 1,
        "next": null,
        "warnings": []
      }
    },
    {
      "id": 99,
      "started_at": "2026-10-15T22:08:08.583Z",
      "finished_at": "2026-10-15T22:08:55.307Z",
      "kind": "admin",
      "error": null,
      "params": {
        "resource": "invoices",
        "mode": "created",
        "from": "2026-09-17T03:00:00.000Z",
        "to": "2026-10-15T22:08:08.583Z",
        "windowDays": 30,
        "maxPages": 3,
        "pageSize": 100,
        "start": 600
      },
      "result": {
        "resource": "invoices",
        "mode": "created",
        "from": "2026-09-17T03:00:00.000Z",
        "to": "2026-10-15T22:08:08.583Z",
        "records": 300,
        "pages": 3,
        "windows": 0,
        "next": {
          "from": "2026-09-17T03:00:00.000Z",
          "start": 900,
          "windowDays": 30
        },
        "warnings": []
      }
    }
  ],
  "saas_snapshot": {
    "gerado_em": "2026-10-16T06:00:46.235Z",
    "hoje": "2026-10-16",
    "de": "2024-09",
    "ate": "2026-10",
    "duracao_ms": 3994
  }
}