{
  "id": "tfnexmytenant001",
  "name": "Taifoon example 1b: check my tenant (with the saved key)",
  "nodes": [
    {
      "parameters": {},
      "id": "tfnexmytenant001-00",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ]
    },
    {
      "parameters": {
        "resource": "account",
        "operation": "me"
      },
      "id": "tfnexmytenant001-01",
      "name": "Get My Tenant",
      "type": "n8n-nodes-taifoon.taifoon",
      "typeVersion": 1,
      "position": [
        240,
        300
      ],
      "credentials": {
        "taifoonRelayerApi": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL",
          "name": "Taifoon Relayer API"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const r = $json || {};\nconst t = r.tenant || {};\nreturn [{ json: {\n  ok: r.ok === true,\n  tenant_id: t.id || null, tag: t.tag || null, kind: t.kind || null, via: t.via || null,\n  caller_env: (r.caller || {}).env || null,\n  keys: (r.keys || []).map((k) => ({ prefix: k.prefix, env: k.env, revoked: Boolean(k.revoked) })),\n  next_step: r.next_step ? { id: r.next_step.id, title: r.next_step.title } : null,\n} }];"
      },
      "id": "tfnexmytenant001-02",
      "name": "Summary",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        480,
        300
      ]
    },
    {
      "parameters": {
        "content": "## 1b · Check my tenant\n\nAttach your **Taifoon Relayer API** credential (no key yet: run **1a**) to **Get My Tenant** and execute.\n\nOut: tenant id, how it came (`via`), its keys (prefixes only) and the next step the layer suggests.",
        "height": 240,
        "width": 460,
        "color": 4
      },
      "id": "tfnexmytenant001-n03",
      "name": "About",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -40,
        -40
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Get My Tenant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get My Tenant": {
      "main": [
        [
          {
            "node": "Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "taifoon": {
      "package": "n8n-nodes-taifoon",
      "min_version": "0.6.0",
      "ops": [
        "account.me"
      ],
      "description": "Reads the tenant of the key saved in the Taifoon Relayer API credential: who it is, its keys, its next step and its own traffic."
    }
  },
  "pinData": {},
  "tags": []
}
