# Generated by docs/scripts/sync-api.mjs. Do not edit directly.
openapi: 3.1.0
info:
  # Do not change the title, if the title changes, the import paths will be broken
  title: Api
  version: 2.1.4
  description: Pachtify360 API specification
servers:
  - url: /api
    description: Base API path
tags:
  - name: health
    description: Health operations
  - name: pachtkonten
    description: Lease account management
  - name: patchobjekte
    description: Patch object management
  - name: kontakte
    description: Contact management
  - name: abrechnung
    description: Billing and invoicing
  - name: audit
    description: Audit log management
  - name: dashboard
    description: Dashboard summary data
  - name: duplikate
    description: Duplicate detection and merge
  - name: einstellungen
    description: Application settings
paths:
  /abrechnung/vorschau-gruppen:
    get:
      operationId: getAbrechnungVorschauGruppen
      tags: [abrechnung]
      description: Read-only Dokumentgruppen und fertige Cent-Summen der ausgewählten Vorschaukonten.
      parameters:
        - in: query
          name: datum
          required: true
          schema: {type: string, pattern: '^\d{4}-\d{2}-\d{2}$'}
        - in: query
          name: auswahl
          description: Kommagetrennte Konto-IDs; leer bedeutet keine Konten, ohne Parameter alle fälligen Konten.
          schema: {type: string, pattern: '^(\d+(,\d+)*)?$'}
      responses:
        "200":
          description: Ausschließlich serverseitig berechnete Beträge.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AbrechnungVorschauGruppen"
        "400":
          description: Ungültiger Termin oder ungültige Kontoauswahl.
  /sevdesk/status:
    get:
      operationId: getSevdeskStatus
      tags: [sevdesk]
      responses:
        "200":
          description: Verbindung und Buchhaltungsversion
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SevdeskStatus"
  /sevdesk/settings:
    get:
      operationId: getSevdeskSettings
      tags: [sevdesk]
      responses:
        "200":
          description: Treuhand-Zuordnung
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SevdeskSettings"
    put:
      operationId: updateSevdeskSettings
      tags: [sevdesk]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SevdeskSettings"
      responses:
        "200":
          description: Gespeicherte Zuordnung
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SevdeskSettings"
  /sevdesk/documents:
    get:
      operationId: listSevdeskDocuments
      tags: [sevdesk]
      parameters:
        - {name: page, in: query, schema: {type: integer, minimum: 1, default: 1}}
        - {name: limit, in: query, schema: {type: integer, minimum: 1, maximum: 100, default: 25}}
        - {name: search, in: query, schema: {type: string}}
        - name: state
          in: query
          schema:
            type: string
            enum: [all, pending, synced, failed, uncertain, cancelled, deleted, legacy]
      responses:
        "200":
          description: Archivbelege mit Exportstatus
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SevdeskDocumentList"
  /sevdesk/documents/{id}:
    get:
      operationId: getSevdeskDocument
      tags: [sevdesk]
      parameters:
        - {name: id, in: path, required: true, schema: {type: integer, minimum: 1}}
      responses:
        "200":
          description: Belegvorschau aus dem Archiv und letzter sevDesk-Status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SevdeskDocumentDetail"
  /sevdesk/documents/{id}/{action}:
    post:
      operationId: performSevdeskDocumentAction
      tags: [sevdesk]
      parameters:
        - {name: id, in: path, required: true, schema: {type: integer, minimum: 1}}
        - name: action
          in: path
          required: true
          schema:
            type: string
            enum: [export, refresh, reconcile, cancel, delete]
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SevdeskDocumentAction"
      responses:
        "200":
          description: Aktualisierte Belegvorschau
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SevdeskDocumentDetail"
  /sevdesk/documents/{id}/pdf:
    get:
      operationId: downloadSevdeskDocumentPdf
      tags: [sevdesk]
      parameters:
        - {name: id, in: path, required: true, schema: {type: integer, minimum: 1}}
      responses:
        "200":
          description: PDF des zugeordneten sevDesk-Belegs
          content:
            application/pdf:
              schema: {type: string, format: binary}
  /sevdesk/jobs:
    get:
      operationId: listSevdeskJobs
      tags: [sevdesk]
      responses:
        "200":
          description: Letzte Hintergrundaufträge mit persistentem Fortschritt
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/SevdeskJob"
    post:
      operationId: startSevdeskJob
      tags: [sevdesk]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SevdeskJobRequest"
      responses:
        "202":
          description: Auftrag angenommen
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SevdeskJob"
  /healthz:
    get:
      security: []
      operationId: healthCheck
      tags: [health]
      summary: Health check
      responses:
        "200":
          description: Healthy
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HealthStatus"

  /einstellungen/positionsarten:
    get:
      operationId: listPositionsarten
      tags: [einstellungen]
      summary: List position types
      responses:
        "200":
          description: Position types with their current usage counts
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Positionsart"
    post:
      operationId: createPositionsart
      tags: [einstellungen]
      summary: Create a position type
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PositionsartInput"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Positionsart"
        "400":
          description: Invalid input
        "409":
          description: A position type with this name already exists

  /einstellungen/positionsarten/{id}:
    put:
      operationId: updatePositionsart
      tags: [einstellungen]
      summary: Update a position type
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PositionsartUpdate"
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Positionsart"
        "400":
          description: Invalid input
        "404":
          description: Not found
        "409":
          description: A position type with this name already exists
    delete:
      operationId: deletePositionsart
      tags: [einstellungen]
      summary: Delete a position type
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "204":
          description: Deleted
        "404":
          description: Not found
        "409":
          description: Position type is still referenced by positions
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PositionsartDeleteConflict"

  /dashboard/summary:
    get:
      operationId: getDashboardSummary
      tags: [dashboard]
      summary: Get dashboard KPI summary
      responses:
        "200":
          description: Dashboard summary
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DashboardSummary"

  /dashboard/recent-activity:
    get:
      operationId: getRecentActivity
      tags: [dashboard]
      summary: Get recent activity feed
      responses:
        "200":
          description: Recent activities
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ActivityEntry"

  /pachtkonten/next-kontonummer:
    get:
      operationId: getNextKontonummer
      tags: [pachtkonten]
      summary: Get the next available lease account number
      responses:
        "200":
          description: Next available kontonummer
          content:
            application/json:
              schema:
                type: object
                properties:
                  kontonummer:
                    type: string
                required:
                  - kontonummer

  /pachtkonten:
    get:
      operationId: listPachtkonten
      tags: [pachtkonten]
      summary: List all lease accounts
      parameters:
        - in: query
          name: search
          schema:
            type: string
        - in: query
          name: status
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum: [aktiv, inaktiv, gekuendigt, ausgelaufen, alle]
        - in: query
          name: pachtbeginnMonat
          schema:
            type: string
            pattern: '^\d{4}-(0[1-9]|1[0-2])$'
        - in: query
          name: pachtendeMonat
          schema:
            type: string
            pattern: '^\d{4}-(0[1-9]|1[0-2])$'
        - in: query
          name: schlussabrechnung
          schema:
            type: string
            enum: [vorhanden, nicht_vorhanden, alle]
        - in: query
          name: schlussabrechnungMonat
          schema:
            type: string
            pattern: '^\d{4}-(0[1-9]|1[0-2])$'
        - in: query
          name: istVorauszahlend
          schema:
            type: string
            enum: [ja, nein, unbekannt, alle]
        - in: query
          name: hebemonat
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              pattern: '^(0[1-9]|1[0-2])$'
        - in: query
          name: letzteHebungMonat
          schema:
            type: string
            pattern: '^\d{4}-(0[1-9]|1[0-2])$'
        - in: query
          name: page
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 1
        - in: query
          name: limit
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 5000
            default: 20
      responses:
        "200":
          description: List of lease accounts
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PachtkontoPaginatedList"
    post:
      operationId: createPachtkonto
      tags: [pachtkonten]
      summary: Create a new lease account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePachtkontoBody"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Pachtkonto"

  /pachtkonten/{id}:
    get:
      operationId: getPachtkonto
      tags: [pachtkonten]
      summary: Get a lease account by ID (with detail)
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Lease account detail
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PachtkontoDetail"
        "404":
          description: Not found
    put:
      operationId: updatePachtkonto
      tags: [pachtkonten]
      summary: Update a lease account
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePachtkontoBody"
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Pachtkonto"
    delete:
      operationId: deletePachtkonto
      tags: [pachtkonten]
      summary: Delete a lease account
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "204":
          description: Deleted

  /pachtkonten/{id}/positionen:
    get:
      operationId: listPachtkontoPositionen
      tags: [pachtkonten]
      summary: List positions for a lease account
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: List of positions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/PachtkontoPosition"
    post:
      operationId: createPachtkontoPosition
      tags: [pachtkonten]
      summary: Add a position to a lease account
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePachtkontoPositionBody"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PachtkontoPosition"

  /pachtkonten/{id}/positionen/{posId}:
    put:
      operationId: updatePachtkontoPosition
      tags: [pachtkonten]
      summary: Update a position
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
        - in: path
          name: posId
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePachtkontoPositionBody"
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PachtkontoPosition"
    delete:
      operationId: deletePachtkontoPosition
      tags: [pachtkonten]
      summary: Delete a position
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
        - in: path
          name: posId
          required: true
          schema:
            type: integer
      responses:
        "204":
          description: Deleted

  /patchobjekte:
    get:
      operationId: listPatchobjekte
      tags: [patchobjekte]
      summary: List all patch objects
      parameters:
        - in: query
          name: search
          schema:
            type: string
        - in: query
          name: status
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum: [aktuell, veraltet, kritisch, geplant, alle]
        - in: query
          name: pachtkontoId
          schema:
            type: integer
        - in: query
          name: page
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 1
        - in: query
          name: limit
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 5000
            default: 20
      responses:
        "200":
          description: List of patch objects
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PatchobjektPaginatedList"
    post:
      operationId: createPatchobjekt
      tags: [patchobjekte]
      summary: Create a new patch object
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreatePatchobjektBody"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Patchobjekt"

  /patchobjekte/{id}:
    get:
      operationId: getPatchobjekt
      tags: [patchobjekte]
      summary: Get a patch object by ID
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Patch object
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Patchobjekt"
        "404":
          description: Not found
    put:
      operationId: updatePatchobjekt
      tags: [patchobjekte]
      summary: Update a patch object
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdatePatchobjektBody"
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Patchobjekt"
    delete:
      operationId: deletePatchobjekt
      tags: [patchobjekte]
      summary: Delete a patch object
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "204":
          description: Deleted

  /patchobjekte/status-overview:
    get:
      operationId: getPatchobjekteStatusOverview
      tags: [patchobjekte]
      summary: Get status breakdown of all patch objects
      responses:
        "200":
          description: Status overview
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/StatusCount"

  /kontakte:
    get:
      operationId: listKontakte
      tags: [kontakte]
      summary: List all contacts
      parameters:
        - in: query
          name: search
          schema:
            type: string
        - in: query
          name: typ
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              minLength: 1
        - in: query
          name: zahlungsmoral
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
              enum: [0, 1, 3]
        - in: query
          name: zahlungsart
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              minLength: 1
        - in: query
          name: ort
          schema:
            type: string
        - in: query
          name: page
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 1
        - in: query
          name: limit
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 5000
            default: 20
      responses:
        "200":
          description: List of contacts
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/KontaktPaginatedList"
    post:
      operationId: createKontakt
      tags: [kontakte]
      summary: Create a new contact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateKontaktBody"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Kontakt"

  /kontakte/{id}:
    get:
      operationId: getKontakt
      tags: [kontakte]
      summary: Get a contact by ID
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Contact
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Kontakt"
        "404":
          description: Not found
    put:
      operationId: updateKontakt
      tags: [kontakte]
      summary: Update a contact
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateKontaktBody"
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Kontakt"
    delete:
      operationId: deleteKontakt
      tags: [kontakte]
      summary: Delete a contact
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "204":
          description: Deleted

  /abrechnung/hebungen:
    get:
      operationId: listHebungen
      tags: [abrechnung]
      summary: List rent increases (Hebungen)
      parameters:
        - in: query
          name: status
          schema:
            type: string
            enum: [geplant, aktiv, abgeschlossen, storniert]
        - in: query
          name: page
          schema:
            type: integer
            default: 1
        - in: query
          name: limit
          schema:
            type: integer
            default: 20
      responses:
        "200":
          description: List of rent increases
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HebungPaginatedList"
    post:
      operationId: createHebung
      tags: [abrechnung]
      summary: Create a new rent increase
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateHebungBody"
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Hebung"

  /abrechnung/hebungen/{id}:
    get:
      operationId: getHebung
      tags: [abrechnung]
      summary: Get a rent increase by ID
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "200":
          description: Rent increase
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Hebung"
    put:
      operationId: updateHebung
      tags: [abrechnung]
      summary: Update a rent increase
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateHebungBody"
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Hebung"
    delete:
      operationId: deleteHebung
      tags: [abrechnung]
      summary: Delete a rent increase
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        "204":
          description: Deleted

  /abrechnung/archiv:
    get:
      operationId: listArchiv
      tags: [abrechnung]
      summary: List archived billing records
      parameters:
        - in: query
          name: search
          schema:
            type: string
        - in: query
          name: year
          schema:
            type: integer
        - in: query
          name: page
          schema:
            type: integer
            default: 1
        - in: query
          name: limit
          schema:
            type: integer
            default: 20
      responses:
        "200":
          description: Archived billing records
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ArchivEintragPaginatedList"

  /abrechnung/buchungslaeufe:
    get:
      operationId: listAbgeschlosseneBuchungslaeufe
      tags: [abrechnung]
      summary: List completed booking runs for archive exports
      responses:
        "200":
          description: Successfully completed booking runs, newest first
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/AbgeschlossenerBuchungslauf"

  /abrechnung/export/paechter:
    get:
      operationId: exportHebungPaechter
      tags: [abrechnung]
      summary: Export Hebung Pächter as CSV or XLSX
      parameters:
        - in: query
          name: buchungslaufId
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: format
          schema:
            type: string
            enum: [csv, xlsx]
            default: csv
      responses:
        "200":
          description: CSV or XLSX file download
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        "400":
          description: Missing or invalid buchungslaufId parameter
        "404":
          description: Booking run not found
        "409":
          description: Booking run has not completed successfully

  /abrechnung/export/verpaechter:
    get:
      operationId: exportHebungVerpaechter
      tags: [abrechnung]
      summary: Export Hebung Verpächter as CSV or XLSX
      parameters:
        - in: query
          name: buchungslaufId
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: format
          schema:
            type: string
            enum: [csv, xlsx]
            default: csv
      responses:
        "200":
          description: CSV or XLSX file download
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        "400":
          description: Missing or invalid buchungslaufId parameter
        "404":
          description: Booking run not found
        "409":
          description: Booking run has not completed successfully

  /audit-log:
    get:
      operationId: listAuditLog
      tags: [audit]
      summary: List audit log entries
      parameters:
        - in: query
          name: userId
          schema:
            type: string
        - in: query
          name: action
          schema:
            type: string
        - in: query
          name: resource
          schema:
            type: string
        - in: query
          name: from
          schema:
            type: string
            format: date-time
        - in: query
          name: to
          schema:
            type: string
            format: date-time
        - in: query
          name: page
          schema:
            type: integer
            default: 1
        - in: query
          name: limit
          schema:
            type: integer
            default: 50
      responses:
        "200":
          description: Audit log entries
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuditLogPaginatedList"

  /duplikate/kontakte:
    get:
      operationId: listDuplikateKontakte
      tags: [duplikate]
      summary: List duplicate contact pairs
      responses:
        "200":
          description: List of duplicate contact pairs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/DuplikatKontaktPaar"

  /duplikate/pachtobjekte:
    get:
      operationId: listDuplikatePachtobjekte
      tags: [duplikate]
      summary: List duplicate patchobjekt pairs
      responses:
        "200":
          description: List of duplicate patchobjekt pairs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/DuplikatPachtobjektPaar"

  /dashboard/user-changes:
    get:
      summary: "GET /dashboard/user-changes"
      operationId: route_get__dashboard_user_changes
      tags: ["dashboard"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./dashboard.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /dashboard/recent-remarks:
    get:
      summary: "GET /dashboard/recent-remarks"
      operationId: route_get__dashboard_recent_remarks
      tags: ["dashboard"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./dashboard.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /pachtkonten/abrechnung-liste:
    get:
      summary: "GET /pachtkonten/abrechnung-liste"
      operationId: route_get__pachtkonten_abrechnung_liste
      tags: ["pachtkonten"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./pachtkonten.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /pachtkonten/{id}/feldwerte:
    get:
      summary: "GET /pachtkonten/{id}/feldwerte"
      operationId: route_get__pachtkonten_id_feldwerte
      tags: ["pachtkonten"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./pachtkonten.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    put:
      summary: "PUT /pachtkonten/{id}/feldwerte"
      operationId: route_put__pachtkonten_id_feldwerte
      tags: ["pachtkonten"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./pachtkonten.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /patchobjekte/validate-address:
    get:
      summary: "GET /patchobjekte/validate-address"
      operationId: route_get__patchobjekte_validate_address
      tags: ["patchobjekte"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./patchobjekte.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /kontakte/validate-address:
    get:
      summary: "GET /kontakte/validate-address"
      operationId: route_get__kontakte_validate_address
      tags: ["kontakte"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./kontakte.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /kontakte/{id}/zahlungsmoral:
    patch:
      summary: "PATCH /kontakte/{id}/zahlungsmoral"
      operationId: route_patch__kontakte_id_zahlungsmoral
      tags: ["kontakte"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./kontakte.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /kontakte/{id}/verknuepfte-konten:
    get:
      summary: "GET /kontakte/{id}/verknuepfte-konten"
      operationId: route_get__kontakte_id_verknuepfte_konten
      tags: ["kontakte"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./kontakte.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /kontakte/{id}/verknuepfte-objekte:
    get:
      summary: "GET /kontakte/{id}/verknuepfte-objekte"
      operationId: route_get__kontakte_id_verknuepfte_objekte
      tags: ["kontakte"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./kontakte.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/vorschau:
    get:
      summary: "GET /abrechnung/vorschau"
      operationId: route_get__abrechnung_vorschau
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/buchen:
    post:
      summary: "POST /abrechnung/buchen"
      operationId: route_post__abrechnung_buchen
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/backfill-dokumente:
    post:
      summary: "POST /abrechnung/backfill-dokumente"
      operationId: route_post__abrechnung_backfill_dokumente
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/stornieren:
    post:
      summary: "POST /abrechnung/stornieren"
      operationId: route_post__abrechnung_stornieren
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/archiv-konten:
    get:
      summary: "GET /abrechnung/archiv-konten"
      operationId: route_get__abrechnung_archiv_konten
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/archiv-konten/{id}:
    get:
      summary: "GET /abrechnung/archiv-konten/{id}"
      operationId: route_get__abrechnung_archiv_konten_id_
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/archiv-konten/{id}/markierung:
    patch:
      summary: "PATCH /abrechnung/archiv-konten/{id}/markierung"
      operationId: route_patch__abrechnung_archiv_konten_id_markierung
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/faelligkeiten/recalculate-all:
    post:
      summary: "POST /abrechnung/faelligkeiten/recalculate-all"
      operationId: route_post__abrechnung_faelligkeiten_recalculate_all
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/faelligkeiten/{id}:
    get:
      summary: "GET /abrechnung/faelligkeiten/{id}"
      operationId: route_get__abrechnung_faelligkeiten_id_
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    post:
      summary: "POST /abrechnung/faelligkeiten/{id}"
      operationId: route_post__abrechnung_faelligkeiten_id_
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/naechste-termine:
    get:
      summary: "GET /abrechnung/naechste-termine"
      operationId: route_get__abrechnung_naechste_termine
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/sync-naechste-hebung:
    post:
      summary: "POST /abrechnung/sync-naechste-hebung"
      operationId: route_post__abrechnung_sync_naechste_hebung
      tags: ["abrechnung"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/pdf-gesamt:
    get:
      summary: "GET /abrechnung/pdf-gesamt"
      operationId: route_get__abrechnung_pdf_gesamt
      tags: ["abrechnung-pdf"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung-pdf.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/pdf-entwurf:
    get:
      summary: "GET /abrechnung/pdf-entwurf"
      operationId: route_get__abrechnung_pdf_entwurf
      tags: ["abrechnung-pdf"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung-pdf.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/archiv-konten/{id}/pdf:
    get:
      summary: "GET /abrechnung/archiv-konten/{id}/pdf"
      operationId: route_get__abrechnung_archiv_konten_id_pdf
      tags: ["abrechnung-pdf"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung-pdf.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/hebung-abschluesse:
    get:
      summary: "GET /abrechnung/hebung-abschluesse"
      operationId: route_get__abrechnung_hebung_abschluesse
      tags: ["abrechnung-pdf"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung-pdf.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /abrechnung/hebung-abschluss/pdf:
    get:
      summary: "GET /abrechnung/hebung-abschluss/pdf"
      operationId: route_get__abrechnung_hebung_abschluss_pdf
      tags: ["abrechnung-pdf"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./abrechnung-pdf.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /feedback:
    post:
      summary: "POST /feedback"
      operationId: route_post__feedback
      tags: ["feedback"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./feedback.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /pachtkonten/{id}/dokumente:
    get:
      summary: "GET /pachtkonten/{id}/dokumente"
      operationId: route_get__pachtkonten_id_dokumente
      tags: ["dokumente"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./dokumente.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    post:
      summary: "POST /pachtkonten/{id}/dokumente"
      operationId: route_post__pachtkonten_id_dokumente
      tags: ["dokumente"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./dokumente.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /pachtkonten/{id}/dokumente/{docId}/download:
    get:
      summary: "GET /pachtkonten/{id}/dokumente/{docId}/download"
      operationId: route_get__pachtkonten_id_dokumente_docId_download
      tags: ["dokumente"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./dokumente.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
        - name: docId
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /pachtkonten/{id}/dokumente/{docId}:
    delete:
      summary: "DELETE /pachtkonten/{id}/dokumente/{docId}"
      operationId: route_delete__pachtkonten_id_dokumente_docId_
      tags: ["dokumente"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./dokumente.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
        - name: docId
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/firmendaten:
    get:
      summary: "GET /einstellungen/firmendaten"
      operationId: route_get__einstellungen_firmendaten
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    put:
      summary: "PUT /einstellungen/firmendaten"
      operationId: route_put__einstellungen_firmendaten
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/logo:
    post:
      summary: "POST /einstellungen/logo"
      operationId: route_post__einstellungen_logo
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    delete:
      summary: "DELETE /einstellungen/logo"
      operationId: route_delete__einstellungen_logo
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/logo/preview:
    get:
      summary: "GET /einstellungen/logo/preview"
      operationId: route_get__einstellungen_logo_preview
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/kontaktarten:
    get:
      summary: "GET /einstellungen/kontaktarten"
      operationId: route_get__einstellungen_kontaktarten
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    post:
      summary: "POST /einstellungen/kontaktarten"
      operationId: route_post__einstellungen_kontaktarten
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/kontaktarten/{id}:
    delete:
      summary: "DELETE /einstellungen/kontaktarten/{id}"
      operationId: route_delete__einstellungen_kontaktarten_id_
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/zahlungsarten:
    get:
      summary: "GET /einstellungen/zahlungsarten"
      operationId: route_get__einstellungen_zahlungsarten
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    post:
      summary: "POST /einstellungen/zahlungsarten"
      operationId: route_post__einstellungen_zahlungsarten
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/zahlungsarten/{id}:
    delete:
      summary: "DELETE /einstellungen/zahlungsarten/{id}"
      operationId: route_delete__einstellungen_zahlungsarten_id_
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/kontaktfelder:
    get:
      summary: "GET /einstellungen/kontaktfelder"
      operationId: route_get__einstellungen_kontaktfelder
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    post:
      summary: "POST /einstellungen/kontaktfelder"
      operationId: route_post__einstellungen_kontaktfelder
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/kontaktfelder/{id}:
    delete:
      summary: "DELETE /einstellungen/kontaktfelder/{id}"
      operationId: route_delete__einstellungen_kontaktfelder_id_
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/einheiten:
    get:
      summary: "GET /einstellungen/einheiten"
      operationId: route_get__einstellungen_einheiten
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    post:
      summary: "POST /einstellungen/einheiten"
      operationId: route_post__einstellungen_einheiten
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /einstellungen/einheiten/{id}:
    delete:
      summary: "DELETE /einstellungen/einheiten/{id}"
      operationId: route_delete__einstellungen_einheiten_id_
      tags: ["einstellungen"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./einstellungen.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /import/parse:
    post:
      summary: "POST /import/parse"
      operationId: route_post__import_parse
      tags: ["import"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./import.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /import/run:
    post:
      summary: "POST /import/run"
      operationId: route_post__import_run
      tags: ["import"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./import.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /import/mappings:
    get:
      summary: "GET /import/mappings"
      operationId: route_get__import_mappings
      tags: ["import"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./import.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
    post:
      summary: "POST /import/mappings"
      operationId: route_post__import_mappings
      tags: ["import"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./import.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /import/mappings/{id}:
    delete:
      summary: "DELETE /import/mappings/{id}"
      operationId: route_delete__import_mappings_id_
      tags: ["import"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./import.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /import/logs:
    get:
      summary: "GET /import/logs"
      operationId: route_get__import_logs
      tags: ["import"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./import.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /sevdesk/sync-kontakt/{id}:
    post:
      summary: "POST /sevdesk/sync-kontakt/{id}"
      operationId: route_post__sevdesk_sync_kontakt_id_
      tags: ["sevdesk"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./sevdesk.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /sevdesk/sync-rechnung/{id}:
    post:
      summary: "POST /sevdesk/sync-rechnung/{id}"
      operationId: route_post__sevdesk_sync_rechnung_id_
      tags: ["sevdesk"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./sevdesk.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Routenparameter; die Einzelroute prüft das gültige Format.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /sevdesk/sync-datum:
    post:
      summary: "POST /sevdesk/sync-datum"
      operationId: route_post__sevdesk_sync_datum
      tags: ["sevdesk"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./sevdesk.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /sevdesk/sync-alle-kontakte:
    post:
      summary: "POST /sevdesk/sync-alle-kontakte"
      operationId: route_post__sevdesk_sync_alle_kontakte
      tags: ["sevdesk"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./sevdesk.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /sevdesk/sync-alle-buchungen:
    post:
      summary: "POST /sevdesk/sync-alle-buchungen"
      operationId: route_post__sevdesk_sync_alle_buchungen
      tags: ["sevdesk"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./sevdesk.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /sevdesk/bulk-buchungen-status:
    get:
      summary: "GET /sevdesk/bulk-buchungen-status"
      operationId: route_get__sevdesk_bulk_buchungen_status
      tags: ["sevdesk"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./sevdesk.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /sevdesk/delete-alle-entwuerfe:
    post:
      summary: "POST /sevdesk/delete-alle-entwuerfe"
      operationId: route_post__sevdesk_delete_alle_entwuerfe
      tags: ["sevdesk"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./sevdesk.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /sevdesk/delete-entwuerfe-status:
    get:
      summary: "GET /sevdesk/delete-entwuerfe-status"
      operationId: route_get__sevdesk_delete_entwuerfe_status
      tags: ["sevdesk"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./sevdesk.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /duplikate/kontakte/merge-gruppe:
    post:
      summary: "POST /duplikate/kontakte/merge-gruppe"
      operationId: route_post__duplikate_kontakte_merge_gruppe
      tags: ["duplikate"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./duplikate.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /duplikate/pachtobjekte/merge-gruppe:
    post:
      summary: "POST /duplikate/pachtobjekte/merge-gruppe"
      operationId: route_post__duplikate_pachtobjekte_merge_gruppe
      tags: ["duplikate"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./duplikate.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /auth/health:
    get:
      summary: "GET /auth/health"
      operationId: route_get__auth_health
      tags: ["auth"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./auth.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      security: []
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /auth/login:
    get:
      summary: "GET /auth/login"
      operationId: route_get__auth_login
      tags: ["auth"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./auth.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      security: []
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /auth/callback:
    get:
      summary: "GET /auth/callback"
      operationId: route_get__auth_callback
      tags: ["auth"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./auth.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      security: []
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /auth/breakglass:
    post:
      summary: "POST /auth/breakglass"
      operationId: route_post__auth_breakglass
      tags: ["auth"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./auth.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      security: []
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /auth/logout:
    post:
      summary: "POST /auth/logout"
      operationId: route_post__auth_logout
      tags: ["auth"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./auth.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      security: []
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
  /auth/me:
    get:
      summary: "GET /auth/me"
      operationId: route_get__auth_me
      tags: ["auth"]
      x-documentation-status: route-only
      x-source-file: "artifacts/api-server/src/routes/./auth.ts"
      description: >-
        Implementierte Route. Ein vollständiges Anfrage-/Antwortschema ist
        im zentralen API-Vertrag noch nicht definiert. Siehe Routenübersicht
        und Quellhandler; generische Antworten sind keine Typgarantie.
      responses:
        "default":
          description: Endpunktspezifische Antwort; Schema und Statuscodes sind noch nicht zentral typisiert.
components:
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: pachtify360.sid
      description: Serverseitige Anwendungssitzung nach Microsoft-Anmeldung.
  schemas:
    AbrechnungVorschauGruppe:
      type: object
      required: [paechterName, paechterId, verpaechterName, konten, zahlbetrag]
      properties:
        paechterName: {type: [string, "null"]}
        paechterId: {type: [integer, "null"]}
        verpaechterName: {type: [string, "null"]}
        zahlbetrag: {type: number}
        konten:
          type: array
          items:
            type: object
            additionalProperties: true
            required: [id, kontonummer, berechnung]
            properties:
              id: {type: integer}
              kontonummer: {type: string}
              berechnung: {type: object, additionalProperties: true}
    AbrechnungVorschauGruppen:
      type: object
      required: [paechterRechnungen, verpaechterGutschriften, verpaechterHebegebuehren, summen, totals]
      properties:
        paechterRechnungen:
          type: array
          items: {$ref: "#/components/schemas/AbrechnungVorschauGruppe"}
        verpaechterGutschriften:
          type: array
          items: {$ref: "#/components/schemas/AbrechnungVorschauGruppe"}
        verpaechterHebegebuehren:
          type: array
          items: {$ref: "#/components/schemas/AbrechnungVorschauGruppe"}
        summen:
          type: object
          required: [paechter, gutschrift, gebuehren]
          properties:
            paechter: {type: number}
            gutschrift: {type: number}
            gebuehren: {type: number}
        totals:
          type: object
          required: [basis, hebEuro, ustEuro, gesamtPaechter]
          properties:
            basis: {type: number}
            hebEuro: {type: number}
            ustEuro: {type: number}
            gesamtPaechter: {type: number}
    SevdeskStatus:
      type: object
      required: [configured, ok]
      properties:
        configured: {type: boolean}
        ok: {type: boolean}
        message: {type: string}
        version: {type: string}
    SevdeskSettings:
      type: object
      required: [trustIncomingAccountId, trustOutgoingAccountId, feeRevenueAccountId, feeTaxRuleId, trustTaxRuleId, reviewed]
      properties:
        trustIncomingAccountId: {type: [integer, "null"], minimum: 1}
        trustOutgoingAccountId: {type: [integer, "null"], minimum: 1}
        feeRevenueAccountId: {type: [integer, "null"], minimum: 1}
        feeTaxRuleId: {type: integer, enum: [1, 4, 11]}
        trustTaxRuleId: {type: integer, enum: [1, 4]}
        reviewed: {type: boolean, description: Die Kontenzuordnung wurde fachlich geprüft; IDs sind sevDesk-Objekt-IDs, keine Kontonummern.}
    SevdeskDocument:
      type: object
      required: [id, documentNumber, date, documentType, cancelledLocally, state, reference, objectType, objectId, remoteStatus, grossAmount, paidAmount, openAmount, lastCheckedAt, error, pdfTransferred]
      properties:
        id: {type: integer}
        documentNumber: {type: [string, "null"]}
        date: {type: string}
        documentType: {type: [string, "null"]}
        cancelledLocally: {type: boolean}
        state: {type: string}
        reference: {type: string}
        objectType: {type: [string, "null"]}
        objectId: {type: [string, "null"]}
        remoteStatus: {type: [integer, "null"]}
        grossAmount: {type: [number, "null"]}
        paidAmount: {type: [number, "null"]}
        openAmount: {type: [number, "null"]}
        lastCheckedAt: {type: [string, "null"]}
        error: {type: [string, "null"]}
        pdfTransferred: {type: boolean}
    SevdeskDocumentList:
      type: object
      required: [items, total, page, limit]
      properties:
        items:
          type: array
          items: {$ref: "#/components/schemas/SevdeskDocument"}
        total: {type: integer}
        page: {type: integer}
        limit: {type: integer}
    SevdeskDocumentDetail:
      type: object
      required: [document, positions, plannedObjectType, expectedGross, previewError]
      properties:
        document: {$ref: "#/components/schemas/SevdeskDocument"}
        positions:
          type: array
          items: {$ref: "#/components/schemas/SevdeskPosition"}
        plannedObjectType: {type: [string, "null"]}
        expectedGross: {type: [number, "null"]}
        previewError: {type: [string, "null"]}
    SevdeskPosition:
      type: object
      required: [name, grossAmount, taxRate, allocation]
      properties:
        name: {type: string}
        grossAmount: {type: number}
        taxRate: {type: number}
        allocation: {type: string, enum: [trust, fee]}
    SevdeskDocumentAction:
      type: object
      properties:
        confirmReference: {type: string}
    SevdeskJobRequest:
      type: object
      required: [kind]
      properties:
        kind: {type: string, enum: [exports, contacts, statuses]}
        date: {type: string, pattern: '^\d{4}-\d{2}-\d{2}$'}
    SevdeskJob:
      type: object
      required: [id, kind, state, total, processed, synced, failed, startedAt, finishedAt, errors]
      properties:
        id: {type: string}
        kind: {type: string}
        state: {type: string}
        total: {type: integer}
        processed: {type: integer}
        synced: {type: integer}
        failed: {type: integer}
        startedAt: {type: string}
        finishedAt: {type: [string, "null"]}
        errors:
          type: array
          items:
            type: object
            required: [id, error]
            properties:
              id: {type: integer}
              error: {type: string}
    HealthStatus:
      type: object
      properties:
        status:
          type: string
      required:
        - status

    Positionsart:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        istHebegebuehrpflichtig:
          type: boolean
        sortierung:
          type: integer
        usageCount:
          type: integer
          minimum: 0
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - istHebegebuehrpflichtig
        - sortierung
        - usageCount
        - createdAt
        - updatedAt

    PositionsartInput:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        istHebegebuehrpflichtig:
          type: boolean
        sortierung:
          type: integer
      required:
        - name
        - istHebegebuehrpflichtig

    PositionsartUpdate:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        istHebegebuehrpflichtig:
          type: boolean
        sortierung:
          type: integer

    PositionsartDeleteConflict:
      type: object
      properties:
        error:
          type: string
        usageCount:
          type: integer
      required:
        - error
        - usageCount

    DashboardSummary:
      type: object
      properties:
        totalPachtkonten:
          type: integer
        aktivePachtkonten:
          type: integer
        totalPatchobjekte:
          type: integer
        kritischePatchobjekte:
          type: integer
        offeneHebungen:
          type: integer
        totalKontakte:
          type: integer
        patchStatusBreakdown:
          type: array
          items:
            $ref: "#/components/schemas/StatusCount"
      required:
        - totalPachtkonten
        - aktivePachtkonten
        - totalPatchobjekte
        - kritischePatchobjekte
        - offeneHebungen
        - totalKontakte
        - patchStatusBreakdown

    ActivityEntry:
      type: object
      properties:
        id:
          type: integer
        timestamp:
          type: string
          format: date-time
        action:
          type: string
        resource:
          type: string
        resourceId:
          type: integer
        userName:
          type: string
        details:
          type: string
      required:
        - id
        - timestamp
        - action
        - resource
        - userName

    StatusCount:
      type: object
      properties:
        status:
          type: string
        count:
          type: integer
        label:
          type: string
      required:
        - status
        - count
        - label

    Pachtkonto:
      type: object
      properties:
        id:
          type: integer
        kontonummer:
          type: string
        bezeichnung:
          type: string
        pachter:
          type: string
        pachtbeginn:
          type: string
          format: date
        pachtende:
          type: string
          format: date
          nullable: true
        geplanteSchlussabrechnung:
          type: string
          format: date
          nullable: true
          description: Datum bis zu dem abgerechnet werden soll (Schlussabrechnung)
        status:
          type: string
          enum: [aktiv, inaktiv, gekuendigt, ausgelaufen]
        kontaktId:
          type: integer
          nullable: true
        verpachterId:
          type: integer
          nullable: true
        paechterKontaktId:
          type: integer
          nullable: true
        kategorie:
          type: string
          nullable: true
        kurzbezeichnung:
          type: string
          nullable: true
        zahlungsart:
          type: string
          nullable: true
        istVorauszahlend:
          type: boolean
          nullable: true
          description: Zahlungszeitpunkt des Pachtkontos; true = vorauszahlend, false oder null = nachzahlend
        hebungsMonate:
          type: string
          nullable: true
          description: JSON array of month names
        belegdruckVerpaechter:
          type: boolean
          nullable: true
        belegdruckPaechter:
          type: boolean
          nullable: true
        notizen:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - kontonummer
        - bezeichnung
        - pachter
        - pachtbeginn
        - status
        - createdAt
        - updatedAt

    PachtkontoDetail:
      allOf:
        - $ref: "#/components/schemas/Pachtkonto"
        - type: object
          properties:
            verpaechter:
              $ref: "#/components/schemas/Kontakt"
              nullable: true
            paechterKontakt:
              $ref: "#/components/schemas/Kontakt"
              nullable: true
            patchobjekte:
              type: array
              items:
                $ref: "#/components/schemas/Patchobjekt"
            positionen:
              type: array
              items:
                $ref: "#/components/schemas/PachtkontoPosition"

    PachtkontoPosition:
      type: object
      properties:
        id:
          type: integer
        pachtkontoId:
          type: integer
        positionsartId:
          type: integer
        positionsart:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            istHebegebuehrpflichtig:
              type: boolean
          required:
            - id
            - name
            - istHebegebuehrpflichtig
        menge:
          type: number
          nullable: true
        einheit:
          type: string
          nullable: true
        preisEinheit:
          type: number
          nullable: true
        preisPauschal:
          type: number
          nullable: true
        flaeche:
          type: number
          nullable: true
        grundbetrag:
          type: number
          nullable: true
        rate:
          type: number
          nullable: true
        berechnung:
          type: string
          nullable: true
        betrag:
          type: number
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - pachtkontoId
        - positionsartId
        - positionsart
        - createdAt
        - updatedAt

    CreatePachtkontoPositionBody:
      type: object
      properties:
        positionsartId:
          type: integer
        menge:
          type: number
          nullable: true
        einheit:
          type: string
          nullable: true
        preisEinheit:
          type: number
          nullable: true
        flaeche:
          type: number
          nullable: true
        grundbetrag:
          type: number
          nullable: true
        rate:
          type: number
          nullable: true
        berechnung:
          type: string
          nullable: true
        betrag:
          type: number
          nullable: true
      required:
        - positionsartId

    UpdatePachtkontoPositionBody:
      type: object
      properties:
        positionsartId:
          type: integer
        menge:
          type: number
          nullable: true
        einheit:
          type: string
          nullable: true
        preisEinheit:
          type: number
          nullable: true
        flaeche:
          type: number
          nullable: true
        grundbetrag:
          type: number
          nullable: true
        rate:
          type: number
          nullable: true
        berechnung:
          type: string
          nullable: true
        betrag:
          type: number
          nullable: true
    CreatePachtkontoBody:
      type: object
      properties:
        bezeichnung:
          type: string
        pachter:
          type: string
        pachtbeginn:
          type: string
          format: date
        pachtende:
          type: string
          format: date
          nullable: true
        istVorauszahlend:
          type: boolean
          nullable: true
          description: Zahlungszeitpunkt des Pachtkontos; true = vorauszahlend, false = nachzahlend
        geplanteSchlussabrechnung:
          type: string
          format: date
          nullable: true
          description: Datum bis zu dem abgerechnet werden soll (Schlussabrechnung)
        status:
          type: string
          enum: [aktiv, inaktiv, gekuendigt, ausgelaufen]
          default: aktiv
        kontaktId:
          type: integer
          nullable: true
        verpachterId:
          type: integer
          nullable: true
        paechterKontaktId:
          type: integer
          nullable: true
        pachtobjektId:
          type: integer
          nullable: true
        kategorie:
          type: string
          nullable: true
        kurzbezeichnung:
          type: string
          nullable: true
        hebungsMonate:
          type: string
          nullable: true
        belegdruckVerpaechter:
          type: boolean
          nullable: true
        belegdruckPaechter:
          type: boolean
          nullable: true
        notizen:
          type: string
          nullable: true
      required:
        - bezeichnung
        - pachter
        - pachtbeginn

    UpdatePachtkontoBody:
      type: object
      properties:
        bezeichnung:
          type: string
        pachter:
          type: string
        pachtbeginn:
          type: string
          format: date
        pachtende:
          type: string
          format: date
          nullable: true
        istVorauszahlend:
          type: boolean
          nullable: true
          description: Zahlungszeitpunkt des Pachtkontos; true = vorauszahlend, false = nachzahlend
        geplanteSchlussabrechnung:
          type: string
          format: date
          nullable: true
          description: Datum bis zu dem abgerechnet werden soll (Schlussabrechnung)
        pachtobjektId:
          type: integer
          nullable: true
        status:
          type: string
          enum: [aktiv, inaktiv, gekuendigt, ausgelaufen]
        kontaktId:
          type: integer
          nullable: true
        verpachterId:
          type: integer
          nullable: true
        paechterKontaktId:
          type: integer
          nullable: true
        kategorie:
          type: string
          nullable: true
        kurzbezeichnung:
          type: string
          nullable: true
        hebungsMonate:
          type: string
          nullable: true
        belegdruckVerpaechter:
          type: boolean
          nullable: true
        belegdruckPaechter:
          type: boolean
          nullable: true
        notizen:
          type: string
          nullable: true
        hebegebuehr:
          type: number
          nullable: true
        ustProzent:
          type: number
          nullable: true
        hebegebuehrZahlt:
          type: string
          nullable: true

    PachtkontoPaginatedList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/Pachtkonto"
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
        totalPages:
          type: integer
      required:
        - data
        - total
        - page
        - limit
        - totalPages

    Patchobjekt:
      type: object
      properties:
        id:
          type: integer
        objektnummer:
          type: string
        bezeichnung:
          type: string
        typ:
          type: string
          enum: [gebaeude, flaeche, anlage, infrastruktur, sonstiges]
        status:
          type: string
          enum: [aktuell, veraltet, kritisch, geplant]
        pachtkontoId:
          type: integer
          nullable: true
        besitzerId:
          type: integer
          nullable: true
        betreuerId:
          type: integer
          nullable: true
        adresse:
          type: string
        strasse:
          type: string
          nullable: true
        hausnummer:
          type: string
          nullable: true
        plz:
          type: string
          nullable: true
        ort:
          type: string
          nullable: true
        bundesland:
          type: string
          nullable: true
        land:
          type: string
          nullable: true
        gemarkung:
          type: string
          nullable: true
        flur:
          type: string
          nullable: true
        flurstueck:
          type: string
          nullable: true
        flaeche:
          type: string
          nullable: true
        einheit:
          type: string
          nullable: true
        letzterPatch:
          type: string
          format: date
          nullable: true
        naechsterPatch:
          type: string
          format: date
          nullable: true
        version:
          type: string
          nullable: true
        beschreibung:
          type: string
          nullable: true
        _besitzerName:
          type: string
          nullable: true
        _pachtkontenCount:
          type: integer
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - objektnummer
        - bezeichnung
        - typ
        - status
        - adresse
        - createdAt
        - updatedAt

    CreatePatchobjektBody:
      type: object
      properties:
        bezeichnung:
          type: string
        typ:
          type: string
          enum: [gebaeude, flaeche, anlage, infrastruktur, sonstiges]
        status:
          type: string
          enum: [aktuell, veraltet, kritisch, geplant]
          default: aktuell
        pachtkontoId:
          type: integer
          nullable: true
        besitzerId:
          type: integer
          nullable: true
        betreuerId:
          type: integer
          nullable: true
        adresse:
          type: string
          default: ""
        strasse:
          type: string
          nullable: true
        hausnummer:
          type: string
          nullable: true
        plz:
          type: string
          nullable: true
        ort:
          type: string
          nullable: true
        bundesland:
          type: string
          nullable: true
        land:
          type: string
          nullable: true
        gemarkung:
          type: string
          nullable: true
        flur:
          type: string
          nullable: true
        flurstueck:
          type: string
          nullable: true
        flaeche:
          type: string
          nullable: true
        einheit:
          type: string
          nullable: true
        letzterPatch:
          type: string
          format: date
          nullable: true
        naechsterPatch:
          type: string
          format: date
          nullable: true
        version:
          type: string
          nullable: true
        beschreibung:
          type: string
          nullable: true
      required:
        - bezeichnung
        - typ

    UpdatePatchobjektBody:
      type: object
      properties:
        bezeichnung:
          type: string
        typ:
          type: string
          enum: [gebaeude, flaeche, anlage, infrastruktur, sonstiges]
        status:
          type: string
          enum: [aktuell, veraltet, kritisch, geplant]
        pachtkontoId:
          type: integer
          nullable: true
        besitzerId:
          type: integer
          nullable: true
        betreuerId:
          type: integer
          nullable: true
        adresse:
          type: string
        strasse:
          type: string
          nullable: true
        hausnummer:
          type: string
          nullable: true
        plz:
          type: string
          nullable: true
        ort:
          type: string
          nullable: true
        bundesland:
          type: string
          nullable: true
        land:
          type: string
          nullable: true
        gemarkung:
          type: string
          nullable: true
        flur:
          type: string
          nullable: true
        flurstueck:
          type: string
          nullable: true
        flaeche:
          type: string
          nullable: true
        einheit:
          type: string
          nullable: true
        letzterPatch:
          type: string
          format: date
          nullable: true
        naechsterPatch:
          type: string
          format: date
          nullable: true
        version:
          type: string
          nullable: true
        beschreibung:
          type: string
          nullable: true

    PatchobjektPaginatedList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/Patchobjekt"
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
        totalPages:
          type: integer
      required:
        - data
        - total
        - page
        - limit
        - totalPages

    Kontakt:
      type: object
      properties:
        id:
          type: integer
        vorname:
          type: string
        nachname:
          type: string
        anrede:
          type: string
          nullable: true
        kurzbezeichnung:
          type: string
          nullable: true
        firma:
          type: string
          nullable: true
        typ:
          type: string
          enum: [pachter, verpaechter, eigentuemer, behoerde, dienstleister, sonstige]
        email:
          type: string
          nullable: true
        telefon:
          type: string
          nullable: true
        adresse:
          type: string
          nullable: true
        notizen:
          type: string
          nullable: true
        kreditorennummer:
          type: string
          nullable: true
        ustId:
          type: string
          nullable: true
        sepaMandatsart:
          type: string
          nullable: true
        sepaGlaeubigerId:
          type: string
          nullable: true
        sepaMandatsreferenz:
          type: string
          nullable: true
        sepaAusstellungsdatum:
          type: string
          nullable: true
        strasse:
          type: string
          nullable: true
        hausnummer:
          type: string
          nullable: true
        plz:
          type: string
          nullable: true
        ort:
          type: string
          nullable: true
        bundesland:
          type: string
          nullable: true
        land:
          type: string
          nullable: true
        kundennummer:
          type: string
          nullable: true
        zahlungsart:
          type: string
          nullable: true
        zahlungsmoral:
          type: integer
          nullable: true
        lastschrifteinzug:
          type: boolean
          nullable: true
        iban:
          type: string
          nullable: true
        bic:
          type: string
          nullable: true
        kontoinhaber:
          type: string
          nullable: true
        sevdeskId:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - vorname
        - nachname
        - typ
        - createdAt
        - updatedAt

    CreateKontaktBody:
      type: object
      properties:
        vorname:
          type: string
        nachname:
          type: string
        anrede:
          type: string
          nullable: true
        kurzbezeichnung:
          type: string
          nullable: true
        firma:
          type: string
          nullable: true
        typ:
          type: string
          enum: [pachter, verpaechter, eigentuemer, behoerde, dienstleister, sonstige]
          default: sonstige
        email:
          type: string
          nullable: true
        telefon:
          type: string
          nullable: true
        adresse:
          type: string
          nullable: true
        notizen:
          type: string
          nullable: true
        kreditorennummer:
          type: string
          nullable: true
        ustId:
          type: string
          nullable: true
        sepaMandatsart:
          type: string
          nullable: true
        sepaGlaeubigerId:
          type: string
          nullable: true
        sepaMandatsreferenz:
          type: string
          nullable: true
        sepaAusstellungsdatum:
          type: string
          nullable: true
        strasse:
          type: string
          nullable: true
        hausnummer:
          type: string
          nullable: true
        plz:
          type: string
          nullable: true
        ort:
          type: string
          nullable: true
        bundesland:
          type: string
          nullable: true
        land:
          type: string
          nullable: true
        zahlungsart:
          type: string
          nullable: true
        zahlungsmoral:
          type: integer
          nullable: true
        lastschrifteinzug:
          type: boolean
          nullable: true
        iban:
          type: string
          nullable: true
        bic:
          type: string
          nullable: true
        kontoinhaber:
          type: string
          nullable: true
        feldwerte:
          type: array
          items:
            type: object
            properties:
              kontaktfeldId:
                type: integer
              wert:
                type: string
            required:
              - kontaktfeldId
              - wert
      required:
        - vorname
        - nachname

    UpdateKontaktBody:
      type: object
      properties:
        vorname:
          type: string
        nachname:
          type: string
        anrede:
          type: string
          nullable: true
        kurzbezeichnung:
          type: string
          nullable: true
        firma:
          type: string
          nullable: true
        typ:
          type: string
          enum: [pachter, verpaechter, eigentuemer, behoerde, dienstleister, sonstige]
        email:
          type: string
          nullable: true
        telefon:
          type: string
          nullable: true
        adresse:
          type: string
          nullable: true
        notizen:
          type: string
          nullable: true
        kreditorennummer:
          type: string
          nullable: true
        ustId:
          type: string
          nullable: true
        sepaMandatsart:
          type: string
          nullable: true
        sepaGlaeubigerId:
          type: string
          nullable: true
        sepaMandatsreferenz:
          type: string
          nullable: true
        sepaAusstellungsdatum:
          type: string
          nullable: true
        strasse:
          type: string
          nullable: true
        hausnummer:
          type: string
          nullable: true
        plz:
          type: string
          nullable: true
        ort:
          type: string
          nullable: true
        bundesland:
          type: string
          nullable: true
        land:
          type: string
          nullable: true
        zahlungsart:
          type: string
          nullable: true
        zahlungsmoral:
          type: integer
          nullable: true
        lastschrifteinzug:
          type: boolean
          nullable: true
        iban:
          type: string
          nullable: true
        bic:
          type: string
          nullable: true
        kontoinhaber:
          type: string
          nullable: true
        feldwerte:
          type: array
          items:
            type: object
            properties:
              kontaktfeldId:
                type: integer
              wert:
                type: string
            required:
              - kontaktfeldId
              - wert

    KontaktPaginatedList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/Kontakt"
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
        totalPages:
          type: integer
      required:
        - data
        - total
        - page
        - limit
        - totalPages

    Hebung:
      type: object
      properties:
        id:
          type: integer
        pachtkontoId:
          type: integer
        bezeichnung:
          type: string
        betrag:
          type: number
        prozent:
          type: number
          nullable: true
        gueltigAb:
          type: string
          format: date
        status:
          type: string
          enum: [geplant, aktiv, abgeschlossen, storniert]
        grundlage:
          type: string
          nullable: true
        notizen:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - pachtkontoId
        - bezeichnung
        - betrag
        - gueltigAb
        - status
        - createdAt
        - updatedAt

    CreateHebungBody:
      type: object
      properties:
        pachtkontoId:
          type: integer
        bezeichnung:
          type: string
        betrag:
          type: number
        prozent:
          type: number
          nullable: true
        gueltigAb:
          type: string
          format: date
        status:
          type: string
          enum: [geplant, aktiv, abgeschlossen, storniert]
          default: geplant
        grundlage:
          type: string
          nullable: true
        notizen:
          type: string
          nullable: true
      required:
        - pachtkontoId
        - bezeichnung
        - betrag
        - gueltigAb

    UpdateHebungBody:
      type: object
      properties:
        bezeichnung:
          type: string
        betrag:
          type: number
        prozent:
          type: number
          nullable: true
        gueltigAb:
          type: string
          format: date
        status:
          type: string
          enum: [geplant, aktiv, abgeschlossen, storniert]
        grundlage:
          type: string
          nullable: true
        notizen:
          type: string
          nullable: true

    HebungPaginatedList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/Hebung"
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
        totalPages:
          type: integer
      required:
        - data
        - total
        - page
        - limit
        - totalPages

    ArchivEintrag:
      type: object
      properties:
        id:
          type: integer
        pachtkontoId:
          type: integer
        kontonummer:
          type: string
        bezeichnung:
          type: string
        jahr:
          type: integer
        betrag:
          type: number
        typ:
          type: string
          enum: [pachtzins, hebung, sonstige]
        datum:
          type: string
          format: date
        dokument:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - pachtkontoId
        - kontonummer
        - bezeichnung
        - jahr
        - betrag
        - typ
        - datum
        - createdAt

    ArchivEintragPaginatedList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/ArchivEintrag"
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
        totalPages:
          type: integer
      required:
        - data
        - total
        - page
        - limit
        - totalPages

    AbgeschlossenerBuchungslauf:
      type: object
      required: [id, hebungDatum, buchungsDatum, status, pachtkontoAnzahl]
      properties:
        id:
          type: string
          format: uuid
        hebungDatum:
          type: string
          pattern: '^\d{4}-\d{2}-\d{2}$'
        buchungsDatum:
          type: string
          pattern: '^\d{4}-\d{2}-\d{2}$'
        status:
          type: string
          enum: [ERFOLGREICH]
        pachtkontoAnzahl:
          type: integer

    AuditLogEntry:
      type: object
      properties:
        id:
          type: integer
        timestamp:
          type: string
          format: date-time
        userId:
          type: string
        userName:
          type: string
        action:
          type: string
          enum: [create, update, delete, view, login, logout]
        resource:
          type: string
        resourceId:
          type: string
          nullable: true
        details:
          type: string
          nullable: true
        ipAddress:
          type: string
          nullable: true
      required:
        - id
        - timestamp
        - userId
        - userName
        - action
        - resource

    AuditLogPaginatedList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/AuditLogEntry"
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
        totalPages:
          type: integer
      required:
        - data
        - total
        - page
        - limit
        - totalPages

    MergeBody:
      type: object
      properties:
        masterId:
          type: integer
        duplikatId:
          type: integer
      required:
        - masterId
        - duplikatId

    MergeResult:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
      required:
        - success
        - message

    DuplikatKontaktPaar:
      type: object
      properties:
        grund:
          type: string
        a:
          $ref: "#/components/schemas/Kontakt"
        b:
          $ref: "#/components/schemas/Kontakt"
      required:
        - grund
        - a
        - b

    DuplikatPachtobjektPaar:
      type: object
      properties:
        grund:
          type: string
        a:
          $ref: "#/components/schemas/Patchobjekt"
        b:
          $ref: "#/components/schemas/Patchobjekt"
      required:
        - grund
        - a
        - b

security:
  - cookieAuth: []
