{
  "openapi": "3.1.0",
  "info": {
    "title": "auradefi",
    "version": "0.1.1"
  },
  "paths": {
    "/auth/token": {
      "post": {
        "summary": "Mint User Token",
        "description": "Mint one short-lived user JWT. Body is exactly ``{\"token\"}``.",
        "operationId": "mint_user_token_auth_token_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Mint User Token Auth Token Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/revoke": {
      "post": {
        "summary": "Revoke User Token",
        "description": "Revoke one jti. Idempotent; an unowned token is one plain 401.",
        "operationId": "revoke_user_token_auth_revoke_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Revoke User Token Auth Revoke Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/users/me": {
      "get": {
        "summary": "Read Current User",
        "description": "The caller's own user record, created on first sight (\u00a77.1).",
        "operationId": "read_current_user_users_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Read Current User Users Me Get"
                }
              }
            }
          }
        }
      }
    },
    "/users": {
      "get": {
        "summary": "List Users",
        "description": "This project's users in creation order, never another's.",
        "operationId": "list_users_users_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response List Users Users Get"
                }
              }
            }
          }
        }
      }
    },
    "/connections": {
      "get": {
        "summary": "List Connections",
        "description": "This user's connections in creation order; never anyone else's.",
        "operationId": "list_connections_connections_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response List Connections Connections Get"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Connection",
        "description": "Create one connection and emit exactly one event.",
        "operationId": "create_connection_connections_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Create Connection Connections Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/connections/{connection_id}": {
      "get": {
        "summary": "Read Connection",
        "description": "One connection the caller owns; 404 for every other id.",
        "operationId": "read_connection_connections__connection_id__get",
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Connection Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Read Connection Connections  Connection Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/sync": {
      "get": {
        "summary": "Crypto Sync",
        "description": "One page of Plaid's envelope for the calling end user.",
        "operationId": "crypto_sync_crypto_sync_get",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Crypto Sync Crypto Sync Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/batch/holdings": {
      "post": {
        "summary": "Batch Holdings",
        "description": "Allium's union: partial success, one quota unit per item.",
        "operationId": "batch_holdings_batch_holdings_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Batch Holdings Batch Holdings Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/coverage": {
      "get": {
        "summary": "Coverage",
        "description": "Generated from the registry and the bound capabilities only.",
        "operationId": "coverage_coverage_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Coverage Coverage Get"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/endpoints": {
      "get": {
        "summary": "List Endpoints",
        "description": "This project's endpoints, in registration order, secretless.",
        "operationId": "list_endpoints_webhooks_endpoints_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response List Endpoints Webhooks Endpoints Get"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Register Endpoint",
        "description": "Self-serve registration; the secret is returned exactly once.",
        "operationId": "register_endpoint_webhooks_endpoints_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Register Endpoint Webhooks Endpoints Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/deliveries": {
      "get": {
        "summary": "List Deliveries",
        "description": "Every delivery in creation order, optionally filtered by status.",
        "operationId": "list_deliveries_webhooks_deliveries_get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Deliveries Webhooks Deliveries Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/dead_letter": {
      "get": {
        "summary": "Dead Letter",
        "description": "The operator view: deliveries that burned all six attempts.",
        "operationId": "dead_letter_webhooks_dead_letter_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Dead Letter Webhooks Dead Letter Get"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/deliveries/{delivery_id}/replay": {
      "post": {
        "summary": "Replay Delivery",
        "description": "Re-arm one delivery; the original row is never mutated.",
        "operationId": "replay_delivery_webhooks_deliveries__delivery_id__replay_post",
        "parameters": [
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Delivery Id"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Replay Delivery Webhooks Deliveries  Delivery Id  Replay Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BatchItem": {
        "properties": {
          "chain": {
            "type": "string",
            "title": "Chain"
          },
          "address": {
            "type": "string",
            "title": "Address"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "chain",
          "address"
        ],
        "title": "BatchItem",
        "description": "One requested pair: exactly ``{chain, address}``, extras forbidden."
      },
      "BatchRequest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BatchItem"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items"
        ],
        "title": "BatchRequest",
        "description": "``POST /batch/holdings`` body: exactly ``{items: [BatchItem]}``."
      },
      "ConnectionKind": {
        "type": "string",
        "enum": [
          "address",
          "xpub",
          "exchange"
        ],
        "title": "ConnectionKind",
        "description": "What a Connection watches: an address, an xpub, an exchange key\n(SPEC \u00a73.1)."
      },
      "ConnectionRequest": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/ConnectionKind"
          },
          "descriptor": {
            "type": "string",
            "title": "Descriptor"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "kind",
          "descriptor"
        ],
        "title": "ConnectionRequest",
        "description": "``POST /connections`` body. Exactly ``{kind, descriptor}``.\n\n``kind`` is typed as :class:`~auradefi.tenancy.models.ConnectionKind`\nrather than re-listed here, so the vocabulary has one home; anything\noutside it is a 422."
      },
      "EndpointRequest": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "url"
        ],
        "title": "EndpointRequest",
        "description": "``POST /webhooks/endpoints`` body: exactly ``{url, events}``.\n\n``events`` omitted or ``null`` subscribes to all seven; the names are\nvalidated in the route so the 422 can name the legal values."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "RevokeRequest": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "token"
        ],
        "title": "RevokeRequest",
        "description": "``POST /auth/revoke`` body: exactly ``{\"token\": str}``."
      },
      "TokenRequest": {
        "properties": {
          "external_user_id": {
            "type": "string",
            "title": "External User Id"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "external_user_id"
        ],
        "title": "TokenRequest",
        "description": "``POST /auth/token`` body: exactly two keys, extras forbidden.\n\n``scopes`` OMITTED or ``null`` means \"everything this key has\"; ``[]``\nis a request for a ZERO-privilege token and is honoured as one. The\ndistinction is why the handler tests ``is not None`` rather than\ntruthiness (RELEASE_0.1.1 \u00a74 #20)."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  }
}