{
  "components": {
    "schemas": {
      "AccountGroupOut": {
        "description": "A group of an account.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name"
        ],
        "title": "AccountGroupOut",
        "type": "object"
      },
      "AccountOut": {
        "description": "An account the user owns, with its groups.",
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/AccountGroupOut"
            },
            "title": "Groups",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/AccountState"
          },
          "usage": {
            "description": "All counters of the account",
            "items": {
              "$ref": "#/components/schemas/UsageOut"
            },
            "title": "Usage",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "state",
          "groups",
          "usage"
        ],
        "title": "AccountOut",
        "type": "object"
      },
      "AccountState": {
        "description": "Lifecycle state of an account, set by the app admin.\n\n``read_only`` blocks writing in every group of the account, reading and export keep working.\n``deletion`` hides the groups of the account; the data is deleted only by a separate step.",
        "enum": [
          "active",
          "read_only",
          "deletion"
        ],
        "title": "AccountState",
        "type": "string"
      },
      "AccountStatsOut": {
        "description": "Statistics of an account: its groups and the history against the quota.",
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/GroupStatsOut"
            },
            "title": "Groups",
            "type": "array"
          },
          "quota_history": {
            "additionalProperties": {
              "items": {
                "$ref": "#/components/schemas/DayValue"
              },
              "type": "array"
            },
            "description": "Per figure (`quota_storage`, `quota_members`, `quota_groups`, `quota_import_pages`) the values of the last 90 days",
            "title": "Quota History",
            "type": "object"
          }
        },
        "required": [
          "groups",
          "quota_history"
        ],
        "title": "AccountStatsOut",
        "type": "object"
      },
      "AreaOut": {
        "description": "An area of the inventory with its extra fields.",
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/ItemFieldOut"
            },
            "title": "Fields",
            "type": "array"
          },
          "key": {
            "description": "`instrument`, `uniform`, `sheet_music`, `technology`, `event` or `other`",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "description": "German name, e.g. `Instrumente`",
            "title": "Label",
            "type": "string"
          },
          "prefix": {
            "description": "Prefix of inventory numbers of items without a category",
            "title": "Prefix",
            "type": "string"
          }
        },
        "required": [
          "key",
          "label",
          "prefix",
          "fields"
        ],
        "title": "AreaOut",
        "type": "object"
      },
      "AttachmentKind": {
        "description": "What an attachment of an item is: who sees it follows from this.",
        "enum": [
          "photo",
          "document"
        ],
        "title": "AttachmentKind",
        "type": "string"
      },
      "AttachmentOut": {
        "description": "A photo or document of an item (#203); documents only for members who may change it.",
        "properties": {
          "content_type": {
            "description": "Media type of the stored file",
            "title": "Content Type",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "file_url": {
            "description": "Path of the file, answers Range",
            "title": "File Url",
            "type": "string"
          },
          "filename": {
            "description": "Name offered on download",
            "title": "Filename",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_cover": {
            "description": "The photo shown in lists, at most one per item",
            "title": "Is Cover",
            "type": "boolean"
          },
          "kind": {
            "$ref": "#/components/schemas/AttachmentKind",
            "description": "`photo` or `document`"
          },
          "maintenance_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Maintenance record it belongs to; only the primary group sees it",
            "title": "Maintenance Id"
          },
          "position": {
            "description": "Order among the attachments of its kind",
            "title": "Position",
            "type": "integer"
          },
          "preview_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Path of a JPEG preview, empty without one",
            "title": "Preview Url"
          },
          "purchase_receipt": {
            "description": "The document is the invoice of the purchase, at most one per item",
            "title": "Purchase Receipt",
            "type": "boolean"
          },
          "sha256": {
            "description": "Checksum of the stored file, hex; unchanged file, same value",
            "title": "Sha256",
            "type": "string"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "filename",
          "content_type",
          "size_bytes",
          "sha256",
          "position",
          "is_cover",
          "purchase_receipt",
          "maintenance_id",
          "file_url",
          "preview_url",
          "created_at",
          "updated_at"
        ],
        "title": "AttachmentOut",
        "type": "object"
      },
      "AttachmentPatch": {
        "description": "Changes of an attachment; fields left out stay as they are.",
        "properties": {
          "is_cover": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "`true` makes this photo the cover; the former cover loses it",
            "title": "Is Cover"
          },
          "maintenance_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Maintenance record of the same item, null removes the link",
            "title": "Maintenance Id"
          },
          "position": {
            "anyOf": [
              {
                "maximum": 10000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Position"
          },
          "purchase_receipt": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "`true` marks this document as invoice of the purchase, `false` unmarks",
            "title": "Purchase Receipt"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Empty removes it",
            "title": "Title"
          }
        },
        "title": "AttachmentPatch",
        "type": "object"
      },
      "BatchLineInput": {
        "description": "One item of a batch.",
        "properties": {
          "condition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemCondition"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only when taking back: state seen at the return; also becomes the state of the item for those who may change it"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only when taking back",
            "title": "Note"
          }
        },
        "required": [
          "item_id"
        ],
        "title": "BatchLineInput",
        "type": "object"
      },
      "Body_analyze_import_api_v1_g__slug__inventory_import_analyze_post": {
        "properties": {
          "create_categories": {
            "default": true,
            "title": "Create Categories",
            "type": "boolean"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "plan": {
            "default": "",
            "description": "JSON object, sheet name to `{\"role\": …, \"columns\": {header or column index: field}}`; sheets left out keep the guessed plan, a new role without `columns` guesses the columns for that role. Roles: `items`, `area:instrument`, `area:uniform`, `area:sheet_music`, `area:technology`, `area:event`, `area:other`, `loans`, `maintenance`, `skip`",
            "title": "Plan",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_analyze_import_api_v1_g__slug__inventory_import_analyze_post",
        "type": "object"
      },
      "Body_apply_workbook_api_v1_g__slug__inventory_import_apply_post": {
        "properties": {
          "create_categories": {
            "default": true,
            "title": "Create Categories",
            "type": "boolean"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "plan": {
            "default": "",
            "description": "JSON object, sheet name to `{\"role\": …, \"columns\": {header or column index: field}}`; sheets left out keep the guessed plan, a new role without `columns` guesses the columns for that role. Roles: `items`, `area:instrument`, `area:uniform`, `area:sheet_music`, `area:technology`, `area:event`, `area:other`, `loans`, `maintenance`, `skip`",
            "title": "Plan",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_apply_workbook_api_v1_g__slug__inventory_import_apply_post",
        "type": "object"
      },
      "Body_read_file_api_v1_g__slug__forscore_sync_read_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_read_file_api_v1_g__slug__forscore_sync_read_post",
        "type": "object"
      },
      "Body_run_import_api_v1_g__slug__stock_import_post": {
        "properties": {
          "dry_run": {
            "default": true,
            "title": "Dry Run",
            "type": "boolean"
          },
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "mapping": {
            "default": "",
            "description": "JSON: field to column index or header name; fields: ['title', 'composer', 'arranger', 'publisher', 'genre', 'archive_number', 'storage_location', 'duration', 'gema_work_number', 'difficulty', 'musical_key', 'time_signature', 'tempo', 'tags', 'purchase_date', 'purchase_shop', 'invoice_number', 'purchase_cost']",
            "title": "Mapping",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_run_import_api_v1_g__slug__stock_import_post",
        "type": "object"
      },
      "Body_upload_attachment_api_v1_g__slug__inventory_items__item_id__attachments_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AttachmentKind"
          },
          "purchase_receipt": {
            "default": false,
            "title": "Purchase Receipt",
            "type": "boolean"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "file",
          "kind"
        ],
        "title": "Body_upload_attachment_api_v1_g__slug__inventory_items__item_id__attachments_post",
        "type": "object"
      },
      "Body_upload_imports_api_v1_g__slug__imports_post": {
        "properties": {
          "files": {
            "items": {
              "contentMediaType": "application/octet-stream",
              "type": "string"
            },
            "title": "Files",
            "type": "array"
          },
          "target_score_set_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Score Set Id"
          }
        },
        "required": [
          "files"
        ],
        "title": "Body_upload_imports_api_v1_g__slug__imports_post",
        "type": "object"
      },
      "Body_upload_receipt_api_v1_g__slug__scores__score_set_id__receipt_put": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "description": "Invoice as PDF, JPEG or PNG, at most 10 MB",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_upload_receipt_api_v1_g__slug__scores__score_set_id__receipt_put",
        "type": "object"
      },
      "Body_upload_score_file_api_v1_g__slug__scores__score_set_id__files_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "type": "string"
          },
          "instrument_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instrument Id"
          },
          "part": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Part"
          },
          "part_number": {
            "anyOf": [
              {
                "maximum": 99.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Part Number"
          },
          "tuning": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tuning"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_upload_score_file_api_v1_g__slug__scores__score_set_id__files_post",
        "type": "object"
      },
      "CandidateOut": {
        "description": "A score set that may be the work.",
        "properties": {
          "archive_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Number"
          },
          "composer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composer"
          },
          "score_set_id": {
            "format": "uuid",
            "title": "Score Set Id",
            "type": "string"
          },
          "similarity": {
            "description": "0 to 100",
            "title": "Similarity",
            "type": "integer"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "score_set_id",
          "title",
          "composer",
          "archive_number",
          "similarity"
        ],
        "title": "CandidateOut",
        "type": "object"
      },
      "CategoriesOut": {
        "description": "The areas with their extra fields and the categories of the group.",
        "properties": {
          "areas": {
            "items": {
              "$ref": "#/components/schemas/AreaOut"
            },
            "title": "Areas",
            "type": "array"
          },
          "categories": {
            "items": {
              "$ref": "#/components/schemas/CategoryOut"
            },
            "title": "Categories",
            "type": "array"
          }
        },
        "required": [
          "areas",
          "categories"
        ],
        "title": "CategoriesOut",
        "type": "object"
      },
      "CategoryInput": {
        "description": "A new category.",
        "properties": {
          "area": {
            "description": "Key of the area, see `AreaOut.key`",
            "title": "Area",
            "type": "string"
          },
          "check_interval_months": {
            "anyOf": [
              {
                "maximum": 120.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months between two inspections of its items",
            "title": "Check Interval Months"
          },
          "name": {
            "maxLength": 100,
            "title": "Name",
            "type": "string"
          },
          "number_prefix": {
            "anyOf": [
              {
                "maxLength": 10,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Prefix of the numbers; the prefix of the area if empty",
            "title": "Number Prefix"
          },
          "size_label": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the sizes measure; only areas with sizes (#211)",
            "title": "Size Label"
          },
          "size_options": {
            "description": "Sizes in their order; only areas with sizes (#211)",
            "items": {
              "type": "string"
            },
            "maxItems": 60,
            "title": "Size Options",
            "type": "array"
          }
        },
        "required": [
          "area",
          "name"
        ],
        "title": "CategoryInput",
        "type": "object"
      },
      "CategoryOut": {
        "description": "A category of the group in one area.",
        "properties": {
          "area": {
            "description": "Key of the area, see `AreaOut.key`",
            "title": "Area",
            "type": "string"
          },
          "check_interval_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months between two inspections of its items, empty for none (#212)",
            "title": "Check Interval Months"
          },
          "fields": {
            "description": "Extra fields of the area of the category",
            "items": {
              "$ref": "#/components/schemas/ItemFieldOut"
            },
            "title": "Fields",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "number_prefix": {
            "description": "Prefix of the inventory numbers, e.g. `BL`",
            "title": "Number Prefix",
            "type": "string"
          },
          "position": {
            "title": "Position",
            "type": "integer"
          },
          "size_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the sizes of its items measure, e.g. `Konfektionsgröße` (#211)",
            "title": "Size Label"
          },
          "size_options": {
            "description": "Sizes its items come in, in this order; suggested, not enforced (#211)",
            "items": {
              "type": "string"
            },
            "title": "Size Options",
            "type": "array"
          }
        },
        "required": [
          "id",
          "area",
          "name",
          "number_prefix",
          "position",
          "check_interval_months",
          "size_label",
          "size_options",
          "fields"
        ],
        "title": "CategoryOut",
        "type": "object"
      },
      "CategoryPatch": {
        "description": "Changes to a category; fields left out stay.\n\n``null`` keeps name and prefix, both are required values, and clears the interval, the size\nlabel and the sizes. Existing inventory numbers stay as they are when the prefix changes,\nitems keep their sizes when the list of sizes changes.",
        "properties": {
          "check_interval_months": {
            "anyOf": [
              {
                "maximum": 120.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months between two inspections of its items",
            "title": "Check Interval Months"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "number_prefix": {
            "anyOf": [
              {
                "maxLength": 10,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Number Prefix"
          },
          "size_label": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the sizes measure; only areas with sizes (#211)",
            "title": "Size Label"
          },
          "size_options": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 60,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sizes in their order; only areas with sizes (#211)",
            "title": "Size Options"
          }
        },
        "title": "CategoryPatch",
        "type": "object"
      },
      "ChangeOut": {
        "description": "A field forScore has a value for.",
        "properties": {
          "action": {
            "description": "`fill` (empty field), `keep` (Tutti's value) or `take`",
            "title": "Action",
            "type": "string"
          },
          "field": {
            "title": "Field",
            "type": "string"
          },
          "forscore": {
            "description": "forScore's value as shown",
            "title": "Forscore",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "tutti": {
            "description": "Value in Tutti as shown, empty when none",
            "title": "Tutti",
            "type": "string"
          }
        },
        "required": [
          "field",
          "label",
          "tutti",
          "forscore",
          "action"
        ],
        "title": "ChangeOut",
        "type": "object"
      },
      "ChangesOut": {
        "description": "One page of changes since a cursor.",
        "properties": {
          "cursor": {
            "description": "Opaque cursor for the next call, store it after applying",
            "title": "Cursor",
            "type": "string"
          },
          "deleted": {
            "items": {
              "$ref": "#/components/schemas/DeletedOut"
            },
            "title": "Deleted",
            "type": "array"
          },
          "full": {
            "description": "This answer belongs to a full sync (no `since` given)",
            "title": "Full",
            "type": "boolean"
          },
          "has_more": {
            "description": "Another page follows, call again with `cursor` at once",
            "title": "Has More",
            "type": "boolean"
          },
          "score_sets": {
            "items": {
              "$ref": "#/components/schemas/SyncScoreSet"
            },
            "title": "Score Sets",
            "type": "array"
          },
          "setlists": {
            "items": {
              "$ref": "#/components/schemas/SetlistDetail"
            },
            "title": "Setlists",
            "type": "array"
          }
        },
        "required": [
          "cursor",
          "has_more",
          "full",
          "score_sets",
          "setlists",
          "deleted"
        ],
        "title": "ChangesOut",
        "type": "object"
      },
      "CommentInput": {
        "description": "Text of a new comment.",
        "properties": {
          "body": {
            "maxLength": 2000,
            "title": "Body",
            "type": "string"
          }
        },
        "required": [
          "body"
        ],
        "title": "CommentInput",
        "type": "object"
      },
      "CommentOut": {
        "description": "A note on a score set.",
        "properties": {
          "author_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Id"
          },
          "author_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Name"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "author_id",
          "author_name",
          "body",
          "created_at"
        ],
        "title": "CommentOut",
        "type": "object"
      },
      "ConfirmBody": {
        "description": "What the client confirms: the piece and the parts to save.",
        "properties": {
          "archive_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Number"
          },
          "arranger": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arranger"
          },
          "composer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composer"
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/PartBody"
            },
            "title": "Parts",
            "type": "array"
          },
          "piece_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Piece Id"
          },
          "target_score_set_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Score Set Id"
          },
          "title": {
            "default": "",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "parts"
        ],
        "title": "ConfirmBody",
        "type": "object"
      },
      "Confirmed": {
        "description": "Result of a confirmation.",
        "properties": {
          "score_set_id": {
            "format": "uuid",
            "title": "Score Set Id",
            "type": "string"
          }
        },
        "required": [
          "score_set_id"
        ],
        "title": "Confirmed",
        "type": "object"
      },
      "CorrectionInput": {
        "description": "A correction to the history; earlier events stay as they are.",
        "properties": {
          "note": {
            "maxLength": 2000,
            "minLength": 1,
            "title": "Note",
            "type": "string"
          }
        },
        "required": [
          "note"
        ],
        "title": "CorrectionInput",
        "type": "object"
      },
      "CountDetailOut": {
        "description": "A count with its entries, by inventory number.",
        "properties": {
          "area": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key of the area, `null` for all",
            "title": "Area"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/CountEntryOut"
            },
            "title": "Entries",
            "type": "array"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` while the count is open",
            "title": "Finished At"
          },
          "finished_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished By Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location, `null` for all",
            "title": "Location"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "scope": {
            "description": "German description of area and location",
            "title": "Scope",
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "started_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started By Id"
          },
          "summary": {
            "$ref": "#/components/schemas/CountSummaryOut"
          }
        },
        "required": [
          "id",
          "area",
          "location",
          "scope",
          "note",
          "started_at",
          "started_by_id",
          "finished_at",
          "finished_by_id",
          "summary",
          "entries"
        ],
        "title": "CountDetailOut",
        "type": "object"
      },
      "CountEntryOut": {
        "description": "One item of a count.",
        "properties": {
          "checked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checked At"
          },
          "checked_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checked By Id"
          },
          "condition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemCondition"
              },
              {
                "type": "null"
              }
            ],
            "description": "Condition seen, written when finished"
          },
          "counted_quantity": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` until checked, 0 for missing",
            "title": "Counted Quantity"
          },
          "expected_quantity": {
            "description": "Target, 0 for an item not on the list at first",
            "title": "Expected Quantity",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "item_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` once the item was deleted",
            "title": "Item Id"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "number": {
            "description": "Inventory number at the start",
            "title": "Number",
            "type": "string"
          },
          "single": {
            "description": "Single item: found (1) or missing (0); else a stock",
            "title": "Single",
            "type": "boolean"
          },
          "state": {
            "enum": [
              "open",
              "found",
              "missing",
              "deviation"
            ],
            "title": "State",
            "type": "string"
          },
          "unit": {
            "title": "Unit",
            "type": "string"
          }
        },
        "required": [
          "id",
          "item_id",
          "number",
          "name",
          "unit",
          "single",
          "expected_quantity",
          "counted_quantity",
          "state",
          "condition",
          "note",
          "checked_at",
          "checked_by_id"
        ],
        "title": "CountEntryOut",
        "type": "object"
      },
      "CountEntryPatch": {
        "description": "Result of an entry; only the fields sent change.",
        "properties": {
          "condition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemCondition"
              },
              {
                "type": "null"
              }
            ]
          },
          "counted_quantity": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "0 for missing, `null` undoes the check; single items 0 or 1",
            "title": "Counted Quantity"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "title": "CountEntryPatch",
        "type": "object"
      },
      "CountFinishInput": {
        "description": "Options of finishing.",
        "properties": {
          "adopt_quantities": {
            "default": false,
            "description": "Whether counted quantities of stocks replace the stored ones",
            "title": "Adopt Quantities",
            "type": "boolean"
          }
        },
        "title": "CountFinishInput",
        "type": "object"
      },
      "CountInput": {
        "description": "A new count.",
        "properties": {
          "area": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key of an area, `null` for all",
            "title": "Area"
          },
          "location": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location as on the items (case does not matter)",
            "title": "Location"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "title": "CountInput",
        "type": "object"
      },
      "CountOut": {
        "description": "A count without its entries.",
        "properties": {
          "area": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key of the area, `null` for all",
            "title": "Area"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` while the count is open",
            "title": "Finished At"
          },
          "finished_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished By Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location, `null` for all",
            "title": "Location"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "scope": {
            "description": "German description of area and location",
            "title": "Scope",
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          },
          "started_by_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started By Id"
          },
          "summary": {
            "$ref": "#/components/schemas/CountSummaryOut"
          }
        },
        "required": [
          "id",
          "area",
          "location",
          "scope",
          "note",
          "started_at",
          "started_by_id",
          "finished_at",
          "finished_by_id",
          "summary"
        ],
        "title": "CountOut",
        "type": "object"
      },
      "CountRetireInput": {
        "description": "Missing entries whose items are retired.",
        "properties": {
          "entry_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` for all missing entries",
            "title": "Entry Ids"
          }
        },
        "title": "CountRetireInput",
        "type": "object"
      },
      "CountRetireOut": {
        "description": "Result of retiring missing items.",
        "properties": {
          "problems": {
            "description": "Entries whose item could not be retired (issued, moved)",
            "items": {
              "$ref": "#/components/schemas/CountRetireProblemOut"
            },
            "title": "Problems",
            "type": "array"
          },
          "retired": {
            "description": "Entries whose item was retired",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Retired",
            "type": "array"
          }
        },
        "required": [
          "retired",
          "problems"
        ],
        "title": "CountRetireOut",
        "type": "object"
      },
      "CountRetireProblemOut": {
        "description": "A missing item that could not be retired.",
        "properties": {
          "entry_id": {
            "format": "uuid",
            "title": "Entry Id",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "entry_id",
          "message"
        ],
        "title": "CountRetireProblemOut",
        "type": "object"
      },
      "CountScanInput": {
        "description": "An inventory number, as scanned or typed, or a scanned QR code.",
        "properties": {
          "inventory_number": {
            "description": "Inventory number, or the address of a scanned QR code (short link) or its code alone, of an own item (#217)",
            "maxLength": 300,
            "minLength": 1,
            "title": "Inventory Number",
            "type": "string"
          }
        },
        "required": [
          "inventory_number"
        ],
        "title": "CountScanInput",
        "type": "object"
      },
      "CountScanOut": {
        "description": "What a scan did.",
        "properties": {
          "entry": {
            "$ref": "#/components/schemas/CountEntryOut"
          },
          "outcome": {
            "description": "`found` checked off, `added` not on the list and added, `already` checked before (unchanged), `quantity` a stock whose quantity is still to be entered",
            "enum": [
              "found",
              "added",
              "already",
              "quantity"
            ],
            "title": "Outcome",
            "type": "string"
          }
        },
        "required": [
          "outcome",
          "entry"
        ],
        "title": "CountScanOut",
        "type": "object"
      },
      "CountSummaryOut": {
        "description": "How far a count is.",
        "properties": {
          "added": {
            "description": "Entries found that were not on the list at the start",
            "title": "Added",
            "type": "integer"
          },
          "checked": {
            "title": "Checked",
            "type": "integer"
          },
          "deviations": {
            "description": "Checked entries whose quantity differs from the target",
            "title": "Deviations",
            "type": "integer"
          },
          "found": {
            "description": "Checked entries with something found",
            "title": "Found",
            "type": "integer"
          },
          "missing": {
            "description": "Checked entries with nothing found",
            "title": "Missing",
            "type": "integer"
          },
          "total": {
            "description": "Entries on the list",
            "title": "Total",
            "type": "integer"
          },
          "unchecked": {
            "title": "Unchecked",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "checked",
          "unchecked",
          "found",
          "missing",
          "deviations",
          "added"
        ],
        "title": "CountSummaryOut",
        "type": "object"
      },
      "DayValue": {
        "description": "A figure on one day.",
        "properties": {
          "day": {
            "format": "date",
            "title": "Day",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "integer"
          }
        },
        "required": [
          "day",
          "value"
        ],
        "title": "DayValue",
        "type": "object"
      },
      "DeletedOut": {
        "description": "A score set or setlist that no longer exists.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "enum": [
              "score_set",
              "setlist"
            ],
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id"
        ],
        "title": "DeletedOut",
        "type": "object"
      },
      "DemoToken": {
        "description": "Access token of a demo user, sent as Bearer token like one of the IdP.",
        "properties": {
          "access_token": {
            "description": "Bearer token for /api/v1.",
            "title": "Access Token",
            "type": "string"
          },
          "expires_in": {
            "description": "Lifetime in seconds.",
            "title": "Expires In",
            "type": "integer"
          },
          "token_type": {
            "default": "Bearer",
            "description": "Always Bearer.",
            "title": "Token Type",
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/DemoUserInfo"
          }
        },
        "required": [
          "access_token",
          "expires_in",
          "user"
        ],
        "title": "DemoToken",
        "type": "object"
      },
      "DemoTokenRequest": {
        "description": "Which demo user the app signs in as.",
        "properties": {
          "user": {
            "description": "Key of a demo user from GET /api/v1/demo/users.",
            "title": "User",
            "type": "string"
          }
        },
        "required": [
          "user"
        ],
        "title": "DemoTokenRequest",
        "type": "object"
      },
      "DemoUserInfo": {
        "description": "A demo user the app offers to sign in as.",
        "properties": {
          "description": {
            "description": "One German line on what the user may do.",
            "title": "Description",
            "type": "string"
          },
          "key": {
            "description": "Key for POST /api/v1/demo/token.",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "description": "German name of the role.",
            "title": "Label",
            "type": "string"
          },
          "name": {
            "description": "Invented display name.",
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "key",
          "name",
          "label",
          "description"
        ],
        "title": "DemoUserInfo",
        "type": "object"
      },
      "DueItemOut": {
        "description": "An item of the list \"Fällig\".",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/ItemOut"
          },
          "urgency": {
            "anyOf": [
              {
                "enum": [
                  "overdue",
                  "due"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`overdue`, `due` (within 30 days or never checked) or empty when the item is only in repair",
            "title": "Urgency"
          }
        },
        "required": [
          "urgency",
          "item"
        ],
        "title": "DueItemOut",
        "type": "object"
      },
      "DueListOut": {
        "description": "Own items whose inspection is overdue or due, then those only in repair.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DueItemOut"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "DueListOut",
        "type": "object"
      },
      "EntryInput": {
        "description": "One line of a setlist to save.",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/SetlistEntryKind"
          },
          "score_set_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score Set Id"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          }
        },
        "required": [
          "kind"
        ],
        "title": "EntryInput",
        "type": "object"
      },
      "EventOut": {
        "description": "One event in the history of an object.",
        "properties": {
          "actor_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who entered it; empty once the user is gone",
            "title": "Actor Id"
          },
          "actor_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the actor at the time, stays for good",
            "title": "Actor Name"
          },
          "data": {
            "additionalProperties": true,
            "description": "Details; for updated {'changes': {field: [old, new]}}, for files {'files': [...]}, for loans recipient and dates",
            "title": "Data",
            "type": "object"
          },
          "event": {
            "description": "What happened, e.g. created, updated, loaned, correction",
            "title": "Event",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "label": {
            "description": "German name of the event",
            "title": "Label",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event",
          "label",
          "occurred_at",
          "actor_id",
          "actor_name",
          "data",
          "note"
        ],
        "title": "EventOut",
        "type": "object"
      },
      "EventPageOut": {
        "description": "One page of the history, newest first.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EventOut"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "pages": {
            "title": "Pages",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "pages"
        ],
        "title": "EventPageOut",
        "type": "object"
      },
      "ExportOut": {
        "description": "An export job of an account.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why a failed export failed, in German",
            "title": "Error"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Until when the file can be downloaded",
            "title": "Expires At"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size Bytes"
          },
          "state": {
            "$ref": "#/components/schemas/ExportState"
          }
        },
        "required": [
          "id",
          "state",
          "created_at",
          "finished_at",
          "expires_at",
          "size_bytes",
          "error"
        ],
        "title": "ExportOut",
        "type": "object"
      },
      "ExportState": {
        "description": "Progress of an account export job.",
        "enum": [
          "queued",
          "running",
          "done",
          "failed"
        ],
        "title": "ExportState",
        "type": "string"
      },
      "ExtendInput": {
        "description": "New planned return of an open loan.",
        "properties": {
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Empty for open-ended",
            "title": "Due On"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          }
        },
        "required": [
          "due_on"
        ],
        "title": "ExtendInput",
        "type": "object"
      },
      "Folder": {
        "description": "The folder of the member for a setlist.",
        "properties": {
          "has_instruments": {
            "description": "Whether the member entered instruments",
            "title": "Has Instruments",
            "type": "boolean"
          },
          "missing": {
            "description": "Numbers of the pieces without a part for the member",
            "items": {
              "type": "integer"
            },
            "title": "Missing",
            "type": "array"
          },
          "page_count": {
            "title": "Page Count",
            "type": "integer"
          },
          "part": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key of the chosen part, null for the member's own instruments",
            "title": "Part"
          },
          "pieces": {
            "items": {
              "$ref": "#/components/schemas/FolderPiece"
            },
            "title": "Pieces",
            "type": "array"
          },
          "setlist_id": {
            "format": "uuid",
            "title": "Setlist Id",
            "type": "string"
          },
          "setlist_name": {
            "title": "Setlist Name",
            "type": "string"
          },
          "since": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only pieces added on or after this day, null for all",
            "title": "Since"
          }
        },
        "required": [
          "setlist_id",
          "setlist_name",
          "has_instruments",
          "pieces",
          "missing",
          "page_count"
        ],
        "title": "Folder",
        "type": "object"
      },
      "FolderExportFormat": {
        "description": "What the job builds: the merged PDF, the ZIP, or the forScore setlist with PDFs.",
        "enum": [
          "pdf",
          "zip",
          "forscore"
        ],
        "title": "FolderExportFormat",
        "type": "string"
      },
      "FolderExportOut": {
        "description": "A large download that the worker builds in the background (#408).",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "done_files": {
            "description": "Files written so far",
            "title": "Done Files",
            "type": "integer"
          },
          "file_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Path of the file, set once it can be fetched",
            "title": "File Path"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "format": {
            "$ref": "#/components/schemas/FolderExportFormat"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reason of a failure, German",
            "title": "Message"
          },
          "part": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Part a Notenwart chose, empty for the own instruments",
            "title": "Part"
          },
          "status": {
            "$ref": "#/components/schemas/FolderExportStatus"
          },
          "status_path": {
            "description": "Path to poll, called with the same token",
            "title": "Status Path",
            "type": "string"
          },
          "total_files": {
            "description": "Files in all, the table of contents counts as one",
            "title": "Total Files",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "format",
          "part",
          "status",
          "done_files",
          "total_files",
          "message",
          "created_at",
          "finished_at",
          "status_path",
          "file_path"
        ],
        "title": "FolderExportOut",
        "type": "object"
      },
      "FolderExportStatus": {
        "description": "Where a job is in its life.",
        "enum": [
          "queued",
          "running",
          "done",
          "failed"
        ],
        "title": "FolderExportStatus",
        "type": "string"
      },
      "FolderFile": {
        "description": "A part of the member for one piece.",
        "properties": {
          "download_path": {
            "description": "Path of the PDF, called with the same token",
            "title": "Download Path",
            "type": "string"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "page_count": {
            "title": "Page Count",
            "type": "integer"
          },
          "score_set_id": {
            "format": "uuid",
            "title": "Score Set Id",
            "type": "string"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "score_set_id",
          "label",
          "filename",
          "page_count",
          "size_bytes",
          "download_path"
        ],
        "title": "FolderFile",
        "type": "object"
      },
      "FolderPart": {
        "description": "A part of the setlist a Notenwart can load the folder for.",
        "properties": {
          "instrument_id": {
            "format": "uuid",
            "title": "Instrument Id",
            "type": "string"
          },
          "key": {
            "description": "Value of the query parameter part",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "description": "Instrument with tuning and part, e.g. Horn in F 2",
            "title": "Label",
            "type": "string"
          },
          "part": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Part"
          },
          "tuning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tuning"
          }
        },
        "required": [
          "key",
          "instrument_id",
          "tuning",
          "part",
          "label"
        ],
        "title": "FolderPart",
        "type": "object"
      },
      "FolderPiece": {
        "description": "A piece of the setlist with the member's parts.",
        "properties": {
          "files": {
            "description": "Empty when the piece has no part for the member",
            "items": {
              "$ref": "#/components/schemas/FolderFile"
            },
            "title": "Files",
            "type": "array"
          },
          "number": {
            "title": "Number",
            "type": "integer"
          },
          "score_set_id": {
            "format": "uuid",
            "title": "Score Set Id",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "number",
          "score_set_id",
          "title",
          "files"
        ],
        "title": "FolderPiece",
        "type": "object"
      },
      "ForscoreFields": {
        "description": "What forScore says about the PDF of a setlist export (#390).",
        "properties": {
          "arranger": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arranger"
          },
          "composer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composer"
          },
          "difficulty": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`leicht`, `mittel` or `schwer`",
            "title": "Difficulty"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "genre": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Genre"
          },
          "labels": {
            "description": "Labels in forScore, usually the instrument",
            "items": {
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "libraries": {
            "description": "Libraries in forScore, only shown",
            "items": {
              "type": "string"
            },
            "title": "Libraries",
            "type": "array"
          },
          "musical_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key as code, e.g. `Eb` or `F#m` (see the score set)",
            "title": "Musical Key"
          },
          "tags": {
            "description": "Keywords",
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "tempo_bpm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tempo Bpm"
          },
          "time_signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "e.g. `6/8`",
            "title": "Time Signature"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Title in forScore, often with the part in it",
            "title": "Title"
          }
        },
        "required": [
          "title",
          "composer",
          "arranger",
          "labels",
          "libraries"
        ],
        "title": "ForscoreFields",
        "type": "object"
      },
      "ForscoreFile": {
        "description": "What forScore knows about one PDF; checked again when sent back.",
        "properties": {
          "arranger": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arranger"
          },
          "composer": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composer"
          },
          "difficulty": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "1 (easy) to 3 (hard)",
            "title": "Difficulty"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "file_path": {
            "description": "Name of the PDF in forScore; setlist lines refer to it",
            "maxLength": 500,
            "title": "File Path",
            "type": "string"
          },
          "genre": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Genre"
          },
          "labels": {
            "default": [],
            "description": "Labels, usually the instrument",
            "items": {
              "maxLength": 500,
              "type": "string"
            },
            "title": "Labels",
            "type": "array"
          },
          "libraries": {
            "default": [],
            "description": "forScore libraries of the PDF",
            "items": {
              "maxLength": 500,
              "type": "string"
            },
            "title": "Libraries",
            "type": "array"
          },
          "musical_key": {
            "anyOf": [
              {
                "maxLength": 4,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key as code, e.g. `Eb`, `F#m`",
            "title": "Musical Key"
          },
          "tags": {
            "default": [],
            "description": "Keywords",
            "items": {
              "maxLength": 500,
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "tempo_bpm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tempo Bpm"
          },
          "time_signature": {
            "anyOf": [
              {
                "maxLength": 5,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "examples": [
              "6/8"
            ],
            "title": "Time Signature"
          },
          "title": {
            "description": "Title as in forScore, often with the part",
            "maxLength": 500,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "file_path",
          "title"
        ],
        "title": "ForscoreFile",
        "type": "object"
      },
      "ForscoreSetlist": {
        "description": "A forScore setlist.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ForscoreSetlistItem"
            },
            "maxItems": 1000,
            "title": "Items",
            "type": "array"
          },
          "library": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Library"
          },
          "name": {
            "maxLength": 500,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "items"
        ],
        "title": "ForscoreSetlist",
        "type": "object"
      },
      "ForscoreSetlistItem": {
        "description": "One line of a forScore setlist.",
        "properties": {
          "file_path": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "PDF of the line, null for a separator",
            "title": "File Path"
          },
          "heading": {
            "default": false,
            "description": "`true` for a separator",
            "title": "Heading",
            "type": "boolean"
          },
          "title": {
            "maxLength": 500,
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "ForscoreSetlistItem",
        "type": "object"
      },
      "ForscoreSource": {
        "description": "Content of a forScore file, as ``…/read`` answers it.",
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/ForscoreFile"
            },
            "maxItems": 5000,
            "title": "Files",
            "type": "array"
          },
          "kind": {
            "enum": [
              "backup",
              "setlist"
            ],
            "title": "Kind",
            "type": "string"
          },
          "setlists": {
            "items": {
              "$ref": "#/components/schemas/ForscoreSetlist"
            },
            "maxItems": 500,
            "title": "Setlists",
            "type": "array"
          }
        },
        "required": [
          "kind",
          "files",
          "setlists"
        ],
        "title": "ForscoreSource",
        "type": "object"
      },
      "GroupInfo": {
        "description": "A group of the user with their role and the modules the group uses.",
        "properties": {
          "modules": {
            "description": "Modules switched on for the group, in navigation order",
            "items": {
              "$ref": "#/components/schemas/ModuleInfo"
            },
            "title": "Modules",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "permissions": {
            "description": "Permission keys the user holds in this group (all their roles added up)",
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          },
          "read_only": {
            "description": "The account of the group is read-only: every write request answers 403",
            "title": "Read Only",
            "type": "boolean"
          },
          "role": {
            "$ref": "#/components/schemas/Role",
            "description": "Role of the user in this group"
          },
          "slug": {
            "description": "Short name of the group, part of every group path",
            "title": "Slug",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "name",
          "role",
          "modules",
          "permissions",
          "read_only"
        ],
        "title": "GroupInfo",
        "type": "object"
      },
      "GroupStatsOut": {
        "description": "Statistics of one group of an account.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "slug": {
            "title": "Slug",
            "type": "string"
          },
          "stats": {
            "$ref": "#/components/schemas/StatsOut"
          }
        },
        "required": [
          "slug",
          "name",
          "stats"
        ],
        "title": "GroupStatsOut",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "ImportJobOut": {
        "description": "A job of the import assistant.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "filename": {
            "title": "Filename",
            "type": "string"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "page_count": {
            "title": "Page Count",
            "type": "integer"
          },
          "progress": {
            "title": "Progress",
            "type": "integer"
          },
          "queue_position": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Place among the waiting jobs of the own group (1 is next), `null` unless queued",
            "title": "Queue Position"
          },
          "setlist_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Draft setlist of the forScore export; confirming puts the score set into it",
            "title": "Setlist Id"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "source": {
            "default": "pdf",
            "description": "`forscore` for a PDF from a forScore setlist export (#390), `pdf` otherwise",
            "enum": [
              "pdf",
              "forscore"
            ],
            "title": "Source",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ImportJobStatus"
          },
          "target_score_set_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Score set the parts should be added to, chosen at the upload",
            "title": "Target Score Set Id"
          }
        },
        "required": [
          "id",
          "filename",
          "status",
          "progress",
          "message",
          "page_count",
          "size_bytes",
          "created_at",
          "finished_at"
        ],
        "title": "ImportJobOut",
        "type": "object"
      },
      "ImportJobStatus": {
        "description": "Where a job is in its life.",
        "enum": [
          "queued",
          "running",
          "done",
          "failed"
        ],
        "title": "ImportJobStatus",
        "type": "string"
      },
      "ImportOutcomeOut": {
        "description": "What a real run wrote.",
        "properties": {
          "categories": {
            "title": "Categories",
            "type": "integer"
          },
          "created": {
            "title": "Created",
            "type": "integer"
          },
          "loans": {
            "title": "Loans",
            "type": "integer"
          },
          "maintenance": {
            "title": "Maintenance",
            "type": "integer"
          },
          "retired": {
            "title": "Retired",
            "type": "integer"
          },
          "updated": {
            "title": "Updated",
            "type": "integer"
          }
        },
        "required": [
          "created",
          "updated",
          "retired",
          "loans",
          "maintenance",
          "categories"
        ],
        "title": "ImportOutcomeOut",
        "type": "object"
      },
      "ImportResult": {
        "description": "Report of the check and, after a real run, the number of created score sets.",
        "properties": {
          "created": {
            "description": "Score sets created, 0 for a dry run",
            "title": "Created",
            "type": "integer"
          },
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "headers": {
            "items": {
              "type": "string"
            },
            "title": "Headers",
            "type": "array"
          },
          "importable": {
            "title": "Importable",
            "type": "integer"
          },
          "mapping": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Field key to column index that was used",
            "title": "Mapping",
            "type": "object"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/ImportRow"
            },
            "title": "Rows",
            "type": "array"
          }
        },
        "required": [
          "headers",
          "mapping",
          "rows",
          "importable",
          "errors",
          "created"
        ],
        "title": "ImportResult",
        "type": "object"
      },
      "ImportRow": {
        "description": "What happens with one row.",
        "properties": {
          "action": {
            "description": "`create`, `reuse` (piece exists in the catalog), `skip`, `error`",
            "title": "Action",
            "type": "string"
          },
          "messages": {
            "items": {
              "type": "string"
            },
            "title": "Messages",
            "type": "array"
          },
          "row": {
            "description": "Row number as in a spreadsheet, the header is row 1",
            "title": "Row",
            "type": "integer"
          },
          "values": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Values",
            "type": "object"
          }
        },
        "required": [
          "row",
          "action",
          "messages",
          "values"
        ],
        "title": "ImportRow",
        "type": "object"
      },
      "InventoryChangesOut": {
        "description": "One page of changes of the inventory since a cursor.",
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/CategoryOut"
            },
            "title": "Categories",
            "type": "array"
          },
          "cursor": {
            "description": "Opaque cursor for the next call, store it after applying",
            "title": "Cursor",
            "type": "string"
          },
          "deleted": {
            "items": {
              "$ref": "#/components/schemas/InventoryDeletedOut"
            },
            "title": "Deleted",
            "type": "array"
          },
          "full": {
            "description": "This answer belongs to a full sync: after the last page drop every item and category the full sync did not list",
            "title": "Full",
            "type": "boolean"
          },
          "has_more": {
            "description": "Another page follows, call again with `cursor` at once",
            "title": "Has More",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemOut"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "cursor",
          "has_more",
          "full",
          "items",
          "categories",
          "deleted"
        ],
        "title": "InventoryChangesOut",
        "type": "object"
      },
      "InventoryDeletedOut": {
        "description": "An item or category the group no longer sees: deleted, moved or no longer shared.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "enum": [
              "item",
              "category"
            ],
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "id"
        ],
        "title": "InventoryDeletedOut",
        "type": "object"
      },
      "InventoryImportResult": {
        "description": "Report of the check and, after ``apply``, what was written.",
        "properties": {
          "errors": {
            "title": "Errors",
            "type": "integer"
          },
          "importable": {
            "description": "Items, loans and maintenance records that `apply` writes",
            "title": "Importable",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemRowOut"
            },
            "title": "Items",
            "type": "array"
          },
          "loans": {
            "items": {
              "$ref": "#/components/schemas/LoanRowOut"
            },
            "title": "Loans",
            "type": "array"
          },
          "maintenance": {
            "items": {
              "$ref": "#/components/schemas/MaintenanceRowOut"
            },
            "title": "Maintenance",
            "type": "array"
          },
          "new_categories": {
            "items": {
              "$ref": "#/components/schemas/NewCategoryOut"
            },
            "title": "New Categories",
            "type": "array"
          },
          "new_locations": {
            "items": {
              "type": "string"
            },
            "title": "New Locations",
            "type": "array"
          },
          "outcome": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ImportOutcomeOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` for `analyze`"
          },
          "sheets": {
            "items": {
              "$ref": "#/components/schemas/SheetOut"
            },
            "title": "Sheets",
            "type": "array"
          }
        },
        "required": [
          "sheets",
          "items",
          "loans",
          "maintenance",
          "new_categories",
          "new_locations",
          "importable",
          "errors",
          "outcome"
        ],
        "title": "InventoryImportResult",
        "type": "object"
      },
      "IssueInput": {
        "description": "Issuing an item.",
        "properties": {
          "condition": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "State at issue",
            "title": "Condition"
          },
          "contact": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only for free-text recipients",
            "title": "Contact"
          },
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Planned return, empty for open-ended",
            "title": "Due On"
          },
          "issued_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Today when empty",
            "title": "Issued On"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "recipient": {
            "description": "Name; matches exactly one member by display name, otherwise free text",
            "maxLength": 200,
            "minLength": 1,
            "title": "Recipient",
            "type": "string"
          },
          "with_parts": {
            "default": false,
            "description": "Issue the parts of the set too (#211), each with its own loan; parts that cannot go out are named in `skipped`",
            "title": "With Parts",
            "type": "boolean"
          }
        },
        "required": [
          "recipient"
        ],
        "title": "IssueInput",
        "type": "object"
      },
      "ItemCondition": {
        "description": "Condition of an item, the values of the inventory template.\n\n\"Ausgemustert\" of the template is no condition here: a retired item has ``retired_on``.",
        "enum": [
          "new",
          "very_good",
          "good",
          "used",
          "needs_repair",
          "defective"
        ],
        "title": "ItemCondition",
        "type": "string"
      },
      "ItemFieldOut": {
        "description": "An extra field of an area, stored in ``details`` of its items under ``key``.",
        "properties": {
          "key": {
            "description": "Key in `details`, e.g. `tuning`",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "description": "German label, e.g. `Stimmung`",
            "title": "Label",
            "type": "string"
          },
          "max_length": {
            "title": "Max Length",
            "type": "integer"
          }
        },
        "required": [
          "key",
          "label",
          "max_length"
        ],
        "title": "ItemFieldOut",
        "type": "object"
      },
      "ItemInput": {
        "description": "A new item.",
        "properties": {
          "area": {
            "description": "Key of the area, see `AreaOut.key`",
            "title": "Area",
            "type": "string"
          },
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "check_interval_months": {
            "anyOf": [
              {
                "maximum": 120.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months between two inspections, before the category's",
            "title": "Check Interval Months"
          },
          "condition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemCondition"
              },
              {
                "type": "null"
              }
            ]
          },
          "details": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": "Extra fields of the area by key",
            "title": "Details",
            "type": "object"
          },
          "instrument_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only for instruments",
            "title": "Instrument Id"
          },
          "last_checked_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Checked On"
          },
          "location": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "manufacturer": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manufacturer"
          },
          "model": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "name": {
            "maxLength": 200,
            "title": "Name",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Empty takes the next number of the category's prefix",
            "title": "Number"
          },
          "purchase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemPurchaseInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "default": 1,
            "maximum": 1000000.0,
            "minimum": 1.0,
            "title": "Quantity",
            "type": "integer"
          },
          "replacement_value": {
            "anyOf": [
              {
                "maximum": 99999999.99,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Replacement Value"
          },
          "serial_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          },
          "unit": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit"
          }
        },
        "required": [
          "area",
          "name"
        ],
        "title": "ItemInput",
        "type": "object"
      },
      "ItemLabelInput": {
        "description": "Which items get a label, in which format.",
        "properties": {
          "area": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key of the area (instrument, uniform, …), empty for all",
            "title": "Area"
          },
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "condition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemCondition"
              },
              {
                "type": "null"
              }
            ]
          },
          "item_ids": {
            "default": [],
            "description": "Chosen items; when given, area, filters and range are ignored. Items of other groups are left out",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 1000,
            "title": "Item Ids",
            "type": "array"
          },
          "layout": {
            "default": "a4-3x8",
            "description": "Key from GET /api/v1/labels/layouts",
            "title": "Layout",
            "type": "string"
          },
          "location": {
            "default": "",
            "maxLength": 200,
            "title": "Location",
            "type": "string"
          },
          "name": {
            "default": "",
            "description": "Exact name, whatever the case",
            "maxLength": 200,
            "title": "Name",
            "type": "string"
          },
          "number_from": {
            "default": "",
            "description": "First inventory number, inclusive; filters only",
            "maxLength": 64,
            "title": "Number From",
            "type": "string"
          },
          "number_to": {
            "default": "",
            "description": "Last inventory number, inclusive; filters only",
            "maxLength": 64,
            "title": "Number To",
            "type": "string"
          },
          "query": {
            "default": "",
            "description": "Search term of the item list",
            "maxLength": 200,
            "title": "Query",
            "type": "string"
          },
          "size": {
            "default": "",
            "description": "Only in areas with sizes",
            "maxLength": 100,
            "title": "Size",
            "type": "string"
          },
          "start": {
            "default": 1,
            "description": "Position of the first label on the sheet",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Start",
            "type": "integer"
          },
          "status": {
            "anyOf": [
              {
                "enum": [
                  "issued",
                  "available",
                  "repair",
                  "retired",
                  "all"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Like the item list; empty gives the items in use",
            "title": "Status"
          }
        },
        "title": "ItemLabelInput",
        "type": "object"
      },
      "ItemLoanOut": {
        "description": "A loan of an item, with the loans of its parts issued or taken back with it.",
        "properties": {
          "condition_in": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition In"
          },
          "condition_out": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition Out"
          },
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due On"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "issued_on": {
            "format": "date",
            "title": "Issued On",
            "type": "string"
          },
          "kind": {
            "description": "Kind of the object, <module>.<object>, e.g. noten.score_set",
            "title": "Kind",
            "type": "string"
          },
          "member_left": {
            "description": "Went to a member who is no longer in the group",
            "title": "Member Left",
            "type": "boolean"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "object_id": {
            "format": "uuid",
            "title": "Object Id",
            "type": "string"
          },
          "object_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the object; empty once it is deleted",
            "title": "Object Label"
          },
          "overdue": {
            "title": "Overdue",
            "type": "boolean"
          },
          "parts": {
            "description": "Loans of the parts issued or taken back in the same request (#211)",
            "items": {
              "$ref": "#/components/schemas/LoanOut"
            },
            "title": "Parts",
            "type": "array"
          },
          "recipient_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipient Contact"
          },
          "recipient_kind": {
            "$ref": "#/components/schemas/RecipientKind",
            "description": "member or text (person without account)"
          },
          "recipient_membership_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipient Membership Id"
          },
          "recipient_name": {
            "title": "Recipient Name",
            "type": "string"
          },
          "returned_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Returned On"
          },
          "skipped": {
            "description": "Parts that could not go out, each with the German reason",
            "items": {
              "type": "string"
            },
            "title": "Skipped",
            "type": "array"
          }
        },
        "required": [
          "id",
          "kind",
          "object_id",
          "object_label",
          "recipient_name",
          "recipient_kind",
          "recipient_membership_id",
          "member_left",
          "recipient_contact",
          "issued_on",
          "due_on",
          "returned_on",
          "overdue",
          "condition_out",
          "condition_in",
          "note"
        ],
        "title": "ItemLoanOut",
        "type": "object"
      },
      "ItemOut": {
        "description": "An item as the group of the member sees it, own or shared.",
        "properties": {
          "area": {
            "description": "Key of the area, see `AreaOut.key`",
            "title": "Area",
            "type": "string"
          },
          "attachments": {
            "description": "Photos for everyone who sees the item, documents only with write access (#203); photos first, then by position",
            "items": {
              "$ref": "#/components/schemas/AttachmentOut"
            },
            "title": "Attachments",
            "type": "array"
          },
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "category_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Name"
          },
          "check_interval_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months between two inspections; empty takes the one of the category (#212)",
            "title": "Check Interval Months"
          },
          "condition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemCondition"
              },
              {
                "type": "null"
              }
            ],
            "description": "`new`, `very_good`, `good`, `used`, `needs_repair` or `defective`; empty when unknown"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "details": {
            "additionalProperties": true,
            "description": "Extra fields of the area by key",
            "title": "Details",
            "type": "object"
          },
          "group_id": {
            "description": "Primary group, the owner of the item",
            "format": "uuid",
            "title": "Group Id",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "in_repair": {
            "description": "Whether a repair of it is open or in progress (#212)",
            "title": "In Repair",
            "type": "boolean"
          },
          "instrument_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only for instruments",
            "title": "Instrument Id"
          },
          "issued": {
            "description": "Whether the item is issued, by this or another group (#209)",
            "title": "Issued",
            "type": "boolean"
          },
          "issued_until": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Planned return of an issued item, if any",
            "title": "Issued Until"
          },
          "last_checked_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Checked On"
          },
          "loan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LoanOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "The open loan, only for members who may issue the item and only when this group issued it"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "manufacturer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manufacturer"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "never_checked": {
            "description": "Whether it has an interval but no inspection yet",
            "title": "Never Checked",
            "type": "boolean"
          },
          "next_check_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next inspection: agreed in the last finished service or inspection, else the last inspection plus the interval; empty without either",
            "title": "Next Check On"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "number": {
            "description": "Inventory number, unique in its primary group",
            "title": "Number",
            "type": "string"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the primary group of a shared item",
            "title": "Owner Name"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Main item of the set this item is a part of (#211); empty for none and when the group does not see the main item",
            "title": "Parent Id"
          },
          "part_ids": {
            "description": "Parts of the set this item is the main item of, as far as the group sees them, by inventory number; empty for none",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Part Ids",
            "type": "array"
          },
          "permissions": {
            "description": "Inventory permissions of the member on this item, grant included",
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          },
          "purchase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemPurchaseOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only for members who may change the item"
          },
          "quantity": {
            "title": "Quantity",
            "type": "integer"
          },
          "replacement_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Euros with two decimals",
            "title": "Replacement Value"
          },
          "retired_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Day of retiring; empty while in use",
            "title": "Retired On"
          },
          "retired_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retired Reason"
          },
          "serial_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          },
          "share_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`read`, `issue` or `write` for a shared item, empty for an own one",
            "title": "Share Level"
          },
          "shared": {
            "description": "Whether another group shares the item with this one",
            "title": "Shared",
            "type": "boolean"
          },
          "short_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Code of the short link (QR code, #217); the address follows short_link_url of GET /api/v1/server. Only own items have one: GET of the item and printing its label create it, other answers show it once it exists; empty for shared items",
            "title": "Short Code"
          },
          "unit": {
            "title": "Unit",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "area",
          "number",
          "name",
          "category_id",
          "category_name",
          "manufacturer",
          "model",
          "serial_number",
          "quantity",
          "unit",
          "condition",
          "location",
          "last_checked_on",
          "check_interval_months",
          "next_check_on",
          "never_checked",
          "in_repair",
          "replacement_value",
          "details",
          "instrument_id",
          "note",
          "retired_on",
          "retired_reason",
          "group_id",
          "shared",
          "owner_name",
          "share_level",
          "permissions",
          "purchase",
          "issued",
          "issued_until",
          "loan",
          "parent_id",
          "part_ids",
          "created_at",
          "updated_at"
        ],
        "title": "ItemOut",
        "type": "object"
      },
      "ItemPage": {
        "description": "One page of the item list.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemOut"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "per_page": {
            "title": "Per Page",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "per_page"
        ],
        "title": "ItemPage",
        "type": "object"
      },
      "ItemPatch": {
        "description": "Changes to an item; fields left out stay, ``null`` clears a field.\n\n``details`` replaces all extra fields, ``purchase`` all four purchase fields. The area of an\nitem never changes.",
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "check_interval_months": {
            "anyOf": [
              {
                "maximum": 120.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Months between two inspections, before the category's",
            "title": "Check Interval Months"
          },
          "condition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemCondition"
              },
              {
                "type": "null"
              }
            ]
          },
          "details": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details"
          },
          "instrument_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instrument Id"
          },
          "last_checked_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Checked On"
          },
          "location": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "manufacturer": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manufacturer"
          },
          "model": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 32,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Number"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Puts the item into the set of this main item of the group, `null` takes it out (#211); only the primary group, only single items, one level",
            "title": "Parent Id"
          },
          "purchase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemPurchaseInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "anyOf": [
              {
                "maximum": 1000000.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantity"
          },
          "replacement_value": {
            "anyOf": [
              {
                "maximum": 99999999.99,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Replacement Value"
          },
          "serial_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          },
          "unit": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unit"
          }
        },
        "title": "ItemPatch",
        "type": "object"
      },
      "ItemPurchaseInput": {
        "description": "Purchase data of an item; replaces all four fields, the receipt stays.",
        "properties": {
          "invoice_number": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          },
          "purchase_cost": {
            "anyOf": [
              {
                "maximum": 99999999.99,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Cost"
          },
          "purchase_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Date"
          },
          "purchase_shop": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Shop"
          }
        },
        "title": "ItemPurchaseInput",
        "type": "object"
      },
      "ItemPurchaseOut": {
        "description": "Purchase data of an item, only for members who may change it.",
        "properties": {
          "invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          },
          "purchase_cost": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Euros with two decimals",
            "title": "Purchase Cost"
          },
          "purchase_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Date"
          },
          "purchase_shop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Shop"
          },
          "receipt_attachment_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document marked as invoice of the purchase (#203), its file under attachments; empty without one",
            "title": "Receipt Attachment Id"
          },
          "receipt_content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Receipt Content Type"
          },
          "receipt_filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the receipt, empty without one",
            "title": "Receipt Filename"
          },
          "receipt_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Receipt Size Bytes"
          }
        },
        "required": [
          "purchase_date",
          "purchase_shop",
          "invoice_number",
          "purchase_cost",
          "receipt_filename",
          "receipt_content_type",
          "receipt_size_bytes"
        ],
        "title": "ItemPurchaseOut",
        "type": "object"
      },
      "ItemReturnInput": {
        "description": "Taking an issued item back.",
        "properties": {
          "condition": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "returned_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Today when empty",
            "title": "Returned On"
          },
          "with_parts": {
            "default": false,
            "description": "Take back the parts of the set that are still out with the same recipient (#211), on the same day",
            "title": "With Parts",
            "type": "boolean"
          }
        },
        "title": "ItemReturnInput",
        "type": "object"
      },
      "ItemRowOut": {
        "description": "What happens with one item, merged from all its rows.",
        "properties": {
          "action": {
            "description": "`create`, `update`, `unchanged` or `error`",
            "title": "Action",
            "type": "string"
          },
          "area": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Area"
          },
          "changes": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "description": "German field name to old and new value",
            "title": "Changes",
            "type": "object"
          },
          "errors": {
            "items": {
              "type": "string"
            },
            "title": "Errors",
            "type": "array"
          },
          "loans": {
            "items": {
              "$ref": "#/components/schemas/LoanPlanOut"
            },
            "title": "Loans",
            "type": "array"
          },
          "maintenance": {
            "items": {
              "$ref": "#/components/schemas/MaintenancePlanOut"
            },
            "title": "Maintenance",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Number"
          },
          "retire": {
            "title": "Retire",
            "type": "boolean"
          },
          "sources": {
            "description": "Sheet and row the item was built from",
            "items": {
              "type": "string"
            },
            "title": "Sources",
            "type": "array"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "number",
          "area",
          "name",
          "action",
          "sources",
          "errors",
          "warnings",
          "changes",
          "retire",
          "loans",
          "maintenance"
        ],
        "title": "ItemRowOut",
        "type": "object"
      },
      "LabelInput": {
        "description": "Which score sets get a label, in which format.",
        "properties": {
          "archive_from": {
            "default": "",
            "description": "First archive number, inclusive; filters only",
            "maxLength": 64,
            "title": "Archive From",
            "type": "string"
          },
          "archive_to": {
            "default": "",
            "description": "Last archive number, inclusive; filters only",
            "maxLength": 64,
            "title": "Archive To",
            "type": "string"
          },
          "composer": {
            "default": "",
            "maxLength": 200,
            "title": "Composer",
            "type": "string"
          },
          "genre": {
            "default": "",
            "maxLength": 200,
            "title": "Genre",
            "type": "string"
          },
          "layout": {
            "default": "a4-3x8",
            "description": "Key from GET /api/v1/labels/layouts",
            "title": "Layout",
            "type": "string"
          },
          "loan": {
            "anyOf": [
              {
                "enum": [
                  "lent",
                  "overdue"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Loan"
          },
          "query": {
            "default": "",
            "description": "Search term of the score list",
            "maxLength": 200,
            "title": "Query",
            "type": "string"
          },
          "score_set_ids": {
            "default": [],
            "description": "Chosen score sets; when given, filters are ignored",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 1000,
            "title": "Score Set Ids",
            "type": "array"
          },
          "start": {
            "default": 1,
            "description": "Position of the first label on the sheet",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Start",
            "type": "integer"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScoreSetStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "LabelInput",
        "type": "object"
      },
      "LayoutOut": {
        "description": "One label format.",
        "properties": {
          "key": {
            "description": "Value for layout, e.g. a4-3x8",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "description": "German name",
            "title": "Label",
            "type": "string"
          },
          "label_height_mm": {
            "title": "Label Height Mm",
            "type": "number"
          },
          "label_width_mm": {
            "title": "Label Width Mm",
            "type": "number"
          },
          "per_page": {
            "description": "Labels per page; the start position lies from 1 to this",
            "title": "Per Page",
            "type": "integer"
          },
          "sheet": {
            "description": "A sheet of several labels (true) or a label printer (false)",
            "title": "Sheet",
            "type": "boolean"
          }
        },
        "required": [
          "key",
          "label",
          "label_width_mm",
          "label_height_mm",
          "per_page",
          "sheet"
        ],
        "title": "LayoutOut",
        "type": "object"
      },
      "LayoutsOut": {
        "description": "The label formats of the installation.",
        "properties": {
          "default": {
            "description": "Key used without layout",
            "title": "Default",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/LayoutOut"
            },
            "title": "Items",
            "type": "array"
          },
          "max_labels": {
            "description": "Most labels in one PDF",
            "title": "Max Labels",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "default",
          "max_labels"
        ],
        "title": "LayoutsOut",
        "type": "object"
      },
      "LibraryOut": {
        "description": "A forScore library in the file.",
        "properties": {
          "files": {
            "description": "PDFs in it",
            "title": "Files",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "files"
        ],
        "title": "LibraryOut",
        "type": "object"
      },
      "LineupInputBody": {
        "description": "The complete lineup of a score set; an empty list removes it.",
        "properties": {
          "lines": {
            "items": {
              "$ref": "#/components/schemas/LineupLineInput"
            },
            "title": "Lines",
            "type": "array"
          }
        },
        "required": [
          "lines"
        ],
        "title": "LineupInputBody",
        "type": "object"
      },
      "LineupLineInput": {
        "description": "One wanted line of a lineup: an instrument once per tuning (#282).\n\n``parts`` names the parts; without it ``part_count`` numbers them 1 to the count.",
        "properties": {
          "instrument_id": {
            "format": "uuid",
            "title": "Instrument Id",
            "type": "string"
          },
          "part_count": {
            "default": 1,
            "maximum": 99.0,
            "minimum": 1.0,
            "title": "Part Count",
            "type": "integer"
          },
          "parts": {
            "anyOf": [
              {
                "items": {
                  "maxLength": 20,
                  "type": "string"
                },
                "maxItems": 99,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parts"
          },
          "tuning": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tuning"
          }
        },
        "required": [
          "instrument_id"
        ],
        "title": "LineupLineInput",
        "type": "object"
      },
      "LineupLineOut": {
        "description": "One line of the lineup and what is still missing for it.",
        "properties": {
          "instrument": {
            "description": "Name of the instrument",
            "title": "Instrument",
            "type": "string"
          },
          "instrument_id": {
            "format": "uuid",
            "title": "Instrument Id",
            "type": "string"
          },
          "missing": {
            "description": "The numbered ones of `missing_parts` (kept for older clients)",
            "items": {
              "type": "integer"
            },
            "title": "Missing",
            "type": "array"
          },
          "missing_parts": {
            "description": "Parts that are not there yet (`[\"1\"]` for a missing one-part line)",
            "items": {
              "type": "string"
            },
            "title": "Missing Parts",
            "type": "array"
          },
          "part_count": {
            "description": "Number of parts, at least 1",
            "title": "Part Count",
            "type": "integer"
          },
          "parts": {
            "description": "Part designations, empty for one part (#282)",
            "items": {
              "type": "string"
            },
            "title": "Parts",
            "type": "array"
          },
          "tuning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tuning of the line, e.g. `B` (#282)",
            "title": "Tuning"
          }
        },
        "required": [
          "instrument_id",
          "instrument",
          "tuning",
          "parts",
          "part_count",
          "missing_parts",
          "missing"
        ],
        "title": "LineupLineOut",
        "type": "object"
      },
      "LinkOut": {
        "description": "What a short link leads to.",
        "properties": {
          "api_path": {
            "description": "Path of the object in the API, e.g. /api/v1/g/<slug>/…",
            "title": "Api Path",
            "type": "string"
          },
          "code": {
            "description": "The code in stored form, upper case",
            "title": "Code",
            "type": "string"
          },
          "group": {
            "description": "Slug of the group the object belongs to",
            "title": "Group",
            "type": "string"
          },
          "group_name": {
            "title": "Group Name",
            "type": "string"
          },
          "kind": {
            "description": "Kind of the object, <module>.<object>, e.g. noten.score_set",
            "title": "Kind",
            "type": "string"
          },
          "kind_label": {
            "description": "German name of the kind, e.g. Notensatz",
            "title": "Kind Label",
            "type": "string"
          },
          "label": {
            "description": "Name of the object",
            "title": "Label",
            "type": "string"
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Archive or inventory number",
            "title": "Number"
          },
          "object_id": {
            "format": "uuid",
            "title": "Object Id",
            "type": "string"
          },
          "url": {
            "description": "Full address of the short link, as in the QR code",
            "title": "Url",
            "type": "string"
          },
          "web_path": {
            "description": "Path of the page of the object, e.g. /g/<slug>/scores/<id>",
            "title": "Web Path",
            "type": "string"
          }
        },
        "required": [
          "code",
          "url",
          "kind",
          "kind_label",
          "group",
          "group_name",
          "object_id",
          "label",
          "number",
          "web_path",
          "api_path"
        ],
        "title": "LinkOut",
        "type": "object"
      },
      "LoanBatchInput": {
        "description": "Issuing several items to one recipient, or taking several items back.",
        "properties": {
          "action": {
            "enum": [
              "issue",
              "return"
            ],
            "title": "Action",
            "type": "string"
          },
          "condition": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only when issuing: state at issue, for every item",
            "title": "Condition"
          },
          "contact": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only for free-text recipients",
            "title": "Contact"
          },
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Planned return, empty for open-ended",
            "title": "Due On"
          },
          "issued_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Today when empty",
            "title": "Issued On"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/BatchLineInput"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Items",
            "type": "array"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only when issuing",
            "title": "Note"
          },
          "recipient": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required to issue: name; matches exactly one member by display name, otherwise free text",
            "title": "Recipient"
          },
          "returned_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only when taking back; today when empty",
            "title": "Returned On"
          },
          "with_parts": {
            "default": false,
            "description": "Issue or take back the parts of sets with their main items (#211); a part in the list as well is not issued twice",
            "title": "With Parts",
            "type": "boolean"
          }
        },
        "required": [
          "action",
          "items"
        ],
        "title": "LoanBatchInput",
        "type": "object"
      },
      "LoanBatchOut": {
        "description": "What a batch wrote.",
        "properties": {
          "loans": {
            "description": "Loans of the items sent, in their order; a part that went out or came back with its main item (with_parts) is in parts instead",
            "items": {
              "$ref": "#/components/schemas/LoanOut"
            },
            "title": "Loans",
            "type": "array"
          },
          "parts": {
            "description": "Loans of parts that went out or came back with them",
            "items": {
              "$ref": "#/components/schemas/LoanOut"
            },
            "title": "Parts",
            "type": "array"
          },
          "skipped": {
            "description": "Parts that could not go out, each with the reason",
            "items": {
              "type": "string"
            },
            "title": "Skipped",
            "type": "array"
          }
        },
        "required": [
          "loans"
        ],
        "title": "LoanBatchOut",
        "type": "object"
      },
      "LoanInput": {
        "description": "Lending an object.",
        "properties": {
          "condition": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition"
          },
          "contact": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only for free-text recipients",
            "title": "Contact"
          },
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due On"
          },
          "issued_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Today when empty",
            "title": "Issued On"
          },
          "kind": {
            "description": "Kind of the object, e.g. noten.score_set",
            "maxLength": 64,
            "title": "Kind",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "object_id": {
            "format": "uuid",
            "title": "Object Id",
            "type": "string"
          },
          "recipient": {
            "description": "Name; matches exactly one member by display name, otherwise free text",
            "maxLength": 200,
            "minLength": 1,
            "title": "Recipient",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "object_id",
          "recipient"
        ],
        "title": "LoanInput",
        "type": "object"
      },
      "LoanOut": {
        "description": "A loan of an object.",
        "properties": {
          "condition_in": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition In"
          },
          "condition_out": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition Out"
          },
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due On"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "issued_on": {
            "format": "date",
            "title": "Issued On",
            "type": "string"
          },
          "kind": {
            "description": "Kind of the object, <module>.<object>, e.g. noten.score_set",
            "title": "Kind",
            "type": "string"
          },
          "member_left": {
            "description": "Went to a member who is no longer in the group",
            "title": "Member Left",
            "type": "boolean"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "object_id": {
            "format": "uuid",
            "title": "Object Id",
            "type": "string"
          },
          "object_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the object; empty once it is deleted",
            "title": "Object Label"
          },
          "overdue": {
            "title": "Overdue",
            "type": "boolean"
          },
          "recipient_contact": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipient Contact"
          },
          "recipient_kind": {
            "$ref": "#/components/schemas/RecipientKind",
            "description": "member or text (person without account)"
          },
          "recipient_membership_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipient Membership Id"
          },
          "recipient_name": {
            "title": "Recipient Name",
            "type": "string"
          },
          "returned_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Returned On"
          }
        },
        "required": [
          "id",
          "kind",
          "object_id",
          "object_label",
          "recipient_name",
          "recipient_kind",
          "recipient_membership_id",
          "member_left",
          "recipient_contact",
          "issued_on",
          "due_on",
          "returned_on",
          "overdue",
          "condition_out",
          "condition_in",
          "note"
        ],
        "title": "LoanOut",
        "type": "object"
      },
      "LoanPage": {
        "description": "One page of loans.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/LoanOut"
            },
            "title": "Items",
            "type": "array"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total"
        ],
        "title": "LoanPage",
        "type": "object"
      },
      "LoanPlanOut": {
        "description": "A loan the import creates for an item.",
        "properties": {
          "due_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due On"
          },
          "issued_on": {
            "title": "Issued On",
            "type": "string"
          },
          "member": {
            "description": "Whether the name matched exactly one member",
            "title": "Member",
            "type": "boolean"
          },
          "recipient": {
            "description": "Name as stored, a member's display name when matched",
            "title": "Recipient",
            "type": "string"
          },
          "returned_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`null` for an open loan",
            "title": "Returned On"
          }
        },
        "required": [
          "recipient",
          "member",
          "issued_on",
          "due_on",
          "returned_on"
        ],
        "title": "LoanPlanOut",
        "type": "object"
      },
      "LoanRowOut": {
        "description": "One row of the loan sheet.",
        "properties": {
          "action": {
            "description": "`create`, `skip` or `error`",
            "title": "Action",
            "type": "string"
          },
          "messages": {
            "items": {
              "type": "string"
            },
            "title": "Messages",
            "type": "array"
          },
          "number": {
            "title": "Number",
            "type": "string"
          },
          "recipient": {
            "title": "Recipient",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "source",
          "number",
          "recipient",
          "action",
          "messages"
        ],
        "title": "LoanRowOut",
        "type": "object"
      },
      "MaintenanceInput": {
        "description": "A new record, or all fields of a changed one.",
        "properties": {
          "cost": {
            "anyOf": [
              {
                "maximum": 99999999.99,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "description": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "done_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required for `done`, empty otherwise; not before `reported_on`",
            "title": "Done On"
          },
          "invoice_number": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          },
          "kind": {
            "$ref": "#/components/schemas/MaintenanceKind"
          },
          "next_due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Due On"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "provider": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "reported_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Today when empty; not in the future",
            "title": "Reported On"
          },
          "result": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "status": {
            "$ref": "#/components/schemas/MaintenanceStatus",
            "default": "open"
          }
        },
        "required": [
          "kind",
          "description"
        ],
        "title": "MaintenanceInput",
        "type": "object"
      },
      "MaintenanceKind": {
        "description": "What a maintenance record is about (#212).",
        "enum": [
          "maintenance",
          "repair",
          "inspection"
        ],
        "title": "MaintenanceKind",
        "type": "string"
      },
      "MaintenanceOut": {
        "description": "A service, repair or inspection of an item.",
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Euros with two decimals",
            "title": "Cost"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "description": "Damage or work",
            "title": "Description",
            "type": "string"
          },
          "done_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only for finished records",
            "title": "Done On"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/MaintenanceKind",
            "description": "`maintenance`, `repair` or `inspection`"
          },
          "next_due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next inspection as agreed; wins over the interval while it is the latest",
            "title": "Next Due On"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company or person who did the work",
            "title": "Provider"
          },
          "reported_on": {
            "format": "date",
            "title": "Reported On",
            "type": "string"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "status": {
            "$ref": "#/components/schemas/MaintenanceStatus",
            "description": "`open`, `in_progress`, `done` or `deferred`"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "item_id",
          "kind",
          "status",
          "description",
          "reported_on",
          "done_on",
          "result",
          "provider",
          "invoice_number",
          "cost",
          "next_due_on",
          "note",
          "created_at",
          "updated_at"
        ],
        "title": "MaintenanceOut",
        "type": "object"
      },
      "MaintenancePatch": {
        "description": "Changes to a record; fields left out stay, ``null`` clears an optional field.",
        "properties": {
          "cost": {
            "anyOf": [
              {
                "maximum": 99999999.99,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cost"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "done_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Done On"
          },
          "invoice_number": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          },
          "kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MaintenanceKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Due On"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "provider": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "reported_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reported On"
          },
          "result": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MaintenanceStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "MaintenancePatch",
        "type": "object"
      },
      "MaintenancePlanOut": {
        "description": "A maintenance record the import creates for an item (#212).",
        "properties": {
          "cost": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Euros with cents as text, e.g. `120.50`",
            "title": "Cost"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "done_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Done On"
          },
          "kind": {
            "description": "`maintenance`, `repair` or `inspection`",
            "title": "Kind",
            "type": "string"
          },
          "next_due_on": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Due On"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "reported_on": {
            "title": "Reported On",
            "type": "string"
          },
          "status": {
            "description": "`open`, `in_progress`, `done` or `deferred`",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "status",
          "description",
          "reported_on",
          "done_on",
          "provider",
          "cost",
          "next_due_on",
          "note"
        ],
        "title": "MaintenancePlanOut",
        "type": "object"
      },
      "MaintenanceRowOut": {
        "description": "One row of the sheet of maintenance and repairs (#212).",
        "properties": {
          "action": {
            "description": "`create`, `skip` or `error`",
            "title": "Action",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Planned kind, `null` with errors",
            "title": "Kind"
          },
          "messages": {
            "items": {
              "type": "string"
            },
            "title": "Messages",
            "type": "array"
          },
          "number": {
            "title": "Number",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Planned status, `null` with errors",
            "title": "Status"
          }
        },
        "required": [
          "source",
          "number",
          "description",
          "kind",
          "status",
          "action",
          "messages"
        ],
        "title": "MaintenanceRowOut",
        "type": "object"
      },
      "MaintenanceStatus": {
        "description": "Where a maintenance record stands, the values of the sheet \"Reparaturen-Wartung\".",
        "enum": [
          "open",
          "in_progress",
          "done",
          "deferred"
        ],
        "title": "MaintenanceStatus",
        "type": "string"
      },
      "Me": {
        "description": "The signed-in user, with everything an app needs to build its navigation.",
        "properties": {
          "accent": {
            "description": "Key of the accent color: petrol, red, orange, yellow, ...",
            "title": "Accent",
            "type": "string"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Path of the profile picture (needs the token), `null` shows initials",
            "title": "Avatar Url"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/GroupInfo"
            },
            "title": "Groups",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_admin": {
            "description": "App admin; holds every permission in every group of the instance",
            "title": "Is Admin",
            "type": "boolean"
          },
          "score_columns": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fields the score list shows next to the title, `null` for the default",
            "title": "Score Columns"
          }
        },
        "required": [
          "id",
          "display_name",
          "email",
          "is_admin",
          "accent",
          "avatar_url",
          "score_columns",
          "groups"
        ],
        "title": "Me",
        "type": "object"
      },
      "MemberOut": {
        "description": "A member of a group with the roles they hold.",
        "properties": {
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "from_oidc": {
            "const": false,
            "description": "Always `false`: memberships are kept in the app, the IdP grants none. Kept for clients of v1",
            "title": "From Oidc",
            "type": "boolean"
          },
          "id": {
            "description": "Id of the membership",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "role_ids": {
            "description": "Ids of the roles the member holds",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Role Ids",
            "type": "array"
          }
        },
        "required": [
          "id",
          "display_name",
          "email",
          "role_ids",
          "from_oidc"
        ],
        "title": "MemberOut",
        "type": "object"
      },
      "MemberRolesInput": {
        "description": "The roles a member holds from now on.",
        "properties": {
          "role_ids": {
            "description": "At least one role of the group",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Role Ids",
            "type": "array"
          }
        },
        "required": [
          "role_ids"
        ],
        "title": "MemberRolesInput",
        "type": "object"
      },
      "ModuleFigureOut": {
        "description": "One figure a module announces for the statistics.",
        "properties": {
          "key": {
            "description": "Stored name, starts with the module key, e.g. `inventar.items`",
            "title": "Key",
            "type": "string"
          },
          "kind": {
            "description": "`snapshot` for a nightly value, `last_30_days` for a summed counting figure",
            "enum": [
              "snapshot",
              "last_30_days"
            ],
            "title": "Kind",
            "type": "string"
          },
          "label": {
            "description": "German name of the figure",
            "title": "Label",
            "type": "string"
          },
          "value": {
            "description": "Newest snapshot value, or the sum of the last 30 days for a counting figure",
            "title": "Value",
            "type": "integer"
          }
        },
        "required": [
          "key",
          "label",
          "value",
          "kind"
        ],
        "title": "ModuleFigureOut",
        "type": "object"
      },
      "ModuleInfo": {
        "description": "A module a group has switched on.",
        "properties": {
          "key": {
            "description": "Stable identifier of the module, e.g. `noten`",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "description": "Name of the module in the interface",
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "key",
          "label"
        ],
        "title": "ModuleInfo",
        "type": "object"
      },
      "ModuleStatsOut": {
        "description": "The figures of one module the group has switched on.",
        "properties": {
          "figures": {
            "items": {
              "$ref": "#/components/schemas/ModuleFigureOut"
            },
            "title": "Figures",
            "type": "array"
          },
          "label": {
            "description": "Name of the module",
            "title": "Label",
            "type": "string"
          },
          "module": {
            "description": "Key of the module",
            "title": "Module",
            "type": "string"
          }
        },
        "required": [
          "module",
          "label",
          "figures"
        ],
        "title": "ModuleStatsOut",
        "type": "object"
      },
      "MyItemDetailOut": {
        "description": "One filled extra field of the item's area.",
        "properties": {
          "label": {
            "description": "German name of the field, e.g. `Größe`",
            "title": "Label",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "label",
          "value"
        ],
        "title": "MyItemDetailOut",
        "type": "object"
      },
      "MyItemOut": {
        "description": "An item issued to the member, with the fields a member may see.",
        "properties": {
          "area": {
            "description": "Key of the area, see `AreaOut.key`",
            "title": "Area",
            "type": "string"
          },
          "area_label": {
            "description": "German name of the area",
            "title": "Area Label",
            "type": "string"
          },
          "category_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Name"
          },
          "condition_out": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Condition when it was issued, as entered",
            "title": "Condition Out"
          },
          "details": {
            "description": "Filled extra fields of the area, in the order of the area",
            "items": {
              "$ref": "#/components/schemas/MyItemDetailOut"
            },
            "title": "Details",
            "type": "array"
          },
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Planned return, empty when none was agreed",
            "title": "Due On"
          },
          "issued_on": {
            "format": "date",
            "title": "Issued On",
            "type": "string"
          },
          "item_id": {
            "format": "uuid",
            "title": "Item Id",
            "type": "string"
          },
          "manufacturer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manufacturer"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "number": {
            "description": "Inventory number",
            "title": "Number",
            "type": "string"
          },
          "overdue": {
            "description": "The planned return lies before today",
            "title": "Overdue",
            "type": "boolean"
          },
          "serial_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          }
        },
        "required": [
          "item_id",
          "number",
          "name",
          "area",
          "area_label",
          "category_name",
          "manufacturer",
          "model",
          "serial_number",
          "details",
          "issued_on",
          "due_on",
          "overdue",
          "condition_out"
        ],
        "title": "MyItemOut",
        "type": "object"
      },
      "NewCategoryOut": {
        "description": "A category the import creates.",
        "properties": {
          "area": {
            "title": "Area",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          }
        },
        "required": [
          "area",
          "name",
          "prefix"
        ],
        "title": "NewCategoryOut",
        "type": "object"
      },
      "PartBody": {
        "description": "A part as the client leaves it after the review.",
        "properties": {
          "discard": {
            "default": false,
            "title": "Discard",
            "type": "boolean"
          },
          "instrument_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instrument Id"
          },
          "learn_synonym": {
            "anyOf": [
              {
                "maxLength": 60,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Learn Synonym"
          },
          "pages": {
            "items": {
              "type": "integer"
            },
            "title": "Pages",
            "type": "array"
          },
          "part": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Part"
          },
          "part_number": {
            "anyOf": [
              {
                "maximum": 99.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Part number of older clients, `part` wins",
            "title": "Part Number"
          },
          "tuning": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tuning"
          }
        },
        "required": [
          "pages"
        ],
        "title": "PartBody",
        "type": "object"
      },
      "PermissionOut": {
        "description": "A permission a role can grant.",
        "properties": {
          "key": {
            "description": "Stable identifier such as `noten.schreiben`",
            "title": "Key",
            "type": "string"
          },
          "label": {
            "description": "Short German description for the role editor",
            "title": "Label",
            "type": "string"
          },
          "module": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Key of the module that owns it, `null` for the core",
            "title": "Module"
          }
        },
        "required": [
          "key",
          "label",
          "module"
        ],
        "title": "PermissionOut",
        "type": "object"
      },
      "PieceOut": {
        "description": "A work with its catalog data; pieces are shared by all groups.",
        "properties": {
          "arranger": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arranger"
          },
          "composer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composer"
          },
          "difficulty": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Difficulty"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "gema_work_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gema Work Number"
          },
          "genre": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Genre"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "musical_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sounding key as code: letter, \"b\" or \"#\", \"m\" for minor (\"Eb\", \"F#m\")",
            "title": "Musical Key"
          },
          "musical_key_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The key in German, e.g. \"Es-Dur\"",
            "title": "Musical Key Name"
          },
          "publisher": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Publisher"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "tempo_bpm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tempo in beats per minute",
            "title": "Tempo Bpm"
          },
          "time_signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time signature such as \"2/4\"",
            "title": "Time Signature"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "composer",
          "arranger",
          "publisher",
          "genre",
          "gema_work_number",
          "duration_seconds",
          "difficulty",
          "tags",
          "tempo_bpm",
          "time_signature",
          "musical_key",
          "musical_key_name"
        ],
        "title": "PieceOut",
        "type": "object"
      },
      "PlanLineOut": {
        "description": "A line of a draft setlist.",
        "properties": {
          "kind": {
            "description": "`piece` or `heading`",
            "title": "Kind",
            "type": "string"
          },
          "score_set_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score Set Id"
          },
          "text": {
            "description": "Heading or hint; for a piece the title of the work",
            "title": "Text",
            "type": "string"
          },
          "work_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Key"
          }
        },
        "required": [
          "kind",
          "text",
          "score_set_id",
          "work_key"
        ],
        "title": "PlanLineOut",
        "type": "object"
      },
      "PurchaseInput": {
        "description": "Purchase data of a score set; replaces all four fields, the receipt stays.",
        "properties": {
          "invoice_number": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          },
          "purchase_cost": {
            "anyOf": [
              {
                "maximum": 99999999.99,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Cost"
          },
          "purchase_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Date"
          },
          "purchase_shop": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Shop"
          }
        },
        "title": "PurchaseInput",
        "type": "object"
      },
      "PurchaseOut": {
        "description": "Purchase data of a score set, only for roles with noten.schreiben.",
        "properties": {
          "invoice_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invoice Number"
          },
          "purchase_cost": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Euros with two decimals",
            "title": "Purchase Cost"
          },
          "purchase_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Date"
          },
          "purchase_shop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchase Shop"
          },
          "receipt_content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Receipt Content Type"
          },
          "receipt_filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the receipt, empty without one",
            "title": "Receipt Filename"
          },
          "receipt_size_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Receipt Size Bytes"
          }
        },
        "required": [
          "purchase_date",
          "purchase_shop",
          "invoice_number",
          "purchase_cost",
          "receipt_filename",
          "receipt_content_type",
          "receipt_size_bytes"
        ],
        "title": "PurchaseOut",
        "type": "object"
      },
      "QuotaMetric": {
        "description": "What is counted per account.",
        "enum": [
          "storage",
          "members",
          "groups",
          "import_pages",
          "vision_pages"
        ],
        "title": "QuotaMetric",
        "type": "string"
      },
      "RecipientKind": {
        "description": "Whether a loan went to a member of the group or to someone named in free text.",
        "enum": [
          "member",
          "text"
        ],
        "title": "RecipientKind",
        "type": "string"
      },
      "RetireInput": {
        "description": "Retiring an item.",
        "properties": {
          "reason": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "e.g. `verkauft`",
            "title": "Reason"
          },
          "retired_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Day of retiring, today if empty",
            "title": "Retired On"
          }
        },
        "title": "RetireInput",
        "type": "object"
      },
      "ReturnInput": {
        "description": "Taking an object back.",
        "properties": {
          "condition": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Condition"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "returned_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Today when empty",
            "title": "Returned On"
          }
        },
        "title": "ReturnInput",
        "type": "object"
      },
      "Review": {
        "description": "Everything the review of a finished import shows.",
        "properties": {
          "forscore": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ForscoreFields"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fields from forScore, `null` for a plain PDF; confirming copies those of the piece into it, into an existing piece only where they are empty"
          },
          "instruments": {
            "items": {
              "$ref": "#/components/schemas/ReviewInstrument"
            },
            "title": "Instruments",
            "type": "array"
          },
          "job": {
            "$ref": "#/components/schemas/ImportJobOut"
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/ReviewPart"
            },
            "title": "Parts",
            "type": "array"
          },
          "suggested_arranger": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggested Arranger"
          },
          "suggested_composer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggested Composer"
          },
          "suggested_piece_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Catalog piece that probably is this one",
            "title": "Suggested Piece Id"
          },
          "suggested_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggested Title"
          },
          "suggestion_confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggestion Confidence"
          },
          "target_score_sets": {
            "items": {
              "$ref": "#/components/schemas/ReviewTarget"
            },
            "title": "Target Score Sets",
            "type": "array"
          }
        },
        "required": [
          "job",
          "suggested_title",
          "suggested_composer",
          "suggested_arranger",
          "suggestion_confidence",
          "suggested_piece_id",
          "target_score_sets",
          "parts",
          "instruments"
        ],
        "title": "Review",
        "type": "object"
      },
      "ReviewInstrument": {
        "description": "An instrument to choose from.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_score": {
            "title": "Is Score",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "is_score"
        ],
        "title": "ReviewInstrument",
        "type": "object"
      },
      "ReviewPart": {
        "description": "A part the assistant found, as the review shows it.",
        "properties": {
          "confidence": {
            "title": "Confidence",
            "type": "number"
          },
          "header_text": {
            "description": "Text read from the header of the first page",
            "title": "Header Text",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "instrument_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instrument Id"
          },
          "pages": {
            "items": {
              "type": "integer"
            },
            "title": "Pages",
            "type": "array"
          },
          "part": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Recognized part designation, e.g. `2` (#282)",
            "title": "Part"
          },
          "part_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "`part` as a number, empty for words (kept for older clients)",
            "title": "Part Number"
          },
          "position": {
            "title": "Position",
            "type": "integer"
          },
          "tuning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Recognized tuning, e.g. `B` (#282)",
            "title": "Tuning"
          },
          "uncertain": {
            "title": "Uncertain",
            "type": "boolean"
          },
          "vision_suggested": {
            "description": "The instrument was suggested by the vision fallback",
            "title": "Vision Suggested",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "position",
          "instrument_id",
          "tuning",
          "part",
          "part_number",
          "pages",
          "confidence",
          "uncertain",
          "vision_suggested",
          "header_text"
        ],
        "title": "ReviewPart",
        "type": "object"
      },
      "ReviewTarget": {
        "description": "A score set of the group the parts can be added to.",
        "properties": {
          "archive_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Number"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "archive_number"
        ],
        "title": "ReviewTarget",
        "type": "object"
      },
      "Role": {
        "description": "Level of a user inside a group, ordered from most to least rights.\n\nThe editor (\"Notenwart\") runs the score archive; further roles such as the board add their\nrights. App admin is no role in a group, it sits on ``User.is_admin`` and holds every right.",
        "enum": [
          "editor",
          "member"
        ],
        "title": "Role",
        "type": "string"
      },
      "RoleInput": {
        "description": "Name and permissions of an own role, to create or replace it.",
        "properties": {
          "name": {
            "description": "Unique within the group (case-insensitive), up to 60 characters",
            "title": "Name",
            "type": "string"
          },
          "permissions": {
            "description": "Permission keys from `GET /permissions`",
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          }
        },
        "required": [
          "name"
        ],
        "title": "RoleInput",
        "type": "object"
      },
      "RoleLogEntry": {
        "description": "One change of a role or of the roles of a member.",
        "properties": {
          "action": {
            "description": "`role.create`, `role.update`, `role.delete`, `member.add`, `member.roles` or `member.remove`",
            "title": "Action",
            "type": "string"
          },
          "actor": {
            "description": "Display name of the user who changed it, at that time",
            "title": "Actor",
            "type": "string"
          },
          "at": {
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What changed, in German",
            "title": "Detail"
          },
          "subject": {
            "description": "Name of the role or of the member concerned",
            "title": "Subject",
            "type": "string"
          }
        },
        "required": [
          "at",
          "actor",
          "action",
          "subject",
          "detail"
        ],
        "title": "RoleLogEntry",
        "type": "object"
      },
      "RoleOut": {
        "description": "A role of a group with the permissions it grants.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "member_count": {
            "description": "Number of members holding the role",
            "title": "Member Count",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "permissions": {
            "description": "Permission keys, sorted",
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          },
          "standard": {
            "description": "Standard role (`member`, `editor`): managed by the app, read-only",
            "title": "Standard",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "standard",
          "permissions",
          "member_count"
        ],
        "title": "RoleOut",
        "type": "object"
      },
      "RowOut": {
        "description": "One line of a setlist: a piece or a heading.",
        "properties": {
          "archive_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Number"
          },
          "arranger": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arranger"
          },
          "composer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composer"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "gema_work_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gema Work Number"
          },
          "kind": {
            "$ref": "#/components/schemas/SetlistEntryKind"
          },
          "musical_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sounding key of the piece as a code such as Eb or F#m",
            "title": "Musical Key"
          },
          "number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Number"
          },
          "publisher": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Publisher"
          },
          "score_set_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Score set of a piece; empty in the snapshot of a played setlist",
            "title": "Score Set Id"
          },
          "tempo_bpm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tempo of the piece in beats per minute",
            "title": "Tempo Bpm"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "time_signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time signature of the piece, e.g. 6/8",
            "title": "Time Signature"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "kind",
          "text",
          "number",
          "title",
          "composer",
          "arranger",
          "publisher",
          "gema_work_number",
          "duration_seconds",
          "archive_number",
          "score_set_id"
        ],
        "title": "RowOut",
        "type": "object"
      },
      "ScoreFileOut": {
        "description": "A PDF of a score set.",
        "properties": {
          "filename": {
            "description": "Name the download gets",
            "title": "Filename",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "instrument_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instrument Id"
          },
          "label": {
            "description": "Instrument with tuning and part, e.g. `Klarinette in B 2`",
            "title": "Label",
            "type": "string"
          },
          "own": {
            "description": "Whether it is a part of an instrument the member plays",
            "title": "Own",
            "type": "boolean"
          },
          "page_count": {
            "title": "Page Count",
            "type": "integer"
          },
          "part": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Part designation, e.g. `2`, `Solo` or `1+2` (#282)",
            "title": "Part"
          },
          "part_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "`part` as a number, empty for words and combinations (kept for older clients)",
            "title": "Part Number"
          },
          "role": {
            "description": "`score`, `part` or `other`",
            "title": "Role",
            "type": "string"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "tuning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tuning of the part, e.g. `B` (#282)",
            "title": "Tuning"
          }
        },
        "required": [
          "id",
          "role",
          "instrument_id",
          "tuning",
          "part",
          "part_number",
          "label",
          "filename",
          "page_count",
          "size_bytes",
          "own"
        ],
        "title": "ScoreFileOut",
        "type": "object"
      },
      "ScoreFilePatch": {
        "description": "What a stored file is said to contain; fields left out stay as they are (#284).",
        "properties": {
          "instrument_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "New instrument, `null` for other material",
            "title": "Instrument Id"
          },
          "part": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Part"
          },
          "tuning": {
            "anyOf": [
              {
                "maxLength": 20,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tuning"
          }
        },
        "title": "ScoreFilePatch",
        "type": "object"
      },
      "ScoreSetDetail": {
        "description": "A score set with its parts, lineup and comments.\n\nWith a non-empty ``lineup`` the ``status`` is calculated from the files.",
        "properties": {
          "archive_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Number"
          },
          "comments": {
            "items": {
              "$ref": "#/components/schemas/CommentOut"
            },
            "title": "Comments",
            "type": "array"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/ScoreFileOut"
            },
            "title": "Files",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "lineup": {
            "items": {
              "$ref": "#/components/schemas/LineupLineOut"
            },
            "title": "Lineup",
            "type": "array"
          },
          "loan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScoreSetLoanOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Open loan; empty when the score set is in the archive"
          },
          "piece": {
            "$ref": "#/components/schemas/PieceOut"
          },
          "purchase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PurchaseOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Purchase data, only filled for roles with noten.schreiben"
          },
          "short_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Code of the short link (QR code); the address follows short_link_url of GET /api/v1/server. GET of the score set creates it, other answers show it once it exists",
            "title": "Short Code"
          },
          "status": {
            "$ref": "#/components/schemas/ScoreSetStatus"
          },
          "storage_location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Location"
          }
        },
        "required": [
          "id",
          "piece",
          "archive_number",
          "storage_location",
          "status",
          "files",
          "lineup",
          "comments"
        ],
        "title": "ScoreSetDetail",
        "type": "object"
      },
      "ScoreSetInput": {
        "description": "Fields of a score set together with its piece.\n\nWith ``piece_id`` on creation an existing piece is used and the piece fields are ignored.",
        "properties": {
          "archive_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Number"
          },
          "arranger": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arranger"
          },
          "composer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composer"
          },
          "difficulty": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Difficulty"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "gema_work_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gema Work Number"
          },
          "genre": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Genre"
          },
          "musical_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Code such as \"Eb\" or \"F#m\" (\"B\" is B major); left out, the stored value stays unchanged",
            "title": "Musical Key"
          },
          "piece_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Piece Id"
          },
          "publisher": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Publisher"
          },
          "purchase": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PurchaseInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Purchase data; left out, the stored ones stay unchanged"
          },
          "status": {
            "$ref": "#/components/schemas/ScoreSetStatus",
            "default": "complete"
          },
          "storage_location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Location"
          },
          "tags": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "tempo_bpm": {
            "anyOf": [
              {
                "maximum": 400.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Beats per minute; left out, the stored value stays unchanged",
            "title": "Tempo Bpm"
          },
          "time_signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Such as \"6/8\"; left out, the stored value stays unchanged",
            "title": "Time Signature"
          },
          "title": {
            "default": "",
            "title": "Title",
            "type": "string"
          }
        },
        "title": "ScoreSetInput",
        "type": "object"
      },
      "ScoreSetLoanOut": {
        "description": "The open loan of a score set, as far as the role may see it.",
        "properties": {
          "due_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due On"
          },
          "issued_on": {
            "format": "date",
            "title": "Issued On",
            "type": "string"
          },
          "loan_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only for roles with noten.ausleihen",
            "title": "Loan Id"
          },
          "overdue": {
            "title": "Overdue",
            "type": "boolean"
          },
          "recipient_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only for roles with noten.ausleihen",
            "title": "Recipient Name"
          }
        },
        "required": [
          "loan_id",
          "recipient_name",
          "issued_on",
          "due_on",
          "overdue"
        ],
        "title": "ScoreSetLoanOut",
        "type": "object"
      },
      "ScoreSetPage": {
        "description": "One page of the score list.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ScoreSetSummary"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "per_page": {
            "title": "Per Page",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "per_page"
        ],
        "title": "ScoreSetPage",
        "type": "object"
      },
      "ScoreSetStatus": {
        "description": "How complete the parts of a score set are.",
        "enum": [
          "complete",
          "incomplete",
          "missing"
        ],
        "title": "ScoreSetStatus",
        "type": "string"
      },
      "ScoreSetSummary": {
        "description": "A score set in a list.",
        "properties": {
          "archive_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Number"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "loan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScoreSetLoanOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Open loan; empty when the score set is in the archive"
          },
          "piece": {
            "$ref": "#/components/schemas/PieceOut"
          },
          "status": {
            "$ref": "#/components/schemas/ScoreSetStatus"
          },
          "storage_location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Location"
          }
        },
        "required": [
          "id",
          "piece",
          "archive_number",
          "storage_location",
          "status"
        ],
        "title": "ScoreSetSummary",
        "type": "object"
      },
      "ServerInfo": {
        "description": "Public description of the installation the native app reads before the login.",
        "properties": {
          "api_versions": {
            "description": "Supported API versions, e.g. `v1`",
            "items": {
              "type": "string"
            },
            "title": "Api Versions",
            "type": "array"
          },
          "app_redirect_uri": {
            "description": "Redirect URI of the native apps, always `tutti://oauth`; the operator registers it at the identity provider, the app may check it against its own",
            "title": "App Redirect Uri",
            "type": "string"
          },
          "audience": {
            "description": "Value the access tokens must carry in `aud`",
            "title": "Audience",
            "type": "string"
          },
          "client_id": {
            "description": "Client id of the native app at the identity provider",
            "title": "Client Id",
            "type": "string"
          },
          "deployment_mode": {
            "description": "Always `selfhost`: Tutti only runs on its own server. Kept so existing apps keep working",
            "title": "Deployment Mode",
            "type": "string"
          },
          "discovery_url": {
            "description": "OpenID discovery document of the issuer",
            "title": "Discovery Url",
            "type": "string"
          },
          "features": {
            "description": "Switched-on features the app may use",
            "items": {
              "type": "string"
            },
            "title": "Features",
            "type": "array"
          },
          "issuer": {
            "description": "Issuer of the identity provider (`iss` of the tokens)",
            "title": "Issuer",
            "type": "string"
          },
          "name": {
            "description": "Name of the installation for the server list of the app",
            "title": "Name",
            "type": "string"
          },
          "scopes": {
            "description": "Scopes the app asks for at the login",
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          },
          "short_link_url": {
            "description": "Pattern of the short links in QR codes, `{code}` stands for the code; the app recognises scanned links of this server by it and resolves them with GET /api/v1/links/{code}",
            "title": "Short Link Url",
            "type": "string"
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source code of this installation (AGPL)",
            "title": "Source Url"
          }
        },
        "required": [
          "name",
          "api_versions",
          "issuer",
          "discovery_url",
          "client_id",
          "audience",
          "scopes",
          "deployment_mode",
          "features",
          "source_url",
          "short_link_url",
          "app_redirect_uri"
        ],
        "title": "ServerInfo",
        "type": "object"
      },
      "SetlistDetail": {
        "description": "A setlist with its rows; a played setlist shows the frozen snapshot.",
        "properties": {
          "event_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Date"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/SetlistKind",
            "description": "Occasion; `repertoire` is a folder of the current repertoire without date or location that is never played and lists each score set once"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "missing_durations": {
            "description": "Pieces without a duration, total is incomplete",
            "title": "Missing Durations",
            "type": "integer"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "played_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Played At"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/RowOut"
            },
            "title": "Rows",
            "type": "array"
          },
          "sort_mode": {
            "$ref": "#/components/schemas/SetlistSortMode",
            "description": "`alphabetical` keeps the pieces sorted by title between two headings; only folders can have it"
          },
          "status": {
            "$ref": "#/components/schemas/SetlistStatus"
          },
          "total_duration_seconds": {
            "title": "Total Duration Seconds",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "event_date",
          "location",
          "kind",
          "status",
          "played_at",
          "sort_mode",
          "rows",
          "total_duration_seconds",
          "missing_durations"
        ],
        "title": "SetlistDetail",
        "type": "object"
      },
      "SetlistEntryKind": {
        "description": "Entry type: a piece from the archive or a heading like a break.",
        "enum": [
          "piece",
          "heading"
        ],
        "title": "SetlistEntryKind",
        "type": "string"
      },
      "SetlistInput": {
        "description": "Details of a setlist and, if given, all its entries in display order.\n\n``entries`` left out keeps the entries as they are; an empty list removes them all.",
        "properties": {
          "entries": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/EntryInput"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entries"
          },
          "event_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date of the event; ignored for a folder",
            "title": "Event Date"
          },
          "kind": {
            "$ref": "#/components/schemas/SetlistKind",
            "description": "Occasion, or `repertoire` for a folder; fixed once the setlist exists"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Place of the event; ignored for a folder",
            "title": "Location"
          },
          "name": {
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "sort_mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SetlistSortMode"
              },
              {
                "type": "null"
              }
            ],
            "description": "Order of the pieces of a folder; left out keeps it (`manual` for a new one), other setlists are always `manual`"
          }
        },
        "required": [
          "name",
          "kind"
        ],
        "title": "SetlistInput",
        "type": "object"
      },
      "SetlistKind": {
        "description": "Occasion a setlist is made for.",
        "enum": [
          "concert",
          "rehearsal",
          "parade",
          "repertoire"
        ],
        "title": "SetlistKind",
        "type": "string"
      },
      "SetlistPlanOut": {
        "description": "A setlist of the file as it is created.",
        "properties": {
          "index": {
            "title": "Index",
            "type": "integer"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/PlanLineOut"
            },
            "title": "Lines",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "index",
          "name",
          "lines"
        ],
        "title": "SetlistPlanOut",
        "type": "object"
      },
      "SetlistSortMode": {
        "description": "How the pieces of a setlist are ordered (#408).\n\n``alphabetical`` sorts the pieces by title within each block between two headings, so the\norder follows every rename; ``manual`` keeps the order the user chose.",
        "enum": [
          "manual",
          "alphabetical"
        ],
        "title": "SetlistSortMode",
        "type": "string"
      },
      "SetlistStatus": {
        "description": "Whether a setlist is still planned or was already played.",
        "enum": [
          "planned",
          "played"
        ],
        "title": "SetlistStatus",
        "type": "string"
      },
      "SetlistSummary": {
        "description": "A setlist or repertoire folder in a list.",
        "properties": {
          "event_date": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Date"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/SetlistKind",
            "description": "Occasion; `repertoire` is a folder of the current repertoire without date or location that is never played and lists each score set once"
          },
          "location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "played_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Played At"
          },
          "sort_mode": {
            "$ref": "#/components/schemas/SetlistSortMode",
            "description": "`alphabetical` keeps the pieces sorted by title between two headings; only folders can have it"
          },
          "status": {
            "$ref": "#/components/schemas/SetlistStatus"
          }
        },
        "required": [
          "id",
          "name",
          "event_date",
          "location",
          "kind",
          "status",
          "played_at",
          "sort_mode"
        ],
        "title": "SetlistSummary",
        "type": "object"
      },
      "ShareInput": {
        "description": "A grant to create, or the new level of the grant with the same group and scope.",
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A category of this group, `null` for the whole inventory",
            "title": "Category Id"
          },
          "level": {
            "$ref": "#/components/schemas/ShareLevel"
          },
          "recipient_group_id": {
            "description": "Another group of the same account",
            "format": "uuid",
            "title": "Recipient Group Id",
            "type": "string"
          }
        },
        "required": [
          "recipient_group_id",
          "level"
        ],
        "title": "ShareInput",
        "type": "object"
      },
      "ShareLevel": {
        "description": "How far a grant reaches into the receiving group; each level includes the one before.",
        "enum": [
          "read",
          "issue",
          "write"
        ],
        "title": "ShareLevel",
        "type": "string"
      },
      "ShareOut": {
        "description": "A grant between two groups of the same account.",
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only this category of the primary group; `null` for the whole inventory",
            "title": "Category Id"
          },
          "group_id": {
            "description": "Primary group, the owner of the items",
            "format": "uuid",
            "title": "Group Id",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "level": {
            "$ref": "#/components/schemas/ShareLevel",
            "description": "`read`, `issue` (also lend out) or `write` (also edit); limited further by the permissions of the member in the receiving group"
          },
          "recipient_group_id": {
            "description": "Group that receives access",
            "format": "uuid",
            "title": "Recipient Group Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "group_id",
          "recipient_group_id",
          "category_id",
          "level"
        ],
        "title": "ShareOut",
        "type": "object"
      },
      "SharesOut": {
        "description": "The grants of a group in both directions.",
        "properties": {
          "given": {
            "description": "Grants this group gave to other groups",
            "items": {
              "$ref": "#/components/schemas/ShareOut"
            },
            "title": "Given",
            "type": "array"
          },
          "received": {
            "description": "Grants in effect that other groups gave this group",
            "items": {
              "$ref": "#/components/schemas/ShareOut"
            },
            "title": "Received",
            "type": "array"
          }
        },
        "required": [
          "given",
          "received"
        ],
        "title": "SharesOut",
        "type": "object"
      },
      "SheetOut": {
        "description": "One sheet with the plan that was used.",
        "properties": {
          "columns": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Column index (as text) to field key",
            "title": "Columns",
            "type": "object"
          },
          "headers": {
            "items": {
              "type": "string"
            },
            "title": "Headers",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the sheet is skipped",
            "title": "Note"
          },
          "role": {
            "description": "`items`, `area:<key>`, `loans`, `maintenance` or `skip`",
            "title": "Role",
            "type": "string"
          },
          "rows": {
            "title": "Rows",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "role",
          "headers",
          "columns",
          "rows",
          "note"
        ],
        "title": "SheetOut",
        "type": "object"
      },
      "SizeGroupOut": {
        "description": "Stock of one category, per part and size.",
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Empty for items without category",
            "title": "Category Id"
          },
          "category_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Name"
          },
          "rows": {
            "description": "By name, then sizes in the order of the category, others after them",
            "items": {
              "$ref": "#/components/schemas/SizeRowOut"
            },
            "title": "Rows",
            "type": "array"
          },
          "shared": {
            "description": "The category belongs to a group that shares its items",
            "title": "Shared",
            "type": "boolean"
          },
          "size_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the sizes of the category measure",
            "title": "Size Label"
          }
        },
        "required": [
          "category_id",
          "category_name",
          "size_label",
          "shared",
          "rows"
        ],
        "title": "SizeGroupOut",
        "type": "object"
      },
      "SizeRowOut": {
        "description": "Stock of one part (items with the same name) in one size.",
        "properties": {
          "free": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pieces the group could issue: neither issued nor in repair, not shared with it only for reading; only with `inventar.ausgeben`",
            "title": "Free"
          },
          "in_repair": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pieces with an open repair; only with `inventar.ausgeben` or `inventar.schreiben`",
            "title": "In Repair"
          },
          "issued": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pieces with an open loan, whichever group issued them; only with `inventar.ausgeben`",
            "title": "Issued"
          },
          "name": {
            "description": "Name of the items, e.g. `Uniformjacke`",
            "title": "Name",
            "type": "string"
          },
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The size, empty for items without one",
            "title": "Size"
          },
          "total": {
            "description": "Pieces in use; a stock counts with its quantity",
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "size",
          "total",
          "free",
          "issued",
          "in_repair"
        ],
        "title": "SizeRowOut",
        "type": "object"
      },
      "SizesOut": {
        "description": "Stock per category, part and size of one area.",
        "properties": {
          "area": {
            "description": "Key of the area, see `AreaOut.key`",
            "title": "Area",
            "type": "string"
          },
          "groups": {
            "description": "By category name, without category last",
            "items": {
              "$ref": "#/components/schemas/SizeGroupOut"
            },
            "title": "Groups",
            "type": "array"
          }
        },
        "required": [
          "area",
          "groups"
        ],
        "title": "SizesOut",
        "type": "object"
      },
      "SourceRead": {
        "description": "Answer of ``…/read``.",
        "properties": {
          "libraries": {
            "items": {
              "$ref": "#/components/schemas/LibraryOut"
            },
            "title": "Libraries",
            "type": "array"
          },
          "library": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Suggested library: named like the group, else the largest",
            "title": "Library"
          },
          "setlists": {
            "description": "Suggested setlists: the one of a setlist export, none of a backup",
            "items": {
              "type": "integer"
            },
            "title": "Setlists",
            "type": "array"
          },
          "source": {
            "$ref": "#/components/schemas/ForscoreSource"
          }
        },
        "required": [
          "source",
          "libraries",
          "library",
          "setlists"
        ],
        "title": "SourceRead",
        "type": "object"
      },
      "StatsOut": {
        "description": "The statistics of a group; only counted figures, never who did what.",
        "properties": {
          "current": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Snapshot figures of that day: `sets_complete`, `sets_incomplete`, `sets_missing`, `parts`, `storage_bytes`, `setlists`, `members`, `active_7`, `active_30`",
            "title": "Current",
            "type": "object"
          },
          "downloads_per_day": {
            "items": {
              "$ref": "#/components/schemas/DayValue"
            },
            "title": "Downloads Per Day",
            "type": "array"
          },
          "import_average_run_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Import Average Run Seconds"
          },
          "import_average_wait_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Import Average Wait Seconds"
          },
          "import_unchanged_percent": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Share of imported parts confirmed unchanged, `null` without imports",
            "title": "Import Unchanged Percent"
          },
          "last_30_days": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Counting figures of the last 30 days: `downloads`, `import_jobs`, `import_pages`, `import_wait_seconds`, `import_run_seconds`, `import_parts`, `import_parts_unchanged`",
            "title": "Last 30 Days",
            "type": "object"
          },
          "modules": {
            "description": "Figures of the modules the group has switched on, one entry per module that announces figures; empty when none does",
            "items": {
              "$ref": "#/components/schemas/ModuleStatsOut"
            },
            "title": "Modules",
            "type": "array"
          },
          "snapshot_day": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Day of the newest nightly snapshot, `null` before the first night",
            "title": "Snapshot Day"
          },
          "top_score_sets": {
            "description": "The most downloaded score sets of the last 30 days, at most 10",
            "items": {
              "$ref": "#/components/schemas/TopScoreSetOut"
            },
            "title": "Top Score Sets",
            "type": "array"
          }
        },
        "required": [
          "snapshot_day",
          "current",
          "last_30_days",
          "downloads_per_day",
          "top_score_sets",
          "import_unchanged_percent",
          "import_average_wait_seconds",
          "import_average_run_seconds",
          "modules"
        ],
        "title": "StatsOut",
        "type": "object"
      },
      "SuggestionOut": {
        "description": "An existing value of a field.",
        "properties": {
          "count": {
            "description": "How many entries use it",
            "title": "Count",
            "type": "integer"
          },
          "value": {
            "description": "The value as stored; take over this spelling",
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "value",
          "count"
        ],
        "title": "SuggestionOut",
        "type": "object"
      },
      "SyncFile": {
        "description": "A PDF of a score set with what the app needs to store it by content.",
        "properties": {
          "download_path": {
            "description": "Path of the PDF, called with the same token",
            "title": "Download Path",
            "type": "string"
          },
          "filename": {
            "description": "Name the download gets",
            "title": "Filename",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "instrument_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instrument Id"
          },
          "label": {
            "description": "Instrument with tuning and part, e.g. `Klarinette in B 2`",
            "title": "Label",
            "type": "string"
          },
          "own": {
            "description": "Whether it is a part of an instrument the member plays",
            "title": "Own",
            "type": "boolean"
          },
          "page_count": {
            "title": "Page Count",
            "type": "integer"
          },
          "part": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Part designation, e.g. `2`, `Solo` or `1+2` (#282)",
            "title": "Part"
          },
          "part_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "`part` as a number, empty for words and combinations (kept for older apps)",
            "title": "Part Number"
          },
          "role": {
            "description": "`score`, `part` or `other`",
            "title": "Role",
            "type": "string"
          },
          "sha256": {
            "description": "SHA-256 of the content, hex; equal checksum, equal file",
            "title": "Sha256",
            "type": "string"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "tuning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tuning of the part, e.g. `B` (#282)",
            "title": "Tuning"
          }
        },
        "required": [
          "id",
          "role",
          "instrument_id",
          "tuning",
          "part",
          "part_number",
          "label",
          "filename",
          "page_count",
          "size_bytes",
          "sha256",
          "own",
          "download_path"
        ],
        "title": "SyncFile",
        "type": "object"
      },
      "SyncRequest": {
        "description": "Source from ``…/read`` with what to compare and to write.",
        "properties": {
          "decisions": {
            "additionalProperties": {
              "$ref": "#/components/schemas/WorkDecision"
            },
            "default": {},
            "description": "Decisions by work `key` from a previous report",
            "title": "Decisions",
            "type": "object"
          },
          "dry_run": {
            "default": true,
            "description": "`true` (default) only reports",
            "title": "Dry Run",
            "type": "boolean"
          },
          "library": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Library whose PDFs count, null for all",
            "title": "Library"
          },
          "prefer_forscore": {
            "default": false,
            "description": "Take forScore's value for every differing field",
            "title": "Prefer Forscore",
            "type": "boolean"
          },
          "setlists": {
            "default": [],
            "description": "Indexes of the setlists to create",
            "items": {
              "type": "integer"
            },
            "maxItems": 500,
            "title": "Setlists",
            "type": "array"
          },
          "source": {
            "$ref": "#/components/schemas/ForscoreSource"
          }
        },
        "required": [
          "source"
        ],
        "title": "SyncRequest",
        "type": "object"
      },
      "SyncResultOut": {
        "description": "Report and, after a real run, what was written.",
        "properties": {
          "created_setlist_ids": {
            "description": "Draft setlists, empty for a dry run",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Created Setlist Ids",
            "type": "array"
          },
          "fields": {
            "description": "Values that are written (or were, without `dry_run`)",
            "title": "Fields",
            "type": "integer"
          },
          "library": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Library"
          },
          "matched": {
            "title": "Matched",
            "type": "integer"
          },
          "missing": {
            "title": "Missing",
            "type": "integer"
          },
          "pieces_changed": {
            "description": "Pieces that got values, 0 for a dry run",
            "title": "Pieces Changed",
            "type": "integer"
          },
          "setlists": {
            "items": {
              "$ref": "#/components/schemas/SetlistPlanOut"
            },
            "title": "Setlists",
            "type": "array"
          },
          "uncertain": {
            "title": "Uncertain",
            "type": "integer"
          },
          "works": {
            "items": {
              "$ref": "#/components/schemas/WorkOut"
            },
            "title": "Works",
            "type": "array"
          }
        },
        "required": [
          "library",
          "setlists",
          "works",
          "matched",
          "uncertain",
          "missing",
          "fields",
          "pieces_changed",
          "created_setlist_ids"
        ],
        "title": "SyncResultOut",
        "type": "object"
      },
      "SyncScoreSet": {
        "description": "A new or changed score set with all its current files; a file missing here is gone.",
        "properties": {
          "archive_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Number"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/SyncFile"
            },
            "title": "Files",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "loan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScoreSetLoanOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "Open loan; empty when the score set is in the archive"
          },
          "piece": {
            "$ref": "#/components/schemas/PieceOut"
          },
          "status": {
            "$ref": "#/components/schemas/ScoreSetStatus"
          },
          "storage_location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Location"
          }
        },
        "required": [
          "id",
          "piece",
          "archive_number",
          "storage_location",
          "status",
          "files"
        ],
        "title": "SyncScoreSet",
        "type": "object"
      },
      "TopScoreSetOut": {
        "description": "A frequently downloaded score set.",
        "properties": {
          "downloads": {
            "title": "Downloads",
            "type": "integer"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title",
          "downloads"
        ],
        "title": "TopScoreSetOut",
        "type": "object"
      },
      "UsageOut": {
        "description": "One counter of an account with its limit.",
        "properties": {
          "level": {
            "description": "`ok`, `warning` (from 80 percent) or `full` (new uploads are refused)",
            "title": "Level",
            "type": "string"
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Limit, `null` for unlimited or when limits are off",
            "title": "Limit"
          },
          "metric": {
            "$ref": "#/components/schemas/QuotaMetric"
          },
          "percent": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Share of the limit that is used, `null` without limit",
            "title": "Percent"
          },
          "used": {
            "description": "Current value (bytes for `storage`)",
            "title": "Used",
            "type": "integer"
          }
        },
        "required": [
          "metric",
          "used",
          "limit",
          "percent",
          "level"
        ],
        "title": "UsageOut",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WorkDecision": {
        "description": "Decision for one work. Leave out ``score_set_id`` to keep the automatic hit.",
        "properties": {
          "score_set_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Score set of the group the work is; null for none",
            "title": "Score Set Id"
          },
          "take": {
            "default": [],
            "description": "Fields whose forScore value replaces a differing one: ['arranger', 'genre', 'duration_seconds', 'difficulty', 'musical_key', 'time_signature', 'tempo_bpm', 'tags']",
            "items": {
              "type": "string"
            },
            "title": "Take",
            "type": "array"
          }
        },
        "title": "WorkDecision",
        "type": "object"
      },
      "WorkOut": {
        "description": "A piece of the file with all its PDFs.",
        "properties": {
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/CandidateOut"
            },
            "title": "Candidates",
            "type": "array"
          },
          "changes": {
            "items": {
              "$ref": "#/components/schemas/ChangeOut"
            },
            "title": "Changes",
            "type": "array"
          },
          "composer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Composer"
          },
          "files": {
            "title": "Files",
            "type": "integer"
          },
          "key": {
            "description": "Stable id for `decisions`",
            "title": "Key",
            "type": "string"
          },
          "parts": {
            "items": {
              "type": "string"
            },
            "title": "Parts",
            "type": "array"
          },
          "same_as": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Title of another work of the file with the same score set; it carries the changes of both, this one has none",
            "title": "Same As"
          },
          "score_set_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score Set Id"
          },
          "status": {
            "description": "`matched`, `uncertain` (candidates, none chosen), `missing`",
            "title": "Status",
            "type": "string"
          },
          "sure": {
            "description": "Whether the best candidate is a clear hit",
            "title": "Sure",
            "type": "boolean"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "key",
          "title",
          "composer",
          "parts",
          "files",
          "status",
          "sure",
          "score_set_id",
          "candidates",
          "changes",
          "same_as"
        ],
        "title": "WorkOut",
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "JSON API of Tutti for native apps. Every call carries an OIDC access token as `Authorization: Bearer`. Breaking changes only come with a new version path.",
    "title": "Tutti API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/accounts": {
      "get": {
        "description": "Lists the accounts the user owns.\n\n:param request: Current request, its settings decide about the limits.\n:param user: User of the token.\n:param db: Database session of the request.\n:return: Accounts with their groups and usage, by name.",
        "operationId": "get_accounts_api_v1_accounts_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AccountOut"
                  },
                  "title": "Response Get Accounts Api V1 Accounts Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Accounts",
        "tags": [
          "accounts"
        ]
      }
    },
    "/api/v1/accounts/{account_id}/exports": {
      "get": {
        "description": "Lists the exports of an account, newest first.\n\n:param account: Account from the path.\n:param db: Database session of the request.\n:return: The export jobs.",
        "operationId": "get_exports_api_v1_accounts__account_id__exports_get",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ExportOut"
                  },
                  "title": "Response Get Exports Api V1 Accounts  Account Id  Exports Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Exports",
        "tags": [
          "accounts"
        ]
      },
      "post": {
        "description": "Starts the export of an account in the background.\n\n:param request: Current request.\n:param background: Runs the job after the response.\n:param user: User of the token.\n:param account: Account from the path.\n:param db: Database session of the request.\n:return: The queued job, to be polled with the list.",
        "operationId": "post_export_api_v1_accounts__account_id__exports_post",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Export",
        "tags": [
          "accounts"
        ]
      }
    },
    "/api/v1/accounts/{account_id}/exports/{export_id}/download": {
      "get": {
        "description": "Downloads a finished export.\n\n:param request: Current request.\n:param account: Account from the path.\n:param db: Database session of the request.\n:param export_id: Export from the path.\n:return: The ZIP file.\n:raises HTTPException: 404 for another account's export, an unfinished or an expired one.",
        "operationId": "download_api_v1_accounts__account_id__exports__export_id__download_get",
        "parameters": [
          {
            "in": "path",
            "name": "export_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Export Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download",
        "tags": [
          "accounts"
        ]
      }
    },
    "/api/v1/accounts/{account_id}/stats": {
      "get": {
        "description": "Returns the statistics of all groups of an account and its history against the quota.\n\n:param account: Account from the path.\n:param db: Database session of the request.\n:return: Statistics per group and the quota history of the last 90 days.",
        "operationId": "get_account_stats_api_v1_accounts__account_id__stats_get",
        "parameters": [
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Account Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountStatsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Account Stats",
        "tags": [
          "accounts"
        ]
      }
    },
    "/api/v1/demo/token": {
      "post": {
        "description": "Hands out an access token of a demo user, without login.\n\n:param request: Current request.\n:param db: Database session of the request.\n:param body: The chosen demo user.\n:return: The token.\n:raises HTTPException: 404 without ``DEMO_MODE`` or ``OIDC_API_AUDIENCE``, 422 for an\n    unknown user, 429 after too many tokens for the same address.",
        "operationId": "demo_token_api_v1_demo_token_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoToken"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Demo Token",
        "tags": [
          "demo"
        ]
      }
    },
    "/api/v1/demo/users": {
      "get": {
        "description": "Lists the demo users, without login.\n\n:param request: Current request.\n:return: The demo users in a fixed order.\n:raises HTTPException: 404 without ``DEMO_MODE`` or ``OIDC_API_AUDIENCE``.",
        "operationId": "demo_users_api_v1_demo_users_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DemoUserInfo"
                  },
                  "title": "Response Demo Users Api V1 Demo Users Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Demo Users",
        "tags": [
          "demo"
        ]
      }
    },
    "/api/v1/g/{slug}/changes": {
      "get": {
        "description": "Lists score sets and setlists changed or deleted since the cursor, oldest change first.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param since: Cursor from the previous answer; left out starts a full sync.\n:param limit: Entries per page (score sets, setlists and deletions together).\n:return: The page with the cursor for the next call.\n:raises HTTPException: 410 with code ``cursor_expired`` when the cursor is too old or unknown.",
        "operationId": "list_changes_api_v1_g__slug__changes_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "description": "Cursor of the previous answer",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Cursor of the previous answer",
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 200,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Changes",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/folder/{setlist_id}": {
      "get": {
        "description": "Lists the parts of the member's instruments for a setlist, in setlist order.\n\n:param ctx: Group context of the request.\n:param setlist: Setlist from the path, already checked against the group.\n:param part: Part a Notenwart chose (``key`` from ``…/parts``), empty for the own instruments.\n:param since: Only pieces added on or after this day (#408); the numbers stay those of the\n    whole setlist.\n:return: The folder with the missing pieces named.\n:raises HTTPException: 403 for ``part`` without ``noten.schreiben``, 404 for an unknown part.",
        "operationId": "get_folder_api_v1_g__slug__folder__setlist_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "part",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Part"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Folder",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/folder/{setlist_id}/download": {
      "get": {
        "description": "Sends the parts as one merged PDF or as a ZIP of single files.\n\nWith ``metadata=true`` the merged PDF names the setlist and every PDF in the ZIP carries\ntitle, composer, genre, part and tags (#345); by default the parts are sent as stored.\nWith ``background=true`` a large download that is not built yet answers ``202`` with a job\ninstead (#408); then the files always carry the metadata, like the ones of the worker.\n\n:param request: Current request.\n:param ctx: Group context of the request.\n:param setlist: Setlist from the path, already checked against the group.\n:param db: Database session of the request, the download is counted.\n:param format: ``pdf`` (default) or ``zip``.\n:param metadata: Whether to write PDF metadata.\n:param part: Part a Notenwart chose, empty for the own instruments.\n:param background: Whether the client can wait for a job instead of the file.\n:param since: Only pieces added to the setlist on or after this day (#408), a small update\n    of a folder the client already has.\n:return: The download, or ``202`` with the job.\n:raises HTTPException: 409 when the member has no part or the parts are too large even for\n    the worker, 404 when a file is missing.",
        "operationId": "download_folder_api_v1_g__slug__folder__setlist_id__download_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "default": "pdf",
              "enum": [
                "pdf",
                "zip"
              ],
              "title": "Format",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "required": false,
            "schema": {
              "default": false,
              "title": "Metadata",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "part",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Part"
            }
          },
          {
            "in": "query",
            "name": "background",
            "required": false,
            "schema": {
              "default": false,
              "title": "Background",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download Folder",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/folder/{setlist_id}/exports/{export_id}": {
      "get": {
        "description": "Tells how far the worker is with a large download (#408).\n\n:param request: Current request.\n:param ctx: Group context of the request.\n:param setlist: Setlist from the path, already checked against the group.\n:param db: Database session of the request.\n:param export_id: Id of the job.\n:return: The job; ``file_path`` is set once the file can be fetched.\n:raises HTTPException: 404 for a job of another member, setlist or group.",
        "operationId": "folder_export_status_api_v1_g__slug__folder__setlist_id__exports__export_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "export_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Export Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FolderExportOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Folder Export Status",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/folder/{setlist_id}/exports/{export_id}/file": {
      "get": {
        "description": "Sends the file of a finished job; counted as a download.\n\n:param request: Current request.\n:param ctx: Group context of the request.\n:param setlist: Setlist from the path, already checked against the group.\n:param db: Database session of the request.\n:param export_id: Id of the job.\n:return: The merged PDF, ZIP or ``.4ss``.\n:raises HTTPException: 404 for a job of someone else, one that is not done or whose file\n    left the cache (ask for the download again).",
        "operationId": "folder_export_file_api_v1_g__slug__folder__setlist_id__exports__export_id__file_get",
        "parameters": [
          {
            "in": "path",
            "name": "export_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Export Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Folder Export File",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/folder/{setlist_id}/forscore": {
      "get": {
        "description": "Sends the folder as forScore setlist (``.4ss``), with the PDFs of the parts or without.\n\nEvery part is a line \"<piece> – <part>\" with title, composer, genre, keywords, difficulty,\nduration, tempo, time signature and key; a piece without a part is a separator. Without\nPDFs forScore links the lines to PDFs it already has under the same file names. With PDFs and\n``background=true`` a large export that is not built yet answers ``202`` with a job (#408).\n\n:param request: Current request.\n:param ctx: Group context of the request.\n:param setlist: Setlist from the path, already checked against the group.\n:param db: Database session of the request; a download with PDFs is counted.\n:param pdfs: Whether the PDFs go into the file (default).\n:param part: Part a Notenwart chose, empty for the own instruments.\n:param background: Whether the client can wait for a job instead of the file.\n:param since: Only pieces added to the setlist on or after this day (#408), a small update\n    of a folder the client already has.\n:return: The ``.4ss``, or ``202`` with the job.\n:raises HTTPException: 409 without any part or when the PDFs are too large, 404 when a file\n    is missing, 403 for ``part`` without ``noten.schreiben``, 429 over the limit ``forscore``.",
        "operationId": "download_folder_forscore_api_v1_g__slug__folder__setlist_id__forscore_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "pdfs",
            "required": false,
            "schema": {
              "default": true,
              "title": "Pdfs",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "part",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Part"
            }
          },
          {
            "in": "query",
            "name": "background",
            "required": false,
            "schema": {
              "default": false,
              "title": "Background",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download Folder Forscore",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/folder/{setlist_id}/parts": {
      "get": {
        "description": "Lists the parts of a setlist, for a Notenwart who loads the folder of another part.\n\n:param ctx: Group context of the request.\n:param setlist: Setlist from the path, already checked against the group.\n:return: Each instrument, tuning and part of the pieces once, in the order of a score.\n:raises HTTPException: 403 without ``noten.schreiben``.",
        "operationId": "list_folder_parts_api_v1_g__slug__folder__setlist_id__parts_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FolderPart"
                  },
                  "title": "Response List Folder Parts Api V1 G  Slug  Folder  Setlist Id  Parts Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Folder Parts",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/forscore-sync": {
      "post": {
        "description": "Compares a forScore source with the stock and, with ``dry_run=false``, writes it.\n\nEmpty fields of matched pieces are filled, differing values only for fields in ``take``\n(or all with ``prefer_forscore``); the chosen setlists become draft setlists. Works without\na score set are reported and left alone.\n\n:param request: Current request.\n:param ctx: Group context, ``noten.schreiben``.\n:param db: Database session of the request.\n:param body: Source, selection, decisions.\n:return: The report.\n:raises HTTPException: 400 for a broken source, a library or setlist the file lacks or a\n    score set of another group, 429 when the user used up the limit ``upload``.",
        "operationId": "run_sync_api_v1_g__slug__forscore_sync_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncResultOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Run Sync",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/forscore-sync/read": {
      "post": {
        "description": "Reads a forScore backup (``.4sb``) or setlist (``.4ss``) into JSON for the comparison.\n\n:param request: Current request.\n:param ctx: Group context, ``noten.schreiben``.\n:param file: The file; PDFs of an export are dropped, nothing is stored.\n:return: The content with a suggested library and setlists.\n:raises HTTPException: 400 for files that are no forScore file or too large, 429 when the\n    user used up the limit ``upload``.",
        "operationId": "read_file_api_v1_g__slug__forscore_sync_read_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_read_file_api_v1_g__slug__forscore_sync_read_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceRead"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read File",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/imports": {
      "get": {
        "description": "Lists the jobs of the group, newest first.\n\n:param ctx: Group context, editor role.\n:param db: Database session of the request.\n:return: The jobs.",
        "operationId": "list_imports_api_v1_g__slug__imports_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ImportJobOut"
                  },
                  "title": "Response List Imports Api V1 G  Slug  Imports Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Imports",
        "tags": [
          "import"
        ]
      },
      "post": {
        "description": "Stores the uploaded PDFs and queues a job for each; a refused file stops the call.\n\nA forScore setlist export (``.4ss``, #390) becomes a draft setlist and one job per PDF in\nit (``setlist_id`` of the jobs); that needs ``noten.schreiben`` as well.\n\n:param request: Current request.\n:param ctx: Group context, editor role.\n:param db: Database session of the request.\n:param files: One or more PDFs or forScore setlist exports.\n:param target_score_set_id: Optional score set of the group the parts should be added to;\n    the PDFs of a forScore export ignore it.\n:return: The queued jobs.\n:raises HTTPException: 400 when a file is too large, no valid PDF or no setlist export\n    (earlier files stay queued, a setlist stays with the jobs queued so far), 403 for a\n    setlist export without ``noten.schreiben``, 404 when the target score set is not one of\n    the group (nothing is queued), 409 when a quota is used up, 429 after too many uploads.",
        "operationId": "upload_imports_api_v1_g__slug__imports_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_imports_api_v1_g__slug__imports_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ImportJobOut"
                  },
                  "title": "Response Upload Imports Api V1 G  Slug  Imports Post",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload Imports",
        "tags": [
          "import"
        ]
      }
    },
    "/api/v1/g/{slug}/imports/{job_id}": {
      "delete": {
        "description": "Deletes a job with its file, unless it is running right now.\n\n:param request: Current request.\n:param ctx: Group context, editor role.\n:param job: Job from the path, already checked against the group.\n:param db: Database session of the request.\n:return: Empty answer.\n:raises HTTPException: 409 while the job is running.",
        "operationId": "delete_import_api_v1_g__slug__imports__job_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Import",
        "tags": [
          "import"
        ]
      },
      "get": {
        "description": "Returns one job with its progress and its place in the queue of the group, for polling.\n\n:param ctx: Group context, editor role.\n:param job: Job from the path, already checked against the group.\n:param db: Database session of the request.\n:return: The job.",
        "operationId": "get_import_api_v1_g__slug__imports__job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportJobOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Import",
        "tags": [
          "import"
        ]
      }
    },
    "/api/v1/g/{slug}/imports/{job_id}/confirm": {
      "post": {
        "description": "Saves the reviewed import as a score set with its parts; nothing is saved on an error.\n\n:param request: Current request.\n:param ctx: Group context, editor role.\n:param job: Finished job from the path.\n:param db: Database session of the request.\n:param body: The confirmed piece and parts.\n:return: The id of the score set that got the parts.\n:raises HTTPException: 400 for invalid input, a taken archive number included.",
        "operationId": "confirm_review_api_v1_g__slug__imports__job_id__confirm_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Confirmed"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Confirm Review",
        "tags": [
          "import"
        ]
      }
    },
    "/api/v1/g/{slug}/imports/{job_id}/pages/{page}/preview.png": {
      "get": {
        "description": "Sends a small picture of a page of the uploaded PDF.\n\n:param request: Current request.\n:param ctx: Group context, editor role.\n:param job: Job from the path, already checked against the group.\n:param page: 1-based page number.\n:return: PNG.\n:raises HTTPException: 404 for a page the PDF does not have.",
        "operationId": "get_page_preview_api_v1_g__slug__imports__job_id__pages__page__preview_png_get",
        "parameters": [
          {
            "in": "path",
            "name": "page",
            "required": true,
            "schema": {
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Page Preview",
        "tags": [
          "import"
        ]
      }
    },
    "/api/v1/g/{slug}/imports/{job_id}/review": {
      "get": {
        "description": "Returns the found parts, the suggestions and the choices for the review.\n\n:param ctx: Group context, editor role.\n:param job: Finished job from the path.\n:param db: Database session of the request.\n:return: The review data.",
        "operationId": "get_review_api_v1_g__slug__imports__job_id__review_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Review"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Review",
        "tags": [
          "import"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/categories": {
      "get": {
        "description": "Lists the areas with their extra fields and the categories of the group.\n\nThe first call of a group without categories creates the default ones, like the web pages,\nunless the account is read-only.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:return: Areas and categories by area and position.",
        "operationId": "list_categories_api_v1_g__slug__inventory_categories_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Categories",
        "tags": [
          "inventar"
        ]
      },
      "post": {
        "description": "Creates a category at the end of its area.\n\n:param data: Area, name and prefix.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:return: The new category.\n:raises HTTPException: 409 for a name in use, 422 for an unknown area, a wrong prefix or\n    sizes in an area without sizes.",
        "operationId": "post_category_api_v1_g__slug__inventory_categories_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategoryInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Category",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/categories/{category_id}": {
      "delete": {
        "description": "Deletes a category no item uses, retired ones included.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param category: Category from the path.\n:return: Empty answer.\n:raises HTTPException: 409 while items are in it.",
        "operationId": "remove_category_api_v1_g__slug__inventory_categories__category_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "category_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Category Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Category",
        "tags": [
          "inventar"
        ]
      },
      "patch": {
        "description": "Renames a category or changes its prefix; existing numbers stay.\n\n:param data: Fields to change.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param category: Category from the path.\n:return: The changed category.\n:raises HTTPException: 409 for a name in use, 422 for a wrong prefix or sizes in an area\n    without sizes.",
        "operationId": "patch_category_api_v1_g__slug__inventory_categories__category_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "category_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Category Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategoryPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch Category",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/changes": {
      "get": {
        "description": "Lists items and categories changed, new or gone since the cursor, oldest change first.\n\n:param ctx: Group context with ``inventar.lesen``.\n:param db: Database session of the request.\n:param since: Cursor from the previous answer; left out starts a full sync.\n:param limit: Entries per page (items, categories and deletions together).\n:return: The page with the cursor for the next call.\n:raises HTTPException: 410 with code ``cursor_expired`` when the cursor is too old, damaged or\n    from before a change of rights or grants.",
        "operationId": "list_inventory_changes_api_v1_g__slug__inventory_changes_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "description": "Cursor of the previous answer",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Cursor of the previous answer",
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 200,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryChangesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Inventory Changes",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/counts": {
      "get": {
        "description": "Lists the counts of the group, open ones first, then the newest.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:return: The counts without entries.",
        "operationId": "list_counts_api_v1_g__slug__inventory_counts_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CountOut"
                  },
                  "title": "Response List Counts Api V1 G  Slug  Inventory Counts Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Counts",
        "tags": [
          "inventar"
        ]
      },
      "post": {
        "description": "Starts a count with the own items in use of an area and/or location.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param data: Area, location and remark.\n:return: The count with its entries.\n:raises HTTPException: 422 for an unknown area or when nothing is to count.",
        "operationId": "post_count_api_v1_g__slug__inventory_counts_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Count",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/counts/{count_id}": {
      "delete": {
        "description": "Deletes an open count started by mistake.\n\n:param db: Database session of the request.\n:param count: Count from the path.\n:return: Empty answer.\n:raises HTTPException: 409 for a finished count.",
        "operationId": "remove_count_api_v1_g__slug__inventory_counts__count_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "count_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Count Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Count",
        "tags": [
          "inventar"
        ]
      },
      "get": {
        "description": "Reads a count with its entries.\n\n:param count: Count from the path.\n:return: The count.",
        "operationId": "get_count_route_api_v1_g__slug__inventory_counts__count_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "count_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Count Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Count Route",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/counts/{count_id}/entries/{count_entry_id}": {
      "patch": {
        "description": "Writes the result of an entry; fields not sent keep their value.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param count: Count from the path.\n:param count_entry_id: Entry from the path, of this count.\n:param data: The fields to change.\n:return: The entry.\n:raises HTTPException: 404 for an entry of another count, 409 for a finished count, 422 for a\n    quantity a single item cannot have.",
        "operationId": "patch_entry_api_v1_g__slug__inventory_counts__count_id__entries__count_entry_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "count_entry_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Count Entry Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "count_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Count Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountEntryPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountEntryOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch Entry",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/counts/{count_id}/finish": {
      "post": {
        "description": "Finishes a count and writes the results to the items.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param count: Count from the path.\n:param data: Options, all off when empty.\n:return: The finished count.\n:raises HTTPException: 409 when it is finished already.",
        "operationId": "finish_route_api_v1_g__slug__inventory_counts__count_id__finish_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "count_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Count Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CountFinishInput"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Finish Route",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/counts/{count_id}/retire": {
      "post": {
        "description": "Retires the items of missing entries of a finished count.\n\n:param db: Database session of the request.\n:param count: Count from the path.\n:param data: The entries, all missing ones when empty.\n:return: Retired entries and those that could not be retired.\n:raises HTTPException: 409 while the count is open, 422 for an id that is no missing entry.",
        "operationId": "retire_route_api_v1_g__slug__inventory_counts__count_id__retire_post",
        "parameters": [
          {
            "in": "path",
            "name": "count_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Count Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CountRetireInput"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountRetireOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Retire Route",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/counts/{count_id}/scan": {
      "post": {
        "description": "Checks off an entry by a scanned or typed inventory number.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param count: Count from the path.\n:param data: The inventory number.\n:return: What happened, and the entry.\n:raises HTTPException: 409 for a finished count, 422 for a number that is no own item in use.",
        "operationId": "scan_route_api_v1_g__slug__inventory_counts__count_id__scan_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "count_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Count Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CountScanInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountScanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Scan Route",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/export": {
      "get": {
        "description": "Downloads the items the group sees, filtered like the item list, as CSV or Excel file.\n\n:param request: Current request.\n:param ctx: Group context with ``inventar.lesen``.\n:param db: Database session of the request.\n:param query: Format, area, filters, sort order and chosen items.\n:return: The file.\n:raises HTTPException: 422 for an unknown format, area, filter value or sort order, or more\n    than ``MAX_EXPORT`` items, 429 above the rate limit ``export``.",
        "operationId": "export_items_api_v1_g__slug__inventory_export_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "default": "xlsx",
              "maxLength": 8,
              "title": "Format",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "default": [],
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "maxItems": 20000,
              "title": "Id",
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "area",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 32,
              "title": "Area",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 64,
              "title": "Category",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "category_id",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 64,
              "title": "Category Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "condition",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 32,
              "title": "Condition",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "location",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Location",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 100,
              "title": "Size",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 16,
              "title": "Origin",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 32,
              "title": "Status",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 16,
              "title": "Sort",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {},
              "text/csv": {}
            },
            "description": "The file, as download"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Items",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/import/analyze": {
      "post": {
        "description": "Checks a workbook and reports what ``apply`` would do, without changing anything.\n\n:param request: Current request.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param file: xlsx or CSV file.\n:param plan: Optional corrections of roles and columns as JSON.\n:param create_categories: Whether unknown categories would be created.\n:return: The report.\n:raises HTTPException: 400 for unreadable files or plans.",
        "operationId": "analyze_import_api_v1_g__slug__inventory_import_analyze_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_analyze_import_api_v1_g__slug__inventory_import_analyze_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryImportResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Analyze Import",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/import/apply": {
      "post": {
        "description": "Checks a workbook and writes all items, loans and records without errors in one transaction.\n\n:param request: Current request.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param file: xlsx or CSV file.\n:param plan: Optional corrections of roles and columns as JSON.\n:param create_categories: Whether unknown categories are created.\n:return: The report with what was written.\n:raises HTTPException: 400 for unreadable files or plans, 409 when the inventory changed\n    while writing; nothing is written then.",
        "operationId": "apply_workbook_api_v1_g__slug__inventory_import_apply_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_apply_workbook_api_v1_g__slug__inventory_import_apply_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryImportResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Apply Workbook",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items": {
      "get": {
        "description": "Lists the items the group sees, own and shared, with the filters of the list page.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param area: Only this area (`AreaOut.key`), all areas when empty.\n:param q: Text searched in inventory number, name, serial number, maker and model.\n:param category_id: Only items of this category.\n:param condition: Only items in this condition.\n:param location: Only items kept there, whatever the case.\n:param size: Only items of this size (extra field ``size``), whatever the case (#211).\n:param name: Only items with exactly this name, whatever the case and runs of spaces.\n:param origin: ``own`` or ``shared``; empty for both.\n:param status_filter: Empty for items in use, ``issued`` or ``available`` for those of them\n    with or without an open loan, ``retired`` or ``all``.\n:param sort: ``number``, ``name``, ``category``, ``condition``, ``location`` or ``checked``.\n:param page: Page, starting at 1.\n:param per_page: 10, 25, 50 or 100.\n:return: One page of items.\n:raises HTTPException: 422 for an unknown area, origin, status, sort order or page size.",
        "operationId": "list_items_api_v1_g__slug__inventory_items_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "area",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 32,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Area"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "category_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Category Id"
            }
          },
          {
            "in": "query",
            "name": "condition",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ItemCondition"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Condition"
            }
          },
          {
            "in": "query",
            "name": "location",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Location",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 100,
              "title": "Size",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 200,
              "title": "Name",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 16,
              "title": "Origin",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "default": "",
              "maxLength": 16,
              "title": "Status",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "number",
              "maxLength": 16,
              "title": "Sort",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 100000,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "default": 25,
              "title": "Per Page",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Items",
        "tags": [
          "inventar"
        ]
      },
      "post": {
        "description": "Creates an item in the group.\n\n:param data: Values of the item.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:return: The new item.\n:raises HTTPException: 409 for an inventory number in use, 422 for an unknown area or a\n    value the inventory cannot take.",
        "operationId": "post_item_api_v1_g__slug__inventory_items_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Item",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/by-number/{inventory_number}": {
      "get": {
        "description": "Finds an item by the inventory number on its label, whatever the case.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param inventory_number: Number from the label, e.g. ``BL-0012``.\n:return: The own item with that number, otherwise the one item another group shares.\n:raises HTTPException: 404 when the group sees no such item, 409 when only shared items of\n    several groups carry the number.",
        "operationId": "get_item_by_number_api_v1_g__slug__inventory_items_by_number__inventory_number__get",
        "parameters": [
          {
            "in": "path",
            "name": "inventory_number",
            "required": true,
            "schema": {
              "title": "Inventory Number",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Item By Number",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}": {
      "delete": {
        "description": "Deletes an item entered by mistake; everything else is retired instead.\n\n:param request: Current request, for the file store of its attachments.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared.\n:return: Empty answer.\n:raises HTTPException: 403 for an item another group shares.",
        "operationId": "remove_item_api_v1_g__slug__inventory_items__item_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Item",
        "tags": [
          "inventar"
        ]
      },
      "get": {
        "description": "Returns an item the group sees; creates the short link of an own item on first use.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared.\n:return: The item with its open loan.",
        "operationId": "get_item_api_v1_g__slug__inventory_items__item_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Item",
        "tags": [
          "inventar"
        ]
      },
      "patch": {
        "description": "Changes an item; fields left out stay as they are.\n\n:param data: Fields to change.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared.\n:return: The changed item.\n:raises HTTPException: 403 for a shared item without a grant to write, or for a shared item\n    and ``parent_id``; 409 for an inventory number in use or an item in another set; 422 for\n    a value the inventory cannot take, a category that would take a shared item out of the\n    grant or a set ``sets.add_part`` refuses.",
        "operationId": "patch_item_api_v1_g__slug__inventory_items__item_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch Item",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}/attachments": {
      "get": {
        "description": "Lists the photos of an item, and its documents for members who may change it.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared.\n:return: Photos first, then documents, each by position.",
        "operationId": "list_attachments_api_v1_g__slug__inventory_items__item_id__attachments_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AttachmentOut"
                  },
                  "title": "Response List Attachments Api V1 G  Slug  Inventory Items  Item Id  Attachments Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Attachments",
        "tags": [
          "inventar"
        ]
      },
      "post": {
        "description": "Stores a photo or document of an item.\n\nPhotos are turned upright and written again without metadata (HEIC becomes JPEG), documents\nare PDFs or pictures.\n\n:param request: Current request.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared with level write.\n:param file: The upload, at most ``MAX_UPLOAD_MB``.\n:param kind: ``photo`` or ``document``.\n:param title: Title shown instead of the file name.\n:param purchase_receipt: Mark the document as invoice of the purchase.\n:return: The new attachment.\n:raises HTTPException: 403 without write access to the item, 404 when the item was deleted\n    in the meantime, 422 for a wrong file or too many attachments, 409 (code\n    ``quota_exceeded``) when the storage of the account is full.",
        "operationId": "upload_attachment_api_v1_g__slug__inventory_items__item_id__attachments_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_attachment_api_v1_g__slug__inventory_items__item_id__attachments_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload Attachment",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}/attachments/{attachment_id}": {
      "delete": {
        "description": "Removes an attachment; a removed cover hands over to the next photo.\n\n:param request: Current request.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared with level write.\n:param attachment: Attachment from the path.\n:return: Empty answer.\n:raises HTTPException: 403 without write access to the item, 404 when the item or the\n    attachment was deleted in the meantime.",
        "operationId": "remove_attachment_api_v1_g__slug__inventory_items__item_id__attachments__attachment_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Attachment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Attachment",
        "tags": [
          "inventar"
        ]
      },
      "patch": {
        "description": "Changes title, order, cover, purchase receipt or maintenance record of an attachment.\n\n:param data: The fields to change.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared with level write.\n:param attachment: Attachment from the path.\n:return: The changed attachment.\n:raises HTTPException: 403 without write access or for a maintenance record of a shared\n    item, 404 for a record of another item or when the item or the attachment was deleted in\n    the meantime, 422 for a cover that is no photo or a receipt\n    that is no document.",
        "operationId": "change_attachment_api_v1_g__slug__inventory_items__item_id__attachments__attachment_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Attachment Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Change Attachment",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}/attachments/{attachment_id}/file": {
      "get": {
        "description": "Sends the file of an attachment, answering ``Range`` with ``206``.\n\n:param request: Current request.\n:param ctx: Group context of the request.\n:param visible: Item from the path.\n:param attachment: Attachment from the path, a document only with write access.\n:return: The file with its name.",
        "operationId": "attachment_file_api_v1_g__slug__inventory_items__item_id__attachments__attachment_id__file_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Attachment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Attachment File",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}/attachments/{attachment_id}/preview": {
      "get": {
        "description": "Sends the JPEG preview of an attachment.\n\n:param request: Current request.\n:param ctx: Group context of the request.\n:param visible: Item from the path.\n:param attachment: Attachment from the path, a document only with write access.\n:return: The preview, 404 when there is none.",
        "operationId": "attachment_preview_api_v1_g__slug__inventory_items__item_id__attachments__attachment_id__preview_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "attachment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Attachment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Attachment Preview",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}/events": {
      "get": {
        "description": "Returns the history of an item, newest first, 25 events per page.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param item: Item from the path, already checked against the group.\n:param db: Database session of the request.\n:param event: Only this event.\n:param page: Page from 1; beyond the last the last is returned.\n:return: The page.",
        "operationId": "list_item_events_api_v1_g__slug__inventory_items__item_id__events_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "description": "Only this event",
            "in": "query",
            "name": "event",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 32,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this event",
              "title": "Event"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 10000,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPageOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Item Events",
        "tags": [
          "inventar"
        ]
      },
      "post": {
        "description": "Adds a correction to the history of an item; earlier events stay unchanged.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param item: Item from the path, already checked against the group.\n:param db: Database session of the request.\n:param data: Text of the correction.\n:return: The new event.\n:raises HTTPException: 422 for a blank note.",
        "operationId": "add_item_correction_api_v1_g__slug__inventory_items__item_id__events_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorrectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Item Correction",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}/loans": {
      "post": {
        "description": "Issues a single item to a member or a person without account, with its parts if asked.\n\n:param data: Recipient, dates, state and note.\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared.\n:return: The new loan, with the loans of the parts and those skipped.\n:raises HTTPException: 403 without ``inventar.ausgeben`` or without a grant to issue, 409\n    when the item is issued already, 422 for a retired item, an entry with a quantity or\n    wrong dates.",
        "operationId": "post_item_loan_api_v1_g__slug__inventory_items__item_id__loans_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemLoanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Item Loan",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}/maintenance": {
      "get": {
        "description": "Lists the records of an item, open ones first, then the newest.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param item: Own item from the path.\n:return: The records.",
        "operationId": "list_records_api_v1_g__slug__inventory_items__item_id__maintenance_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MaintenanceOut"
                  },
                  "title": "Response List Records Api V1 G  Slug  Inventory Items  Item Id  Maintenance Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Records",
        "tags": [
          "inventar"
        ]
      },
      "post": {
        "description": "Adds a record to an item; a finished service or inspection sets its last inspection.\n\n:param data: Values of the record.\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param item: Own item from the path.\n:return: The new record.\n:raises HTTPException: 422 for a value a record cannot take or a retired item.",
        "operationId": "post_record_api_v1_g__slug__inventory_items__item_id__maintenance_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaintenanceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Record",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}/restore": {
      "post": {
        "description": "Takes back a retirement made by mistake.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared.\n:return: The item, in use again.\n:raises HTTPException: 403 for a shared item without a grant to write, 409 for an item that\n    is not retired.",
        "operationId": "post_restore_api_v1_g__slug__inventory_items__item_id__restore_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Restore",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/items/{item_id}/retire": {
      "post": {
        "description": "Retires an item: it leaves the lists in use, its history stays.\n\n:param data: Day and reason.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param visible: Item from the path, own or shared.\n:return: The retired item.\n:raises HTTPException: 403 for a shared item without a grant to write, 409 for an item\n    retired already or still issued, 422 for a day in the future.",
        "operationId": "post_retire_api_v1_g__slug__inventory_items__item_id__retire_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetireInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Retire",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/labels": {
      "post": {
        "description": "Draws labels for a selection of own items, ordered by inventory number.\n\n:param request: Current request.\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:param data: Selection, format and start position.\n:return: The PDF.\n:raises HTTPException: 422 for an unknown format or area, a start beyond the sheet, an empty\n    selection or more than ``MAX_LABELS`` items, 429 above the limit.",
        "operationId": "item_label_pdf_api_v1_g__slug__inventory_labels_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemLabelInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Item Label Pdf",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/loans": {
      "get": {
        "description": "Lists the items the group has issued (or got back), by return date.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param recipient: Only recipients whose name contains this text.\n:param overdue: Only overdue loans.\n:param returned: Returned loans instead of open ones, newest first.\n:param limit: Rows per page.\n:param offset: Rows to skip.\n:return: The page and the number of all matching loans.\n:raises HTTPException: 403 without ``inventar.ausgeben``.",
        "operationId": "list_item_loans_api_v1_g__slug__inventory_loans_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "recipient",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Recipient"
            }
          },
          {
            "in": "query",
            "name": "overdue",
            "required": false,
            "schema": {
              "default": false,
              "title": "Overdue",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "returned",
            "required": false,
            "schema": {
              "default": false,
              "title": "Returned",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Item Loans",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/loans/batch": {
      "post": {
        "description": "Issues several items to one recipient or takes several items back, all or nothing.\n\n:param data: Action, items and the data of the loans.\n:param ctx: Group context with ``inventar.ausgeben``.\n:param db: Database session of the request.\n:return: The loans written.\n:raises HTTPException: 403 without ``inventar.ausgeben``, 422 with the failing items when one\n    cannot go out (unknown, issued already, retired, with a quantity, without a grant) or\n    come back (not issued by this group), or for wrong dates.",
        "operationId": "post_loan_batch_api_v1_g__slug__inventory_loans_batch_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoanBatchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanBatchOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Loan Batch",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/loans/{item_loan_id}/extend": {
      "post": {
        "description": "Changes the planned return of an issued item.\n\n:param data: New return date, empty for open-ended.\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param loan: Loan from the path, made by this group.\n:return: The loan.\n:raises HTTPException: 422 when it is returned already or the date lies before the issue.",
        "operationId": "post_item_extend_api_v1_g__slug__inventory_loans__item_loan_id__extend_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_loan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Loan Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Item Extend",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/loans/{item_loan_id}/return": {
      "post": {
        "description": "Takes an issued item back, with the parts still out with the same recipient if asked.\n\n:param data: Day and state of the return.\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param loan: Loan from the path, made by this group.\n:return: The closed loan, with the loans of the parts taken back.\n:raises HTTPException: 422 when it is returned already or the day lies before the issue.",
        "operationId": "post_item_return_api_v1_g__slug__inventory_loans__item_loan_id__return_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_loan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Loan Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemReturnInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemLoanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Item Return",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/maintenance": {
      "get": {
        "description": "Lists the own items whose inspection is overdue or due within 30 days, or in repair.\n\n:param ctx: Group context with ``inventar.schreiben``.\n:param db: Database session of the request.\n:return: Overdue first, then due, then only in repair.",
        "operationId": "list_due_api_v1_g__slug__inventory_maintenance_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DueListOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Due",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/maintenance/{maintenance_id}": {
      "delete": {
        "description": "Deletes a record made by mistake; the history of the item keeps it.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param record: Record from the path.\n:return: Empty answer.",
        "operationId": "remove_record_api_v1_g__slug__inventory_maintenance__maintenance_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "maintenance_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Maintenance Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Record",
        "tags": [
          "inventar"
        ]
      },
      "patch": {
        "description": "Changes a record; fields left out stay as they are.\n\n:param data: Fields to change.\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param record: Record from the path.\n:return: The changed record.\n:raises HTTPException: 422 for a value a record cannot take.",
        "operationId": "patch_record_api_v1_g__slug__inventory_maintenance__maintenance_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "maintenance_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Maintenance Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MaintenancePatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintenanceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Patch Record",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/mine": {
      "get": {
        "description": "Lists the items the group issued to the member and has not taken back.\n\n:param ctx: Group context with ``inventar.eigene``.\n:param db: Database session of the request.\n:return: The items, the next return first; empty for an app admin without membership.",
        "operationId": "get_my_equipment_api_v1_g__slug__inventory_mine_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MyItemOut"
                  },
                  "title": "Response Get My Equipment Api V1 G  Slug  Inventory Mine Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get My Equipment",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/shares": {
      "get": {
        "description": "Lists the grants the group gave and those it received.\n\n:param ctx: Group context of a member who may share.\n:param db: Database session of the request.\n:return: Grants in both directions.",
        "operationId": "get_shares_api_v1_g__slug__inventory_shares_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Shares",
        "tags": [
          "inventar"
        ]
      },
      "put": {
        "description": "Grants another group access, or changes the level of the grant with the same scope.\n\n:param data: Receiving group, level and scope.\n:param ctx: Group context of a member who may share.\n:param db: Database session of the request.\n:return: The new or changed grant.\n:raises HTTPException: 400 for a group outside the account or the group itself, 404 for a\n    category of another group.",
        "operationId": "put_share_api_v1_g__slug__inventory_shares_put",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShareInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Put Share",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/shares/{share_id}": {
      "delete": {
        "description": "Takes a grant back.\n\n:param ctx: Group context of a member who may share.\n:param share: Grant from the path.\n:param db: Database session of the request.\n:return: Empty answer.\n:raises HTTPException: 409 while the receiving group has items of the grant issued.",
        "operationId": "delete_share_api_v1_g__slug__inventory_shares__share_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "share_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Share Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Share",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/inventory/sizes": {
      "get": {
        "description": "Counts the items in use the group sees per category, part and size.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param area: An area whose items carry a size, ``uniform`` by default.\n:return: The stock; free and issued pieces only with ``inventar.ausgeben``, pieces in\n    repair with that or ``inventar.schreiben``.\n:raises HTTPException: 422 for an area without sizes.",
        "operationId": "get_sizes_api_v1_g__slug__inventory_sizes_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "area",
            "required": false,
            "schema": {
              "default": "uniform",
              "maxLength": 32,
              "title": "Area",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SizesOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Sizes",
        "tags": [
          "inventar"
        ]
      }
    },
    "/api/v1/g/{slug}/loans": {
      "get": {
        "description": "Lists open loans of the group (or returned ones) over all modules the user may lend from.\n\n:param ctx: Group context of the API request.\n:param db: Database session of the request.\n:param module: Only this module.\n:param recipient: Only recipients whose name contains this text.\n:param overdue: Only overdue loans.\n:param returned: Returned loans instead of open ones, newest first.\n:param limit: Rows per page.\n:param offset: Rows to skip.\n:return: The page and the number of all matching loans.",
        "operationId": "list_loans_api_v1_g__slug__loans_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "description": "Only this module",
            "in": "query",
            "name": "module",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this module",
              "title": "Module"
            }
          },
          {
            "in": "query",
            "name": "recipient",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Recipient"
            }
          },
          {
            "in": "query",
            "name": "overdue",
            "required": false,
            "schema": {
              "default": false,
              "title": "Overdue",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "returned",
            "required": false,
            "schema": {
              "default": false,
              "title": "Returned",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Loans",
        "tags": [
          "loans"
        ]
      },
      "post": {
        "description": "Lends an object.\n\n:param ctx: Group context of the API request.\n:param db: Database session of the request.\n:param data: The loan.\n:return: The new loan.\n:raises HTTPException: 404 for objects of other groups, 403 without the permission of the\n    kind, 409 when it is lent already, 422 for wrong values.",
        "operationId": "create_loan_api_v1_g__slug__loans_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoanInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Loan",
        "tags": [
          "loans"
        ]
      }
    },
    "/api/v1/g/{slug}/loans/{loan_id}": {
      "get": {
        "description": "Returns one loan of the group.\n\n:param ctx: Group context of the API request.\n:param db: Database session of the request.\n:param loan: Loan from the path, already checked against the group.\n:return: The loan.",
        "operationId": "get_loan_api_v1_g__slug__loans__loan_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "loan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Loan Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Loan",
        "tags": [
          "loans"
        ]
      }
    },
    "/api/v1/g/{slug}/loans/{loan_id}/extend": {
      "post": {
        "description": "Changes the planned return of an open loan.\n\n:param ctx: Group context of the API request.\n:param db: Database session of the request.\n:param loan: Loan from the path, already checked against the group.\n:param data: New return date.\n:return: The loan.\n:raises HTTPException: 422 when it is returned already or the date is wrong.",
        "operationId": "extend_api_v1_g__slug__loans__loan_id__extend_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "loan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Loan Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Extend",
        "tags": [
          "loans"
        ]
      }
    },
    "/api/v1/g/{slug}/loans/{loan_id}/return": {
      "post": {
        "description": "Takes an object back.\n\n:param ctx: Group context of the API request.\n:param db: Database session of the request.\n:param loan: Loan from the path, already checked against the group.\n:param data: Day and state of the return.\n:return: The loan.\n:raises HTTPException: 422 when it is returned already or the day is wrong.",
        "operationId": "take_back_api_v1_g__slug__loans__loan_id__return_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "loan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Loan Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReturnInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoanOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Take Back",
        "tags": [
          "loans"
        ]
      }
    },
    "/api/v1/g/{slug}/loans/{loan_id}/slip": {
      "get": {
        "description": "Draws the slip of the handover a loan belongs to (#340), printed for the recipient.\n\nThe slip lists every open loan of the same kind that went to the same recipient on the same\nday from the same person, so the parts of a set and items issued by scan stand on one sheet.\n\n:param request: Current request.\n:param ctx: Group context of the API request.\n:param db: Database session of the request.\n:param loan_id: Id of the loan; checked without locking it, the slip only reads.\n:return: The PDF.\n:raises HTTPException: 404 for loans of other groups, 403 without the permission of the\n    kind, 409 for a loan taken back already, 429 above the limit.",
        "operationId": "get_slip_api_v1_g__slug__loans__loan_id__slip_get",
        "parameters": [
          {
            "in": "path",
            "name": "loan_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Loan Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {}
            },
            "description": "The slip as PDF"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Slip",
        "tags": [
          "loans"
        ]
      }
    },
    "/api/v1/g/{slug}/members": {
      "get": {
        "description": "Lists the members of the group with their roles.\n\n:param ctx: Group context of an owner.\n:param db: Database session of the request.\n:return: Members sorted by name.",
        "operationId": "get_members_api_v1_g__slug__members_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/MemberOut"
                  },
                  "title": "Response Get Members Api V1 G  Slug  Members Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Members",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/v1/g/{slug}/members/{membership_id}/roles": {
      "put": {
        "description": "Sets the roles of a member.\n\n:param data: Ids of the roles the member holds from now on.\n:param ctx: Group context of an owner.\n:param member: Membership from the path.\n:param db: Database session of the request.\n:return: The member with their new roles.\n:raises HTTPException: 400, 404 or 409 when the rules refuse it.",
        "operationId": "put_member_roles_api_v1_g__slug__members__membership_id__roles_put",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "membership_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Membership Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberRolesInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Put Member Roles",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/v1/g/{slug}/permissions": {
      "get": {
        "description": "Lists the permissions a role of this group can grant.\n\n:param ctx: Group context of an owner.\n:return: Core permissions and those of the modules the group has switched on.",
        "operationId": "list_permissions_api_v1_g__slug__permissions_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PermissionOut"
                  },
                  "title": "Response List Permissions Api V1 G  Slug  Permissions Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Permissions",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/v1/g/{slug}/pieces/suggest": {
      "get": {
        "description": "Finds existing pieces for a title, so an editor reuses one instead of making a duplicate.\n\n:param ctx: Group context, editor role or higher.\n:param db: Database session of the request.\n:param title: Title typed so far.\n:return: The best matches.",
        "operationId": "suggest_piece_titles_api_v1_g__slug__pieces_suggest_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "title",
            "required": false,
            "schema": {
              "default": "",
              "title": "Title",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PieceOut"
                  },
                  "title": "Response Suggest Piece Titles Api V1 G  Slug  Pieces Suggest Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Suggest Piece Titles",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/ping": {
      "get": {
        "description": "Checks that the token's user belongs to the group and reports their role.\n\n:param context: Group context of the Bearer token's user.\n:return: The slug of the group and the role of the user in it.",
        "operationId": "group_ping_api_v1_g__slug__ping_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Group Ping Api V1 G  Slug  Ping Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Group Ping",
        "tags": [
          "api"
        ]
      }
    },
    "/api/v1/g/{slug}/roles": {
      "get": {
        "description": "Lists the roles of the group, standard roles first.\n\n:param ctx: Group context of an owner.\n:param db: Database session of the request.\n:return: The roles with their permissions and number of holders.",
        "operationId": "get_roles_api_v1_g__slug__roles_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RoleOut"
                  },
                  "title": "Response Get Roles Api V1 G  Slug  Roles Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Roles",
        "tags": [
          "groups"
        ]
      },
      "post": {
        "description": "Creates an own role.\n\n:param data: Name and permissions.\n:param ctx: Group context of an owner.\n:param db: Database session of the request.\n:return: The new role.\n:raises HTTPException: 400 or 409 when the rules refuse it.",
        "operationId": "post_role_api_v1_g__slug__roles_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Post Role",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/v1/g/{slug}/roles/log": {
      "get": {
        "description": "Lists the latest changes of roles and assignments.\n\n:param ctx: Group context of an owner.\n:param db: Database session of the request.\n:param limit: Maximum number of entries, 1 to 500.\n:return: Entries, newest first.",
        "operationId": "get_role_log_api_v1_g__slug__roles_log_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RoleLogEntry"
                  },
                  "title": "Response Get Role Log Api V1 G  Slug  Roles Log Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Role Log",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/v1/g/{slug}/roles/{role_id}": {
      "delete": {
        "description": "Deletes an own role nobody holds.\n\n:param ctx: Group context of an owner.\n:param role: Role from the path.\n:param db: Database session of the request.\n:return: Empty answer.\n:raises HTTPException: 409 for standard roles and roles still assigned.",
        "operationId": "remove_role_api_v1_g__slug__roles__role_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "role_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Role Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Role",
        "tags": [
          "groups"
        ]
      },
      "put": {
        "description": "Renames an own role and replaces its permissions.\n\n:param data: New name and permissions.\n:param ctx: Group context of an owner.\n:param role: Role from the path.\n:param db: Database session of the request.\n:return: The changed role.\n:raises HTTPException: 400 or 409 when the rules refuse it.",
        "operationId": "put_role_api_v1_g__slug__roles__role_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "role_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Role Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Put Role",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/v1/g/{slug}/scores": {
      "get": {
        "description": "Searches the score sets of the group, typos tolerated like in the web.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param q: Search term over title, composer and arranger.\n:param composer: Exact composer filter.\n:param genre: Exact genre filter.\n:param status_filter: Status filter.\n:param loan: ``lent`` or ``overdue``.\n:param sort: ``title`` or ``purchase_date``.\n:param page: Page number, starting at 1.\n:param per_page: Entries per page, one of the offered sizes.\n:return: The page with the total number of matches.",
        "operationId": "list_scores_api_v1_g__slug__scores_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "title": "Q",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "composer",
            "required": false,
            "schema": {
              "default": "",
              "title": "Composer",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "genre",
            "required": false,
            "schema": {
              "default": "",
              "title": "Genre",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ScoreSetStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "description": "Only lent or overdue score sets",
            "in": "query",
            "name": "loan",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "lent",
                    "overdue"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only lent or overdue score sets",
              "title": "Loan"
            }
          },
          {
            "description": "purchase_date (newest first) only for roles with noten.schreiben",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "title",
              "description": "purchase_date (newest first) only for roles with noten.schreiben",
              "enum": [
                "title",
                "purchase_date"
              ],
              "title": "Sort",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "One of (10, 25, 50, 100), else the default",
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "default": 0,
              "description": "One of (10, 25, 50, 100), else the default",
              "title": "Per Page",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreSetPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Scores",
        "tags": [
          "noten"
        ]
      },
      "post": {
        "description": "Creates a score set with a new piece or an existing one.\n\n:param ctx: Group context, editor role or higher.\n:param db: Database session of the request.\n:param data: Fields of the score set and its piece.\n:return: The new score set.\n:raises HTTPException: 404 for an unknown piece, 422 without title, 409 for a taken archive\n    number.",
        "operationId": "create_score_set_api_v1_g__slug__scores_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScoreSetInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreSetDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Score Set",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/labels": {
      "post": {
        "description": "Draws labels for a selection of score sets, ordered by archive number.\n\n:param request: Current request.\n:param ctx: Group context with ``noten.schreiben``.\n:param db: Database session of the request.\n:param data: Selection, format and start position.\n:return: The PDF.\n:raises HTTPException: 422 for an unknown format, a start beyond the sheet, an empty\n    selection or more than ``MAX_LABELS`` score sets, 429 above the limit.",
        "operationId": "score_set_label_pdf_api_v1_g__slug__scores_labels_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Score Set Label Pdf",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/{score_set_id}": {
      "delete": {
        "description": "Deletes a score set with its files, unless a setlist still uses it.\n\n:param request: Current request.\n:param ctx: Group context, editor role or higher.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:return: Empty answer.\n:raises HTTPException: 409 naming the setlists that still contain the score set, or when it is\n    lent.",
        "operationId": "delete_score_set_endpoint_api_v1_g__slug__scores__score_set_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Score Set Endpoint",
        "tags": [
          "noten"
        ]
      },
      "get": {
        "description": "Returns a score set with all its parts and comments; creates its short link on first use.\n\n:param ctx: Group context of the request.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:return: The score set; ``own`` marks the parts of the member's instruments.",
        "operationId": "get_score_set_detail_api_v1_g__slug__scores__score_set_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreSetDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Score Set Detail",
        "tags": [
          "noten"
        ]
      },
      "put": {
        "description": "Replaces the fields of a score set and its piece.\n\n:param ctx: Group context, editor role or higher.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:param data: New field values.\n:return: The changed score set.\n:raises HTTPException: 422 without title, 409 for a taken archive number.",
        "operationId": "update_score_set_api_v1_g__slug__scores__score_set_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScoreSetInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreSetDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Score Set",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/{score_set_id}/comments": {
      "post": {
        "description": "Adds a comment to a score set; every member may comment.\n\n:param ctx: Group context of the request.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:param data: Comment text.\n:return: The new comment.\n:raises HTTPException: 422 for a blank comment.",
        "operationId": "add_comment_api_v1_g__slug__scores__score_set_id__comments_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Comment",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/{score_set_id}/comments/{comment_id}": {
      "delete": {
        "description": "Deletes a comment; authors may delete their own, editors any.\n\n:param ctx: Group context of the request.\n:param score_set: Score set from the path, already checked against the group.\n:param comment: Comment from the path.\n:param db: Database session of the request.\n:return: Empty answer.\n:raises HTTPException: 403 for other members.",
        "operationId": "delete_comment_api_v1_g__slug__scores__score_set_id__comments__comment_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Comment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Comment",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/{score_set_id}/events": {
      "get": {
        "description": "Returns the history of a score set, newest first, 25 events per page.\n\n:param ctx: Group context with ``noten.schreiben``.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:param event: Only this event.\n:param page: Page from 1; beyond the last the last is returned.\n:return: The page.",
        "operationId": "list_score_set_events_api_v1_g__slug__scores__score_set_id__events_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          },
          {
            "description": "Only this event",
            "in": "query",
            "name": "event",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 32,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only this event",
              "title": "Event"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "maximum": 10000,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPageOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Score Set Events",
        "tags": [
          "noten"
        ]
      },
      "post": {
        "description": "Adds a correction to the history of a score set; earlier events stay unchanged.\n\n:param ctx: Group context with ``noten.schreiben``.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:param data: Text of the correction.\n:return: The new event.\n:raises HTTPException: 422 for a blank note.",
        "operationId": "add_score_set_correction_api_v1_g__slug__scores__score_set_id__events_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CorrectionInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Score Set Correction",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/{score_set_id}/files": {
      "post": {
        "description": "Stores an uploaded PDF as a part of the score set.\n\n:param request: Current request.\n:param ctx: Group context, editor role or higher.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:param file: Uploaded PDF.\n:param instrument_id: Instrument of the part, empty for other material.\n:param part_number: Part number of older clients, ``part`` wins over it.\n:param part: Part designation (\"2\", \"Solo\", \"1+2\"), ignored for scores.\n:param tuning: Tuning of the part (\"B\", \"Es\"), ignored for scores.\n:return: The new file.\n:raises HTTPException: 400 for invalid or duplicate files, 404 for an unknown instrument, 409\n    (code ``quota_exceeded``) when the storage of the account is full.",
        "operationId": "upload_score_file_api_v1_g__slug__scores__score_set_id__files_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_score_file_api_v1_g__slug__scores__score_set_id__files_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreFileOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload Score File",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/{score_set_id}/files/{file_id}": {
      "delete": {
        "description": "Deletes a PDF from the database and the storage.\n\n:param request: Current request.\n:param ctx: Group context, editor role or higher.\n:param score_set: Score set from the path, already checked against the group.\n:param score_file: File from the path.\n:param db: Database session of the request.\n:return: Empty answer.",
        "operationId": "delete_score_file_api_v1_g__slug__scores__score_set_id__files__file_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "File Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Score File",
        "tags": [
          "noten"
        ]
      },
      "get": {
        "description": "Sends a PDF; the download name is built here and never stored.\n\nBy default the bytes are the stored file, ``sha256`` and ``size_bytes`` describe them. With\n``metadata=true`` a copy carries title, composer, arranger, genre, part and tags in its info\ndictionary (#345), as the web download does.\n\n:param request: Current request.\n:param ctx: Group context of the request.\n:param score_set: Score set from the path, already checked against the group.\n:param score_file: File from the path.\n:param db: Database session of the request, the access is counted.\n:param metadata: Whether to write PDF metadata into the delivered copy.\n:return: The PDF.\n:raises HTTPException: 404 when the file is missing in the storage.",
        "operationId": "download_score_file_api_v1_g__slug__scores__score_set_id__files__file_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "File Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "metadata",
            "required": false,
            "schema": {
              "default": false,
              "title": "Metadata",
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download Score File",
        "tags": [
          "noten"
        ]
      },
      "patch": {
        "description": "Changes instrument, tuning and part of a stored file, without uploading it again (#284).\n\nOnly the fields sent change; ``instrument_id`` ``null`` makes the file other material.\n\n:param ctx: Group context, editor role or higher.\n:param score_set: Score set from the path, already checked against the group.\n:param score_file: File from the path.\n:param db: Database session of the request.\n:param data: The fields to change.\n:return: The changed file.\n:raises HTTPException: 404 for an unknown instrument.",
        "operationId": "change_score_file_api_v1_g__slug__scores__score_set_id__files__file_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "File Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScoreFilePatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreFileOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Change Score File",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/{score_set_id}/lineup": {
      "put": {
        "description": "Replaces the lineup of a score set and recalculates its status.\n\n:param ctx: Group context, editor role or higher.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:param data: The complete new lineup; an empty list removes it.\n:return: The changed score set.\n:raises HTTPException: 422 for an unknown instrument or one that appears twice.",
        "operationId": "replace_lineup_api_v1_g__slug__scores__score_set_id__lineup_put",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LineupInputBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreSetDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Lineup",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/{score_set_id}/lineup/from-files": {
      "post": {
        "description": "Makes the parts the score set has now its lineup.\n\n:param ctx: Group context, editor role or higher.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:return: The changed score set.",
        "operationId": "lineup_from_existing_files_api_v1_g__slug__scores__score_set_id__lineup_from_files_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreSetDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lineup From Existing Files",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/scores/{score_set_id}/receipt": {
      "delete": {
        "description": "Deletes the receipt of a score set; the other purchase data stay.\n\n:param request: Current request.\n:param ctx: Group context with ``noten.schreiben``.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:return: Empty answer.\n:raises HTTPException: 404 without receipt.",
        "operationId": "delete_receipt_api_v1_g__slug__scores__score_set_id__receipt_delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Receipt",
        "tags": [
          "noten"
        ]
      },
      "get": {
        "description": "Sends the receipt of a score set with its media type.\n\n:param request: Current request.\n:param ctx: Group context with ``noten.schreiben``.\n:param score_set: Score set from the path, already checked against the group.\n:return: The file.\n:raises HTTPException: 404 without receipt.",
        "operationId": "download_receipt_api_v1_g__slug__scores__score_set_id__receipt_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Download Receipt",
        "tags": [
          "noten"
        ]
      },
      "put": {
        "description": "Stores the receipt of a score set, replacing an earlier one.\n\n:param request: Current request.\n:param ctx: Group context with ``noten.schreiben``.\n:param score_set: Score set from the path, already checked against the group.\n:param db: Database session of the request.\n:param file: The receipt.\n:return: The purchase data with the new receipt.\n:raises HTTPException: 422 for a wrong file, 409 with code ``quota_exceeded`` when the\n    storage of the account is full.",
        "operationId": "upload_receipt_api_v1_g__slug__scores__score_set_id__receipt_put",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "score_set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Score Set Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_receipt_api_v1_g__slug__scores__score_set_id__receipt_put"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Upload Receipt",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/setlists": {
      "get": {
        "description": "Lists the setlists and repertoire folders of the group, newest event first.\n\n:param ctx: Group context of the request.\n:param db: Database session of the request.\n:param kind: Only this kind, e.g. `repertoire` for the folders; left out lists all.\n:return: The setlists of the group.",
        "operationId": "list_setlists_api_v1_g__slug__setlists_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SetlistKind"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SetlistSummary"
                  },
                  "title": "Response List Setlists Api V1 G  Slug  Setlists Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Setlists",
        "tags": [
          "noten"
        ]
      },
      "post": {
        "description": "Creates a setlist, with entries if the request carries them.\n\n:param ctx: Group context, editor role or higher.\n:param db: Database session of the request.\n:param data: Details and optional entries.\n:return: The new setlist.\n:raises HTTPException: 400 for an invalid entry.",
        "operationId": "create_setlist_api_v1_g__slug__setlists_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetlistInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetlistDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Setlist",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/setlists/{setlist_id}": {
      "delete": {
        "description": "Deletes a setlist with all entries.\n\n:param ctx: Group context, editor role or higher.\n:param setlist: Setlist from the path, already checked against the group.\n:param db: Database session of the request.\n:return: Empty answer.",
        "operationId": "delete_setlist_api_v1_g__slug__setlists__setlist_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Setlist",
        "tags": [
          "noten"
        ]
      },
      "get": {
        "description": "Returns a setlist with its rows; a played setlist shows the frozen snapshot.\n\n:param ctx: Group context of the request.\n:param setlist: Setlist from the path, already checked against the group.\n:return: The setlist.",
        "operationId": "get_setlist_detail_api_v1_g__slug__setlists__setlist_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetlistDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Setlist Detail",
        "tags": [
          "noten"
        ]
      },
      "put": {
        "description": "Saves details and, if the request carries them, all entries in one step.\n\n:param ctx: Group context, editor role or higher.\n:param setlist: Planned setlist from the path.\n:param db: Database session of the request.\n:param data: Details and optional entries.\n:return: The changed setlist.\n:raises HTTPException: 400 for an invalid entry, 409 when the setlist was played, 422 when\n    a setlist would become a folder or the other way round.",
        "operationId": "update_setlist_api_v1_g__slug__setlists__setlist_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetlistInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetlistDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Setlist",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/setlists/{setlist_id}/gema.csv": {
      "get": {
        "description": "Sends the music sequence for the GEMA as CSV, from the snapshot once the setlist was played.\n\n:param ctx: Group context, editor role or higher.\n:param setlist: Setlist from the path, already checked against the group.\n:return: The CSV as download.",
        "operationId": "export_gema_csv_api_v1_g__slug__setlists__setlist_id__gema_csv_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Gema Csv",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/setlists/{setlist_id}/played": {
      "post": {
        "description": "Marks the setlist as played and freezes its rows.\n\n:param ctx: Group context, editor role or higher.\n:param setlist: Planned setlist from the path.\n:param db: Database session of the request.\n:return: The played setlist with its snapshot.\n:raises HTTPException: 409 when it was played already or is a repertoire folder.",
        "operationId": "mark_setlist_played_api_v1_g__slug__setlists__setlist_id__played_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetlistDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Mark Setlist Played",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/setlists/{setlist_id}/reopen": {
      "post": {
        "description": "Makes a played setlist editable again.\n\n:param ctx: Group context, editor role or higher.\n:param setlist: Setlist from the path, already checked against the group.\n:param db: Database session of the request.\n:return: The planned setlist.",
        "operationId": "reopen_setlist_api_v1_g__slug__setlists__setlist_id__reopen_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetlistDetail"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reopen Setlist",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/setlists/{setlist_id}/toc": {
      "get": {
        "description": "Sends the table of contents of a repertoire folder as A4 PDF (#408).\n\nThe pieces stand in two columns, each heading of the folder as a category above them, with\nlogo, heading font and colour of the group and the month at the bottom. Other setlists have\nnone and answer 404.\n\n:param request: Current request.\n:param ctx: Group context of the request.\n:param setlist: Setlist from the path, already checked against the group.\n:return: The PDF.\n:raises HTTPException: 404 for a setlist that is no repertoire folder.",
        "operationId": "get_setlist_toc_api_v1_g__slug__setlists__setlist_id__toc_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "setlist_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Setlist Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {}
            },
            "description": "The PDF"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Setlist Toc",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/stats": {
      "get": {
        "description": "Returns the statistics of the group: stock, use, downloads and imports.\n\n:param ctx: Group context of a group admin.\n:param db: Database session of the request.\n:return: The figures; they come from the nightly table, so they are at most a day old.",
        "operationId": "get_stats_api_v1_g__slug__stats_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Stats",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/v1/g/{slug}/stock-import": {
      "post": {
        "description": "Checks a CSV or xlsx file and, with ``dry_run=false``, creates the score sets.\n\nRows with errors are reported and left out; the other rows are created in one transaction.\n\n:param request: Current request.\n:param ctx: Group context, editor role or higher.\n:param db: Database session of the request.\n:param file: CSV or xlsx file.\n:param mapping: Optional column mapping as JSON, guessed from the headers when empty.\n:param dry_run: ``true`` (default) only reports.\n:return: The report.\n:raises HTTPException: 400 for unreadable files or mappings, 409 when an archive number was\n    taken meanwhile, 429 when the user used up the limit ``upload``.",
        "operationId": "run_import_api_v1_g__slug__stock_import_post",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_run_import_api_v1_g__slug__stock_import_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Run Import",
        "tags": [
          "noten"
        ]
      }
    },
    "/api/v1/g/{slug}/suggest/{field}": {
      "get": {
        "description": "Returns the existing values of a field, for input help in the app.\n\n:param request: Current request.\n:param ctx: Group context of the API request.\n:param db: Database session of the request.\n:param field: Key of the field, ``<module>.<field>``.\n:param q: Text typed so far.\n:return: At most 10 values, best match first.",
        "operationId": "get_suggestions_api_v1_g__slug__suggest__field__get",
        "parameters": [
          {
            "in": "path",
            "name": "field",
            "required": true,
            "schema": {
              "title": "Field",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          },
          {
            "description": "Text typed so far, may be empty",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "default": "",
              "description": "Text typed so far, may be empty",
              "maxLength": 200,
              "title": "Q",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SuggestionOut"
                  },
                  "title": "Response Get Suggestions Api V1 G  Slug  Suggest  Field  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Suggestions",
        "tags": [
          "suggest"
        ]
      }
    },
    "/api/v1/g/{slug}/usage": {
      "get": {
        "description": "Lists the counters of the account of the group with their limits.\n\n:param request: Current request, its settings decide about the limits.\n:param ctx: Group context of a group admin.\n:param db: Database session of the request.\n:return: One entry per counter; the whole account counts, not only this group.",
        "operationId": "get_usage_api_v1_g__slug__usage_get",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "title": "Slug",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UsageOut"
                  },
                  "title": "Response Get Usage Api V1 G  Slug  Usage Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Usage",
        "tags": [
          "groups"
        ]
      }
    },
    "/api/v1/labels/layouts": {
      "get": {
        "description": "Lists the label formats.\n\n:param user: User of the Bearer token; the list holds nothing about groups.\n:return: The formats.",
        "operationId": "list_layouts_api_v1_labels_layouts_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LayoutsOut"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "List Layouts",
        "tags": [
          "labels"
        ]
      }
    },
    "/api/v1/links/{code}": {
      "get": {
        "description": "Resolves a scanned code to its object; counts as an opened short link.\n\n:param request: Current request.\n:param user: User of the Bearer token.\n:param db: Database session of the request.\n:param code: The code, case and dashes do not matter.\n:return: Kind, group and paths of the object.\n:raises HTTPException: 404 for unknown codes, outsiders, switched off modules and deleted\n    objects, 403 without the permission of the kind, 429 when codes are tried too fast.",
        "operationId": "resolve_link_api_v1_links__code__get",
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "title": "Code",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Resolve Link",
        "tags": [
          "links"
        ]
      }
    },
    "/api/v1/links/{code}/qr": {
      "get": {
        "description": "Draws the QR code of a short link; does not count as opened.\n\n:param request: Current request.\n:param user: User of the Bearer token.\n:param db: Database session of the request.\n:param code: The code.\n:param format: ``svg`` (default) or ``png``.\n:param size: Edge length of the PNG in pixels.\n:return: The picture.\n:raises HTTPException: As ``resolve_link``.",
        "operationId": "link_qr_api_v1_links__code__qr_get",
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "title": "Code",
              "type": "string"
            }
          },
          {
            "description": "svg or png",
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "default": "svg",
              "description": "svg or png",
              "enum": [
                "svg",
                "png"
              ],
              "title": "Format",
              "type": "string"
            }
          },
          {
            "description": "Edge length of the PNG",
            "in": "query",
            "name": "size",
            "required": false,
            "schema": {
              "default": 512,
              "description": "Edge length of the PNG",
              "maximum": 2048,
              "minimum": 64,
              "title": "Size",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Link Qr",
        "tags": [
          "links"
        ]
      }
    },
    "/api/v1/me": {
      "get": {
        "description": "Describes the signed-in user: profile, groups with roles and the modules of each group.\n\nThe app builds its navigation from this, like the web builds it from the same registry. Only\ngroups of the user appear, a group they do not belong to does not exist for them. The app\nadmin sees every group with every permission.\n\n:param request: Current request, its app holds the installation default of the accent.\n:param user: User of the Bearer token.\n:param db: Database session of the request.\n:return: The profile.",
        "operationId": "me_api_v1_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Me",
        "tags": [
          "api"
        ]
      }
    },
    "/api/v1/me/avatar": {
      "get": {
        "description": "Sends the own profile picture through the delivery path of the web.\n\n:param request: Current request.\n:param user: User of the Bearer token.\n:return: The picture, or 304 when the app has it already.\n:raises HTTPException: 404 when the user has no picture.",
        "operationId": "own_avatar_api_v1_me_avatar_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Own Avatar",
        "tags": [
          "api"
        ]
      }
    },
    "/api/v1/ping": {
      "get": {
        "description": "Checks that the token is accepted, for the app to test a fresh login.\n\n:param user: User of the Bearer token.\n:return: The subject of the user.",
        "operationId": "ping_api_v1_ping_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Ping Api V1 Ping Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Ping",
        "tags": [
          "api"
        ]
      }
    },
    "/api/v1/server": {
      "get": {
        "description": "Describes the installation for the login of the native app, without any login.\n\nThe app knows no fixed server: the user enters the address, the app reads issuer, client id\nand audience here and logs in with them. The answer holds nothing secret and nothing about\nusers or groups.\n\n:param request: Current request, its app holds the settings.\n:return: The description.\n:raises HTTPException: 404 when the API is switched off, like every API route.",
        "operationId": "server_api_v1_server_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerInfo"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Server",
        "tags": [
          "api"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
