{
  "openapi": "3.0.4",
  "info": {
    "title": "Heimdall API",
    "description": "A centralized identity management API with scope-based multi-tenancy.\n\nEvery identifier in a path is a **PublicId** (GUID), never an internal id. Every endpoint answers one of two envelopes — `DataOutput<T>` for a single resource, `PaginatedOutput<T>` for a listing.\n\nObtain a token from `POST /api/auth/login`, then authorize with it. A challenge token issued by a 2FA-gated login is not one: no endpoint accepts it as a bearer credential, and it is read only from the `challengeToken` body field of `POST /api/auth/2fa/verify` and `POST /api/auth/2fa/challenge/resend`.",
    "contact": {
      "name": "Artur Rios",
      "url": "https://github.com/artur-rios/heimdall-api"
    },
    "license": {
      "name": "Artur Rios Attribution License",
      "url": "https://github.com/artur-rios/heimdall-api/blob/main/LICENSE"
    },
    "version": "v1"
  },
  "paths": {
    "/api/scopes/{scopeId}/applications": {
      "post": {
        "tags": [
          "Application"
        ],
        "summary": "Registers an application within a scope (UC-16, FR-AP-01/02/03). Only a System Admin or a\nScope Admin may call it: FR-AP-03 restricts ownership to an administrator who owns the\nscope, so a `User` has nothing to create here and the attribute refuses them. The\nremaining rules depend on data the attribute cannot see and are enforced by the handler —\nthe acting Scope Admin must own the scope (AF-16e) and may only name themself (AF-16c),\nand the named owner must satisfy FR-AP-03 (AF-16b).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Application_Create",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApplicationCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApplicationCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApplicationCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApplicationCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApplicationCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApplicationCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Application"
        ],
        "summary": "Lists the applications of a scope (UC-17, FR-AP-05/09). A System Admin sees every\napplication in the scope; a Scope Admin must own the scope (AF-17b) and sees only the\napplications they own. Both narrowings are enforced by the handler from the acting user.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Application_List",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "OwnerId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "IncludeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/applications/{id}": {
      "get": {
        "tags": [
          "Application"
        ],
        "summary": "Retrieves a single application by its public identifier within the scope (UC-17,\nFR-AP-04/09). A `User` can own no application (FR-AP-03) and so is refused by the\nattribute; among the remaining actors the rule is data-dependent and lives in the handler —\na System Admin sees any application, a Scope Admin only the ones they own (AF-17b).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Application_GetById",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Application"
        ],
        "summary": "Updates an application's name and owner (UC-18, FR-AP-06). A `User` can own no\napplication (FR-AP-03) and so is refused by the attribute; among the remaining actors the\nrule is data-dependent and lives in the handler — a System Admin updates any application, a\nScope Admin only the ones they own (AF-18c). The handler also resolves the application\ninside the addressed scope (AF-18a) and, when the owner changes, checks the new owner\nagainst FR-AP-03 (AF-18b).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Application_Update",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApplicationCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApplicationCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApplicationCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateApplicationCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateApplicationCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateApplicationCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Application"
        ],
        "summary": "Logically deletes an application by setting `IsDeleted = true` (UC-19, FR-AP-07). A\n`User` can own no application (FR-AP-03) and so is refused by the attribute; among the\nremaining actors the rule is data-dependent and lives in the handler — a System Admin\ndeletes any application, a Scope Admin only the ones they own (AF-19c). The handler also\nresolves the application inside the addressed scope (AF-19a) and answers an already-deleted\napplication idempotently (AF-19b).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Application_Delete",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteApplicationCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteApplicationCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteApplicationCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/applications/{id}/hard": {
      "delete": {
        "tags": [
          "Application"
        ],
        "summary": "Permanently (hard) deletes an application, removing the record from the database (UC-20,\nFR-AP-08). Restricted to System Admins: a Scope Admin may logically delete an application\nthey own (UC-19), but never purge it, so the attribute settles authorization on its own and\nthe handler applies no further rule. The handler resolves the application inside the\naddressed scope in any deletion state and reports AF-20a when it does not exist — which\nincludes a repeated call, as the removal leaves nothing to find. The application's\ncredentials (UC-53) go with it, by cascade; its scope and owner are untouched.",
        "description": "**Requires role:** System Admin.",
        "operationId": "Application_HardDelete",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteApplicationCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteApplicationCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteApplicationCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/applications/{id}/credentials": {
      "post": {
        "tags": [
          "ApplicationCredential"
        ],
        "summary": "Issues a credential (UC-53). The body is optional and carries only `expiresAt`. The\nanswer is the only place the secret ever appears; Heimdall keeps its hash alone.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "ApplicationCredential_Issue",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueApplicationCredentialCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueApplicationCredentialCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/IssueApplicationCredentialCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/IssueApplicationCredentialCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueApplicationCredentialCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueApplicationCredentialCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "ApplicationCredential"
        ],
        "summary": "Lists the application's credentials, newest first, with whether each is live (UC-54).\nNever a secret or a hash.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "ApplicationCredential_List",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationCredentialListOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationCredentialListOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationCredentialListOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/applications/{id}/credentials/{credentialId}": {
      "delete": {
        "tags": [
          "ApplicationCredential"
        ],
        "summary": "Revokes one credential (UC-55). Its secret stops being exchanged at once, and every token\nalready issued from it fails the next live re-check (UC-57).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "ApplicationCredential_Revoke",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeApplicationCredentialCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeApplicationCredentialCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeApplicationCredentialCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/applications/token": {
      "post": {
        "tags": [
          "ApplicationToken"
        ],
        "summary": "Exchanges an application's secret for a token valid for ten minutes by default (UC-56).\nEvery refusal is the same 401, so the endpoint reveals nothing about which applications,\nscopes or credentials exist. Rate-limited per client address like the person sign-in.",
        "description": "**Anonymous** — no bearer token required.",
        "operationId": "ApplicationToken_IssueToken",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueApplicationTokenCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueApplicationTokenCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/IssueApplicationTokenCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/IssueApplicationTokenCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueApplicationTokenCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueApplicationTokenCommandOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/applications/self": {
      "get": {
        "tags": [
          "ApplicationToken"
        ],
        "summary": "Checks an application token live (UC-57), presented as `Authorization: Bearer …`.\nAnswers the application, its scope and the credential when the token is valid and all\nthree are still live; otherwise one 401. Anonymous to the middleware, which accepts only\nperson tokens: the handler validates the token itself.",
        "description": "**Anonymous** — no bearer token required.",
        "operationId": "ApplicationToken_Self",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationTokenCheckOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationTokenCheckOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationTokenCheckOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/audit-log": {
      "get": {
        "tags": [
          "Audit"
        ],
        "summary": "Lists the audit trail (UC-48, FR-AT-01/02), newest first. System Admin only. Every filter is\noptional and they combine: `from`/`to` bound when an entry was recorded (UTC,\ninclusive), `actorId` and `targetId` are public ids, `action` is the exact\ncommand type name (e.g. `CreateScopeCommand`), and `succeeded=false` lists only\nrefusals.",
        "description": "Entries are shown as stored. An actor the retention pass has cleared (NFR-21) is\n`null` and is never reconstructed, so filtering by `actorId` cannot find entries\nwhose attribution has been cleared. A Scope Admin is refused: the trail has no scope\ncolumn, and an old entry's target may be gone, so it cannot be divided by scope reliably.\nReading the trail is not itself audited.\n\n**Requires role:** System Admin.",
        "operationId": "Audit_List",
        "parameters": [
          {
            "name": "From",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "To",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "ActorId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Action",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "TargetId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Succeeded",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogEntryOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogEntryOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditLogEntryOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Authenticates a person by email and password and returns a token (UC-11, FR-AU-01…07). A\n`User` also sends the `PublicId` of their scope; a `ScopeAdmin` or\n`SystemAdmin` sends credentials only. Open to anonymous callers — this is where a\ncaller gets the token every other endpoint requires. Every rejection (AF-11a…AF-11e)\nanswers 401 alike, so the endpoint cannot be used to enumerate accounts.",
        "description": "**Anonymous** — no bearer token required.",
        "operationId": "Auth_Login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LoginCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginCommandOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/auth/password-recovery": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Requests a password reset link (UC-12, FR-PR-01/02). A `User` also sends the\n`PublicId` of their scope; a `ScopeAdmin` or `SystemAdmin` sends the email\nalone. Open to anonymous callers — someone who has lost their password cannot hold a\ntoken.",
        "description": "Answers 200 with the same message whether or not the address belongs to anyone (AF-12a),\nso the endpoint cannot be used to enumerate accounts. The only rejection is a malformed\nrequest (400, NFR-10), which says nothing about who is registered.\n\n**Anonymous** — no bearer token required.",
        "operationId": "Auth_PasswordRecovery",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordRecoveryCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordRecoveryCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordRecoveryCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordRecoveryCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordRecoveryCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordRecoveryCommandOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/auth/register": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Registers a password `User` in a scope that has opened self-registration (UC-47,\nFR-SR-03…FR-SR-09). Open to anonymous callers — someone without an account cannot hold a\ntoken.",
        "description": "Answers 202 with the same message whether the address was free or taken (AF-47b), and in the\nsame time: a pending registration is written and its link mailed, or the holder told of the\nattempt, after the response, by `RegistrationDispatcher`. No `User` exists until\nthat link is followed (UC-14, FR-SR-07). A missing, deleted or closed scope answers 403\n(AF-47a); a malformed request 400 (AF-47c). Neither says anything about an address.\n\n**Anonymous** — no bearer token required.",
        "operationId": "Auth_Register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterCommandOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/auth/password-reset": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Sets a new password from the reset token mailed by UC-12 (UC-13, FR-PR-03/04). Open to\nanonymous callers for the same reason: the token is the only credential someone who has\nlost their password can present.",
        "description": "Unlike the two endpoints above, each rejection is named — unknown (AF-13c), expired\n(AF-13a), and spent (AF-13b) tokens all answer 400 with their own message, as does a\nmalformed request (AF-13d). Nothing is disclosed by the distinction: the token identifies\nno account to a caller who does not already hold it. The account is checked again when the\nlink is followed (AF-13e, FR-PR-08): a person restricted, deleted or anonymised since it was\nmailed, or who can no longer sign in through their scope, gets exactly the unknown-token\nanswer, 400 \"Invalid token.\", and nothing is changed. A link mailed before the person's\naddress changed has been retired (FR-PE-17) and answers 400 \"Token already used.\".\n\n**Anonymous** — no bearer token required.",
        "operationId": "Auth_ResetPassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResetPasswordCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetPasswordCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResetPasswordCommandOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/auth/verify-email": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Confirms an email address from the verification token mailed at person creation (UC-14,\nFR-EV-03). Open to anonymous callers: the person reaches this from a link in their mail\nclient, where they hold no bearer token — and the point of the link is that they have not\nproved anything yet.",
        "description": "Each rejection is named, as UC-13's are — unknown (AF-14c), expired (AF-14a), and spent\n(AF-14b) tokens all answer 400 with their own message, as does a request carrying no token\nat all. An address that was already verified answers 200: UC-14 defines no alternative flow\nfor it, and the link did what it promised. As in UC-13, the account is checked when the link\nis followed (AF-14d, FR-EV-08): a person restricted, deleted or anonymised since it was\nmailed, or who can no longer sign in through their scope, gets 400 \"Invalid token.\", and\nnothing is changed. A link mailed before the person's address changed has been retired\n(FR-PE-17) and answers 400 \"Token already used.\".\n\nA token that names a UC-47 pending registration also needs `password`, the one chosen\n    at sign-up: without it the answer is 422, and with a wrong one 401, and either leaves the\n    registration in place — except that the 10th wrong password discards it, after which the\n    token answers 400 \"Invalid token\" (FR-SR-09). `password` is read only for pending\n    registrations and ignored for an ordinary verification token.\n\n**Anonymous** — no bearer token required.",
        "operationId": "Auth_VerifyEmail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyEmailCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyEmailCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyEmailCommandOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/auth/resend-verification": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Retires the caller's outstanding verification links and mails a fresh one (UC-15,\nFR-EV-04), for someone whose first link expired, was lost, or never arrived. The one\nauthenticated endpoint on this controller — and the reason it takes no request body: the\nperson is read from the bearer token, so a caller can only ever ask for their own link.",
        "description": "No `RoleRequirement`: the authorization matrix grants email verification to all three\nroles and withholds it from anonymous callers, which is exactly what authentication alone\nenforces. An address that is already verified answers 400 (AF-15a) — unlike UC-14's\nidempotent success, since a link mailed to a verified address could do nothing when clicked.\nA token naming a person who no longer exists answers 404: it was validated, but there is no\naddress left to send to. The send is charged to the person's account-email budget, shared\nwith a two-factor setup code and an own email change: one per\n`HEIMDALL_ADMIN_EMAIL_COOLDOWN_IN_SECONDS` (five minutes by default) and five per\nday-long window from the first. Inside the cooldown it answers 429 \"An email of this kind\nwas sent to you recently. Try again in a few minutes.\" (AF-15b); once the window's five are\nspent, 429 \"You have reached the limit for account emails. Try again later.\"\n(AF-15c). Both carry `Retry-After`, the seconds until a send would be accepted: the\ncooldown's end, or for the limit the later of the window's end and the cooldown's.\nNothing is sent either way. The\nendpoint is also under the credential endpoints' rate limit, whose 429 is \"Too many\nrequests.\" with a `Retry-After` header.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_ResendVerification",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResendVerificationEmailCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResendVerificationEmailCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResendVerificationEmailCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/google": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Signs a Google account up or in against a scope and returns a token (UC-25,\nFR-GO-03…FR-GO-13). The caller sends the ID token they obtained from Google and the\n`PublicId` of the scope they are entering; the first call for a given Google account\nin a given scope creates the Google User, every later one authenticates it. Open to\nanonymous callers for the same reason `login` is — this is where a Google User gets\nthe token every other endpoint requires. `nonce` is optional: the value the client\nsent Google when it asked for the ID token. When it is present, the token's `nonce`\nclaim must equal it exactly (AF-25g, FR-GO-20), a client-side check that the token it\npresents was issued for its own sign-in request; when it is absent or empty, nothing is\ncompared. Whether a token is accepted rests on its signature, issuer, audience and expiry.",
        "description": "The 401 flows answer alike (AF-25a, AF-25d, AF-25g) with \"Google authentication failed.\",\nas UC-11's do, so an anonymous caller cannot use the endpoint to learn which Google accounts\na scope has registered or which were deleted. AF-25b answers 403 for a missing, deleted, and\ndisabled scope alike — a scope is not enumerable through here either. A first sign-in whose\ntoken does not carry `email_verified: true` creates nothing and answers 403 \"Google\nsign-up requires a verified email address.\" (AF-25f, FR-GO-07), before the address is\ncompared with the scope's; a Google User that already exists signs in whatever the claim\nsays. AF-25c (409) is named, and it discloses nothing: the caller has proved the address is\ntheirs, and Google vouches for it.\n\n**Anonymous** — no bearer token required.",
        "operationId": "Auth_GoogleSignIn",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoogleSignInCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GoogleSignInCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GoogleSignInCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleSignInCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleSignInCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleSignInCommandOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/auth/google/sign-out": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Ends the caller's Google-authenticated session (UC-26, FR-GO-18). Takes no request body for\nthe reason `resend-verification` does not: the Google User is read from the bearer\ntoken, so a caller can only ever sign themselves out.",
        "description": "No `RoleRequirement`, deliberately. The authorization matrix grants Google sign-out to\na Google User acting on themselves and marks it not-applicable for both administrator roles\n— who can never be Google Users (FR-GO-04) — so the rule is \"the caller is a live Google\nUser\", which is data the attribute cannot see and the handler checks. It also keeps the\nendpoint to the two answers UC-26 defines: 200, or 401 for every rejection. A missing or\nmalformed token is the other half of AF-26a and never reaches here — authentication answers\nit with the same 401.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_GoogleSignOut",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleSignOutCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleSignOutCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleSignOutCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/2fa/enable": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Begins opting the caller into two-factor authentication (UC-36, FR-2F-01…FR-2F-03),\nselecting an authenticator-app method, an email method, or both. Setup stays inactive until\nconfirmed by UC-37. The person acted on is always the caller themselves — read from the\nbearer token, the same as M:ArturRios.Heimdall.WebApi.Controllers.AuthController.ResendVerification.",
        "description": "No `RoleRequirement`: the authorization matrix grants two-factor setup to all three\nperson roles (`User`, `ScopeAdmin`, `SystemAdmin`) and withholds it from\nanonymous callers, which is exactly what authentication alone enforces. AF-36b (Google User,\n403) is not a role the attribute can see — a Google-issued token names a\n`GoogleUser`, not a `Person` — so the handler enforces it by resolving the caller\nagainst the `Person` table itself. The request carries the caller's\n`currentPassword` (FR-2F-18), so the action sits under the credential endpoints' rate\nlimit, as `2fa/confirm` and `2fa/disable` do. Selecting `Email` mails a code,\ncharged to the account-email budget the verification resend uses: 429 \"An email of this\nkind was sent to you recently. Try again in a few minutes.\" inside the cooldown (AF-36f),\n429 \"You have reached the limit for account emails. Try again later.\" once the\nwindow's five are spent (AF-36g), both with `Retry-After`; it is checked before the\npassword and charged only after it. Selecting\n`App` alone is never held back by it. A missing\nor wrong password answers 401 \"The password or code is incorrect.\", and is charged to the\naccount's re-authentication budget (FR-AU-13): five failures within fifteen minutes pause\nthe check for fifteen minutes, with the same answer.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_EnableTwoFactorAuth",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnableTwoFactorAuthCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EnableTwoFactorAuthCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnableTwoFactorAuthCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EnableTwoFactorAuthCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnableTwoFactorAuthCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnableTwoFactorAuthCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/2fa/confirm": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Confirms the caller's pending two-factor authentication setup (UC-37, FR-2F-04/05), proving\ncontrol of every method selected in UC-36 — an `appCode` if `AppEnabled`, an\n`emailCode` if `EmailEnabled`, both if both. On success, activates the\nconfiguration and returns ten recovery codes in plaintext, exactly once: sixteen characters\nof Crockford's base32 (the digits and the uppercase letters but I, L, O and U), shown as\n`XXXX-XXXX-XXXX-XXXX` (FR-2F-20). The person acted on\nis always the caller themselves — read from the bearer token, the same as\nM:ArturRios.Heimdall.WebApi.Controllers.AuthController.EnableTwoFactorAuth(ArturRios.Heimdall.Command.Input.EnableTwoFactorAuthCommand).",
        "description": "No `RoleRequirement`, for the same reason M:ArturRios.Heimdall.WebApi.Controllers.AuthController.EnableTwoFactorAuth(ArturRios.Heimdall.Command.Input.EnableTwoFactorAuthCommand) has none:\nthe authorization matrix grants confirmation to all three person roles and withholds it from\nanonymous callers, which authentication alone already enforces. AF-37a's 404 covers both \"no\nsetup was ever initiated\" and \"the caller is a Google User\" alike — a Google-issued token\nnames a `GoogleUser`, never a row this lookup could find. A missing or wrong code for\neither method (AF-37b, AF-37c) answers 401 \"The password or code is incorrect.\", whichever\nit was, and is charged to the account's re-authentication budget (FR-AU-13), whose pause\nanswers the same.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_ConfirmTwoFactorAuth",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmTwoFactorAuthCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmTwoFactorAuthCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmTwoFactorAuthCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmTwoFactorAuthCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmTwoFactorAuthCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmTwoFactorAuthCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/2fa/verify": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Completes a 2FA-gated login (UC-38, FR-2F-09) by redeeming the challenge token AF-11g\nissued at login, together with an app/email code or a recovery code, for the full\nauthentication token. Open to anonymous callers — the caller holds no bearer token yet,\nonly the challenge token, which is submitted here as a plain request body field, exactly\nlike M:ArturRios.Heimdall.WebApi.Controllers.AuthController.ResetPassword(ArturRios.Heimdall.Command.Input.ResetPasswordCommand)'s token, never as an `Authorization` header.",
        "description": "AF-38a (invalid/expired challenge token) and AF-38b/AF-38c (wrong code, or a reused\nrecovery code) all answer the same 401 with the same message, so this endpoint cannot be\nused to distinguish a forged challenge from an expired one, or a wrong code from a\nrecovery code that was already spent. A recovery code is accepted with or without its\nhyphens, with spaces, and in any case, and an O, I or L in a sixteen-character code reads as\n0, 1 and 1; codes of the shorter `XXXX-XXXX` shape issued before keep working until used\nor regenerated (FR-2F-20). ArturRios.Heimdall.WebApi.Security.MfaPendingGuardFilter is what keeps a\nchallenge token from working anywhere else (FR-2F-10) — it never applies here, since this\naction never reads the challenge token as a bearer credential in the first place.\n\n**Anonymous** — no bearer token required.",
        "operationId": "Auth_VerifyTwoFactorAuth",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyTwoFactorAuthCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyTwoFactorAuthCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyTwoFactorAuthCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyTwoFactorAuthCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyTwoFactorAuthCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyTwoFactorAuthCommandOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/auth/2fa/challenge/resend": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Reissues the email code for a two-factor challenge that is still outstanding (UC-46,\nFR-2F-16), so someone who never received the code UC-11 mailed can ask for another\nwithout starting sign-in over. Open to anonymous callers and authorized by the challenge\ntoken alone, submitted as a request body field exactly as\nM:ArturRios.Heimdall.WebApi.Controllers.AuthController.VerifyTwoFactorAuth(ArturRios.Heimdall.Command.Input.VerifyTwoFactorAuthCommand) takes it — never as an `Authorization` header\n(FR-2F-10).",
        "description": "\nAnswers `200 OK` with the same message and no data on every path — a valid\n                    challenge, an unknown one, a forged one, an expired one, one naming a person with no\n                    email method, and one whose reissues are spent (AF-46a…AF-46e). A response that varied\n                    would tell an anonymous caller whether an address is registered and has email\n                    two-factor enabled, which is the question UC-11 and UC-38 collapse their own answers\n                    to refuse.\n\nThe reissue lands inside the existing challenge's window and never lengthens it: a\n                    new challenge token could only be returned for a challenge that was real, which would\n                    be exactly that oracle.\n\nRate-limited like every other anonymous auth route. The address is never the caller's\n                    to choose — it is read from the person the challenge token names — and FR-2F-13's cap\n                    already bounds how many codes one challenge can produce, so the limiter is not what\n                    stops this being a mail cannon. What it bounds is the unauthenticated request volume\n                    itself, which is the same thing it bounds on M:ArturRios.Heimdall.WebApi.Controllers.AuthController.Login(ArturRios.Heimdall.Command.Input.LoginCommand) and\n                    M:ArturRios.Heimdall.WebApi.Controllers.AuthController.PasswordRecovery(ArturRios.Heimdall.Command.Input.PasswordRecoveryCommand).\n\n**Anonymous** — no bearer token required.",
        "operationId": "Auth_ResendTwoFactorChallengeCode",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendTwoFactorChallengeCodeCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendTwoFactorChallengeCodeCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResendTwoFactorChallengeCodeCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ResendTwoFactorChallengeCodeCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResendTwoFactorChallengeCodeCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResendTwoFactorChallengeCodeCommandOutputDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/auth/2fa/disable": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Turns off the caller's own two-factor authentication (UC-39, FR-2F-11), requiring both the\ncaller's current password and a valid second factor — an app/email code or a recovery\ncode — exactly as hard to satisfy as a login. On success, permanently removes the\n`TWO_FACTOR_AUTH` row and its recovery codes. The person acted on is always the\ncaller themselves — read from the bearer token, the same as M:ArturRios.Heimdall.WebApi.Controllers.AuthController.EnableTwoFactorAuth(ArturRios.Heimdall.Command.Input.EnableTwoFactorAuthCommand).",
        "description": "No `RoleRequirement`, for the same reason M:ArturRios.Heimdall.WebApi.Controllers.AuthController.EnableTwoFactorAuth(ArturRios.Heimdall.Command.Input.EnableTwoFactorAuthCommand) has none:\nthe authorization matrix grants disabling two-factor authentication to all three person\nroles and withholds it from anonymous callers, which authentication alone already enforces.\nAF-39a answers 404 (not active). AF-39b and AF-39c — a wrong password and a wrong second\nfactor — answer the same 401, \"The password or code is incorrect.\", so the answer never\nsays which was wrong; a paused re-authentication budget (FR-AU-13) answers it too.\n`recoveryCode` is matched as `2fa/verify` matches it: `XXXX-XXXX-XXXX-XXXX`,\nwith or without hyphens, with spaces, in any case, an O, I or L read as 0, 1 and 1, and\nthe shorter `XXXX-XXXX` codes issued before still accepted (FR-2F-20).\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_DisableTwoFactorAuth",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisableTwoFactorAuthCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DisableTwoFactorAuthCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DisableTwoFactorAuthCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DisableTwoFactorAuthCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisableTwoFactorAuthCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisableTwoFactorAuthCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/2fa/recovery-codes/regenerate": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Invalidates the caller's current recovery codes and issues a fresh set of ten (UC-40,\nFR-2F-12), requiring a valid second factor — an app/email code or one of the caller's\nremaining recovery codes — verified exactly as M:ArturRios.Heimdall.WebApi.Controllers.AuthController.VerifyTwoFactorAuth(ArturRios.Heimdall.Command.Input.VerifyTwoFactorAuthCommand) verifies\none. On success, every existing `TWO_FACTOR_RECOVERY_CODE` row for the caller is\nremoved, including any still unused, and replaced with ten new ones of the current\n`XXXX-XXXX-XXXX-XXXX` shape (FR-2F-20) — which is also how a person holding the shorter\n`XXXX-XXXX` codes issued before gets the stronger ones. The person acted on is\nalways the caller themselves — read from the bearer token, the same as\nM:ArturRios.Heimdall.WebApi.Controllers.AuthController.EnableTwoFactorAuth(ArturRios.Heimdall.Command.Input.EnableTwoFactorAuthCommand).",
        "description": "No `RoleRequirement`, for the same reason M:ArturRios.Heimdall.WebApi.Controllers.AuthController.EnableTwoFactorAuth(ArturRios.Heimdall.Command.Input.EnableTwoFactorAuthCommand) has none:\nthe authorization matrix grants regenerating recovery codes to all three person roles and\nwithholds it from anonymous callers, which authentication alone already enforces. AF-40a\n(404, not active) reuses UC-39's \"not active\" message; AF-40b (401, second factor invalid,\nor a paused re-authentication budget, FR-AU-13) answers \"The password or code is\nincorrect.\", as every re-authentication does.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_RegenerateRecoveryCodes",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateRecoveryCodesCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateRecoveryCodesCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateRecoveryCodesCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RegenerateRecoveryCodesCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegenerateRecoveryCodesCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegenerateRecoveryCodesCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/data-export": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Returns a copy of everything held about the caller (UC-41, GDPR Art. 15 and 20, LGPD Art.\n18 II and V).",
        "description": "\nNo `RoleRequirement`: access and portability are rights of the data subject\n                    rather than privileges of a role, and a Google User has them as much as a person.\n\n<b>\n    `POST`, for a read.</b> Two reasons. A `GET` response is cacheable, and\n                    this one is a document containing everything about a person — exactly what must never\n                    sit in a proxy or browser cache. And the export is the highest-value action a stolen\n                    token can take, so it has to reach the audit trail, which in this codebase means\n                    being a command.\n\nThe subject is the token's. There is no path parameter and no body field naming an\n                    identity, so one caller cannot export another's data.\n\nReachable by a subject whose processing is restricted, or who is suspended pending\n                    erasure (NFR-24): the right to a copy does not depend on the account's standing.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_ExportMyData",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataExportCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/erasure-request": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Requests erasure of the caller's own identity (UC-42, GDPR Art. 17, LGPD Art. 18 VI).",
        "description": "\nNo `RoleRequirement`: every role, and a Google User, may ask to be erased — it is\n                    a right of the data subject rather than a privilege of a role. Authentication alone\n                    enforces what matters, which is that somebody is asking for themselves.\n\nThe subject is never named in the request. There is no path parameter and no body\n                    field for it, so the endpoint has no shape in which one identity could ask for\n                    another's erasure.\n\nThe body carries a credential, and which one depends on the caller: a person presents\n                    their password, a Google User a freshly issued Google ID token. A bearer token alone\n                    is not enough for an irreversible operation. Because it verifies a password, this\n                    endpoint is governed by NFR-18 rather than NFR-05.\n\nReachable by a subject whose processing is restricted (NFR-24), and a successful request\n                    lifts that restriction — without the Art. 18(3) notice, since the subject is lifting\n                    their own — so the erasure is not held behind it; `restrictionLifted` in the\n                    response says whether it did. A suspended identity\n                    reaches the handler too, and is answered by AF-42c (409) if it asked already, AF-42b\n                    (403) otherwise.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_RequestErasure",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestErasureCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestErasureCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestErasureCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RequestErasureCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestErasureCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestErasureCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/processing-restriction": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Restricts processing of the caller's own identity (UC-44, GDPR Art. 18, LGPD Art. 18\nIII–IV) — suspended without being deleted, while something about it is disputed.",
        "description": "No credential is required, unlike UC-42's erasure request. A restriction destroys\nnothing and is liftable, and somebody asking for one may be doing so precisely because\nthey believe the account is compromised — demanding the password of a person in that\nposition would be the wrong way round. Reachable by a suspended subject (UC-44), and by a\nrestricted one, who is answered by AF-44a (409).\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_RestrictProcessing",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestrictProcessingCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RestrictProcessingCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RestrictProcessingCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RestrictProcessingCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestrictProcessingCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestrictProcessingCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/erasure-reconciliation": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Re-applies erasure to identities a database restore brought back (NFR-25). System Admin\nonly.",
        "description": "A step in the restore runbook rather than an everyday operation. The identifiers come\nfrom the erasure ledger the anonymisation pass writes to the logs, which is the only copy\na restore cannot roll back.\n\n**Requires role:** System Admin.",
        "operationId": "Auth_ReapplyErasures",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReapplyErasuresCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReapplyErasuresCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReapplyErasuresCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ReapplyErasuresCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReapplyErasuresCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReapplyErasuresCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/processing-restriction/lift": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Lifts a restriction on processing (UC-45, GDPR Art. 18(3)).",
        "description": "No `RoleRequirement`, because the rule is data-dependent: a subject of any role may\nlift their own, and only a System Admin may lift somebody else's. The handler decides,\nand it informs the subject first in the second case — Art. 18(3) makes that a\nprecondition of the act rather than a courtesy afterwards, so a failed notification\nrefuses the lift. The subject can reach this with a restricted identity — it is how they\nlift their own (NFR-24) — but a System Admin who is restricted or suspended may not lift\nanyone else's (AF-45c, 403).\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_LiftProcessingRestriction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LiftProcessingRestrictionCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LiftProcessingRestrictionCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LiftProcessingRestrictionCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LiftProcessingRestrictionCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiftProcessingRestrictionCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiftProcessingRestrictionCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/erasure-requests": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Lists the erasure requests that have not yet been carried out (UC-43). System Admin only.",
        "description": "A Scope Admin is deliberately excluded, though they administer their scope's users: which\nof them has asked to be erased is not something the request entitles anyone to know, and\nmost requests need no human at all. This queue exists for the ones NFR-12 blocks, which\nneed an owner transferred before they can proceed.\n\n**Requires role:** System Admin.",
        "operationId": "Auth_ListErasureRequests",
        "parameters": [
          {
            "name": "OverdueOnly",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErasureRequestOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErasureRequestOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErasureRequestOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/auth/2fa": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Reports the caller's own two-factor authentication status (FR-2F-15): whether it is\nactive, which methods are configured, and how many recovery codes remain unused. The\nperson read is always the caller themselves — taken from the bearer token, the same as\nM:ArturRios.Heimdall.WebApi.Controllers.AuthController.EnableTwoFactorAuth(ArturRios.Heimdall.Command.Input.EnableTwoFactorAuthCommand) — so a configuration is never addressed by an\nidentifier in a path.",
        "description": "No `RoleRequirement`, for the same reason its `POST` siblings have none: the\nauthorization matrix grants two-factor management to all three person roles and withholds\nit from anonymous callers, which authentication alone enforces. A caller with no\nconfiguration is answered 200 with every flag false; a Google User is answered 403, since\nFR-2F-01 makes them permanently ineligible.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Auth_GetTwoFactorStatus",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorStatusOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorStatusOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TwoFactorStatusOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/google-users": {
      "get": {
        "tags": [
          "GoogleUser"
        ],
        "summary": "Lists the Google Users of a scope, with pagination and optional name/email filters (UC-27,\nFR-GO-14). A System Admin or an owner of the scope may call it; the ownership check\n(AF-27b) is enforced by the handler from the acting caller.",
        "description": "Unlike M:ArturRios.Heimdall.WebApi.Controllers.GoogleUserController.GetById(System.Guid,System.Guid,System.Boolean) this does carry a `RoleRequirement`: the authorization\nmatrix grants a Google User a read of themselves, never a listing, so every `User` is\nrefused here before the handler runs.\n\n**Requires role:** System Admin or Scope Admin.",
        "operationId": "GoogleUser_List",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleUserOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleUserOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleUserOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/google-users/{id}": {
      "get": {
        "tags": [
          "GoogleUser"
        ],
        "summary": "Retrieves a single Google User by its public identifier within a scope (UC-27, FR-GO-14).",
        "description": "Open to any authenticated actor, deliberately. UC-27 names a Google User as one of its\nthree actors — they may read their own record — and a Google User's token carries the\n`User` role (FR-GO-04), so any attribute strong enough to keep other Users out would\nlock out the actor the use case grants. The per-actor rule (AF-27b) is data-dependent and\nis therefore the handler's, as UC-07's by-id read is.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "GoogleUser_GetById",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleUserOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleUserOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoogleUserOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "GoogleUser"
        ],
        "summary": "Logically deletes a Google User by setting `IsDeleted = true` (UC-28, FR-GO-15). The\nattribute keeps every `User` out — the authorization matrix withholds this from them,\nGoogle or password alike — while the rule that depends on data it cannot see is the\nhandler's: whether the acting Scope Admin owns the Google User's scope (AF-28c).",
        "description": "Unlike M:ArturRios.Heimdall.WebApi.Controllers.GoogleUserController.GetById(System.Guid,System.Guid,System.Boolean) there is no actor a role attribute would wrongly exclude\nhere, which is why this one carries the attribute the by-id read cannot.\n\n**Requires role:** System Admin or Scope Admin.",
        "operationId": "GoogleUser_Delete",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteGoogleUserCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteGoogleUserCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteGoogleUserCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/google-users/{id}/hard": {
      "delete": {
        "tags": [
          "GoogleUser"
        ],
        "summary": "Permanently (hard) deletes a Google User, removing the record for good (UC-29, FR-GO-16).\nRestricted to System Admins — the authorization matrix withholds this even from an owning\nScope Admin, who may only delete logically (UC-28).",
        "description": "The one Google User endpoint where the attribute is the whole authorization rule: UC-29\nnames a single actor and nothing about the decision depends on data, so the handler applies\nnone and the command carries no acting person. Nothing cascades either — a Google User owns\nno dependent row.\n\n**Requires role:** System Admin.",
        "operationId": "GoogleUser_HardDelete",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteGoogleUserCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteGoogleUserCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteGoogleUserCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/healthcheck": {
      "get": {
        "tags": [
          "HealthCheck"
        ],
        "summary": "Basic liveness check (UC-30, FR-HC-01): confirms the API process is up and responding.\nPublic — no authentication required.",
        "description": "**Anonymous** — no bearer token required.",
        "operationId": "HealthCheck_HelloWorld",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringDataOutput"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/healthcheck/detailed": {
      "get": {
        "tags": [
          "HealthCheck"
        ],
        "summary": "Detailed health check (UC-30, FR-HC-02…07): reports the status of each verified service\nplus an aggregate general status. Restricted to System Admins (AF-30a → 403, AF-30b → 401).\nReturns `200 OK` when healthy and `503 Service Unavailable` when any verified\nservice is down (FR-HC-07, AF-30c).",
        "description": "**Requires role:** System Admin.",
        "operationId": "HealthCheck_Detailed",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/HealthCheckOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthCheckOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthCheckOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/persons": {
      "post": {
        "tags": [
          "Person"
        ],
        "summary": "Creates a `ScopeAdmin` or `SystemAdmin` person with no scope (UC-06 path b).\nRestricted to System Admins (AF-06c).",
        "description": "Derives an Argon2id hash, so it is limited to thirty requests a minute per acting person and\nthirty per address; a rejection answers 429 \"Too many requests.\" with a `Retry-After`\nheader.\n\n**Requires role:** System Admin.",
        "operationId": "Person_CreateAdmin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdminCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdminCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAdminCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/persons": {
      "post": {
        "tags": [
          "Person"
        ],
        "summary": "Creates a `User` within a scope (UC-06 path a). A System Admin or an owner of the scope\nmay call it; the ownership check (AF-06e) is enforced by the handler from the acting user.",
        "description": "Derives an Argon2id hash, so it is limited to thirty requests a minute per acting person and\nthirty per address; a rejection answers 429 \"Too many requests.\" with a `Retry-After`\nheader.\n\n**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_CreateUser",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Person"
        ],
        "summary": "Lists the `User` persons of a scope (UC-07, FR-PE-04). A System Admin or an owner of\nthe scope may call it; the ownership check (AF-07b) is enforced by the handler from the\nacting user. `ownedScopeIds` is trimmed for a Scope Admin as on\n`GET /api/persons/{id}` (FR-PE-19).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_ListScopePersons",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/owners": {
      "post": {
        "tags": [
          "Person"
        ],
        "summary": "Creates a brand-new `ScopeAdmin` person directly as a co-owner of a scope (UC-06 path\nc, FR-SC-12). A System Admin or an owner of the scope may call it; the ownership check\n(AF-06e) is enforced by the handler from the acting user.",
        "description": "Derives an Argon2id hash, so it is limited to thirty requests a minute per acting person and\nthirty per address; a rejection answers 429 \"Too many requests.\" with a `Retry-After`\nheader.\n\n**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_CreateScopeOwner",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopeOwnerCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopeOwnerCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopeOwnerCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePersonCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Person"
        ],
        "summary": "Lists the owners of a scope (UC-07, FR-PE-04). A System Admin or an\nowner of the scope may call it; the ownership check (AF-07b) is enforced by the handler\nfrom the acting user. For a Scope Admin each owner's `ownedScopeIds` lists only the\nscopes the caller owns too, this one among them; a System Admin sees them all (FR-PE-19).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_ListScopeOwners",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/owners/{personId}": {
      "post": {
        "tags": [
          "Person"
        ],
        "summary": "Adds an existing `ScopeAdmin` or `SystemAdmin` person as an additional owner\nof a scope (UC-21, FR-SC-08/FR-SC-09). The attribute keeps a `User` out — they can\nnever be a System Admin nor an existing owner — while the rules that depend on data it\ncannot see are the handler's: whether the acting Scope Admin owns this scope (AF-21c),\nwhether the scope is active (AF-21a), whether the named person is a usable administrator\n(AF-21b), and whether they already own it (AF-21d).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_AddScopeOwner",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "personId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AddScopeOwnerCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddScopeOwnerCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddScopeOwnerCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Person"
        ],
        "summary": "Removes a person's ownership of a scope (UC-22, FR-SC-08/FR-SC-10). The attribute keeps a\n`User` out — they can never be a System Admin nor an existing owner — while the rules\nthat depend on data it cannot see are the handler's: whether the acting Scope Admin owns\nthis scope (AF-22c), whether the scope is active and the named person actually owns it\n(AF-22a), and whether the scope would be left without an owner (AF-22b, NFR-12).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_RemoveScopeOwner",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "personId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RemoveScopeOwnerCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemoveScopeOwnerCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemoveScopeOwnerCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/users/{personId}/promote": {
      "post": {
        "tags": [
          "Person"
        ],
        "summary": "Promotes an existing `User` of a scope to `ScopeAdmin`, making them a co-owner of\nthat scope (UC-23, FR-SC-08/FR-SC-13/FR-RO-03). The attribute keeps a `User` out —\nthey can never be a System Admin nor an existing owner — while the rules that depend on\ndata it cannot see are the handler's: whether the acting Scope Admin owns this scope\n(AF-23c), whether the scope is active (AF-23a), whether the named person is a `User`\nof it (AF-23b), and whether they already hold the role (AF-23d).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_PromoteScopeUser",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "personId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PromoteScopeUserCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromoteScopeUserCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromoteScopeUserCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/persons/{id}": {
      "put": {
        "tags": [
          "Person"
        ],
        "summary": "Updates a person's name and email, and — for a System Admin — their role (UC-08). Open to\nany authenticated actor because a User may update their own record; the per-actor rule and\nthe role-change restriction (AF-08c) are enforced by the handler. The response's\n`ownedScopeIds` follows FR-PE-19, as `GET /api/persons/{id}` does.",
        "description": "A caller changing their own email presents `currentPassword`, and `twoFactorCode`\nwhen their second factor is active (FR-PE-14) — six digits for an authenticator-app code,\nor a recovery code, matched as `2fa/verify` matches one (`XXXX-XXXX-XXXX-XXXX`,\nhyphens, spaces and case ignored, the shorter `XXXX-XXXX` codes still accepted,\nFR-2F-20) — so this action verifies a password like the\ncredential endpoints do, and sits under their rate limit (NFR-18), as every\npassword-verifying endpoint does. An own email change mails the previous address, so it is\ncharged to the person's account-email budget once the credentials are accepted: 429 \"An\nemail of this kind was sent to you recently. Try again in a few minutes.\" inside the\ncooldown, 429 \"You have reached the limit for account emails. Try again later.\" once\nthe window's five are spent (AF-08j), both with `Retry-After`; nothing changes then, and\nno recovery or email code is spent (an accepted authenticator code's time step is recorded,\nas for any accepted code). While the caller's email sign-in method is enabled, an own\nemail change answers 409 \"Turn off the email sign-in method before changing your email\naddress.\" (AF-08k), once the credentials are accepted.\n\n**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Person_Update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePersonCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePersonCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePersonCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePersonCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePersonCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePersonCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Person"
        ],
        "summary": "Logically deletes a person by setting `IsDeleted = true` (UC-09, FR-PE-06). The\nattribute keeps a plain `User` out; the owner rule (AF-09c) is data-dependent and is\ntherefore enforced by the handler, as are the self-deletion (AF-09d) and last-owner\n(AF-09e) refusals.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_Delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeletePersonCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletePersonCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletePersonCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Person"
        ],
        "summary": "Retrieves a single person by their public identifier (UC-07, FR-PE-03). Open to any\nauthenticated actor; the per-actor visibility rule (AF-07b) is data-dependent and is\ntherefore enforced by the handler. `ownedScopeIds` lists every scope the person owns\nfor a System Admin and for the person themselves; a Scope Admin reading somebody else sees\nonly the scopes they own too (FR-PE-19).",
        "description": "**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Person_GetById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/persons/{id}/hard": {
      "delete": {
        "tags": [
          "Person"
        ],
        "summary": "Permanently (hard) deletes a person, removing the applications they own, their password\nreset and email verification tokens, and their scope membership/ownership rows (UC-10,\nFR-PE-07). Restricted to System Admins; the self-deletion refusal (AF-10c) and the\nlast-owner guard (AF-10b) are enforced by the handler.",
        "description": "**Requires role:** System Admin.",
        "operationId": "Person_HardDelete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeletePersonCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeletePersonCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeletePersonCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/persons/scope-admins": {
      "get": {
        "tags": [
          "Person"
        ],
        "summary": "Lists the administrators who may own a scope (UC-07 read d, FR-PE-12) — every\n`ScopeAdmin`, and for a System Admin caller every `SystemAdmin` too — projected to\nidentifier, name, and email: the source for an owner picker. A System Admin or a Scope\nAdmin may call it. Optionally excludes the current owners of a named scope, in which case\nthe handler requires the caller to be entitled to manage that scope.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_ListScopeAdmins",
        "parameters": [
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ExcludeOwnersOfScopeId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PersonSummaryOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonSummaryOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonSummaryOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/persons/system-admins": {
      "get": {
        "tags": [
          "Person"
        ],
        "summary": "Lists the system's `SystemAdmin` persons (UC-07 read e, FR-PE-13), projected to\nidentifier, name, and email: who else holds full access to the deployment. System Admin\nonly.",
        "description": "A Scope Admin is deliberately excluded: a System Admin's address is not tenant-facing,\nwhich is also why `GET /api/persons/scope-admins` offers System Admins only to a\nSystem Admin caller.\n\n**Requires role:** System Admin.",
        "operationId": "Person_ListSystemAdmins",
        "parameters": [
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PersonSummaryOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonSummaryOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonSummaryOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/persons/{id}/verification-email": {
      "post": {
        "tags": [
          "Person"
        ],
        "summary": "Has a fresh verification link mailed to a person's own address (UC-51, FR-EV-06): outstanding\nlinks are retired first, as UC-15 does, and the link uses the scope's verification URL. A\nSystem Admin may ask for any person; a Scope Admin only for a `User` of a scope they own\n(AF-51b). No body; the token is never returned.",
        "description": "Refused when the person is deleted or restricted (409, AF-51c) or already verified (400,\nAF-51d), and with 429 when an email of this kind went to them within the cooldown,\n`HEIMDALL_ADMIN_EMAIL_COOLDOWN_IN_SECONDS` (five minutes by default, AF-51e). 200 means\nthe email was handed to the sender.\n\n**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_SendVerificationEmail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SendPersonVerificationEmailCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendPersonVerificationEmailCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendPersonVerificationEmailCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/persons/{id}/password-reset": {
      "post": {
        "tags": [
          "Person"
        ],
        "summary": "Has a password-reset link mailed to a person's own address (UC-52, FR-PR-05). A System Admin\nmay ask for any person; a Scope Admin only for a `User` of a scope they own (AF-52b). No\nbody; neither a token nor a password is accepted or returned.",
        "description": "Eligibility is UC-12's: refused (409) when the person is deleted or restricted (AF-52c) or\ntheir account could not sign in — a User whose scope is deleted, a Scope Admin with no live\nscope (AF-52d). 429 when a reset went to them within the cooldown (AF-52e). Unlike UC-12 the\nsend is not queued: the caller is authenticated and owed a real answer. 200 means the email\nwas handed to the sender.\n\n**Requires role:** System Admin or Scope Admin.",
        "operationId": "Person_SendPasswordReset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SendPersonPasswordResetCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendPersonPasswordResetCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendPersonPasswordResetCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes": {
      "post": {
        "tags": [
          "Scope"
        ],
        "summary": "Creates a new scope with one or more initial owners (UC-01). Restricted to System Admins.",
        "description": "**Requires role:** System Admin.",
        "operationId": "Scope_Create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopeCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopeCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopeCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScopeCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScopeCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScopeCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Scope"
        ],
        "summary": "Lists scopes with pagination and optional filtering (UC-02 read b). A System Admin lists\nevery scope; a Scope Admin only the scopes they own, with the total counting those alone.",
        "description": "Ownership is read from the database rather than the token's owned-scope claim, so an owner\nremoved from a scope stops seeing it at once. A `User` has one scope and reads it by\nid, so the collection is refused to them (403).\n\n**Requires role:** System Admin or Scope Admin.",
        "operationId": "Scope_List",
        "parameters": [
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ScopeOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopeOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopeOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{id}": {
      "put": {
        "tags": [
          "Scope"
        ],
        "summary": "Updates an existing scope's name and description (UC-03). Restricted to System Admins.",
        "description": "**Requires role:** System Admin.",
        "operationId": "Scope_Update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScopeCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScopeCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScopeCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateScopeCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateScopeCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateScopeCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Scope"
        ],
        "summary": "Logically deletes a scope, cascading to its Users, Google Users, and applications (UC-04).\nRestricted to System Admins.",
        "description": "**Requires role:** System Admin.",
        "operationId": "Scope_Delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteScopeCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteScopeCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteScopeCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "Scope"
        ],
        "summary": "Retrieves a single scope by its public identifier (UC-02). Open to any authenticated actor\nbecause a Scope Admin reads the scopes they own and a User the scope they belong to; that\nper-actor visibility rule (AF-02b) is data-dependent and is therefore enforced by the\nhandler.",
        "description": "**Any authenticated caller** — the handler decides who may act, so no role is required at the door.",
        "operationId": "Scope_GetById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ScopeOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopeOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopeOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{id}/hard": {
      "delete": {
        "tags": [
          "Scope"
        ],
        "summary": "Permanently (hard) deletes a scope, removing its Users, Google Users, applications,\nscope permissions, and ownership/membership join rows (UC-05). Restricted to System\nAdmins.",
        "description": "**Requires role:** System Admin.",
        "operationId": "Scope_HardDelete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteScopeCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteScopeCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteScopeCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{id}/google-signin": {
      "put": {
        "tags": [
          "Scope"
        ],
        "summary": "Turns Google Sign-In on or off for a scope (UC-24, FR-GO-01/FR-GO-02). The attribute keeps\na `User` out — they can never be a System Admin nor an existing owner — while the\nrules that depend on data it cannot see are the handler's: whether the acting Scope Admin\nowns this scope (AF-24b) and whether the scope is active (AF-24a).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Scope_SetGoogleSignIn",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetGoogleSignInCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetGoogleSignInCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetGoogleSignInCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SetGoogleSignInCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetGoogleSignInCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetGoogleSignInCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{id}/self-registration": {
      "put": {
        "tags": [
          "Scope"
        ],
        "summary": "Opens or closes anonymous self-registration for a scope (UC-47 toggle, FR-SR-02). Same\nactors and refusals as the Google Sign-In toggle (UC-24).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Scope_SetSelfRegistration",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetSelfRegistrationCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetSelfRegistrationCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetSelfRegistrationCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SetSelfRegistrationCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetSelfRegistrationCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetSelfRegistrationCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{id}/email-links": {
      "put": {
        "tags": [
          "Scope"
        ],
        "summary": "Sets the base links the scope's verification and password-reset emails point at. A client\nsystem with its own screens for those steps points its users there; a link left out, or\nsent as null or empty, is cleared and the global one applies again. Same actors and\nrefusals as the self-registration toggle.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Scope_SetEmailLinks",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetScopeEmailLinksCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetScopeEmailLinksCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetScopeEmailLinksCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SetScopeEmailLinksCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetScopeEmailLinksCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetScopeEmailLinksCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{id}/pending-registrations": {
      "get": {
        "tags": [
          "Scope"
        ],
        "summary": "Lists the scope's self-registrations awaiting confirmation (UC-49, FR-SR-11), newest first:\neach one's id, name, address, when it was stored and expires, how many wrong passwords it\nmay still take, and whether it has already expired. Never the password hash, salt or token.\nThe attribute keeps a `User` out; whether the acting Scope Admin owns the scope\n(AF-49b) and whether the scope is live (AF-49a) are the handler's.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Scope_ListPendingRegistrations",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PendingRegistrationOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingRegistrationOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingRegistrationOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{id}/pending-registrations/{registrationId}": {
      "delete": {
        "tags": [
          "Scope"
        ],
        "summary": "Discards one of the scope's self-registrations awaiting confirmation (UC-50, FR-SR-12). Its\nlink stops working — following it answers as for any unknown token — and the registrant may\nsign up again. Same actors as the listing; a registration of another scope answers 404 exactly\nlike a missing one (AF-50c).",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "Scope_DiscardPendingRegistration",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "registrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DiscardPendingRegistrationCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscardPendingRegistrationCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscardPendingRegistrationCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/permissions": {
      "post": {
        "tags": [
          "ScopePermission"
        ],
        "summary": "Creates a scope-specific permission within a scope (UC-31, FR-SP-01/02). Only a System Admin\nor a Scope Admin may call it: the endpoint's `[RoleRequirement]` refuses a `User`,\nwho has no standing to manage a scope's permissions. The remaining rules depend on data the\nattribute cannot see and are enforced by the handler — the target scope must exist and be\nactive (AF-31a), the input must be well-formed (AF-31d), and an acting Scope Admin must own\nthe scope (AF-31e). A scope permission has no owner of its own, so owning the scope is the\nwhole of the authorization.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "ScopePermission_Create",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopePermissionCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopePermissionCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScopePermissionCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScopePermissionCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScopePermissionCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScopePermissionCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "ScopePermission"
        ],
        "summary": "Lists the permissions of a scope (UC-32, FR-SP-05/09). A System Admin sees every\npermission in the scope; a Scope Admin must own the scope (AF-32e) and then sees every\npermission in it — a scope permission has no owner of its own, so there is no per-owner\nnarrowing. Both the ownership gate and the scope lookup are enforced by the handler from\nthe acting user; a missing or logically deleted scope reuses AF-31a.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "ScopePermission_List",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ScopePermissionOutputPaginatedOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopePermissionOutputPaginatedOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopePermissionOutputPaginatedOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/permissions/{id}": {
      "get": {
        "tags": [
          "ScopePermission"
        ],
        "summary": "Retrieves a single scope permission by its public identifier within the scope (UC-32,\nFR-SP-04/09). A `User` is refused by the attribute; among the remaining actors the\nrule is data-dependent and lives in the handler — a System Admin sees any permission, a\nScope Admin only one whose scope they own (AF-32e). A permission that does not exist under\nthe addressed scope, or that is logically deleted and was not explicitly requested, is\nAF-32a.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "ScopePermission_GetById",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ScopePermissionOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopePermissionOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScopePermissionOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "ScopePermission"
        ],
        "summary": "Updates a scope permission's name, description, and JWT-claim flag (UC-33, FR-SP-06). A\n`User` is refused by the attribute; among the remaining actors the rule is\ndata-dependent and lives in the handler — a System Admin updates any permission, a Scope\nAdmin only one whose scope they own (AF-33e). The handler resolves the permission inside\nthe addressed scope (AF-33a) and validates the input shape, reusing UC-31's messages.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "ScopePermission_Update",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScopePermissionCommand"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScopePermissionCommand"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScopePermissionCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateScopePermissionCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateScopePermissionCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateScopePermissionCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "ScopePermission"
        ],
        "summary": "Logically deletes a scope permission by setting `IsDeleted = true` (UC-34, FR-SP-07).\nA `User` is refused by the attribute; among the remaining actors the rule is\ndata-dependent and lives in the handler — a System Admin deletes any permission, a Scope\nAdmin only one whose scope they own (AF-34e). The handler resolves the permission inside\nthe addressed scope (AF-34a) and answers an already-deleted permission idempotently\n(AF-34b). Nothing cascades: a scope permission owns no dependent row.",
        "description": "**Requires role:** System Admin or Scope Admin.",
        "operationId": "ScopePermission_Delete",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteScopePermissionCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteScopePermissionCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteScopePermissionCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/scopes/{scopeId}/permissions/{id}/hard": {
      "delete": {
        "tags": [
          "ScopePermission"
        ],
        "summary": "Permanently (hard) deletes a scope permission, removing the record from the database\n(UC-35, FR-SP-08). Restricted to System Admins: a Scope Admin may logically delete a\npermission in a scope they own (UC-34), but never purge it, so the attribute settles\nauthorization on its own and the handler applies no further rule. The handler resolves the\npermission inside the addressed scope in any deletion state and reports AF-35a when it\ndoes not exist — which includes a repeated call, as the removal leaves nothing to find.\nNothing cascades: the permission's scope is untouched.",
        "description": "**Requires role:** System Admin.",
        "operationId": "ScopePermission_HardDelete",
        "parameters": [
          {
            "name": "scopeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteScopePermissionCommandOutputDataOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteScopePermissionCommandOutputDataOutput"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/HardDeleteScopePermissionCommandOutputDataOutput"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, malformed, expired, or is a 2FA challenge token."
          },
          "403": {
            "description": "The token is valid but the caller does not hold a required role."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AddScopeOwnerCommandOutput": {
        "type": "object",
        "properties": {
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          },
          "alreadyOwner": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "AddScopeOwnerCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/AddScopeOwnerCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "ApplicationCredentialListOutput": {
        "type": "object",
        "properties": {
          "credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCredentialOutput"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ApplicationCredentialListOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ApplicationCredentialListOutput"
          }
        },
        "additionalProperties": false
      },
      "ApplicationCredentialOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "live": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ApplicationOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "isDeleted": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ApplicationOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ApplicationOutput"
          }
        },
        "additionalProperties": false
      },
      "ApplicationOutputPaginatedOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationOutput"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ApplicationTokenCheckOutput": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "credentialId": {
            "type": "string",
            "format": "uuid"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ApplicationTokenCheckOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ApplicationTokenCheckOutput"
          }
        },
        "additionalProperties": false
      },
      "AuditLogEntryOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time"
          },
          "actorId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "actorRole": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "action": {
            "type": "string",
            "nullable": true
          },
          "targetId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "succeeded": {
            "type": "boolean"
          },
          "failureReason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AuditLogEntryOutputPaginatedOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLogEntryOutput"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ConfirmTwoFactorAuthCommand": {
        "type": "object",
        "properties": {
          "appCode": {
            "type": "string",
            "nullable": true
          },
          "emailCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConfirmTwoFactorAuthCommandOutput": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "recoveryCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConfirmTwoFactorAuthCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ConfirmTwoFactorAuthCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "CreateAdminCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "CreateApplicationCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "CreateApplicationCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CreateApplicationCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/CreateApplicationCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "CreatePersonCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "scopeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CreatePersonCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/CreatePersonCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "CreateScopeCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "ownerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateScopeCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "googleSignInEnabled": {
            "type": "boolean"
          },
          "selfRegistrationEnabled": {
            "type": "boolean"
          },
          "emailVerificationUrl": {
            "type": "string",
            "nullable": true
          },
          "passwordResetUrl": {
            "type": "string",
            "nullable": true
          },
          "ownerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CreateScopeCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/CreateScopeCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "CreateScopeOwnerCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateScopePermissionCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "includeAsJwtClaim": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CreateScopePermissionCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "includeAsJwtClaim": {
            "type": "boolean"
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CreateScopePermissionCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/CreateScopePermissionCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "CreateUserCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataExportApplication": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "isDeleted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DataExportAuditEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "action": {
            "type": "string",
            "nullable": true
          },
          "targetId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "succeeded": {
            "type": "boolean"
          },
          "failureReason": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "DataExportCommandOutput": {
        "required": [
          "processing",
          "security",
          "subject"
        ],
        "type": "object",
        "properties": {
          "exportedAt": {
            "type": "string",
            "format": "date-time"
          },
          "subject": {
            "$ref": "#/components/schemas/DataExportSubject"
          },
          "security": {
            "$ref": "#/components/schemas/DataExportSecurity"
          },
          "processing": {
            "$ref": "#/components/schemas/DataExportProcessing"
          },
          "erasure": {
            "$ref": "#/components/schemas/DataExportErasure"
          },
          "scopeMemberships": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "scopeOwnerships": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataExportApplication"
            },
            "nullable": true
          },
          "auditEntries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataExportAuditEntry"
            },
            "nullable": true
          },
          "auditEntriesTruncated": {
            "type": "boolean"
          },
          "withheld": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataExportWithheld"
            },
            "nullable": true
          },
          "recipients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataExportRecipient"
            },
            "nullable": true
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataExportSource"
            },
            "nullable": true
          },
          "retention": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataExportRetention"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataExportCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/DataExportCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "DataExportErasure": {
        "type": "object",
        "properties": {
          "isDeleted": {
            "type": "boolean"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deletionKind": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "anonymisedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "erasureRequestedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "erasureDueAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "erasureBlockedReason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataExportProcessing": {
        "type": "object",
        "properties": {
          "legalBasis": {
            "type": "integer",
            "format": "int32"
          },
          "legalBasisName": {
            "type": "string",
            "nullable": true
          },
          "privacyNoticeVersion": {
            "type": "string",
            "nullable": true
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataExportRecipient": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "purpose": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataExportRetention": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "nullable": true
          },
          "period": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataExportSecurity": {
        "type": "object",
        "properties": {
          "passwordSet": {
            "type": "boolean"
          },
          "twoFactorActive": {
            "type": "boolean"
          },
          "twoFactorAppEnabled": {
            "type": "boolean"
          },
          "twoFactorEmailEnabled": {
            "type": "boolean"
          },
          "unusedRecoveryCodes": {
            "type": "integer",
            "format": "int32"
          },
          "failedLoginAttempts": {
            "type": "integer",
            "format": "int32"
          },
          "lockedOutUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "failedSecondFactorAttempts": {
            "type": "integer",
            "format": "int32"
          },
          "secondFactorLockedOutUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "secondFactorLockouts": {
            "type": "integer",
            "format": "int32"
          },
          "failedReauthenticationAttempts": {
            "type": "integer",
            "format": "int32"
          },
          "reauthenticationWindowStartedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reauthenticationPausedUntil": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "accountEmailsSent": {
            "type": "integer",
            "format": "int32"
          },
          "accountEmailWindowEndsAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "accountEmailLastSentAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataExportSource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "provides": {
            "type": "string",
            "nullable": true
          },
          "dataSentThere": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataExportSubject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "emailVerified": {
            "type": "boolean"
          },
          "role": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "googleId": {
            "type": "string",
            "nullable": true
          },
          "profilePictureUrl": {
            "type": "string",
            "nullable": true
          },
          "isDeleted": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "DataExportWithheld": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeleteApplicationCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "alreadyDeleted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DeleteApplicationCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/DeleteApplicationCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "DeleteGoogleUserCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "alreadyDeleted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DeleteGoogleUserCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/DeleteGoogleUserCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "DeletePersonCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "alreadyDeleted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DeletePersonCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/DeletePersonCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "DeleteScopeCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "userCount": {
            "type": "integer",
            "format": "int32"
          },
          "googleUserCount": {
            "type": "integer",
            "format": "int32"
          },
          "applicationCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "DeleteScopeCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/DeleteScopeCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "DeleteScopePermissionCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "alreadyDeleted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DeleteScopePermissionCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/DeleteScopePermissionCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "DisableTwoFactorAuthCommand": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "recoveryCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DisableTwoFactorAuthCommandOutput": {
        "type": "object",
        "properties": {
          "disabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DisableTwoFactorAuthCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/DisableTwoFactorAuthCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "DiscardPendingRegistrationCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "DiscardPendingRegistrationCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/DiscardPendingRegistrationCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "EnableTwoFactorAuthCommand": {
        "type": "object",
        "properties": {
          "methods": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "currentPassword": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnableTwoFactorAuthCommandOutput": {
        "type": "object",
        "properties": {
          "otpAuthUri": {
            "type": "string",
            "nullable": true
          },
          "emailCodeSent": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnableTwoFactorAuthCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/EnableTwoFactorAuthCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "ErasureRequestOutput": {
        "type": "object",
        "properties": {
          "subjectId": {
            "type": "string",
            "format": "uuid"
          },
          "isGoogleUser": {
            "type": "boolean"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "overdue": {
            "type": "boolean"
          },
          "blockedReason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ErasureRequestOutputPaginatedOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErasureRequestOutput"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "GoogleSignInCommand": {
        "type": "object",
        "properties": {
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "idToken": {
            "type": "string",
            "nullable": true
          },
          "nonce": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GoogleSignInCommandOutput": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "processingRestricted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "GoogleSignInCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/GoogleSignInCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "GoogleSignOutCommandOutput": {
        "type": "object",
        "additionalProperties": false
      },
      "GoogleSignOutCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/GoogleSignOutCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "GoogleUserOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "googleId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "emailVerified": {
            "type": "boolean"
          },
          "profilePictureUrl": {
            "type": "string",
            "nullable": true
          },
          "isDeleted": {
            "type": "boolean"
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "GoogleUserOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/GoogleUserOutput"
          }
        },
        "additionalProperties": false
      },
      "GoogleUserOutputPaginatedOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GoogleUserOutput"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "HardDeleteApplicationCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "HardDeleteApplicationCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/HardDeleteApplicationCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "HardDeleteGoogleUserCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "HardDeleteGoogleUserCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/HardDeleteGoogleUserCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "HardDeletePersonCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deletedApplicationCount": {
            "type": "integer",
            "format": "int32"
          },
          "deletedTokenCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "HardDeletePersonCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/HardDeletePersonCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "HardDeleteScopeCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "userCount": {
            "type": "integer",
            "format": "int32"
          },
          "googleUserCount": {
            "type": "integer",
            "format": "int32"
          },
          "applicationCount": {
            "type": "integer",
            "format": "int32"
          },
          "scopePermissionCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "HardDeleteScopeCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/HardDeleteScopeCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "HardDeleteScopePermissionCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "HardDeleteScopePermissionCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/HardDeleteScopePermissionCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "HealthCheckOutput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceHealthOutput"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "HealthCheckOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/HealthCheckOutput"
          }
        },
        "additionalProperties": false
      },
      "IssueApplicationCredentialCommand": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IssueApplicationCredentialCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "secret": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IssueApplicationCredentialCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/IssueApplicationCredentialCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "IssueApplicationTokenCommand": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "format": "uuid"
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "secret": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IssueApplicationTokenCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "IssueApplicationTokenCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/IssueApplicationTokenCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "LiftProcessingRestrictionCommand": {
        "type": "object",
        "properties": {
          "subjectId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LiftProcessingRestrictionCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "liftedAt": {
            "type": "string",
            "format": "date-time"
          },
          "subjectNotified": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "LiftProcessingRestrictionCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/LiftProcessingRestrictionCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "LoginCommand": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "scopeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LoginCommandOutput": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "emailVerified": {
            "type": "boolean",
            "nullable": true
          },
          "requiresTwoFactor": {
            "type": "boolean"
          },
          "challengeToken": {
            "type": "string",
            "nullable": true
          },
          "availableMethods": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "processingRestricted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "LoginCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/LoginCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "PasswordRecoveryCommand": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "scopeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PasswordRecoveryCommandOutput": {
        "type": "object",
        "additionalProperties": false
      },
      "PasswordRecoveryCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/PasswordRecoveryCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "PendingRegistrationOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "attemptsLeft": {
            "type": "integer",
            "format": "int32"
          },
          "expired": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PendingRegistrationOutputPaginatedOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PendingRegistrationOutput"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PersonOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "twoFactorEnabled": {
            "type": "boolean"
          },
          "isDeleted": {
            "type": "boolean"
          },
          "scopeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "ownedScopeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PersonOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/PersonOutput"
          }
        },
        "additionalProperties": false
      },
      "PersonOutputPaginatedOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonOutput"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PersonSummaryOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PersonSummaryOutputPaginatedOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PersonSummaryOutput"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "PromoteScopeUserCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "ownedScopeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PromoteScopeUserCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/PromoteScopeUserCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "ReapplyErasuresCommand": {
        "type": "object",
        "properties": {
          "subjectIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReapplyErasuresCommandOutput": {
        "type": "object",
        "properties": {
          "anonymised": {
            "type": "integer",
            "format": "int32"
          },
          "alreadyAnonymised": {
            "type": "integer",
            "format": "int32"
          },
          "notFound": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ReapplyErasuresCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ReapplyErasuresCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "RegenerateRecoveryCodesCommand": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "recoveryCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RegenerateRecoveryCodesCommandOutput": {
        "type": "object",
        "properties": {
          "recoveryCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RegenerateRecoveryCodesCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/RegenerateRecoveryCodesCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "RegisterCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "scopeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RegisterCommandOutput": {
        "type": "object",
        "additionalProperties": false
      },
      "RegisterCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/RegisterCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "RemoveScopeOwnerCommandOutput": {
        "type": "object",
        "properties": {
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "personId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "RemoveScopeOwnerCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/RemoveScopeOwnerCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "RequestErasureCommand": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "nullable": true
          },
          "idToken": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RequestErasureCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "dueAt": {
            "type": "string",
            "format": "date-time"
          },
          "blocked": {
            "type": "boolean"
          },
          "blockedReason": {
            "type": "string",
            "nullable": true
          },
          "restrictionLifted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "RequestErasureCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/RequestErasureCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "ResendTwoFactorChallengeCodeCommand": {
        "type": "object",
        "properties": {
          "challengeToken": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ResendTwoFactorChallengeCodeCommandOutput": {
        "type": "object",
        "additionalProperties": false
      },
      "ResendTwoFactorChallengeCodeCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ResendTwoFactorChallengeCodeCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "ResendVerificationEmailCommandOutput": {
        "type": "object",
        "additionalProperties": false
      },
      "ResendVerificationEmailCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ResendVerificationEmailCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "ResetPasswordCommand": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "nullable": true
          },
          "newPassword": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ResetPasswordCommandOutput": {
        "type": "object",
        "additionalProperties": false
      },
      "ResetPasswordCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ResetPasswordCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "RestrictProcessingCommand": {
        "type": "object",
        "properties": {
          "ground": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "RestrictProcessingCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "restrictedAt": {
            "type": "string",
            "format": "date-time"
          },
          "ground": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "RestrictProcessingCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/RestrictProcessingCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "RevokeApplicationCredentialCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "RevokeApplicationCredentialCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/RevokeApplicationCredentialCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "ScopeOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "googleSignInEnabled": {
            "type": "boolean"
          },
          "selfRegistrationEnabled": {
            "type": "boolean"
          },
          "defaultLegalBasis": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "privacyNoticeUri": {
            "type": "string",
            "nullable": true
          },
          "emailVerificationUrl": {
            "type": "string",
            "nullable": true
          },
          "passwordResetUrl": {
            "type": "string",
            "nullable": true
          },
          "isDeleted": {
            "type": "boolean"
          },
          "ownerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ScopeOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ScopeOutput"
          }
        },
        "additionalProperties": false
      },
      "ScopeOutputPaginatedOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScopeOutput"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ScopePermissionOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "includeAsJwtClaim": {
            "type": "boolean"
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "isDeleted": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ScopePermissionOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/ScopePermissionOutput"
          }
        },
        "additionalProperties": false
      },
      "ScopePermissionOutputPaginatedOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScopePermissionOutput"
            },
            "nullable": true
          },
          "pageNumber": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "SendPersonPasswordResetCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "SendPersonPasswordResetCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/SendPersonPasswordResetCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "SendPersonVerificationEmailCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "SendPersonVerificationEmailCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/SendPersonVerificationEmailCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "ServiceHealthOutput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SetGoogleSignInCommand": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SetGoogleSignInCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "googleSignInEnabled": {
            "type": "boolean"
          },
          "emailVerificationUrl": {
            "type": "string",
            "nullable": true
          },
          "passwordResetUrl": {
            "type": "string",
            "nullable": true
          },
          "ownerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SetGoogleSignInCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/SetGoogleSignInCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "SetScopeEmailLinksCommand": {
        "type": "object",
        "properties": {
          "emailVerificationUrl": {
            "type": "string",
            "nullable": true
          },
          "passwordResetUrl": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SetScopeEmailLinksCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "googleSignInEnabled": {
            "type": "boolean"
          },
          "selfRegistrationEnabled": {
            "type": "boolean"
          },
          "emailVerificationUrl": {
            "type": "string",
            "nullable": true
          },
          "passwordResetUrl": {
            "type": "string",
            "nullable": true
          },
          "ownerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SetScopeEmailLinksCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/SetScopeEmailLinksCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "SetSelfRegistrationCommand": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SetSelfRegistrationCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "googleSignInEnabled": {
            "type": "boolean"
          },
          "selfRegistrationEnabled": {
            "type": "boolean"
          },
          "emailVerificationUrl": {
            "type": "string",
            "nullable": true
          },
          "passwordResetUrl": {
            "type": "string",
            "nullable": true
          },
          "ownerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SetSelfRegistrationCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/SetSelfRegistrationCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "StringDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TwoFactorStatusOutput": {
        "type": "object",
        "properties": {
          "isActive": {
            "type": "boolean"
          },
          "appEnabled": {
            "type": "boolean"
          },
          "emailEnabled": {
            "type": "boolean"
          },
          "remainingRecoveryCodes": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "TwoFactorStatusOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/TwoFactorStatusOutput"
          }
        },
        "additionalProperties": false
      },
      "UpdateApplicationCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "UpdateApplicationCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "UpdateApplicationCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/UpdateApplicationCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "UpdatePersonCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "currentPassword": {
            "type": "string",
            "nullable": true
          },
          "twoFactorCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdatePersonCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "integer",
            "format": "int32"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "scopeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "ownedScopeIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "UpdatePersonCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/UpdatePersonCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "UpdateScopeCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "defaultLegalBasis": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "privacyNoticeUri": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateScopeCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "googleSignInEnabled": {
            "type": "boolean"
          },
          "selfRegistrationEnabled": {
            "type": "boolean"
          },
          "emailVerificationUrl": {
            "type": "string",
            "nullable": true
          },
          "passwordResetUrl": {
            "type": "string",
            "nullable": true
          },
          "ownerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "UpdateScopeCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/UpdateScopeCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "UpdateScopePermissionCommand": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "includeAsJwtClaim": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "UpdateScopePermissionCommandOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "includeAsJwtClaim": {
            "type": "boolean"
          },
          "scopeId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "UpdateScopePermissionCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/UpdateScopePermissionCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "VerifyEmailCommand": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VerifyEmailCommandOutput": {
        "type": "object",
        "additionalProperties": false
      },
      "VerifyEmailCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/VerifyEmailCommandOutput"
          }
        },
        "additionalProperties": false
      },
      "VerifyTwoFactorAuthCommand": {
        "type": "object",
        "properties": {
          "challengeToken": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "recoveryCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VerifyTwoFactorAuthCommandOutput": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "processingRestricted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "VerifyTwoFactorAuthCommandOutputDataOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "success": {
            "type": "boolean",
            "readOnly": true
          },
          "data": {
            "$ref": "#/components/schemas/VerifyTwoFactorAuthCommandOutput"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Paste the token returned by POST /api/auth/login. The 'Bearer ' prefix is added for you.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "Application"
    },
    {
      "name": "ApplicationCredential"
    },
    {
      "name": "ApplicationToken"
    },
    {
      "name": "Audit"
    },
    {
      "name": "Auth"
    },
    {
      "name": "GoogleUser"
    },
    {
      "name": "HealthCheck"
    },
    {
      "name": "Person"
    },
    {
      "name": "Scope"
    },
    {
      "name": "ScopePermission"
    }
  ]
}