{
  "$schema": "https://plus.solberg.is/schema/manifest.json",
  "site": "meniga.is",
  "title": "Meniga (card aggregator)",
  "description": "Credit card transactions, accounts and categories from Meniga — Arion's card aggregation platform. Access tokens last ~2 min; a refresh token (~14 days) rotates automatically.",
  "version": "0.1.2",
  "author": "jokull <https://github.com/jokull>",
  "license": "MIT",
  "tags": [
    "banking",
    "finance",
    "transactions",
    "credit-card"
  ],
  "identities": [
    "cardholder"
  ],
  "auth": [
    {
      "id": "refresh-token",
      "type": "header-token",
      "description": "Short-lived JWT (~2 min) + refresh token (~14 days) stored in the keychain as MENIGA_REFRESH_TOKEN. Refresh rotates on use; the new token is written back automatically.",
      "default": true,
      "probe": "POST /authentication/refresh succeeds",
      "credentials": [
        "MENIGA_REFRESH_TOKEN"
      ],
      "flow": "token"
    }
  ],
  "ops": [
    {
      "id": "transactions",
      "kind": "rest",
      "title": "Transactions",
      "description": "GET /transactions — credit card transactions with category, MCC and currency. Paginate with take/skip (500/page).",
      "tags": [
        "transactions"
      ],
      "risk": "read-only",
      "input": {
        "type": "object",
        "properties": {
          "periodFrom": {
            "type": "string",
            "format": "date"
          },
          "periodTo": {
            "type": "string",
            "format": "date"
          },
          "take": {
            "type": "integer",
            "default": 500
          },
          "skip": {
            "type": "integer",
            "default": 0
          }
        }
      },
      "output": {
        "$ref": "#/schemas/Transaction"
      }
    },
    {
      "id": "accounts",
      "kind": "rest",
      "title": "Accounts",
      "description": "GET /accounts — cards and accounts with balances.",
      "tags": [
        "accounts"
      ],
      "risk": "read-only",
      "output": {
        "type": "object"
      }
    },
    {
      "id": "categories",
      "kind": "rest",
      "title": "Categories",
      "description": "GET /categories — the category tree used to classify transactions.",
      "tags": [
        "categories"
      ],
      "risk": "read-only",
      "output": {
        "type": "object"
      }
    }
  ],
  "schemas": {
    "Transaction": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "text": {
          "type": "string"
        },
        "originalText": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        },
        "amountInCurrency": {
          "type": "number"
        },
        "categoryId": {
          "type": "integer"
        },
        "category": {
          "type": "string"
        },
        "topCategory": {
          "type": "string"
        },
        "accountId": {
          "type": "integer"
        },
        "uncertain": {
          "type": "boolean"
        },
        "mcc": {
          "type": "integer"
        }
      }
    }
  }
}
