{
  "components": {
    "schemas": {
      "AdminRemoval": {
        "properties": {
          "confirm": {
            "description": "The account's sign-in name, typed again",
            "maxLength": 200,
            "minLength": 1,
            "title": "Confirm",
            "type": "string"
          }
        },
        "required": [
          "confirm"
        ],
        "title": "AdminRemoval",
        "type": "object"
      },
      "AppSignInFinish": {
        "properties": {
          "code": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          },
          "device": {
            "default": "",
            "maxLength": 80,
            "title": "Device",
            "type": "string"
          },
          "verifier": {
            "maxLength": 128,
            "minLength": 43,
            "pattern": "^[A-Za-z0-9._~-]+$",
            "title": "Verifier",
            "type": "string"
          }
        },
        "required": [
          "code",
          "verifier"
        ],
        "title": "AppSignInFinish",
        "type": "object"
      },
      "AppSignInStart": {
        "properties": {
          "challenge": {
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "title": "Challenge",
            "type": "string"
          },
          "confirm": {
            "default": "",
            "maxLength": 200,
            "title": "Confirm",
            "type": "string"
          },
          "extension": {
            "default": "",
            "pattern": "^[a-p]{0,32}$",
            "title": "Extension",
            "type": "string"
          },
          "kind": {
            "default": "app",
            "enum": [
              "app",
              "extension"
            ],
            "title": "Kind",
            "type": "string"
          },
          "password": {
            "default": "",
            "maxLength": 1024,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "challenge"
        ],
        "title": "AppSignInStart",
        "type": "object"
      },
      "Body_attach_v1_notes__note_id__attachments_post": {
        "properties": {
          "extract": {
            "default": false,
            "title": "Extract",
            "type": "boolean"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "ocr": {
            "default": false,
            "title": "Ocr",
            "type": "boolean"
          },
          "sensitivity": {
            "default": "auto",
            "enum": [
              "auto",
              "sensitive",
              "public",
              "encrypted",
              "plaintext",
              "encrypt",
              "plain"
            ],
            "title": "Sensitivity",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_attach_v1_notes__note_id__attachments_post",
        "type": "object"
      },
      "Body_capture_v1_captures_post": {
        "properties": {
          "captured_at": {
            "default": "",
            "maxLength": 64,
            "title": "Captured At",
            "type": "string"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "source_title": {
            "default": "",
            "maxLength": 4096,
            "title": "Source Title",
            "type": "string"
          },
          "source_url": {
            "default": "",
            "maxLength": 4096,
            "title": "Source Url",
            "type": "string"
          },
          "title": {
            "default": "",
            "maxLength": 500,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_capture_v1_captures_post",
        "type": "object"
      },
      "Body_library_attach_v1_library_notes__note_id__attachments_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_library_attach_v1_library_notes__note_id__attachments_post",
        "type": "object"
      },
      "Body_medical_capture_v1_medical_receipts_post": {
        "properties": {
          "captured_at": {
            "default": "",
            "maxLength": 64,
            "title": "Captured At",
            "type": "string"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "source_title": {
            "default": "",
            "maxLength": 4096,
            "title": "Source Title",
            "type": "string"
          },
          "source_url": {
            "default": "",
            "maxLength": 4096,
            "title": "Source Url",
            "type": "string"
          },
          "title": {
            "default": "",
            "maxLength": 500,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_medical_capture_v1_medical_receipts_post",
        "type": "object"
      },
      "BulkPurge": {
        "properties": {
          "confirm": {
            "default": false,
            "title": "Confirm",
            "type": "boolean"
          },
          "ids": {
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "title": "Ids",
            "type": "array"
          }
        },
        "required": [
          "ids"
        ],
        "title": "BulkPurge",
        "type": "object"
      },
      "ConnectStart": {
        "properties": {
          "password": {
            "default": "",
            "maxLength": 1024,
            "title": "Password",
            "type": "string"
          }
        },
        "title": "ConnectStart",
        "type": "object"
      },
      "ExtensionSignInFinish": {
        "properties": {
          "code": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          },
          "name": {
            "default": "Chrome extension",
            "maxLength": 60,
            "title": "Name",
            "type": "string"
          },
          "verifier": {
            "maxLength": 128,
            "minLength": 43,
            "pattern": "^[A-Za-z0-9._~-]+$",
            "title": "Verifier",
            "type": "string"
          }
        },
        "required": [
          "code",
          "verifier"
        ],
        "title": "ExtensionSignInFinish",
        "type": "object"
      },
      "ExtractRun": {
        "properties": {
          "dry_run": {
            "default": false,
            "title": "Dry Run",
            "type": "boolean"
          },
          "force": {
            "default": false,
            "title": "Force",
            "type": "boolean"
          },
          "limit": {
            "default": 0,
            "minimum": 0.0,
            "title": "Limit",
            "type": "integer"
          },
          "no_extract": {
            "default": false,
            "title": "No Extract",
            "type": "boolean"
          },
          "no_ocr": {
            "default": false,
            "title": "No Ocr",
            "type": "boolean"
          },
          "query": {
            "default": "",
            "maxLength": 500,
            "title": "Query",
            "type": "string"
          }
        },
        "title": "ExtractRun",
        "type": "object"
      },
      "Flag": {
        "properties": {
          "on": {
            "title": "On",
            "type": "boolean"
          }
        },
        "required": [
          "on"
        ],
        "title": "Flag",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "Invitation": {
        "properties": {
          "login": {
            "default": "",
            "maxLength": 64,
            "title": "Login",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "role": {
            "enum": [
              "owner",
              "editor",
              "viewer"
            ],
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "name",
          "role"
        ],
        "title": "Invitation",
        "type": "object"
      },
      "LibraryCreate": {
        "properties": {
          "body": {
            "maxLength": 1000000,
            "minLength": 0,
            "title": "Body",
            "type": "string"
          },
          "source_title": {
            "default": "",
            "maxLength": 4096,
            "title": "Source Title",
            "type": "string"
          },
          "source_url": {
            "default": "",
            "maxLength": 4096,
            "title": "Source Url",
            "type": "string"
          },
          "tags": {
            "items": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 100,
            "title": "Tags",
            "type": "array"
          },
          "title": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title",
          "body"
        ],
        "title": "LibraryCreate",
        "type": "object"
      },
      "LibrarySearch": {
        "properties": {
          "limit": {
            "default": 50,
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "minimum": 0.0,
            "title": "Offset",
            "type": "integer"
          },
          "query": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Query",
            "type": "string"
          },
          "trash": {
            "default": false,
            "title": "Trash",
            "type": "boolean"
          }
        },
        "required": [
          "query"
        ],
        "title": "LibrarySearch",
        "type": "object"
      },
      "LibraryUpdate": {
        "properties": {
          "body": {
            "maxLength": 1000000,
            "minLength": 0,
            "title": "Body",
            "type": "string"
          },
          "tags": {
            "items": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 100,
            "title": "Tags",
            "type": "array"
          },
          "title": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title",
          "body"
        ],
        "title": "LibraryUpdate",
        "type": "object"
      },
      "MemberChange": {
        "properties": {
          "login": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Login",
            "type": "string"
          },
          "role": {
            "enum": [
              "owner",
              "editor",
              "viewer"
            ],
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "login",
          "role"
        ],
        "title": "MemberChange",
        "type": "object"
      },
      "NoteCreate": {
        "properties": {
          "body": {
            "maxLength": 1000000,
            "minLength": 0,
            "title": "Body",
            "type": "string"
          },
          "sensitivity": {
            "default": "auto",
            "enum": [
              "auto",
              "sensitive",
              "public",
              "encrypted",
              "plaintext",
              "encrypt",
              "plain"
            ],
            "title": "Sensitivity",
            "type": "string"
          },
          "tags": {
            "items": {
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 100,
            "title": "Tags",
            "type": "array"
          },
          "title": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title",
          "body"
        ],
        "title": "NoteCreate",
        "type": "object"
      },
      "PasswordChange": {
        "properties": {
          "current": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Current",
            "type": "string"
          },
          "new": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "New",
            "type": "string"
          }
        },
        "required": [
          "current",
          "new"
        ],
        "title": "PasswordChange",
        "type": "object"
      },
      "PasswordProof": {
        "properties": {
          "password": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "password"
        ],
        "title": "PasswordProof",
        "type": "object"
      },
      "PasswordSignIn": {
        "properties": {
          "login": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Login",
            "type": "string"
          },
          "password": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "login",
          "password"
        ],
        "title": "PasswordSignIn",
        "type": "object"
      },
      "PeopleChange": {
        "properties": {
          "add": {
            "items": {
              "maxLength": 200,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Add",
            "type": "array"
          },
          "remove": {
            "items": {
              "maxLength": 200,
              "type": "string"
            },
            "maxItems": 50,
            "title": "Remove",
            "type": "array"
          }
        },
        "title": "PeopleChange",
        "type": "object"
      },
      "PersonNew": {
        "properties": {
          "admin": {
            "default": false,
            "title": "Admin",
            "type": "boolean"
          },
          "login": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Login",
            "type": "string"
          },
          "name": {
            "default": "",
            "maxLength": 100,
            "title": "Name",
            "type": "string"
          },
          "own_vault": {
            "default": true,
            "title": "Own Vault",
            "type": "boolean"
          },
          "vault_name": {
            "default": "",
            "maxLength": 80,
            "title": "Vault Name",
            "type": "string"
          }
        },
        "required": [
          "login"
        ],
        "title": "PersonNew",
        "type": "object"
      },
      "Proof": {
        "description": "What a person gives to confirm something that cannot be undone: their password, or,\nfor an account that signs in only through another service, the name of what is deleted.",
        "properties": {
          "confirm": {
            "default": "",
            "maxLength": 200,
            "title": "Confirm",
            "type": "string"
          },
          "password": {
            "default": "",
            "maxLength": 1024,
            "title": "Password",
            "type": "string"
          }
        },
        "title": "Proof",
        "type": "object"
      },
      "ProviderForget": {
        "properties": {
          "forget": {
            "items": {
              "maxLength": 200,
              "type": "string"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Forget",
            "type": "array"
          }
        },
        "required": [
          "forget"
        ],
        "title": "ProviderForget",
        "type": "object"
      },
      "QueryBody": {
        "properties": {
          "query": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Query",
            "type": "string"
          }
        },
        "required": [
          "query"
        ],
        "title": "QueryBody",
        "type": "object"
      },
      "ReceiptFields": {
        "properties": {
          "fields": {
            "additionalProperties": {
              "maxLength": 500,
              "type": "string"
            },
            "maxProperties": 50,
            "propertyNames": {
              "maxLength": 60
            },
            "title": "Fields",
            "type": "object"
          }
        },
        "required": [
          "fields"
        ],
        "title": "ReceiptFields",
        "type": "object"
      },
      "Recover": {
        "properties": {
          "code": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          },
          "login": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Login",
            "type": "string"
          },
          "password": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "login",
          "code",
          "password"
        ],
        "title": "Recover",
        "type": "object"
      },
      "Reextract": {
        "properties": {
          "ids": {
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "title": "Ids",
            "type": "array"
          },
          "unreviewed": {
            "default": false,
            "title": "Unreviewed",
            "type": "boolean"
          }
        },
        "title": "Reextract",
        "type": "object"
      },
      "Reimburse": {
        "properties": {
          "date": {
            "default": "",
            "maxLength": 32,
            "title": "Date",
            "type": "string"
          },
          "ids": {
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "title": "Ids",
            "type": "array"
          },
          "note": {
            "default": "",
            "maxLength": 500,
            "title": "Note",
            "type": "string"
          },
          "undo": {
            "default": false,
            "title": "Undo",
            "type": "boolean"
          }
        },
        "required": [
          "ids"
        ],
        "title": "Reimburse",
        "type": "object"
      },
      "ReportFilter": {
        "properties": {
          "from_date": {
            "default": "",
            "maxLength": 32,
            "title": "From Date",
            "type": "string"
          },
          "patient_name": {
            "default": "",
            "maxLength": 200,
            "title": "Patient Name",
            "type": "string"
          },
          "reimbursed": {
            "default": "all",
            "maxLength": 3,
            "title": "Reimbursed",
            "type": "string"
          },
          "to_date": {
            "default": "",
            "maxLength": 32,
            "title": "To Date",
            "type": "string"
          },
          "year": {
            "default": "",
            "maxLength": 10,
            "title": "Year",
            "type": "string"
          }
        },
        "title": "ReportFilter",
        "type": "object"
      },
      "ServiceNew": {
        "properties": {
          "address": {
            "maxLength": 300,
            "minLength": 1,
            "title": "Address",
            "type": "string"
          },
          "client_id": {
            "maxLength": 300,
            "minLength": 1,
            "title": "Client Id",
            "type": "string"
          },
          "client_secret": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Client Secret",
            "type": "string"
          },
          "issuer": {
            "default": "",
            "maxLength": 300,
            "title": "Issuer",
            "type": "string"
          },
          "kind": {
            "default": "google",
            "enum": [
              "google",
              "other"
            ],
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "default": "",
            "maxLength": 40,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "client_secret",
          "address"
        ],
        "title": "ServiceNew",
        "type": "object"
      },
      "ServiceStart": {
        "properties": {
          "setup_code": {
            "default": "",
            "maxLength": 200,
            "title": "Setup Code",
            "type": "string"
          }
        },
        "title": "ServiceStart",
        "type": "object"
      },
      "SetupCode": {
        "properties": {
          "code": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "title": "SetupCode",
        "type": "object"
      },
      "SetupFinish": {
        "properties": {
          "code": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          },
          "login": {
            "default": "",
            "maxLength": 64,
            "title": "Login",
            "type": "string"
          },
          "name": {
            "default": "",
            "maxLength": 100,
            "title": "Name",
            "type": "string"
          },
          "password": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "code",
          "password"
        ],
        "title": "SetupFinish",
        "type": "object"
      },
      "SetupList": {
        "properties": {
          "hidden": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hidden"
          },
          "key_saved": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Saved"
          }
        },
        "title": "SetupList",
        "type": "object"
      },
      "SignIn": {
        "properties": {
          "token": {
            "maxLength": 400,
            "minLength": 1,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "title": "SignIn",
        "type": "object"
      },
      "SignUp": {
        "properties": {
          "login": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Login",
            "type": "string"
          },
          "name": {
            "default": "",
            "maxLength": 100,
            "title": "Name",
            "type": "string"
          },
          "password": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          },
          "vault_name": {
            "default": "",
            "maxLength": 80,
            "title": "Vault Name",
            "type": "string"
          }
        },
        "required": [
          "login",
          "password"
        ],
        "title": "SignUp",
        "type": "object"
      },
      "SignUpSetting": {
        "properties": {
          "signup": {
            "enum": [
              "open",
              "invitation"
            ],
            "title": "Signup",
            "type": "string"
          }
        },
        "required": [
          "signup"
        ],
        "title": "SignUpSetting",
        "type": "object"
      },
      "TextBody": {
        "properties": {
          "body": {
            "maxLength": 1000000,
            "minLength": 0,
            "title": "Body",
            "type": "string"
          }
        },
        "required": [
          "body"
        ],
        "title": "TextBody",
        "type": "object"
      },
      "TextCapture": {
        "properties": {
          "captured_at": {
            "default": "",
            "maxLength": 64,
            "title": "Captured At",
            "type": "string"
          },
          "source_title": {
            "default": "",
            "maxLength": 4096,
            "title": "Source Title",
            "type": "string"
          },
          "source_url": {
            "default": "",
            "maxLength": 4096,
            "title": "Source Url",
            "type": "string"
          },
          "text": {
            "maxLength": 100000,
            "minLength": 1,
            "title": "Text",
            "type": "string"
          },
          "title": {
            "default": "",
            "maxLength": 4096,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "TextCapture",
        "type": "object"
      },
      "TokenNew": {
        "properties": {
          "confirm": {
            "default": "",
            "maxLength": 200,
            "title": "Confirm",
            "type": "string"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "password": {
            "default": "",
            "maxLength": 1024,
            "title": "Password",
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "maxItems": 5,
            "minItems": 1,
            "title": "Scopes",
            "type": "array"
          },
          "vault": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Vault",
            "type": "string"
          }
        },
        "required": [
          "name",
          "scopes",
          "vault"
        ],
        "title": "TokenNew",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "VaultChoice": {
        "properties": {
          "vault": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Vault",
            "type": "string"
          }
        },
        "required": [
          "vault"
        ],
        "title": "VaultChoice",
        "type": "object"
      },
      "VaultNew": {
        "properties": {
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "VaultNew",
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "An encrypted notes vault. Every request needs `Authorization: Bearer <token>` except /v1/health.",
    "title": "Kaal",
    "version": "1.0.0rc3"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/account": {
      "delete": {
        "description": "Delete one's own account for good, with the vaults only one belongs to.\nNeeds the password, or, for an account without one, the sign-in name typed.",
        "operationId": "account_delete_v1_account_delete",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Proof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account Delete",
        "tags": [
          "account"
        ]
      },
      "get": {
        "operationId": "account_show_v1_account_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Account Show",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/app-sign-ins": {
      "post": {
        "description": "Approve signing an app (or this browser's Kaal extension) in as oneself. Answers a code that\nworks once, for five minutes, and where to send it: the app's own address, or the extension's.\nKaal decides where it goes, so a page cannot be talked into handing a code to anyone else.",
        "operationId": "app_sign_in_start_v1_account_app_sign_ins_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppSignInStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "App Sign In Start",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/connections/{service_id}": {
      "delete": {
        "operationId": "account_disconnect_v1_account_connections__service_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "service_id",
            "required": true,
            "schema": {
              "title": "Service Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account Disconnect",
        "tags": [
          "account"
        ]
      },
      "post": {
        "description": "Start connecting a sign-in service to one's account. Someone with a password proves it first.",
        "operationId": "account_connect_v1_account_connections__service_id__post",
        "parameters": [
          {
            "in": "path",
            "name": "service_id",
            "required": true,
            "schema": {
              "title": "Service Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account Connect",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/password": {
      "post": {
        "description": "Change one's password. Every other browser is signed out.",
        "operationId": "account_password_v1_account_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account Password",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/recovery-codes": {
      "post": {
        "description": "Replace one's recovery codes. The new ones are shown this once.",
        "operationId": "account_recovery_codes_v1_account_recovery_codes_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordProof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account Recovery Codes",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/removal": {
      "get": {
        "description": "What deleting one's own account would delete, and anything that stops it.",
        "operationId": "account_removal_plan_v1_account_removal_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Account Removal Plan",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/sessions/sign-out-others": {
      "post": {
        "operationId": "account_end_other_sessions_v1_account_sessions_sign_out_others_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Account End Other Sessions",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/sessions/{session_id}": {
      "delete": {
        "description": "Sign one of one's browsers out.",
        "operationId": "account_end_session_v1_account_sessions__session_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account End Session",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/tokens": {
      "get": {
        "operationId": "account_tokens_v1_account_tokens_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Account Tokens",
        "tags": [
          "account"
        ]
      },
      "post": {
        "description": "Make a token for a script or the extension. Its secret is in this answer and nowhere else, ever.\nNeeds the password (or, for an account without one, the sign-in name typed), so a borrowed\nbrowser cannot leave a lasting way in behind.",
        "operationId": "account_token_create_v1_account_tokens_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenNew"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account Token Create",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/tokens/{token_id}": {
      "delete": {
        "operationId": "account_token_revoke_v1_account_tokens__token_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "token_id",
            "required": true,
            "schema": {
              "title": "Token Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account Token Revoke",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/account/vaults": {
      "post": {
        "description": "Create another vault of one's own, for example one to share with a household.",
        "operationId": "account_vault_create_v1_account_vaults_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultNew"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Account Vault Create",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/admin/people": {
      "get": {
        "operationId": "admin_people_v1_admin_people_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Admin People",
        "tags": [
          "admin"
        ]
      },
      "post": {
        "description": "Create an account and a single-use link with which that person chooses their password.",
        "operationId": "admin_person_add_v1_admin_people_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonNew"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Person Add",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/admin/people/{account_id}": {
      "delete": {
        "description": "Remove someone's account for good, with the vaults only they belonged to. Their sign-in name must be typed again.",
        "operationId": "admin_remove_person_v1_admin_people__account_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminRemoval"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Remove Person",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/admin/people/{account_id}/admin": {
      "post": {
        "operationId": "admin_person_admin_v1_admin_people__account_id__admin_post",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Flag"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Person Admin",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/admin/people/{account_id}/disabled": {
      "post": {
        "operationId": "admin_person_disable_v1_admin_people__account_id__disabled_post",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Flag"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Person Disable",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/admin/people/{account_id}/removal": {
      "get": {
        "description": "What removing someone would delete, and anything that stops it.",
        "operationId": "admin_removal_plan_v1_admin_people__account_id__removal_get",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Removal Plan",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/admin/people/{account_id}/setup-link": {
      "post": {
        "description": "A new single-use link for someone who has never signed in. An administrator cannot make one\nfor an account already in use: whoever uses a setup link signs in as that person, so that would\nlet an administrator into other people's vaults. For someone who has lost every way in, whoever\nruns the server makes the link (kaal-server account setup-link LOGIN).",
        "operationId": "admin_person_link_v1_admin_people__account_id__setup_link_post",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Person Link",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/admin/setup": {
      "get": {
        "operationId": "admin_setup_v1_admin_setup_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Admin Setup",
        "tags": [
          "admin"
        ]
      },
      "post": {
        "description": "Say that a copy of the key is kept somewhere else, or put the list away (or bring it back).",
        "operationId": "admin_setup_change_v1_admin_setup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupList"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Setup Change",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/admin/sign-in-services": {
      "get": {
        "operationId": "admin_services_v1_admin_sign_in_services_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Admin Services",
        "tags": [
          "admin"
        ]
      },
      "post": {
        "description": "Offer signing in through Google or another OpenID Connect service. The client secret is stored encrypted and never shown again.",
        "operationId": "admin_service_add_v1_admin_sign_in_services_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceNew"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Service Add",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/admin/sign-in-services/{service_id}": {
      "delete": {
        "description": "Stop offering a service. People connected to it keep their connection in case it is added again.",
        "operationId": "admin_service_remove_v1_admin_sign_in_services__service_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "service_id",
            "required": true,
            "schema": {
              "title": "Service Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Service Remove",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/admin/sign-up": {
      "post": {
        "description": "Whether anyone who can reach this Kaal may create an account, or only people an administrator adds.",
        "operationId": "admin_signup_v1_admin_sign_up_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignUpSetting"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Admin Signup",
        "tags": [
          "admin"
        ]
      }
    },
    "/v1/app-sign-ins": {
      "post": {
        "description": "An app collects the sign-in a browser approved for it. The session it is\ngiven is sent back in the ``X-Kaal-Session`` header, with ``X-Kaal-Request: 1``.",
        "operationId": "app_sign_in_finish_v1_app_sign_ins_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppSignInFinish"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "App Sign In Finish",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/captures": {
      "post": {
        "operationId": "capture_v1_captures_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_capture_v1_captures_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Capture",
        "tags": [
          "captures"
        ]
      }
    },
    "/v1/captures/text": {
      "post": {
        "operationId": "capture_text_v1_captures_text_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextCapture"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Capture Text",
        "tags": [
          "captures"
        ]
      }
    },
    "/v1/export": {
      "get": {
        "operationId": "export_v1_export_get",
        "responses": {
          "200": {
            "description": "Successful Response"
          }
        },
        "summary": "Export",
        "tags": [
          "service"
        ]
      }
    },
    "/v1/extension-sign-ins": {
      "post": {
        "description": "The browser extension collects the sign-in a browser approved for it, as a token of its own\nfor the vault that was open: read, reveal and write, as far as the person's role there allows.",
        "operationId": "extension_sign_in_finish_v1_extension_sign_ins_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtensionSignInFinish"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Extension Sign In Finish",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "health_v1_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Health V1 Health Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Health",
        "tags": [
          "service"
        ]
      }
    },
    "/v1/library/notes": {
      "get": {
        "operationId": "library_list_v1_library_notes_get",
        "parameters": [
          {
            "in": "query",
            "name": "trash",
            "required": false,
            "schema": {
              "default": false,
              "title": "Trash",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 100,
              "minimum": 0,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Q",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library List",
        "tags": [
          "library"
        ]
      },
      "post": {
        "operationId": "library_create_v1_library_notes_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibraryCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Create",
        "tags": [
          "library"
        ]
      }
    },
    "/v1/library/notes/{note_id}": {
      "delete": {
        "operationId": "library_purge_v1_library_notes__note_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "confirm",
            "required": false,
            "schema": {
              "default": false,
              "title": "Confirm",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Purge",
        "tags": [
          "library"
        ]
      },
      "get": {
        "operationId": "library_show_v1_library_notes__note_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Show",
        "tags": [
          "library"
        ]
      },
      "put": {
        "operationId": "library_update_v1_library_notes__note_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibraryUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Update",
        "tags": [
          "library"
        ]
      }
    },
    "/v1/library/notes/{note_id}/attachments": {
      "post": {
        "operationId": "library_attach_v1_library_notes__note_id__attachments_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_library_attach_v1_library_notes__note_id__attachments_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Attach",
        "tags": [
          "library"
        ]
      }
    },
    "/v1/library/notes/{note_id}/attachments/{attachment_id}/extracted-text": {
      "get": {
        "operationId": "library_extracted_text_v1_library_notes__note_id__attachments__attachment_id__extracted_text_get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "title": "Attachment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Extracted Text",
        "tags": [
          "library"
        ]
      }
    },
    "/v1/library/notes/{note_id}/extract": {
      "post": {
        "operationId": "library_extract_v1_library_notes__note_id__extract_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Extract",
        "tags": [
          "library"
        ]
      }
    },
    "/v1/library/notes/{note_id}/restore": {
      "post": {
        "operationId": "library_restore_v1_library_notes__note_id__restore_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Restore",
        "tags": [
          "library"
        ]
      }
    },
    "/v1/library/notes/{note_id}/trash": {
      "post": {
        "operationId": "library_trash_v1_library_notes__note_id__trash_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Trash",
        "tags": [
          "library"
        ]
      }
    },
    "/v1/library/search": {
      "post": {
        "operationId": "library_search_v1_library_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LibrarySearch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Library Search",
        "tags": [
          "library"
        ]
      }
    },
    "/v1/medical/people": {
      "get": {
        "operationId": "medical_people_v1_medical_people_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Medical People",
        "tags": [
          "medical"
        ]
      },
      "post": {
        "operationId": "medical_people_change_v1_medical_people_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PeopleChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical People Change",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/providers": {
      "get": {
        "operationId": "medical_providers_v1_medical_providers_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Medical Providers",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/providers/forget": {
      "post": {
        "operationId": "medical_providers_forget_v1_medical_providers_forget_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProviderForget"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Providers Forget",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts": {
      "get": {
        "operationId": "medical_list_v1_medical_receipts_get",
        "parameters": [
          {
            "in": "query",
            "name": "inbox",
            "required": false,
            "schema": {
              "default": false,
              "title": "Inbox",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "trash",
            "required": false,
            "schema": {
              "default": false,
              "title": "Trash",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 20,
              "title": "Status",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "updated",
              "maxLength": 20,
              "title": "Sort",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical List",
        "tags": [
          "medical"
        ]
      },
      "post": {
        "operationId": "medical_capture_v1_medical_receipts_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_medical_capture_v1_medical_receipts_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Capture",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/purge": {
      "post": {
        "operationId": "medical_purge_bulk_v1_medical_receipts_purge_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkPurge"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Purge Bulk",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/reextract": {
      "post": {
        "operationId": "medical_reextract_v1_medical_receipts_reextract_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Reextract"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Reextract",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/reimburse": {
      "post": {
        "operationId": "medical_reimburse_v1_medical_receipts_reimburse_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Reimburse"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Reimburse",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/{note_id}": {
      "delete": {
        "operationId": "medical_purge_v1_medical_receipts__note_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "confirm",
            "required": false,
            "schema": {
              "default": false,
              "title": "Confirm",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Purge",
        "tags": [
          "medical"
        ]
      },
      "get": {
        "operationId": "medical_show_v1_medical_receipts__note_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Show",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/{note_id}/attachments/{attachment_id}/content": {
      "get": {
        "operationId": "medical_content_v1_medical_receipts__note_id__attachments__attachment_id__content_get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "title": "Attachment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Content",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/{note_id}/attachments/{attachment_id}/preview": {
      "get": {
        "operationId": "medical_preview_v1_medical_receipts__note_id__attachments__attachment_id__preview_get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "title": "Attachment Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 20,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Preview",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/{note_id}/extracted-text": {
      "get": {
        "operationId": "medical_extracted_text_v1_medical_receipts__note_id__extracted_text_get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "attachment_id",
            "required": false,
            "schema": {
              "default": "",
              "title": "Attachment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Extracted Text",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/{note_id}/fields": {
      "patch": {
        "operationId": "medical_update_v1_medical_receipts__note_id__fields_patch",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReceiptFields"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Update",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/{note_id}/reopen": {
      "post": {
        "operationId": "medical_reopen_v1_medical_receipts__note_id__reopen_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Reopen",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/{note_id}/restore": {
      "post": {
        "operationId": "medical_restore_v1_medical_receipts__note_id__restore_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Restore",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/{note_id}/review": {
      "post": {
        "operationId": "medical_review_v1_medical_receipts__note_id__review_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Review",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/receipts/{note_id}/trash": {
      "post": {
        "operationId": "medical_trash_v1_medical_receipts__note_id__trash_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Trash",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/report": {
      "post": {
        "operationId": "medical_report_v1_medical_report_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportFilter"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Medical Report",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/medical/sources": {
      "get": {
        "operationId": "medical_sources_v1_medical_sources_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Medical Sources",
        "tags": [
          "medical"
        ]
      }
    },
    "/v1/notes": {
      "get": {
        "operationId": "list_notes_v1_notes_get",
        "parameters": [
          {
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Tag",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Notes",
        "tags": [
          "notes"
        ]
      },
      "post": {
        "operationId": "add_note_v1_notes_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Note",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/extract": {
      "post": {
        "operationId": "extract_attachments_v1_notes_extract_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtractRun"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Extract Attachments",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/lookup": {
      "post": {
        "operationId": "lookup_note_v1_notes_lookup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lookup Note",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/search": {
      "post": {
        "operationId": "search_notes_v1_notes_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Search Notes",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/{note_id}": {
      "delete": {
        "operationId": "delete_note_v1_notes__note_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "confirm",
            "required": false,
            "schema": {
              "default": false,
              "title": "Confirm",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Note",
        "tags": [
          "notes"
        ]
      },
      "get": {
        "operationId": "show_note_v1_notes__note_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "full",
            "required": false,
            "schema": {
              "default": false,
              "title": "Full",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Show Note",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/{note_id}/append": {
      "post": {
        "operationId": "append_note_v1_notes__note_id__append_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Append Note",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/{note_id}/attachments": {
      "post": {
        "operationId": "attach_v1_notes__note_id__attachments_post",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_attach_v1_notes__note_id__attachments_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Attach",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/{note_id}/attachments/{attachment_id}/content": {
      "get": {
        "operationId": "attachment_content_v1_notes__note_id__attachments__attachment_id__content_get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "title": "Attachment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Attachment Content",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/{note_id}/attachments/{attachment_id}/preview": {
      "get": {
        "description": "A picture of a note's file, shrunk for the page: an image itself, or a PDF's page.",
        "operationId": "preview_attachment_v1_notes__note_id__attachments__attachment_id__preview_get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "title": "Attachment Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 20,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview Attachment",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/{note_id}/attachments/{attachment_id}/view": {
      "get": {
        "description": "A picture, PDF or plain-text file, served so the browser shows it; other kinds are refused.",
        "operationId": "view_attachment_v1_notes__note_id__attachments__attachment_id__view_get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "title": "Attachment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "View Attachment",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/notes/{note_id}/fields/{field}": {
      "get": {
        "operationId": "field_value_v1_notes__note_id__fields__field__get",
        "parameters": [
          {
            "in": "path",
            "name": "note_id",
            "required": true,
            "schema": {
              "title": "Note Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "field",
            "required": true,
            "schema": {
              "title": "Field",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Field Value",
        "tags": [
          "notes"
        ]
      }
    },
    "/v1/session": {
      "delete": {
        "operationId": "sign_out_v1_session_delete",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Sign Out",
        "tags": [
          "session"
        ]
      },
      "get": {
        "operationId": "session_v1_session_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Session",
        "tags": [
          "session"
        ]
      },
      "post": {
        "operationId": "sign_in_v1_session_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sign In",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/session/vault": {
      "post": {
        "description": "Move this browser to another of the person's vaults.",
        "operationId": "choose_vault_v1_session_vault_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultChoice"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Choose Vault",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/setup": {
      "post": {
        "description": "Choose a password with a setup link, then sign in. The link works once.",
        "operationId": "setup_finish_v1_setup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupFinish"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Setup Finish",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/setup/check": {
      "post": {
        "description": "Whose setup link this is, so the page can greet them. Uses nothing up.",
        "operationId": "setup_check_v1_setup_check_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupCode"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Setup Check",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/sign-in": {
      "post": {
        "operationId": "sign_in_with_password_v1_sign_in_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordSignIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sign In With Password",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/sign-in/options": {
      "get": {
        "description": "What the sign-in page should offer. Needs no sign-in, and says nothing about who has an account.",
        "operationId": "sign_in_options_v1_sign_in_options_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Sign In Options",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/sign-in/recover": {
      "post": {
        "description": "Use a recovery code to choose a new password. Signs every other browser out and\nends the account's tokens, since whoever forgot the password may not be the only one using it.",
        "operationId": "recover_v1_sign_in_recover_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Recover"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Recover",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/sign-in/with/{service_id}": {
      "post": {
        "description": "Start signing in through a service. With a setup link's code, the service becomes how that account signs in.",
        "operationId": "sign_in_with_service_v1_sign_in_with__service_id__post",
        "parameters": [
          {
            "in": "path",
            "name": "service_id",
            "required": true,
            "schema": {
              "title": "Service Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sign In With Service",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/sign-in/with/{service_id}/callback": {
      "get": {
        "description": "Where a sign-in service sends the browser back to. Answers by sending the browser on into the web app.",
        "operationId": "sign_in_callback_v1_sign_in_with__service_id__callback_get",
        "parameters": [
          {
            "in": "path",
            "name": "service_id",
            "required": true,
            "schema": {
              "title": "Service Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 4096,
              "title": "Code",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "State",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Error",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sign In Callback",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/sign-up": {
      "post": {
        "description": "Create one's own account, where the administrator has left sign-up open.",
        "operationId": "sign_up_v1_sign_up_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignUp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Sign Up",
        "tags": [
          "session"
        ]
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "status_v1_status_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Status",
        "tags": [
          "service"
        ]
      }
    },
    "/v1/vault": {
      "delete": {
        "description": "Delete the open vault for good, with everything in it. Needs the password (or the vault's name, typed).",
        "operationId": "vault_delete_v1_vault_delete",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Proof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Vault Delete",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/vault/export": {
      "get": {
        "description": "Everything in the open vault, decrypted, as a zip: notes as Markdown, the files, receipts.csv. Owners only.",
        "operationId": "vault_export_readable_v1_vault_export_get",
        "responses": {
          "200": {
            "description": "Successful Response"
          }
        },
        "summary": "Vault Export Readable",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/vault/invitations": {
      "post": {
        "description": "Invite someone who has no account yet into this vault: an account, a vault of their own,\na place in this one, and a single-use link with which they choose how to sign in. Making\naccounts is an administrator's job, so only an owner who is one may.",
        "operationId": "vault_invite_v1_vault_invitations_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invitation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Vault Invite",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/vault/members": {
      "get": {
        "operationId": "vault_members_v1_vault_members_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Vault Members",
        "tags": [
          "account"
        ]
      },
      "post": {
        "description": "Let someone with an account into this vault, or change their role in it.",
        "operationId": "vault_member_set_v1_vault_members_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Vault Member Set",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/vault/members/{account_id}": {
      "delete": {
        "operationId": "vault_member_remove_v1_vault_members__account_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Vault Member Remove",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/vault/name": {
      "post": {
        "description": "Give the open vault another name. Only the name changes.",
        "operationId": "vault_rename_v1_vault_name_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultNew"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Vault Rename",
        "tags": [
          "account"
        ]
      }
    },
    "/v1/verify": {
      "get": {
        "operationId": "verify_v1_verify_get",
        "parameters": [
          {
            "in": "query",
            "name": "deep",
            "required": false,
            "schema": {
              "default": false,
              "title": "Deep",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Verify",
        "tags": [
          "service"
        ]
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ]
}
