{
  "app": "personal-ledger",
  "runtime": "cloudflare-worker",
  "schemaVersion": 1,
  "currency": "CNY",
  "expenseCategories": [
    "餐饮",
    "购物",
    "交通",
    "娱乐",
    "转账",
    "居住",
    "医疗",
    "学习",
    "人情",
    "其他"
  ],
  "incomeCategories": [
    "工资",
    "奖金",
    "理财",
    "红包",
    "退款",
    "兼职",
    "其他收入"
  ],
  "transferCategories": [
    "转账"
  ],
  "fields": {
    "id": "服务端生成",
    "type": "'income' | 'expense'",
    "amount": "正数，单位元",
    "category": "字符串",
    "date": "YYYY-MM-DD",
    "note": "最长 500 字",
    "excludeFromStats": "true 时不计入统计",
    "source": "来源标记"
  },
  "endpoints": {
    "GET /api/health": "健康检查",
    "GET /api/meta": "本字典",
    "GET /api/entries?month=YYYY-MM&type=&category=": "查询流水",
    "POST /api/entries": "新增",
    "PATCH /api/entries/:id": "修改",
    "DELETE /api/entries/:id": "删除",
    "GET /api/summary?month=YYYY-MM&excludeTransfer=1": "月度汇总",
    "GET /api/export": "导出",
    "POST /api/import": "导入 {mode:\"merge\"|\"replace\", data}",
    "GET /api/openapi.json": "OpenAPI 3 描述"
  },
  "auth": "需要请求头 X-Ledger-Key"
}