{
  "openapi": "3.1.0",
  "info": {
    "title": "Cocktail Manager API",
    "version": "1.0.0",
    "description": "Versioned (`/api/v1`) REST API of the Cocktail Manager. Authenticate with a workspace API key (Bearer JWT) or, for the operations marked as such, a logged-in session."
  },
  "servers": [
    {
      "url": "https://app.cocktail-manager.de",
      "description": "Produktion"
    },
    {
      "url": "https://staging.cocktail-manager.de",
      "description": "Staging"
    },
    {
      "url": "http://localhost:3000",
      "description": "Lokale Entwicklung"
    }
  ],
  "security": [
    {
      "WorkspaceApiKeyAuth": []
    },
    {
      "InstanceApiKeyAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "WorkspaceApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Workspace API key (JWT), scoped to a single workspace. Create one under Workspace → Settings → API Keys and send it as `Authorization: Bearer <token>`. Each key carries a set of permissions; the required permission is documented per operation (see the `Permission` schema for the full list)."
      },
      "InstanceApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Instance master API key — the `INSTANCE_MASTER_API_KEY` server env value, sent as `Authorization: Bearer <token>`. It is instance-wide (NOT scoped to a workspace) and bypasses the per-operation permission checks, so it authorizes every workspace operation. Intended for self-hosting / instance administration, not for third-party integrations. Call `GET /me` to introspect a token (its `isMaster` flag is true for this key)."
      },
      "SessionCookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "better-auth.session_token",
        "description": "Logged-in user session (browser cookie). Used by the few workspace-member operations that act on the caller's own identity (e.g. leaving a workspace, creating/revoking API keys) and therefore do NOT accept API keys — neither a workspace key nor the instance master key."
      }
    },
    "schemas": {
      "Permission": {
        "type": "string",
        "enum": [
          "COCKTAILS_READ",
          "COCKTAILS_CREATE",
          "COCKTAILS_UPDATE",
          "COCKTAILS_DELETE",
          "INGREDIENTS_READ",
          "INGREDIENTS_CREATE",
          "INGREDIENTS_UPDATE",
          "INGREDIENTS_DELETE",
          "GARNISHES_READ",
          "GARNISHES_CREATE",
          "GARNISHES_UPDATE",
          "GARNISHES_DELETE",
          "GLASSES_READ",
          "GLASSES_CREATE",
          "GLASSES_UPDATE",
          "GLASSES_DELETE",
          "UNITS_READ",
          "UNITS_UPDATE",
          "QUEUE_READ",
          "QUEUE_CREATE",
          "QUEUE_UPDATE",
          "QUEUE_DELETE",
          "STATISTICS_READ",
          "STATISTICS_CREATE",
          "STATISTICS_DELETE",
          "CARDS_READ",
          "CARDS_CREATE",
          "CARDS_UPDATE",
          "CARDS_DELETE",
          "CALCULATIONS_READ",
          "CALCULATIONS_CREATE",
          "CALCULATIONS_UPDATE",
          "CALCULATIONS_DELETE",
          "WORKSPACE_READ",
          "WORKSPACE_UPDATE",
          "USERS_READ",
          "USERS_UPDATE",
          "USERS_DELETE",
          "ICE_READ",
          "ICE_CREATE",
          "ICE_UPDATE",
          "ICE_DELETE",
          "RATINGS_READ",
          "RATINGS_CREATE",
          "RATINGS_DELETE",
          "MONITOR_READ",
          "MONITOR_UPDATE",
          "GUEST_MENUS_READ",
          "GUEST_MENUS_CREATE",
          "GUEST_MENUS_UPDATE",
          "GUEST_MENUS_DELETE",
          "GUEST_MENUS_PUBLISH",
          "TRANSLATIONS_READ",
          "TRANSLATIONS_UPDATE",
          "TAGS_READ",
          "TAGS_UPDATE",
          "BACKUPS_EXPORT",
          "BACKUPS_IMPORT"
        ],
        "description": "Granular API-key permission scopes. See Authentication → Permissions for the full matrix."
      },
      "AdminTemplate": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "name": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "builtIn": {
            "type": "boolean",
            "description": "Shipped with the app (`templates/<key>/`); read-only, replaced by newer releases."
          },
          "version": {
            "type": "integer"
          },
          "published": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "memberCount": {
            "type": "integer"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "key",
          "workspaceId",
          "kind",
          "name",
          "description",
          "locales",
          "source",
          "builtIn",
          "version",
          "published",
          "isDefault",
          "sortOrder",
          "memberCount",
          "updatedAt"
        ]
      },
      "TemplateKind": {
        "type": "string",
        "enum": [
          "BASE",
          "CATALOG",
          "DEMO"
        ],
        "description": "`BASE`: defaults of every new workspace, `CATALOG`: start content collection, `DEMO`: complete example bar."
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "VALIDATION_ERROR"
              },
              "message": {
                "type": "string"
              },
              "issues": {}
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "AdminTemplateCreateInput": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Existing (non-demo) workspace that becomes the template."
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "name": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "description": "Text per language, e.g. `{ \"de\": \"Klassiker\", \"en\": \"Classics\" }`."
          },
          "description": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "description": "Text per language, e.g. `{ \"de\": \"Klassiker\", \"en\": \"Classics\" }`."
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 35
            },
            "minItems": 1,
            "maxItems": 20,
            "description": "Content languages; the first one is the primary language."
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "published": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Default template of its kind (only one per kind; setting it clears the others)."
          },
          "sortOrder": {
            "type": "integer",
            "minimum": -10000,
            "maximum": 10000
          }
        },
        "required": [
          "workspaceId",
          "key",
          "kind",
          "name",
          "locales"
        ]
      },
      "AdminTemplateUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "description": "Text per language, e.g. `{ \"de\": \"Klassiker\", \"en\": \"Classics\" }`."
          },
          "description": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "description": "Text per language, e.g. `{ \"de\": \"Klassiker\", \"en\": \"Classics\" }`."
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 35
            },
            "minItems": 1,
            "maxItems": 20,
            "description": "Content languages; the first one is the primary language."
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "published": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Default template of its kind (only one per kind; setting it clears the others)."
          },
          "sortOrder": {
            "type": "integer",
            "minimum": -10000,
            "maximum": 10000
          }
        }
      },
      "AdminTemplateAccess": {
        "type": "object",
        "properties": {
          "template": {
            "$ref": "#/components/schemas/AdminTemplate"
          },
          "joinCode": {
            "type": "string",
            "description": "One-time join code for the template workspace; the first member becomes its owner."
          }
        },
        "required": [
          "template",
          "joinCode"
        ]
      },
      "AdminTemplateCloneInput": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "description": "Key of the new (custom) template."
          },
          "name": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "description": "Name of the clone; default: name of the source."
          }
        },
        "required": [
          "key"
        ]
      },
      "Me": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Workspace the token is scoped to, or null for the instance master key."
          },
          "workspace": {
            "$ref": "#/components/schemas/WorkspaceRef"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "description": "Permission scopes granted to this token."
          },
          "apiKey": {
            "$ref": "#/components/schemas/ApiKeyRef"
          },
          "isMaster": {
            "type": "boolean",
            "description": "True when authenticated with the instance master key (full, non-workspace-scoped access)."
          }
        },
        "required": [
          "workspaceId",
          "workspace",
          "permissions",
          "apiKey",
          "isMaster"
        ]
      },
      "WorkspaceRef": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "ApiKeyRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "GuideProgress": {
        "type": "object",
        "properties": {
          "guideId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/GuideStatus"
          },
          "version": {
            "type": "integer",
            "description": "Version of the guide the status refers to."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "guideId",
          "status",
          "version",
          "updatedAt"
        ]
      },
      "GuideStatus": {
        "type": "string",
        "enum": [
          "STARTED",
          "COMPLETED",
          "DISMISSED"
        ]
      },
      "GuideProgressUpdateInput": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/GuideStatus"
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000
          }
        },
        "required": [
          "status",
          "version"
        ]
      },
      "TemplateSummary": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/TemplateKind"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Content languages; the first one is the primary language."
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "Origin and license summary of the content (e.g. recipe sources, photo licenses); show it with the template. Per-image credits: `imageCredit` of the items."
          },
          "builtIn": {
            "type": "boolean"
          },
          "version": {
            "type": "integer"
          },
          "isDefault": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "counts": {
            "$ref": "#/components/schemas/TemplateCounts"
          }
        },
        "required": [
          "key",
          "kind",
          "name",
          "description",
          "locales",
          "source",
          "builtIn",
          "version",
          "isDefault",
          "sortOrder",
          "counts"
        ]
      },
      "TemplateCounts": {
        "type": "object",
        "properties": {
          "glasses": {
            "type": "integer"
          },
          "ingredients": {
            "type": "integer"
          },
          "garnishes": {
            "type": "integer"
          },
          "cocktails": {
            "type": "integer"
          },
          "cards": {
            "type": "integer"
          },
          "guestMenus": {
            "type": "integer"
          }
        },
        "required": [
          "glasses",
          "ingredients",
          "garnishes",
          "cocktails",
          "cards",
          "guestMenus"
        ]
      },
      "TemplateItems": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "locale": {
            "type": "string",
            "description": "Language of the names."
          },
          "glasses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "hasImage": {
                  "type": "boolean"
                },
                "imageCredit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Attribution of the image (title, author, source, license), to be shown wherever the image is displayed; null = none required or known."
                }
              },
              "required": [
                "id",
                "name",
                "hasImage",
                "imageCredit"
              ]
            }
          },
          "ingredients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "hasImage": {
                  "type": "boolean"
                },
                "imageCredit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Attribution of the image (title, author, source, license), to be shown wherever the image is displayed; null = none required or known."
                }
              },
              "required": [
                "id",
                "name",
                "hasImage",
                "imageCredit"
              ]
            }
          },
          "garnishes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "hasImage": {
                  "type": "boolean"
                },
                "imageCredit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Attribution of the image (title, author, source, license), to be shown wherever the image is displayed; null = none required or known."
                }
              },
              "required": [
                "id",
                "name",
                "hasImage",
                "imageCredit"
              ]
            }
          },
          "cocktails": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "hasImage": {
                  "type": "boolean"
                },
                "imageCredit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Attribution of the image (title, author, source, license), to be shown wherever the image is displayed; null = none required or known."
                },
                "glassId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ingredientIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "garnishIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "name",
                "hasImage",
                "imageCredit",
                "glassId",
                "ingredientIds",
                "garnishIds"
              ]
            }
          },
          "cards": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "cocktailIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "id",
                "name",
                "cocktailIds"
              ]
            }
          }
        },
        "required": [
          "key",
          "locale",
          "glasses",
          "ingredients",
          "garnishes",
          "cocktails",
          "cards"
        ],
        "description": "Items of a template for a selection dialog; ids are only valid as selection of this template."
      },
      "UserSetting": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "setting": {
            "$ref": "#/components/schemas/UserSettingKey"
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "userId",
          "setting",
          "value"
        ]
      },
      "UserSettingKey": {
        "type": "string",
        "enum": [
          "showImage",
          "showTags",
          "lessItems",
          "theme",
          "language",
          "showStatisticActions",
          "lastSeenVersion",
          "showNotes",
          "showHistory",
          "showDescription",
          "showTime",
          "showRating",
          "queueGrouping",
          "showFastQueueCheck",
          "showSettingsAtBottom",
          "showGuestMenuExtras"
        ]
      },
      "UserSettingUpdateInput": {
        "type": "object",
        "properties": {
          "setting": {
            "$ref": "#/components/schemas/UserSettingKey"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Setting value as string (max 1000 characters), or null to clear."
          }
        },
        "required": [
          "setting",
          "value"
        ]
      },
      "Workspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "isDemo": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "When a demo workspace expires, or null."
          },
          "isExternallyManaged": {
            "type": "boolean",
            "description": "Whether membership/roles are managed via an external identity provider."
          },
          "publicSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "Public slug for guest menus (`/m/{publicSlug}`), or null."
          },
          "setupCompletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "When the setup assistant was completed; null = not yet."
          },
          "isTemplate": {
            "type": "boolean",
            "description": "The workspace is a template (start content); it cannot be deleted."
          },
          "settings": {
            "$ref": "#/components/schemas/WorkspaceSettings"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceMember"
            }
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "image",
          "isDemo",
          "expiresAt",
          "isExternallyManaged",
          "publicSlug",
          "setupCompletedAt",
          "isTemplate",
          "settings",
          "members"
        ]
      },
      "WorkspaceSettings": {
        "type": "object",
        "properties": {
          "translations": {
            "type": [
              "string",
              "null"
            ]
          },
          "usePrices": {
            "type": [
              "string",
              "null"
            ]
          },
          "statisticDayStartTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "contentLocales": {
            "type": [
              "string",
              "null"
            ]
          },
          "onboardingChecklistSkipped": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "description": "Workspace settings keyed by setting name; values are strings or null."
      },
      "WorkspaceMember": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "$ref": "#/components/schemas/WorkspaceRole"
          },
          "lastOpened": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "When the member last opened this workspace."
          }
        },
        "required": [
          "userId",
          "name",
          "email",
          "image",
          "role",
          "lastOpened"
        ]
      },
      "WorkspaceRole": {
        "type": "string",
        "enum": [
          "OWNER",
          "ADMIN",
          "MANAGER",
          "USER"
        ]
      },
      "WorkspaceUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "New workspace name (trimmed, 1–100 characters); omitted keeps the current name."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000000,
            "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
            "description": "Workspace logo as a base64 raster image data URI; null removes it, omitted keeps it.",
            "example": "data:image/png;base64,iVBORw0KGgo="
          },
          "publicSlug": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 3,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "description": "Public slug for guest menus (`/m/{publicSlug}`), unique across workspaces; null removes it, omitted keeps it. Slugs shaped like ids (cuid `c` + 20 or more letters/digits, or a UUID) are rejected with 400 `PUBLIC_SLUG_RESERVED`, slugs used by another workspace or equal to a workspace id with 409 `PUBLIC_SLUG_TAKEN`."
          }
        }
      },
      "DeletionResult": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of records deleted."
          }
        },
        "required": [
          "count"
        ]
      },
      "Action": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "actionGroup": {
            "type": "string",
            "description": "Grouping bucket, e.g. \"MIXING\" or \"POURING\"."
          },
          "dilutionPercent": {
            "type": [
              "number",
              "null"
            ],
            "description": "Water added by this action in % of the liquid volume (for ABV calculation); null = default (SHAKE 25, STIR 20, otherwise 10)."
          }
        },
        "required": [
          "id",
          "name",
          "actionGroup",
          "dilutionPercent"
        ]
      },
      "ActionCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "actionGroup": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "dilutionPercent": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Dilution in % of the liquid volume; null = default for the action. Omit to keep unchanged."
          },
          "translations": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Optional display-name translations keyed by language code, e.g. { \"en\": \"Shake\" }."
          }
        },
        "required": [
          "name",
          "actionGroup"
        ]
      },
      "ActionUpdateInput": {
        "type": "object",
        "properties": {
          "actionGroup": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "dilutionPercent": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Dilution in % of the liquid volume; null = default for the action. Omit to keep unchanged."
          },
          "translations": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Optional display-name translations keyed by language code, e.g. { \"en\": \"Shake\" }."
          }
        },
        "required": [
          "actionGroup"
        ]
      },
      "SignageFormat": {
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/MonitorFormat"
          },
          "backgroundColor": {
            "type": [
              "string",
              "null"
            ]
          },
          "backgroundMode": {
            "$ref": "#/components/schemas/SignageBackgroundMode"
          },
          "slideDurationSeconds": {
            "type": "integer"
          },
          "mirrorSourceFormat": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MonitorFormat"
              },
              {
                "type": [
                  "string",
                  "null"
                ],
                "description": "If set, this format mirrors the slides of the given source format."
              }
            ]
          },
          "slides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignageSlide"
            }
          }
        },
        "required": [
          "format",
          "backgroundColor",
          "backgroundMode",
          "slideDurationSeconds",
          "mirrorSourceFormat",
          "slides"
        ]
      },
      "MonitorFormat": {
        "type": "string",
        "enum": [
          "LANDSCAPE",
          "PORTRAIT"
        ]
      },
      "SignageBackgroundMode": {
        "type": "string",
        "enum": [
          "COLOR",
          "BLURRED"
        ]
      },
      "SignageSlide": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "order": {
            "type": "integer"
          },
          "enabled": {
            "type": "boolean"
          },
          "weekdays": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Active weekdays (0=Sun … 6=Sat); empty = every day."
          },
          "validFrom": {
            "type": [
              "string",
              "null"
            ],
            "description": "Active-from date (YYYY-MM-DD), or null."
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Active-to date (YYYY-MM-DD), or null."
          },
          "dateExclusive": {
            "type": "boolean"
          },
          "type": {
            "$ref": "#/components/schemas/SignageSlideType"
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to fetch the slide image bytes (IMAGE slides), null for GUEST_MENU slides."
          },
          "guestMenuId": {
            "type": [
              "string",
              "null"
            ],
            "description": "GUEST_MENU slides: the shown menu, or null for the currently active menu."
          },
          "guestMenuName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of `guestMenuId`, if set."
          },
          "options": {
            "$ref": "#/components/schemas/GuestMenuSlideOptions"
          }
        },
        "required": [
          "id",
          "order",
          "enabled",
          "weekdays",
          "validFrom",
          "validTo",
          "dateExclusive",
          "type",
          "imageUrl",
          "guestMenuId",
          "guestMenuName",
          "options"
        ]
      },
      "SignageSlideType": {
        "type": "string",
        "enum": [
          "IMAGE",
          "GUEST_MENU"
        ]
      },
      "GuestMenuSlideOptions": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "localeMode": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "primary",
              "fixed",
              "rotate",
              null
            ],
            "description": "`rotate` alternates the menu languages per page cycle."
          },
          "locale": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 16,
            "description": "Content locale for `localeMode: fixed`."
          },
          "showQrCode": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "columns": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "auto"
                ]
              },
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 6
              },
              {
                "type": "null"
              }
            ],
            "description": "`auto` picks the column count (and font scale) that fits best."
          },
          "pageDurationSeconds": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 3,
            "maximum": 600,
            "description": "Seconds per page when the menu needs several pages."
          }
        }
      },
      "SignageSettingsUpdateInput": {
        "type": "object",
        "properties": {
          "landscape": {
            "type": "object",
            "properties": {
              "backgroundColor": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 64
              },
              "backgroundMode": {
                "$ref": "#/components/schemas/SignageBackgroundMode"
              },
              "slideDurationSeconds": {
                "type": "integer",
                "minimum": 1,
                "maximum": 86400
              },
              "mirrorSourceFormat": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MonitorFormat"
                  },
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "slides": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SignageSlideOrder"
                },
                "maxItems": 1000,
                "description": "New `order` per slide of this format; ids of other formats/workspaces are ignored."
              }
            },
            "required": [
              "slideDurationSeconds",
              "slides"
            ]
          },
          "portrait": {
            "type": "object",
            "properties": {
              "backgroundColor": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 64
              },
              "backgroundMode": {
                "$ref": "#/components/schemas/SignageBackgroundMode"
              },
              "slideDurationSeconds": {
                "type": "integer",
                "minimum": 1,
                "maximum": 86400
              },
              "mirrorSourceFormat": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MonitorFormat"
                  },
                  {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                ]
              },
              "slides": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SignageSlideOrder"
                },
                "maxItems": 1000,
                "description": "New `order` per slide of this format; ids of other formats/workspaces are ignored."
              }
            },
            "required": [
              "slideDurationSeconds",
              "slides"
            ]
          }
        }
      },
      "SignageSlideOrder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "order": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000
          }
        },
        "required": [
          "id",
          "order"
        ]
      },
      "SignageKey": {
        "type": "object",
        "properties": {
          "key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Monitor key (bearer secret), or null if none was generated yet. Required by monitors to show PIN-protected guest menus."
          },
          "monitorPath": {
            "type": "string",
            "description": "Relative monitor URL (`/signage?id=…&key=…`, without `key` if none exists)."
          }
        },
        "required": [
          "key",
          "monitorPath"
        ]
      },
      "SignageSlideCreateInput": {
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/MonitorFormat"
          },
          "slides": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 10000000,
              "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Base64-encoded raster image as data URI, e.g. `data:image/png;base64,…`.",
              "example": "data:image/png;base64,iVBORw0KGgo="
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "Base64-encoded raster slide images (data URIs) to append (max 100 per request)."
          }
        },
        "required": [
          "format",
          "slides"
        ]
      },
      "SignageSlidePatchInput": {
        "type": "object",
        "properties": {
          "slideIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "minItems": 1,
            "maxItems": 1000
          },
          "enabled": {
            "type": "boolean"
          },
          "weekdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "maxItems": 7
          },
          "validFrom": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 40,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}(?:T[\\d:.]+(?:Z|[+-]\\d{2}:?\\d{2})?)?$"
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 40,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}(?:T[\\d:.]+(?:Z|[+-]\\d{2}:?\\d{2})?)?$"
          },
          "dateExclusive": {
            "type": "boolean"
          }
        },
        "required": [
          "slideIds"
        ]
      },
      "SignageGuestMenuSlideUpdateInput": {
        "type": "object",
        "properties": {
          "guestMenuId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "description": "Menu to show; null = the currently active guest menu."
          },
          "options": {
            "$ref": "#/components/schemas/GuestMenuSlideOptions"
          }
        }
      },
      "SignageGuestMenuSlideCreateInput": {
        "type": "object",
        "properties": {
          "format": {
            "$ref": "#/components/schemas/MonitorFormat"
          },
          "guestMenuId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "description": "Menu to show; null = the currently active guest menu."
          },
          "options": {
            "$ref": "#/components/schemas/GuestMenuSlideOptions"
          }
        },
        "required": [
          "format",
          "guestMenuId"
        ]
      },
      "TranslationUpdateResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ]
      },
      "TranslationUpdateInput": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The translation key (e.g. an action/unit/ice name)."
          },
          "translations": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Display names keyed by language code, e.g. { \"de\": \"Shaken\" }."
          }
        },
        "required": [
          "key",
          "translations"
        ]
      },
      "ApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "keyPrefix": {
            "type": "string",
            "description": "First characters of the internal key id, for identification."
          },
          "revoked": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "createdBy": {
            "$ref": "#/components/schemas/ApiKeyCreator"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          }
        },
        "required": [
          "id",
          "name",
          "keyPrefix",
          "revoked",
          "expiresAt",
          "lastUsedAt",
          "createdAt",
          "createdBy",
          "permissions"
        ]
      },
      "ApiKeyCreator": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "email"
        ]
      },
      "ApiKeyCreateResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "The signed API key (JWT). Returned ONLY once — store it now."
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          }
        },
        "required": [
          "id",
          "name",
          "key",
          "expiresAt",
          "createdAt",
          "permissions"
        ]
      },
      "ApiKeyCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 40,
            "description": "ISO expiry timestamp in the future (400 `INVALID_EXPIRY` otherwise), or null/omitted for no expiry."
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "maxItems": 58,
            "description": "Permission scopes to grant the key (duplicates are ignored)."
          }
        },
        "required": [
          "name"
        ]
      },
      "AuditLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "entityType": {
            "type": "string",
            "description": "Type of the affected entity, e.g. `Glass`."
          },
          "entityId": {
            "type": "string",
            "description": "ID of the affected entity."
          },
          "action": {
            "type": "string",
            "description": "Action performed, e.g. `CREATE`, `UPDATE`, `DELETE`."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "user": {
            "$ref": "#/components/schemas/AuditLogUser"
          },
          "changes": {
            "description": "Structured diff of the change, or null."
          },
          "snapshot": {
            "description": "Entity snapshot after the change, or null."
          },
          "exportData": {
            "description": "Exportable entity payload for restore/download, or null."
          }
        },
        "required": [
          "id",
          "entityType",
          "entityId",
          "action",
          "createdAt",
          "user"
        ]
      },
      "AuditLogUser": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "Avatar URL, or null."
          }
        },
        "required": [
          "id",
          "name",
          "image"
        ],
        "description": "The acting user, or null if the user was removed."
      },
      "CalculationSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "showSalesStuff": {
            "type": "boolean"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "group": {
            "$ref": "#/components/schemas/CalculationGroupRef"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalculationItem"
            }
          }
        },
        "required": [
          "id",
          "name",
          "showSalesStuff",
          "updatedAt",
          "group",
          "items"
        ]
      },
      "CalculationGroupRef": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isDefaultExpanded": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "isDefaultExpanded"
        ],
        "description": "Group this calculation belongs to, or null."
      },
      "CalculationItem": {
        "type": "object",
        "properties": {
          "cocktail": {
            "$ref": "#/components/schemas/CalculationCocktailRef"
          },
          "plannedAmount": {
            "type": "integer",
            "description": "Planned number of cocktails for this item."
          },
          "customPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Overridden price for this item, or null."
          }
        },
        "required": [
          "cocktail",
          "plannedAmount",
          "customPrice"
        ]
      },
      "CalculationCocktailRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CalculationCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "showSalesStuff": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to show sales figures (default true)."
          },
          "groupId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 100,
            "description": "Group to assign the calculation to, or null/omitted for none."
          },
          "calculationItems": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cocktailId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "plannedAmount": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 1000000,
                  "description": "Planned number of cocktails for this item."
                },
                "customPrice": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 1000000,
                  "description": "Overridden price for this item, or null."
                }
              },
              "required": [
                "cocktailId",
                "plannedAmount"
              ]
            },
            "maxItems": 500,
            "description": "Cocktail items in this calculation."
          },
          "ingredientShoppingUnits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ingredientId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "unitId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "checked": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "required": [
                "ingredientId",
                "unitId"
              ]
            },
            "maxItems": 2000,
            "description": "Ingredient shopping units for this calculation."
          }
        },
        "required": [
          "name",
          "calculationItems",
          "ingredientShoppingUnits"
        ]
      },
      "Calculation": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CalculationSummary"
          },
          {
            "type": "object",
            "properties": {
              "ingredientShoppingUnits": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CalculationShoppingUnit"
                }
              }
            },
            "required": [
              "ingredientShoppingUnits"
            ]
          }
        ]
      },
      "CalculationShoppingUnit": {
        "type": "object",
        "properties": {
          "ingredient": {
            "$ref": "#/components/schemas/CalculationIngredientRef"
          },
          "unit": {
            "$ref": "#/components/schemas/CalculationUnitRef"
          },
          "checked": {
            "type": "boolean"
          }
        },
        "required": [
          "ingredient",
          "unit",
          "checked"
        ]
      },
      "CalculationIngredientRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CalculationUnitRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CalculationUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "showSalesStuff": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to show sales figures."
          },
          "groupId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 100,
            "description": "Group to assign the calculation to; null/omitted disconnects it."
          },
          "calculationItems": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cocktailId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "plannedAmount": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 1000000,
                  "description": "Planned number of cocktails for this item."
                },
                "customPrice": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 1000000,
                  "description": "Overridden price for this item, or null."
                }
              },
              "required": [
                "cocktailId",
                "plannedAmount"
              ]
            },
            "maxItems": 500,
            "description": "Cocktail items; fully replaces the existing items."
          },
          "ingredientShoppingUnits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ingredientId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "unitId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "checked": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                }
              },
              "required": [
                "ingredientId",
                "unitId"
              ]
            },
            "maxItems": 2000,
            "description": "Ingredient shopping units; fully replaces the existing ones."
          }
        },
        "required": [
          "name",
          "calculationItems",
          "ingredientShoppingUnits"
        ]
      },
      "CalculationExportJsonInput": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 500,
            "description": "Ids of the calculations to export."
          }
        },
        "required": [
          "ids"
        ]
      },
      "CalculationGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "isDefaultExpanded": {
            "type": "boolean"
          },
          "calculationCount": {
            "type": "integer",
            "description": "Number of calculations assigned to this group."
          }
        },
        "required": [
          "id",
          "name",
          "isDefaultExpanded",
          "calculationCount"
        ]
      },
      "CalculationGroupCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "isDefaultExpanded": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the group is expanded by default (default false)."
          }
        },
        "required": [
          "name"
        ]
      },
      "CalculationGroupUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "isDefaultExpanded": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the group is expanded by default."
          }
        },
        "required": [
          "name"
        ]
      },
      "GroupAssignmentResult": {
        "type": "object",
        "properties": {
          "updatedCount": {
            "type": "integer"
          }
        },
        "required": [
          "updatedCount"
        ]
      },
      "CalculationGroupAssignInput": {
        "type": "object",
        "properties": {
          "calculationIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "minItems": 1,
            "maxItems": 500,
            "description": "Calculations to (re)assign."
          },
          "groupId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 100,
            "description": "Target group, or null to remove group assignment."
          }
        },
        "required": [
          "calculationIds"
        ]
      },
      "CalculationImportJsonInput": {
        "type": "object",
        "properties": {
          "phase": {
            "type": "string",
            "enum": [
              "validate",
              "prepare-mapping",
              "execute"
            ],
            "description": "Import phase to run."
          },
          "exportData": {
            "description": "Raw export dump (single object or array) as produced by POST /calculations/export/json (round-trip format, kept verbatim)."
          },
          "decisions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "exportName": {
                  "type": "string",
                  "maxLength": 255
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "import",
                    "overwrite",
                    "rename",
                    "skip"
                  ]
                },
                "existingId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 100
                },
                "newName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "groupDecision": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "keep-exported",
                    "use-existing",
                    "create-new",
                    "no-group",
                    null
                  ]
                },
                "existingGroupId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 100
                },
                "newGroupName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 100
                },
                "newGroupDefaultExpanded": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "data": {}
              },
              "required": [
                "exportName",
                "decision"
              ]
            },
            "maxItems": 500,
            "description": "Per-entity import decisions, required for the \"execute\" phase."
          },
          "cocktailMappings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "exportName": {
                  "type": "string",
                  "maxLength": 255
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "use-existing",
                    "skip"
                  ]
                },
                "existingId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "required": [
                "exportName",
                "decision"
              ]
            },
            "maxItems": 5000,
            "description": "Cocktail name → id mappings for the \"execute\" phase."
          },
          "ingredientMappings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "exportName": {
                  "type": "string",
                  "maxLength": 255
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "use-existing",
                    "skip"
                  ]
                },
                "existingId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "required": [
                "exportName",
                "decision"
              ]
            },
            "maxItems": 5000,
            "description": "Ingredient name → id mappings for the \"execute\" phase."
          },
          "unitMappings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "exportName": {
                  "type": "string",
                  "maxLength": 255
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "use-existing",
                    "skip"
                  ]
                },
                "existingId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "required": [
                "exportName",
                "decision"
              ]
            },
            "maxItems": 5000,
            "description": "Unit name → id mappings for the \"execute\" phase."
          }
        },
        "required": [
          "phase"
        ]
      },
      "CardSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "Optional date the card is scheduled for."
          },
          "archived": {
            "type": "boolean"
          },
          "groupCount": {
            "type": "integer",
            "description": "Number of groups on this card."
          },
          "itemCount": {
            "type": "integer",
            "description": "Total number of cocktail items across all groups."
          }
        },
        "required": [
          "id",
          "name",
          "date",
          "archived",
          "groupCount",
          "itemCount"
        ]
      },
      "Card": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CardSummary"
          },
          {
            "type": "object",
            "properties": {
              "groups": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CardGroup"
                }
              }
            },
            "required": [
              "groups"
            ]
          }
        ]
      },
      "CardGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "groupNumber": {
            "type": "integer",
            "description": "Ordering index of the group within the card."
          },
          "groupPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Uniform price applied to the whole group, or null."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CardItem"
            }
          }
        },
        "required": [
          "id",
          "name",
          "groupNumber",
          "groupPrice",
          "items"
        ]
      },
      "CardItem": {
        "type": "object",
        "properties": {
          "cocktail": {
            "$ref": "#/components/schemas/CardCocktailRef"
          },
          "itemNumber": {
            "type": "integer",
            "description": "Ordering index of the item within its group."
          },
          "specialPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Overridden price for this item on this card, or null."
          }
        },
        "required": [
          "cocktail",
          "itemNumber",
          "specialPrice"
        ]
      },
      "CardCocktailRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CardCreateInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Optional client-supplied CUID."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Optional date the card is scheduled for."
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "description": "Optional client-supplied CUID; on update, ids of the card’s existing groups keep the group (and its id)."
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                "groupNumber": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 100000,
                  "description": "Ordering index; auto-assigned when omitted."
                },
                "groupPrice": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 1000000,
                  "description": "Uniform group price, or null."
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "cocktailId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "itemNumber": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 100000,
                        "description": "Ordering index; auto-assigned when omitted."
                      },
                      "specialPrice": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 1000000,
                        "description": "Overridden price for this item, or null."
                      }
                    },
                    "required": [
                      "cocktailId"
                    ]
                  },
                  "maxItems": 500,
                  "description": "Items in this group."
                }
              },
              "required": [
                "name"
              ]
            },
            "maxItems": 100,
            "description": "Groups (with their items) to create."
          }
        },
        "required": [
          "name"
        ]
      },
      "CardUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Optional date the card is scheduled for."
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "description": "Optional client-supplied CUID; on update, ids of the card’s existing groups keep the group (and its id)."
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                "groupNumber": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 100000,
                  "description": "Ordering index; auto-assigned when omitted."
                },
                "groupPrice": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 1000000,
                  "description": "Uniform group price, or null."
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "cocktailId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "itemNumber": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 100000,
                        "description": "Ordering index; auto-assigned when omitted."
                      },
                      "specialPrice": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 1000000,
                        "description": "Overridden price for this item, or null."
                      }
                    },
                    "required": [
                      "cocktailId"
                    ]
                  },
                  "maxItems": 500,
                  "description": "Items in this group."
                }
              },
              "required": [
                "name"
              ]
            },
            "maxItems": 100,
            "description": "Groups (with their items); fully replaces the existing groups/items."
          }
        },
        "required": [
          "name"
        ]
      },
      "CardCloneInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Name for the cloned card."
          }
        },
        "required": [
          "name"
        ]
      },
      "CocktailSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "price": {
            "type": [
              "number",
              "null"
            ]
          },
          "isArchived": {
            "type": "boolean",
            "description": "Whether the cocktail is archived."
          },
          "unavailableUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "Cocktail is marked as unavailable (\"heute aus\") until this instant (start of the next bar day), or null when available."
          },
          "hasImage": {
            "type": "boolean",
            "description": "Whether the cocktail has an image."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to fetch the cocktail image bytes, or null when hasImage is false."
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Attribution of the image (author, source, license), to be shown with it; null = none."
          },
          "glass": {
            "$ref": "#/components/schemas/CocktailGlassRef"
          },
          "garnishes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CocktailGarnishNameRef"
            },
            "description": "Garnish name refs; present only when requested via ?include=garnishes."
          },
          "ingredients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CocktailIngredientNameRef"
            },
            "description": "Distinct ingredient name refs across all steps; present only when requested via ?include=ingredients."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "tags",
          "price",
          "isArchived",
          "unavailableUntil",
          "hasImage",
          "imageUrl",
          "imageCredit",
          "glass"
        ]
      },
      "CocktailGlassRef": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "deposit": {
            "type": "number",
            "description": "Glass deposit in currency units."
          },
          "hasImage": {
            "type": "boolean",
            "description": "Whether the glass has an image."
          }
        },
        "required": [
          "id",
          "name",
          "deposit",
          "hasImage"
        ]
      },
      "CocktailGarnishNameRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CocktailIngredientNameRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "shortName"
        ]
      },
      "Cocktail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "price": {
            "type": [
              "number",
              "null"
            ]
          },
          "isArchived": {
            "type": "boolean",
            "description": "Whether the cocktail is archived."
          },
          "unavailableUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "Cocktail is marked as unavailable (\"heute aus\") until this instant (start of the next bar day), or null when available."
          },
          "hasImage": {
            "type": "boolean",
            "description": "Whether the cocktail has an image."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to fetch the cocktail image bytes, or null when hasImage is false."
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Attribution of the image (author, source, license), to be shown with it; null = none."
          },
          "glass": {
            "$ref": "#/components/schemas/CocktailGlassRef"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "history": {
            "type": [
              "string",
              "null"
            ]
          },
          "abvOverride": {
            "type": [
              "number",
              "null"
            ],
            "description": "Manual ABV in % vol, null when calculated."
          },
          "extraAllergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allergen"
            }
          },
          "extraAdditives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Additive"
            }
          },
          "ice": {
            "$ref": "#/components/schemas/CocktailIceRef"
          },
          "garnishes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CocktailGarnish"
            }
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CocktailStep"
            }
          },
          "averageRating": {
            "type": [
              "number",
              "null"
            ],
            "description": "Mean of all rating values, or null when there are no ratings."
          },
          "ratingCount": {
            "type": "integer",
            "description": "Number of ratings."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "tags",
          "price",
          "isArchived",
          "unavailableUntil",
          "hasImage",
          "imageUrl",
          "imageCredit",
          "glass",
          "notes",
          "history",
          "abvOverride",
          "extraAllergens",
          "extraAdditives",
          "ice",
          "garnishes",
          "steps",
          "averageRating",
          "ratingCount"
        ]
      },
      "Allergen": {
        "type": "string",
        "enum": [
          "GLUTEN",
          "CRUSTACEANS",
          "EGGS",
          "FISH",
          "PEANUTS",
          "SOY",
          "MILK",
          "NUTS",
          "CELERY",
          "MUSTARD",
          "SESAME",
          "SULPHITES",
          "LUPIN",
          "MOLLUSCS"
        ],
        "description": "Allergen per Regulation (EU) No 1169/2011, Annex II."
      },
      "Additive": {
        "type": "string",
        "enum": [
          "COLORING",
          "PRESERVATIVE",
          "ANTIOXIDANT",
          "FLAVOR_ENHANCER",
          "SULPHURED",
          "BLACKENED",
          "WAXED",
          "PHOSPHATE",
          "SWEETENER",
          "PHENYLALANINE",
          "CAFFEINE",
          "QUININE"
        ],
        "description": "Labelling-relevant additive."
      },
      "CocktailIceRef": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CocktailGarnish": {
        "type": "object",
        "properties": {
          "garnishId": {
            "type": "string"
          },
          "garnishNumber": {
            "type": "integer",
            "description": "Ordering index of the garnish within the recipe."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "optional": {
            "type": "boolean"
          },
          "isAlternative": {
            "type": "boolean"
          },
          "garnish": {
            "$ref": "#/components/schemas/CocktailGarnishRef"
          }
        },
        "required": [
          "garnishId",
          "garnishNumber",
          "description",
          "optional",
          "isAlternative",
          "garnish"
        ]
      },
      "CocktailGarnishRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "Garnish price in currency units (drives material cost)."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "hasImage": {
            "type": "boolean",
            "description": "Whether the garnish has an image."
          }
        },
        "required": [
          "id",
          "name",
          "price",
          "description",
          "notes",
          "hasImage"
        ]
      },
      "CocktailStep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "stepNumber": {
            "type": "integer",
            "description": "Ordering index of the step within the recipe."
          },
          "optional": {
            "type": "boolean"
          },
          "action": {
            "$ref": "#/components/schemas/CocktailActionRef"
          },
          "ingredients": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CocktailStepIngredient"
            }
          }
        },
        "required": [
          "id",
          "stepNumber",
          "optional",
          "action",
          "ingredients"
        ]
      },
      "CocktailActionRef": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CocktailStepIngredient": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "Amount in the given unit, or null."
          },
          "optional": {
            "type": "boolean"
          },
          "ingredientNumber": {
            "type": "integer",
            "description": "Ordering index within the step."
          },
          "unit": {
            "$ref": "#/components/schemas/CocktailUnitRef"
          },
          "ingredient": {
            "$ref": "#/components/schemas/CocktailIngredientRef"
          }
        },
        "required": [
          "id",
          "amount",
          "optional",
          "ingredientNumber",
          "unit",
          "ingredient"
        ]
      },
      "CocktailUnitRef": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "CocktailIngredientRef": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hasImage": {
            "type": "boolean",
            "description": "Whether the ingredient has an image."
          }
        },
        "required": [
          "id",
          "name",
          "shortName",
          "description",
          "notes",
          "tags",
          "hasImage"
        ]
      },
      "CocktailCreateInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9_-]+$",
            "description": "Optional client-supplied CUID."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20000
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20000
          },
          "history": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "maxItems": 100
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -1000000,
            "maximum": 1000000
          },
          "iceId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9_-]+$",
            "description": "Ice id, or null."
          },
          "glassId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9_-]+$",
            "description": "Glass id, or null."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000000,
            "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
            "description": "Base64-encoded raster image (data URI) to attach.",
            "example": "data:image/png;base64,iVBORw0KGgo="
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Attribution of the image (author, source, license), shown wherever the image is displayed. Omitted: kept while the image stays the same, cleared when a new image is uploaded; null or empty clears it.",
            "example": "\"Negroni\" by Jane Doe, https://commons.wikimedia.org/wiki/File:Negroni.jpg, CC BY-SA 4.0"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Existing step id; omit/empty for a new step."
                },
                "stepNumber": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 10000,
                  "description": "Ordering index of the step within the recipe."
                },
                "optional": {
                  "type": "boolean",
                  "description": "Whether this step is optional (default false)."
                },
                "actionId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Action id for this step."
                },
                "ingredients": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9_-]+$",
                        "description": "Existing ingredient-line id; omit/empty for a new line."
                      },
                      "amount": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "minimum": -1000000,
                        "maximum": 1000000,
                        "description": "Amount in the given unit, or null."
                      },
                      "optional": {
                        "type": "boolean",
                        "description": "Whether this ingredient is optional (default false)."
                      },
                      "ingredientNumber": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 10000,
                        "description": "Ordering index within the step."
                      },
                      "unitId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9_-]+$",
                        "description": "Unit id, or null."
                      },
                      "ingredientId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9_-]+$",
                        "description": "Ingredient id, or null."
                      }
                    },
                    "required": [
                      "ingredientNumber"
                    ]
                  },
                  "maxItems": 100,
                  "description": "Ingredient lines within this step."
                }
              },
              "required": [
                "stepNumber",
                "actionId"
              ]
            },
            "maxItems": 100,
            "description": "Preparation steps (with their ingredients)."
          },
          "garnishes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "garnishId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9_-]+$"
                },
                "garnishNumber": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 10000,
                  "description": "Ordering index of the garnish within the recipe."
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 2000
                },
                "optional": {
                  "type": "boolean",
                  "description": "Whether this garnish is optional (default false)."
                },
                "isAlternative": {
                  "type": "boolean",
                  "description": "Whether this garnish is an alternative (default false)."
                }
              },
              "required": [
                "garnishId",
                "garnishNumber"
              ]
            },
            "maxItems": 100,
            "description": "Garnishes attached to the cocktail."
          },
          "abvOverride": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Manual ABV in % vol; overrides the calculated value. null = calculate."
          },
          "extraAllergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allergen"
            },
            "maxItems": 100,
            "description": "Allergens added on top of the ingredient-derived ones."
          },
          "extraAdditives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Additive"
            },
            "maxItems": 100,
            "description": "Additives added on top of the ingredient-derived ones."
          }
        },
        "required": [
          "name"
        ]
      },
      "CocktailUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20000
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20000
          },
          "history": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "maxItems": 100
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "minimum": -1000000,
            "maximum": 1000000
          },
          "iceId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9_-]+$",
            "description": "Ice id, or null."
          },
          "glassId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9_-]+$",
            "description": "Glass id, or null."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000000,
            "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
            "description": "Base64 raster image (data URI); omitting it removes the current image.",
            "example": "data:image/png;base64,iVBORw0KGgo="
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Attribution of the image (author, source, license), shown wherever the image is displayed. Omitted: kept while the image stays the same, cleared when a new image is uploaded; null or empty clears it.",
            "example": "\"Negroni\" by Jane Doe, https://commons.wikimedia.org/wiki/File:Negroni.jpg, CC BY-SA 4.0"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Existing step id; omit/empty for a new step."
                },
                "stepNumber": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 10000,
                  "description": "Ordering index of the step within the recipe."
                },
                "optional": {
                  "type": "boolean",
                  "description": "Whether this step is optional (default false)."
                },
                "actionId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Action id for this step."
                },
                "ingredients": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9_-]+$",
                        "description": "Existing ingredient-line id; omit/empty for a new line."
                      },
                      "amount": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "minimum": -1000000,
                        "maximum": 1000000,
                        "description": "Amount in the given unit, or null."
                      },
                      "optional": {
                        "type": "boolean",
                        "description": "Whether this ingredient is optional (default false)."
                      },
                      "ingredientNumber": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0,
                        "maximum": 10000,
                        "description": "Ordering index within the step."
                      },
                      "unitId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9_-]+$",
                        "description": "Unit id, or null."
                      },
                      "ingredientId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[A-Za-z0-9_-]+$",
                        "description": "Ingredient id, or null."
                      }
                    },
                    "required": [
                      "ingredientNumber"
                    ]
                  },
                  "maxItems": 100,
                  "description": "Ingredient lines within this step."
                }
              },
              "required": [
                "stepNumber",
                "actionId"
              ]
            },
            "maxItems": 100,
            "description": "Steps (with ingredients). Differentially applied via ids: lines with ids are updated, without ids created, missing ids deleted. Ids must belong to this cocktail."
          },
          "garnishes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "garnishId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[A-Za-z0-9_-]+$"
                },
                "garnishNumber": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 10000,
                  "description": "Ordering index of the garnish within the recipe."
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 2000
                },
                "optional": {
                  "type": "boolean",
                  "description": "Whether this garnish is optional (default false)."
                },
                "isAlternative": {
                  "type": "boolean",
                  "description": "Whether this garnish is an alternative (default false)."
                }
              },
              "required": [
                "garnishId",
                "garnishNumber"
              ]
            },
            "maxItems": 100,
            "description": "Garnishes. Differentially applied via garnishId: present are updated/created, missing are deleted."
          },
          "abvOverride": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Manual ABV in % vol; overrides the calculated value. null = calculate."
          },
          "extraAllergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allergen"
            },
            "maxItems": 100,
            "description": "Allergens added on top of the ingredient-derived ones."
          },
          "extraAdditives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Additive"
            },
            "maxItems": 100,
            "description": "Additives added on top of the ingredient-derived ones."
          }
        },
        "required": [
          "name"
        ]
      },
      "CocktailAvailabilityInput": {
        "type": "object",
        "properties": {
          "unavailable": {
            "type": "boolean",
            "description": "true marks the cocktail as unavailable until the next bar day starts; false makes it available again."
          }
        },
        "required": [
          "unavailable"
        ]
      },
      "CocktailCloneInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Name for the cloned cocktail."
          }
        },
        "required": [
          "name"
        ]
      },
      "CocktailGuestInfo": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DerivedGuestInfo"
          },
          {
            "type": "object",
            "properties": {
              "sources": {
                "type": "object",
                "properties": {
                  "allergens": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "ingredient",
                            "garnish",
                            "cocktail"
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "optional": {
                          "type": "boolean"
                        },
                        "code": {
                          "$ref": "#/components/schemas/Allergen"
                        }
                      },
                      "required": [
                        "type",
                        "id",
                        "name",
                        "optional",
                        "code"
                      ]
                    }
                  },
                  "additives": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "ingredient",
                            "garnish",
                            "cocktail"
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "optional": {
                          "type": "boolean"
                        },
                        "code": {
                          "$ref": "#/components/schemas/Additive"
                        }
                      },
                      "required": [
                        "type",
                        "id",
                        "name",
                        "optional",
                        "code"
                      ]
                    }
                  },
                  "incomplete": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "ingredient",
                            "garnish",
                            "cocktail"
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id",
                        "name"
                      ]
                    },
                    "description": "Ingredients/garnishes whose guest information is not complete."
                  },
                  "missingAbv": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "ingredient",
                            "garnish",
                            "cocktail"
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id",
                        "name"
                      ]
                    },
                    "description": "Required ingredients without ABV or convertible amount."
                  }
                },
                "required": [
                  "allergens",
                  "additives",
                  "incomplete",
                  "missingAbv"
                ],
                "description": "Which component contributes which allergen/additive."
              }
            },
            "required": [
              "sources"
            ]
          }
        ]
      },
      "AllergenSource": {
        "type": "string",
        "enum": [
          "WHEAT",
          "SPELT",
          "KHORASAN_WHEAT",
          "RYE",
          "BARLEY",
          "OATS",
          "ALMONDS",
          "HAZELNUTS",
          "WALNUTS",
          "CASHEWS",
          "PECANS",
          "BRAZIL_NUTS",
          "PISTACHIOS",
          "MACADAMIA_NUTS"
        ],
        "description": "Specific cereal (GLUTEN) or nut (NUTS) named in Annex II of Regulation (EU) No 1169/2011."
      },
      "DerivedGuestInfo": {
        "type": "object",
        "properties": {
          "allergens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "$ref": "#/components/schemas/Allergen"
                },
                "optional": {
                  "type": "boolean",
                  "description": "Only contained in optional/alternative components."
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AllergenSource"
                  },
                  "description": "Specified cereals/nuts of the contributing ingredients/garnishes."
                }
              },
              "required": [
                "code",
                "optional",
                "sources"
              ]
            }
          },
          "additives": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "$ref": "#/components/schemas/Additive"
                },
                "optional": {
                  "type": "boolean"
                }
              },
              "required": [
                "code",
                "optional"
              ]
            }
          },
          "complete": {
            "type": "boolean",
            "description": "All involved ingredients and garnishes have verified guest information."
          },
          "alcohol": {
            "type": "object",
            "properties": {
              "abv": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Alcohol by volume in % vol of the served drink (incl. dilution)."
              },
              "status": {
                "type": "string",
                "enum": [
                  "calculated",
                  "manual",
                  "unknown"
                ]
              },
              "category": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "alcoholFree",
                  "light",
                  "medium",
                  "strong",
                  null
                ]
              },
              "alcoholFree": {
                "type": "boolean"
              },
              "grams": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Grams of pure alcohol per serving."
              },
              "volumeMl": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Served volume in ml (incl. dilution)."
              }
            },
            "required": [
              "abv",
              "status",
              "category",
              "alcoholFree",
              "grams",
              "volumeMl"
            ]
          }
        },
        "required": [
          "allergens",
          "additives",
          "complete",
          "alcohol"
        ]
      },
      "Rating": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the rater, or null."
          },
          "rating": {
            "type": "integer",
            "description": "Rating value."
          },
          "comment": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional comment."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "rating",
          "comment",
          "createdAt"
        ]
      },
      "RatingCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100,
            "description": "Name of the rater (max. 100 characters)."
          },
          "rating": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5,
            "description": "Rating value (1–5)."
          },
          "comment": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000,
            "description": "Optional comment (max. 2000 characters)."
          }
        },
        "required": [
          "rating"
        ]
      },
      "CocktailExportJsonInput": {
        "type": "object",
        "properties": {
          "cocktailIds": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "minItems": 1,
            "maxItems": 5000,
            "description": "Ids of the cocktails to export (max. 5000)."
          }
        },
        "required": [
          "cocktailIds"
        ]
      },
      "CocktailExportPdfInput": {
        "type": "object",
        "properties": {
          "cocktailIds": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "minItems": 1,
            "maxItems": 200,
            "description": "Ids of the cocktails to render (max. 200)."
          },
          "exportImage": {
            "type": "boolean",
            "description": "Include the cocktail image (default true)."
          },
          "exportDescription": {
            "type": "boolean",
            "description": "Include the description (default true)."
          },
          "exportNotes": {
            "type": "boolean",
            "description": "Include the notes (default true)."
          },
          "exportHistory": {
            "type": "boolean",
            "description": "Include the history (default true)."
          },
          "newPagePerCocktail": {
            "type": "boolean",
            "description": "Start a new page per cocktail (default true)."
          },
          "showHeader": {
            "type": "boolean",
            "description": "Render a page header (default false)."
          },
          "showFooter": {
            "type": "boolean",
            "description": "Render a page footer with page numbers (default false)."
          },
          "locale": {
            "type": "string",
            "enum": [
              "de",
              "en"
            ],
            "description": "UI locale for PDF chrome labels (default de)."
          }
        },
        "required": [
          "cocktailIds"
        ]
      },
      "CocktailImportJsonInput": {
        "type": "object",
        "properties": {
          "phase": {
            "type": "string",
            "enum": [
              "validate",
              "prepare-mapping",
              "execute"
            ],
            "description": "Import phase to run."
          },
          "exportData": {
            "description": "Raw export dump as produced by POST /cocktails/export/json (round-trip format, kept verbatim)."
          },
          "mappingDecisions": {
            "description": "User mapping decisions, required for the \"execute\" phase."
          }
        },
        "required": [
          "phase"
        ],
        "additionalProperties": {}
      },
      "Garnish": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price in currency units."
          },
          "hasImage": {
            "type": "boolean",
            "description": "Whether the garnish has an image."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to fetch the garnish image bytes, or null when hasImage is false."
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Attribution of the image (author, source, license), to be shown with it; null = none."
          },
          "allergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allergen"
            }
          },
          "allergenSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllergenSource"
            }
          },
          "additives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Additive"
            }
          },
          "guestInfoComplete": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "notes",
          "price",
          "hasImage",
          "imageUrl",
          "imageCredit",
          "allergens",
          "allergenSources",
          "additives",
          "guestInfoComplete"
        ]
      },
      "GarnishCreateInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Optional client-supplied CUID."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000,
            "description": "Price in currency units."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000000,
            "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
            "description": "Base64-encoded raster image (data URI) to attach.",
            "example": "data:image/png;base64,iVBORw0KGgo="
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Attribution of the image (author, source, license), shown wherever the image is displayed. Omitted: kept while the image stays the same, cleared when a new image is uploaded; null or empty clears it.",
            "example": "\"Negroni\" by Jane Doe, https://commons.wikimedia.org/wiki/File:Negroni.jpg, CC BY-SA 4.0"
          },
          "allergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allergen"
            },
            "maxItems": 100
          },
          "allergenSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllergenSource"
            },
            "maxItems": 100,
            "description": "Specific cereals/nuts behind GLUTEN/NUTS. Sources whose allergen is not set are dropped."
          },
          "additives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Additive"
            },
            "maxItems": 100
          },
          "guestInfoComplete": {
            "type": "boolean",
            "description": "Allergen/additive information has been verified as complete."
          }
        },
        "required": [
          "name"
        ]
      },
      "GarnishUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000000,
            "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
            "description": "Base64 raster image (data URI); omitting it removes the current image.",
            "example": "data:image/png;base64,iVBORw0KGgo="
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Attribution of the image (author, source, license), shown wherever the image is displayed. Omitted: kept while the image stays the same, cleared when a new image is uploaded; null or empty clears it.",
            "example": "\"Negroni\" by Jane Doe, https://commons.wikimedia.org/wiki/File:Negroni.jpg, CC BY-SA 4.0"
          },
          "allergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allergen"
            },
            "maxItems": 100
          },
          "allergenSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllergenSource"
            },
            "maxItems": 100,
            "description": "Specific cereals/nuts behind GLUTEN/NUTS. Sources whose allergen is not set are dropped."
          },
          "additives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Additive"
            },
            "maxItems": 100
          },
          "guestInfoComplete": {
            "type": "boolean",
            "description": "Allergen/additive information has been verified as complete."
          }
        },
        "required": [
          "name"
        ]
      },
      "GarnishCloneInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Name for the cloned garnish."
          }
        },
        "required": [
          "name"
        ]
      },
      "GarnishExportInput": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "minItems": 1,
            "maxItems": 500,
            "description": "IDs of the garnishes to export."
          }
        },
        "required": [
          "ids"
        ]
      },
      "GarnishImportInput": {
        "type": "object",
        "properties": {
          "phase": {
            "type": "string",
            "enum": [
              "validate",
              "prepare-mapping",
              "execute"
            ]
          },
          "exportData": {
            "anyOf": [
              {
                "type": "array",
                "items": {},
                "maxItems": 500
              },
              {
                "type": "object",
                "additionalProperties": {}
              }
            ],
            "description": "Garnish export structure (single object or array). Required for `validate` and `prepare-mapping`."
          },
          "decisions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "exportName": {
                  "type": "string",
                  "maxLength": 255
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "import",
                    "overwrite",
                    "rename",
                    "skip"
                  ]
                },
                "existingId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "Garnish of this workspace to overwrite (required for `overwrite`)."
                },
                "newName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "data": {
                  "description": "Export item to import (validated unless the decision is `skip`)."
                }
              },
              "required": [
                "decision"
              ]
            },
            "maxItems": 500,
            "description": "Per-item decisions. Required for `execute`."
          }
        },
        "required": [
          "phase"
        ]
      },
      "Glass": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "volume": {
            "type": [
              "number",
              "null"
            ],
            "description": "Volume in cl."
          },
          "deposit": {
            "type": "number",
            "description": "Deposit in currency units."
          },
          "hasImage": {
            "type": "boolean",
            "description": "Whether the glass has an image."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to fetch the glass image bytes, or null when hasImage is false."
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Attribution of the image (author, source, license), to be shown with it; null = none."
          }
        },
        "required": [
          "id",
          "name",
          "notes",
          "volume",
          "deposit",
          "hasImage",
          "imageUrl",
          "imageCredit"
        ]
      },
      "GlassCreateInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Optional client-supplied CUID."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "deposit": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000,
            "description": "Deposit in currency units."
          },
          "volume": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000,
            "description": "Volume in cl."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000000,
            "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
            "description": "Base64-encoded raster image (data URI) to attach.",
            "example": "data:image/png;base64,iVBORw0KGgo="
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Attribution of the image (author, source, license), shown wherever the image is displayed. Omitted: kept while the image stays the same, cleared when a new image is uploaded; null or empty clears it.",
            "example": "\"Negroni\" by Jane Doe, https://commons.wikimedia.org/wiki/File:Negroni.jpg, CC BY-SA 4.0"
          }
        },
        "required": [
          "name",
          "deposit"
        ]
      },
      "GlassUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "deposit": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000
          },
          "volume": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000000,
            "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
            "description": "Base64 raster image (data URI); omitting it removes the current image.",
            "example": "data:image/png;base64,iVBORw0KGgo="
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Attribution of the image (author, source, license), shown wherever the image is displayed. Omitted: kept while the image stays the same, cleared when a new image is uploaded; null or empty clears it.",
            "example": "\"Negroni\" by Jane Doe, https://commons.wikimedia.org/wiki/File:Negroni.jpg, CC BY-SA 4.0"
          }
        },
        "required": [
          "name",
          "deposit"
        ]
      },
      "GlassCloneInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Name for the cloned glass."
          }
        },
        "required": [
          "name"
        ]
      },
      "GlassReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "GlassExportInput": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "minItems": 1,
            "maxItems": 500,
            "description": "IDs of the glasses to export."
          }
        },
        "required": [
          "ids"
        ]
      },
      "GlassImportInput": {
        "type": "object",
        "properties": {
          "phase": {
            "type": "string",
            "enum": [
              "validate",
              "prepare-mapping",
              "execute"
            ]
          },
          "exportData": {
            "anyOf": [
              {
                "type": "array",
                "items": {},
                "maxItems": 500
              },
              {
                "type": "object",
                "additionalProperties": {}
              }
            ],
            "description": "Glass export structure (single object or array). Required for `validate` and `prepare-mapping`."
          },
          "decisions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "exportName": {
                  "type": "string",
                  "maxLength": 255
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "import",
                    "overwrite",
                    "rename",
                    "skip"
                  ]
                },
                "existingId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "Glass of this workspace to overwrite (required for `overwrite`)."
                },
                "newName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "data": {
                  "description": "Export item to import (validated unless the decision is `skip`)."
                }
              },
              "required": [
                "decision"
              ]
            },
            "maxItems": 500,
            "description": "Per-item decisions. Required for `execute`."
          }
        },
        "required": [
          "phase"
        ]
      },
      "GuestInfoBulkUpdateInput": {
        "type": "object",
        "properties": {
          "ingredients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "maxLength": 64
                },
                "abv": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 100,
                  "description": "Alcohol by volume in % vol (0–100), null if unknown."
                },
                "allergens": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Allergen"
                  },
                  "maxItems": 100
                },
                "additives": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Additive"
                  },
                  "maxItems": 100
                },
                "guestInfoComplete": {
                  "type": "boolean",
                  "description": "Allergen/additive information has been verified as complete."
                },
                "hideOnGuestMenu": {
                  "type": "boolean",
                  "description": "Do not list this ingredient on guest menus."
                },
                "guestName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255,
                  "description": "Name shown to guests instead of the internal name."
                }
              },
              "required": [
                "id"
              ]
            },
            "maxItems": 1000
          },
          "garnishes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "maxLength": 64
                },
                "allergens": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Allergen"
                  },
                  "maxItems": 100
                },
                "allergenSources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AllergenSource"
                  },
                  "maxItems": 100,
                  "description": "Specific cereals/nuts behind GLUTEN/NUTS. Sources whose allergen is not set are dropped."
                },
                "additives": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Additive"
                  },
                  "maxItems": 100
                },
                "guestInfoComplete": {
                  "type": "boolean",
                  "description": "Allergen/additive information has been verified as complete."
                }
              },
              "required": [
                "id"
              ]
            },
            "maxItems": 1000
          }
        }
      },
      "GuestInfoOverview": {
        "type": "object",
        "properties": {
          "ingredients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "usedInCocktails": {
                  "type": "integer"
                },
                "abv": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Alcohol by volume in % vol, null if unknown."
                },
                "allergens": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Allergen"
                  }
                },
                "allergenSources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AllergenSource"
                  }
                },
                "additives": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Additive"
                  }
                },
                "guestInfoComplete": {
                  "type": "boolean"
                },
                "hideOnGuestMenu": {
                  "type": "boolean"
                },
                "guestName": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "usedInCocktails",
                "abv",
                "allergens",
                "allergenSources",
                "additives",
                "guestInfoComplete",
                "hideOnGuestMenu",
                "guestName"
              ]
            }
          },
          "garnishes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "usedInCocktails": {
                  "type": "integer"
                },
                "allergens": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Allergen"
                  }
                },
                "allergenSources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AllergenSource"
                  }
                },
                "additives": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Additive"
                  }
                },
                "guestInfoComplete": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "usedInCocktails",
                "allergens",
                "allergenSources",
                "additives",
                "guestInfoComplete"
              ]
            }
          },
          "stats": {
            "type": "object",
            "properties": {
              "ingredients": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer"
                  },
                  "complete": {
                    "type": "integer"
                  },
                  "withAbv": {
                    "type": "integer"
                  }
                },
                "required": [
                  "total",
                  "complete",
                  "withAbv"
                ]
              },
              "garnishes": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer"
                  },
                  "complete": {
                    "type": "integer"
                  }
                },
                "required": [
                  "total",
                  "complete"
                ]
              },
              "cocktails": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer"
                  },
                  "complete": {
                    "type": "integer"
                  },
                  "abvKnown": {
                    "type": "integer"
                  }
                },
                "required": [
                  "total",
                  "complete",
                  "abvKnown"
                ],
                "description": "Non-archived cocktails."
              }
            },
            "required": [
              "ingredients",
              "garnishes",
              "cocktails"
            ]
          }
        },
        "required": [
          "ingredients",
          "garnishes",
          "stats"
        ]
      },
      "GuestMenuSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean"
          },
          "priority": {
            "type": "integer",
            "description": "Lower number = higher priority."
          },
          "validFrom": {
            "type": [
              "string",
              "null"
            ],
            "description": "YYYY-MM-DD (inclusive) or null."
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "description": "YYYY-MM-DD (inclusive) or null."
          },
          "weekdays": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "0 = Sunday … 6 = Saturday; empty = every day."
          },
          "timeFrom": {
            "type": [
              "string",
              "null"
            ],
            "description": "\"HH:mm\" in the workspace timezone; windows may cross midnight."
          },
          "timeTo": {
            "type": [
              "string",
              "null"
            ]
          },
          "inactiveBehavior": {
            "$ref": "#/components/schemas/GuestMenuInactiveBehavior"
          },
          "sourceMode": {
            "$ref": "#/components/schemas/GuestMenuSourceMode"
          },
          "sourceCardId": {
            "type": [
              "string",
              "null"
            ]
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Offered content locales; empty = workspace contentLocales."
          },
          "isPublished": {
            "type": "boolean"
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "hasUnpublishedChanges": {
            "type": "boolean"
          },
          "previewToken": {
            "type": [
              "string",
              "null"
            ],
            "description": "Use `?preview=<token>` on the public URL to see the draft. Null for members with the USER role."
          },
          "publicPath": {
            "type": "string",
            "description": "Relative public URL, e.g. `/m/my-bar/abendkarte`."
          },
          "hasAccessCode": {
            "type": "boolean",
            "description": "Guests need an access code (PIN) to open the menu. The code itself is never returned."
          },
          "validity": {
            "$ref": "#/components/schemas/GuestMenuValidity"
          },
          "isActive": {
            "type": "boolean",
            "description": "True if this menu is the one currently shown at `/m/{bar}`."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "enabled",
          "isDefault",
          "priority",
          "validFrom",
          "validTo",
          "weekdays",
          "timeFrom",
          "timeTo",
          "inactiveBehavior",
          "sourceMode",
          "sourceCardId",
          "locales",
          "isPublished",
          "publishedAt",
          "hasUnpublishedChanges",
          "previewToken",
          "publicPath",
          "hasAccessCode",
          "validity",
          "isActive",
          "createdAt",
          "updatedAt"
        ]
      },
      "GuestMenuInactiveBehavior": {
        "type": "string",
        "enum": [
          "NOTICE_WITH_LINK",
          "NOTICE_WITH_CONTENT",
          "REDIRECT"
        ]
      },
      "GuestMenuSourceMode": {
        "type": "string",
        "enum": [
          "NONE",
          "FIXED_CARD",
          "ACTIVE_CARD"
        ]
      },
      "GuestMenuValidity": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "disabled",
              "unpublished",
              "notYetValid",
              "expired",
              "weekday",
              "time",
              null
            ]
          }
        },
        "required": [
          "valid",
          "reason"
        ],
        "description": "Schedule validity right now (workspace timezone)."
      },
      "GuestMenu": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GuestMenuSummary"
          },
          {
            "type": "object",
            "properties": {
              "draft": {
                "$ref": "#/components/schemas/GuestMenuDocument"
              },
              "published": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/GuestMenuDocument"
                  },
                  {
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                ]
              }
            },
            "required": [
              "draft",
              "published"
            ]
          }
        ]
      },
      "GuestMenuDocument": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "enum": [
              1
            ]
          },
          "title": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 500
            }
          },
          "subtitle": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 500
            }
          },
          "theme": {
            "type": "object",
            "properties": {
              "preset": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "tokens": {
                "type": "object",
                "properties": {
                  "colors": {
                    "type": "object",
                    "properties": {
                      "bg": {
                        "type": "string",
                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                      },
                      "surface": {
                        "type": "string",
                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                      },
                      "text": {
                        "type": "string",
                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                      },
                      "muted": {
                        "type": "string",
                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                      },
                      "accent": {
                        "type": "string",
                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                      },
                      "accentContrast": {
                        "type": "string",
                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                      }
                    },
                    "required": [
                      "bg",
                      "surface",
                      "text",
                      "muted",
                      "accent",
                      "accentContrast"
                    ]
                  },
                  "fontHeading": {
                    "type": "string",
                    "enum": [
                      "system-sans",
                      "system-serif",
                      "inter",
                      "dm-sans",
                      "montserrat",
                      "raleway",
                      "josefin-sans",
                      "oswald",
                      "playfair-display",
                      "cormorant-garamond",
                      "lora",
                      "libre-baskerville"
                    ]
                  },
                  "fontBody": {
                    "type": "string",
                    "enum": [
                      "system-sans",
                      "system-serif",
                      "inter",
                      "dm-sans",
                      "montserrat",
                      "raleway",
                      "josefin-sans",
                      "oswald",
                      "playfair-display",
                      "cormorant-garamond",
                      "lora",
                      "libre-baskerville"
                    ]
                  },
                  "radius": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 48
                  },
                  "density": {
                    "type": "string",
                    "enum": [
                      "compact",
                      "comfortable",
                      "spacious"
                    ]
                  }
                },
                "required": [
                  "colors",
                  "fontHeading",
                  "fontBody",
                  "radius",
                  "density"
                ]
              },
              "backgroundImage": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 5000000
              },
              "logo": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 5000000
              },
              "customCss": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 100000
              }
            },
            "required": [
              "preset",
              "tokens"
            ]
          },
          "templates": {
            "type": "object",
            "properties": {
              "web": {
                "type": "object",
                "properties": {
                  "templateId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "slots": {
                    "type": "object",
                    "properties": {
                      "menu_header": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "section_header": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "item": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "item_detail": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "footer": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "css": {
                        "type": "string",
                        "maxLength": 100000
                      }
                    }
                  }
                },
                "required": [
                  "templateId"
                ]
              },
              "monitor": {
                "type": "object",
                "properties": {
                  "templateId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "slots": {
                    "type": "object",
                    "properties": {
                      "menu_header": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "section_header": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "item": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "item_detail": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "footer": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "css": {
                        "type": "string",
                        "maxLength": 100000
                      }
                    }
                  }
                },
                "required": [
                  "templateId"
                ]
              },
              "print": {
                "type": "object",
                "properties": {
                  "templateId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "slots": {
                    "type": "object",
                    "properties": {
                      "menu_header": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "section_header": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "item": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "item_detail": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "footer": {
                        "type": "string",
                        "maxLength": 100000
                      },
                      "css": {
                        "type": "string",
                        "maxLength": 100000
                      }
                    }
                  }
                },
                "required": [
                  "templateId"
                ]
              }
            },
            "required": [
              "web",
              "monitor",
              "print"
            ]
          },
          "outputs": {
            "type": "object",
            "properties": {
              "web": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "layout": {
                    "type": "string",
                    "enum": [
                      "list",
                      "compact",
                      "grid",
                      "cards",
                      "tiles",
                      "gallery"
                    ]
                  },
                  "fields": {
                    "type": "object",
                    "properties": {
                      "price": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "ingredients": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "amounts": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "flavors": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "badges": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "image": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "description": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "history": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "glass": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "garnish": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "rating": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "alcohol": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "allergens": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "additives": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "alcoholDisplay": {
                        "type": "string",
                        "enum": [
                          "badgeOnly",
                          "category",
                          "percent",
                          "percentAndGrams"
                        ]
                      },
                      "allergenDisplay": {
                        "type": "string",
                        "enum": [
                          "icons",
                          "codes",
                          "footnotes"
                        ]
                      },
                      "additiveDisplay": {
                        "type": "string",
                        "enum": [
                          "footnotes"
                        ]
                      }
                    }
                  },
                  "search": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "includeOnRequest": {
                        "type": "boolean"
                      },
                      "ingredientsSearchable": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "enabled",
                      "includeOnRequest",
                      "ingredientsSearchable"
                    ]
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "categories": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "auto"
                            ]
                          },
                          {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            }
                          }
                        ]
                      },
                      "allergens": {
                        "type": "boolean"
                      },
                      "alcohol": {
                        "type": "boolean"
                      },
                      "customTitle": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string",
                          "maxLength": 20000
                        }
                      },
                      "custom": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "label": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "string",
                                "maxLength": 20000
                              }
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "maxItems": 50
                            },
                            "quick": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "label",
                            "tags"
                          ]
                        },
                        "maxItems": 30
                      }
                    },
                    "required": [
                      "categories",
                      "allergens",
                      "alcohol"
                    ]
                  },
                  "sort": {
                    "type": "string",
                    "enum": [
                      "menu",
                      "name",
                      "price"
                    ]
                  },
                  "noindex": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled",
                  "layout",
                  "fields",
                  "search",
                  "filters",
                  "sort"
                ]
              },
              "monitor": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "layout": {
                    "type": "string",
                    "enum": [
                      "list",
                      "compact",
                      "grid",
                      "cards",
                      "tiles",
                      "gallery"
                    ]
                  },
                  "fields": {
                    "type": "object",
                    "properties": {
                      "price": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "ingredients": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "amounts": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "flavors": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "badges": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "image": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "description": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "history": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "glass": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "garnish": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "rating": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "alcohol": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "allergens": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "additives": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "alcoholDisplay": {
                        "type": "string",
                        "enum": [
                          "badgeOnly",
                          "category",
                          "percent",
                          "percentAndGrams"
                        ]
                      },
                      "allergenDisplay": {
                        "type": "string",
                        "enum": [
                          "icons",
                          "codes",
                          "footnotes"
                        ]
                      },
                      "additiveDisplay": {
                        "type": "string",
                        "enum": [
                          "footnotes"
                        ]
                      }
                    }
                  },
                  "columns": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "auto"
                        ]
                      },
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 6
                      }
                    ]
                  },
                  "pageDurationSeconds": {
                    "type": "integer",
                    "minimum": 3,
                    "maximum": 600
                  },
                  "showQrCode": {
                    "type": "boolean"
                  },
                  "localeMode": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "fixed",
                      "rotate"
                    ]
                  },
                  "locale": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
                  }
                },
                "required": [
                  "enabled",
                  "layout",
                  "fields",
                  "columns",
                  "pageDurationSeconds",
                  "showQrCode",
                  "localeMode"
                ]
              },
              "print": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "layout": {
                    "type": "string",
                    "enum": [
                      "list",
                      "compact",
                      "grid",
                      "cards",
                      "tiles",
                      "gallery"
                    ]
                  },
                  "fields": {
                    "type": "object",
                    "properties": {
                      "price": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "ingredients": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "amounts": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "flavors": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "badges": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "image": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "description": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "history": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "glass": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "garnish": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "rating": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "alcohol": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "allergens": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "additives": {
                        "type": "string",
                        "enum": [
                          "off",
                          "list",
                          "detail",
                          "expandable"
                        ]
                      },
                      "alcoholDisplay": {
                        "type": "string",
                        "enum": [
                          "badgeOnly",
                          "category",
                          "percent",
                          "percentAndGrams"
                        ]
                      },
                      "allergenDisplay": {
                        "type": "string",
                        "enum": [
                          "icons",
                          "codes",
                          "footnotes"
                        ]
                      },
                      "additiveDisplay": {
                        "type": "string",
                        "enum": [
                          "footnotes"
                        ]
                      }
                    }
                  },
                  "paper": {
                    "type": "string",
                    "enum": [
                      "A4",
                      "A5",
                      "DL"
                    ]
                  },
                  "locale": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
                  },
                  "showQrCode": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled",
                  "layout",
                  "fields",
                  "paper",
                  "showQrCode"
                ]
              }
            },
            "required": [
              "web",
              "monitor",
              "print"
            ]
          },
          "defaults": {
            "type": "object",
            "properties": {
              "fields": {
                "type": "object",
                "properties": {
                  "price": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "ingredients": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "amounts": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "flavors": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "badges": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "image": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "description": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "history": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "glass": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "garnish": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "rating": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "alcohol": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "allergens": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "additives": {
                    "type": "string",
                    "enum": [
                      "off",
                      "list",
                      "detail",
                      "expandable"
                    ]
                  },
                  "alcoholDisplay": {
                    "type": "string",
                    "enum": [
                      "badgeOnly",
                      "category",
                      "percent",
                      "percentAndGrams"
                    ]
                  },
                  "allergenDisplay": {
                    "type": "string",
                    "enum": [
                      "icons",
                      "codes",
                      "footnotes"
                    ]
                  },
                  "additiveDisplay": {
                    "type": "string",
                    "enum": [
                      "footnotes"
                    ]
                  }
                },
                "required": [
                  "price",
                  "ingredients",
                  "amounts",
                  "flavors",
                  "badges",
                  "image",
                  "description",
                  "history",
                  "glass",
                  "garnish",
                  "rating",
                  "alcohol",
                  "allergens",
                  "additives",
                  "alcoholDisplay",
                  "allergenDisplay",
                  "additiveDisplay"
                ]
              }
            },
            "required": [
              "fields"
            ]
          },
          "blocks": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "header"
                      ]
                    },
                    "showLogo": {
                      "type": "boolean"
                    },
                    "showTitle": {
                      "type": "boolean"
                    },
                    "showSubtitle": {
                      "type": "boolean"
                    },
                    "outputs": {
                      "type": "object",
                      "properties": {
                        "web": {
                          "type": "boolean"
                        },
                        "monitor": {
                          "type": "boolean"
                        },
                        "print": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "showLogo",
                    "showTitle",
                    "showSubtitle"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "section"
                      ]
                    },
                    "title": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 500
                      }
                    },
                    "description": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 20000
                      }
                    },
                    "source": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "cardAllGroups"
                              ]
                            }
                          },
                          "required": [
                            "kind"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "cardGroup"
                              ]
                            },
                            "groupId": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "kind",
                            "groupId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "manual"
                              ]
                            },
                            "cocktailIds": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              },
                              "maxItems": 500
                            }
                          },
                          "required": [
                            "kind",
                            "cocktailIds"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "rule"
                              ]
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              },
                              "maxItems": 100
                            },
                            "ingredientIds": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              },
                              "maxItems": 100
                            },
                            "logic": {
                              "type": "string",
                              "enum": [
                                "AND",
                                "OR"
                              ]
                            },
                            "sort": {
                              "type": "string",
                              "enum": [
                                "name",
                                "price"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "tags",
                            "ingredientIds",
                            "logic",
                            "sort"
                          ]
                        }
                      ]
                    },
                    "layout": {
                      "type": "string",
                      "enum": [
                        "list",
                        "compact",
                        "grid",
                        "cards",
                        "tiles",
                        "gallery"
                      ]
                    },
                    "fields": {
                      "type": "object",
                      "properties": {
                        "price": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "ingredients": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "amounts": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "flavors": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "badges": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "image": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "description": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "history": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "glass": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "garnish": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "rating": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "alcohol": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "allergens": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "additives": {
                          "type": "string",
                          "enum": [
                            "off",
                            "list",
                            "detail",
                            "expandable"
                          ]
                        },
                        "alcoholDisplay": {
                          "type": "string",
                          "enum": [
                            "badgeOnly",
                            "category",
                            "percent",
                            "percentAndGrams"
                          ]
                        },
                        "allergenDisplay": {
                          "type": "string",
                          "enum": [
                            "icons",
                            "codes",
                            "footnotes"
                          ]
                        },
                        "additiveDisplay": {
                          "type": "string",
                          "enum": [
                            "footnotes"
                          ]
                        }
                      }
                    },
                    "overrides": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "hidden": {
                            "type": "boolean"
                          },
                          "highlight": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "recommendation",
                              "new",
                              "signature",
                              null
                            ]
                          },
                          "description": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string",
                              "maxLength": 20000
                            }
                          },
                          "price": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "minimum": 0
                          },
                          "fields": {
                            "type": "object",
                            "properties": {
                              "price": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "ingredients": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "amounts": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "flavors": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "badges": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "image": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "description": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "history": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "glass": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "garnish": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "rating": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "alcohol": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "allergens": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "additives": {
                                "type": "string",
                                "enum": [
                                  "off",
                                  "list",
                                  "detail",
                                  "expandable"
                                ]
                              },
                              "alcoholDisplay": {
                                "type": "string",
                                "enum": [
                                  "badgeOnly",
                                  "category",
                                  "percent",
                                  "percentAndGrams"
                                ]
                              },
                              "allergenDisplay": {
                                "type": "string",
                                "enum": [
                                  "icons",
                                  "codes",
                                  "footnotes"
                                ]
                              },
                              "additiveDisplay": {
                                "type": "string",
                                "enum": [
                                  "footnotes"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    "outputs": {
                      "type": "object",
                      "properties": {
                        "web": {
                          "type": "boolean"
                        },
                        "monitor": {
                          "type": "boolean"
                        },
                        "print": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "title",
                    "source",
                    "overrides"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    },
                    "content": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 20000
                      }
                    },
                    "outputs": {
                      "type": "object",
                      "properties": {
                        "web": {
                          "type": "boolean"
                        },
                        "monitor": {
                          "type": "boolean"
                        },
                        "print": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "content"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "image"
                      ]
                    },
                    "src": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 5000000
                    },
                    "alt": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 500
                      }
                    },
                    "outputs": {
                      "type": "object",
                      "properties": {
                        "web": {
                          "type": "boolean"
                        },
                        "monitor": {
                          "type": "boolean"
                        },
                        "print": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "src"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "divider"
                      ]
                    },
                    "outputs": {
                      "type": "object",
                      "properties": {
                        "web": {
                          "type": "boolean"
                        },
                        "monitor": {
                          "type": "boolean"
                        },
                        "print": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "notice"
                      ]
                    },
                    "preset": {
                      "type": "string",
                      "enum": [
                        "allergens",
                        "deposit",
                        "custom"
                      ]
                    },
                    "text": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 20000
                      }
                    },
                    "outputs": {
                      "type": "object",
                      "properties": {
                        "web": {
                          "type": "boolean"
                        },
                        "monitor": {
                          "type": "boolean"
                        },
                        "print": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "preset"
                  ]
                }
              ]
            },
            "maxItems": 500
          },
          "noticeTexts": {
            "type": "object",
            "properties": {
              "allergens": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 20000
                }
              },
              "deposit": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 20000
                }
              },
              "unavailable": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 20000
                }
              },
              "onRequest": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 20000
                }
              },
              "alcoholApprox": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "maxLength": 20000
                }
              }
            }
          },
          "uiTexts": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "string",
                "maxLength": 500
              }
            }
          }
        },
        "required": [
          "schemaVersion",
          "title",
          "theme",
          "templates",
          "outputs",
          "defaults",
          "blocks"
        ],
        "description": "Guest menu document (lib/guest-menu/schema.ts, schemaVersion 1)."
      },
      "GuestMenuCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "example": "abendkarte",
            "description": "Generated from the name when omitted."
          },
          "sourceMode": {
            "$ref": "#/components/schemas/GuestMenuSourceMode"
          },
          "sourceCardId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
            },
            "maxItems": 20
          },
          "templateId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Built-in template for all outputs of the new default document."
          },
          "document": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GuestMenuDocument"
              },
              {
                "description": "Initial draft; a default document is created when omitted."
              }
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "GuestMenuUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "example": "abendkarte"
          },
          "enabled": {
            "type": "boolean"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Only one default menu per workspace; setting it unsets the others."
          },
          "priority": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000
          },
          "validFrom": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "example": "2026-12-01"
          },
          "validTo": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "example": "2026-12-01"
          },
          "weekdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "maxItems": 7
          },
          "timeFrom": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$",
            "example": "18:00"
          },
          "timeTo": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$",
            "example": "18:00"
          },
          "inactiveBehavior": {
            "$ref": "#/components/schemas/GuestMenuInactiveBehavior"
          },
          "sourceMode": {
            "$ref": "#/components/schemas/GuestMenuSourceMode"
          },
          "sourceCardId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
            },
            "maxItems": 20
          },
          "accessCode": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[A-Za-z0-9]{4,12}$",
            "description": "Set (string) or remove (null) the guest access code. Stored hashed only, never returned (see `hasAccessCode`). Every change invalidates existing guest sessions and signage tokens.",
            "example": "2580"
          }
        },
        "description": "Partial update of the menu meta data (omitted = unchanged)."
      },
      "GuestMenuDuplicateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "example": "abendkarte"
          }
        }
      },
      "GuestMenuPrintPaper": {
        "type": "string",
        "enum": [
          "A4",
          "A5",
          "DL"
        ],
        "description": "A4, A5 or DL (99 × 210 mm)."
      },
      "GuestMenuPdfExportInput": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ],
            "description": "Which document to print."
          },
          "locale": {
            "type": "string",
            "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
            "description": "Content locale; default `outputs.print.locale` → primary."
          },
          "paper": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GuestMenuPrintPaper"
              },
              {
                "description": "Default `outputs.print.paper`."
              }
            ]
          },
          "showQrCode": {
            "type": "boolean",
            "description": "Default `outputs.print.showQrCode`."
          }
        },
        "required": [
          "source"
        ]
      },
      "GuestMenuRendered": {
        "type": "object",
        "properties": {
          "dto": {
            "type": "object",
            "additionalProperties": {},
            "description": "PublicMenuDto (lib/guest-menu/schema.ts)."
          },
          "rendered": {
            "type": "object",
            "additionalProperties": {},
            "description": "RenderedMenu (lib/guest-menu/render): css, menuHeader, sections, blocks, footer, errors."
          }
        },
        "required": [
          "dto",
          "rendered"
        ]
      },
      "GuestMenuOutput": {
        "type": "string",
        "enum": [
          "web",
          "monitor",
          "print"
        ],
        "description": "Default web."
      },
      "GuestMenuExtras": {
        "type": "object",
        "properties": {
          "menus": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            },
            "description": "Active guest menu(s) used for the comparison."
          },
          "cocktailIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Cocktails on the active guest menu but not on the card (menu order)."
          }
        },
        "required": [
          "menus",
          "cocktailIds"
        ]
      },
      "GuestMenuReorderInput": {
        "type": "object",
        "properties": {
          "menuIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "minItems": 1,
            "maxItems": 1000,
            "description": "Menu ids in priority order; priority = index (0 = highest)."
          }
        },
        "required": [
          "menuIds"
        ]
      },
      "GuestMenuTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "templateId": {
            "type": "string",
            "description": "Value for `document.templates[output].templateId` (`custom:<id>`)."
          },
          "definition": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "baseTemplateId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "slots": {
                "type": "object",
                "properties": {
                  "menu_header": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "section_header": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "item": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "item_detail": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "footer": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "css": {
                    "type": "string",
                    "maxLength": 100000
                  }
                }
              },
              "theme": {
                "type": "object",
                "properties": {
                  "preset": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "tokens": {
                    "type": "object",
                    "properties": {
                      "colors": {
                        "type": "object",
                        "properties": {
                          "bg": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "surface": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "text": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "muted": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "accent": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "accentContrast": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          }
                        },
                        "required": [
                          "bg",
                          "surface",
                          "text",
                          "muted",
                          "accent",
                          "accentContrast"
                        ]
                      },
                      "fontHeading": {
                        "type": "string",
                        "enum": [
                          "system-sans",
                          "system-serif",
                          "inter",
                          "dm-sans",
                          "montserrat",
                          "raleway",
                          "josefin-sans",
                          "oswald",
                          "playfair-display",
                          "cormorant-garamond",
                          "lora",
                          "libre-baskerville"
                        ]
                      },
                      "fontBody": {
                        "type": "string",
                        "enum": [
                          "system-sans",
                          "system-serif",
                          "inter",
                          "dm-sans",
                          "montserrat",
                          "raleway",
                          "josefin-sans",
                          "oswald",
                          "playfair-display",
                          "cormorant-garamond",
                          "lora",
                          "libre-baskerville"
                        ]
                      },
                      "radius": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 48
                      },
                      "density": {
                        "type": "string",
                        "enum": [
                          "compact",
                          "comfortable",
                          "spacious"
                        ]
                      }
                    },
                    "required": [
                      "colors",
                      "fontHeading",
                      "fontBody",
                      "radius",
                      "density"
                    ]
                  },
                  "backgroundImage": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000000
                  },
                  "logo": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000000
                  },
                  "customCss": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100000
                  }
                },
                "required": [
                  "preset",
                  "tokens"
                ]
              }
            },
            "required": [
              "schemaVersion",
              "baseTemplateId",
              "slots"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "templateId",
          "definition",
          "createdAt",
          "updatedAt"
        ]
      },
      "GuestMenuTemplateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "definition": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "number",
                "enum": [
                  1
                ]
              },
              "baseTemplateId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "slots": {
                "type": "object",
                "properties": {
                  "menu_header": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "section_header": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "item": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "item_detail": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "footer": {
                    "type": "string",
                    "maxLength": 100000
                  },
                  "css": {
                    "type": "string",
                    "maxLength": 100000
                  }
                }
              },
              "theme": {
                "type": "object",
                "properties": {
                  "preset": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "tokens": {
                    "type": "object",
                    "properties": {
                      "colors": {
                        "type": "object",
                        "properties": {
                          "bg": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "surface": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "text": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "muted": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "accent": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          },
                          "accentContrast": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          }
                        },
                        "required": [
                          "bg",
                          "surface",
                          "text",
                          "muted",
                          "accent",
                          "accentContrast"
                        ]
                      },
                      "fontHeading": {
                        "type": "string",
                        "enum": [
                          "system-sans",
                          "system-serif",
                          "inter",
                          "dm-sans",
                          "montserrat",
                          "raleway",
                          "josefin-sans",
                          "oswald",
                          "playfair-display",
                          "cormorant-garamond",
                          "lora",
                          "libre-baskerville"
                        ]
                      },
                      "fontBody": {
                        "type": "string",
                        "enum": [
                          "system-sans",
                          "system-serif",
                          "inter",
                          "dm-sans",
                          "montserrat",
                          "raleway",
                          "josefin-sans",
                          "oswald",
                          "playfair-display",
                          "cormorant-garamond",
                          "lora",
                          "libre-baskerville"
                        ]
                      },
                      "radius": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 48
                      },
                      "density": {
                        "type": "string",
                        "enum": [
                          "compact",
                          "comfortable",
                          "spacious"
                        ]
                      }
                    },
                    "required": [
                      "colors",
                      "fontHeading",
                      "fontBody",
                      "radius",
                      "density"
                    ]
                  },
                  "backgroundImage": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000000
                  },
                  "logo": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5000000
                  },
                  "customCss": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100000
                  }
                },
                "required": [
                  "preset",
                  "tokens"
                ]
              }
            },
            "required": [
              "schemaVersion",
              "baseTemplateId",
              "slots"
            ]
          }
        },
        "required": [
          "name",
          "definition"
        ]
      },
      "BuiltInGuestMenuTemplates": {
        "type": "object",
        "properties": {
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BuiltInGuestMenuTemplate"
            }
          },
          "baseCss": {
            "type": "string"
          },
          "partials": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Includable partials (`{% include \"gm_badges\" %}`)."
          }
        },
        "required": [
          "templates",
          "baseCss",
          "partials"
        ]
      },
      "BuiltInGuestMenuTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "outputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GuestMenuOutput"
            }
          },
          "layout": {
            "type": "string"
          },
          "defaultTokens": {
            "type": "object",
            "additionalProperties": {}
          },
          "slots": {
            "type": "object",
            "properties": {
              "menu_header": {
                "type": "string"
              },
              "section_header": {
                "type": "string"
              },
              "item": {
                "type": "string"
              },
              "item_detail": {
                "type": "string"
              },
              "footer": {
                "type": "string"
              }
            },
            "required": [
              "menu_header",
              "section_header",
              "item",
              "item_detail",
              "footer"
            ]
          },
          "css": {
            "type": "string",
            "description": "Template CSS (unscoped; the base CSS is prepended at render time)."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "outputs",
          "layout",
          "defaultTokens",
          "slots",
          "css"
        ]
      },
      "Ice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "IceCreateInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Optional client-supplied CUID."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "translations": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Optional display-name translations keyed by language code, e.g. { \"en\": \"Crushed ice\" }."
          }
        },
        "required": [
          "name"
        ]
      },
      "IceUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "translations": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Optional display-name translations keyed by language code, e.g. { \"en\": \"Crushed ice\" }."
          }
        },
        "required": [
          "name"
        ]
      },
      "Ingredient": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": [
              "number",
              "null"
            ]
          },
          "link": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "volumes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngredientVolume"
            }
          },
          "hasImage": {
            "type": "boolean",
            "description": "Whether the ingredient has an image."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to fetch the ingredient image bytes, or null when hasImage is false."
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Attribution of the image (author, source, license), to be shown with it; null = none."
          },
          "abv": {
            "type": [
              "number",
              "null"
            ],
            "description": "Alcohol by volume in % vol, null if unknown."
          },
          "allergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allergen"
            }
          },
          "allergenSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllergenSource"
            }
          },
          "additives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Additive"
            }
          },
          "guestInfoComplete": {
            "type": "boolean"
          },
          "hideOnGuestMenu": {
            "type": "boolean"
          },
          "guestName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "shortName",
          "description",
          "notes",
          "price",
          "link",
          "tags",
          "volumes",
          "hasImage",
          "imageUrl",
          "imageCredit",
          "abv",
          "allergens",
          "allergenSources",
          "additives",
          "guestInfoComplete",
          "hideOnGuestMenu",
          "guestName"
        ]
      },
      "IngredientVolume": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "volume": {
            "type": "number",
            "description": "Volume amount in the given unit."
          },
          "unit": {
            "$ref": "#/components/schemas/IngredientVolumeUnit"
          }
        },
        "required": [
          "id",
          "volume",
          "unit"
        ]
      },
      "IngredientVolumeUnit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "IngredientCreateInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Optional client-supplied CUID."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000
          },
          "link": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2048
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 255
            },
            "maxItems": 100
          },
          "units": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "unitId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "Unit of this workspace."
                },
                "volume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 1000000,
                  "description": "Volume amount in the given unit."
                }
              },
              "required": [
                "unitId",
                "volume"
              ]
            },
            "maxItems": 100,
            "description": "Unit volumes to attach (units of this workspace, each at most once)."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000000,
            "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
            "description": "Base64-encoded raster image (data URI) to attach.",
            "example": "data:image/png;base64,iVBORw0KGgo="
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Attribution of the image (author, source, license), shown wherever the image is displayed. Omitted: kept while the image stays the same, cleared when a new image is uploaded; null or empty clears it.",
            "example": "\"Negroni\" by Jane Doe, https://commons.wikimedia.org/wiki/File:Negroni.jpg, CC BY-SA 4.0"
          },
          "abv": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Alcohol by volume in % vol (0–100), null if unknown."
          },
          "allergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allergen"
            },
            "maxItems": 100
          },
          "allergenSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllergenSource"
            },
            "maxItems": 100,
            "description": "Specific cereals/nuts behind GLUTEN/NUTS. Sources whose allergen is not set are dropped."
          },
          "additives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Additive"
            },
            "maxItems": 100
          },
          "guestInfoComplete": {
            "type": "boolean",
            "description": "Allergen/additive information has been verified as complete."
          },
          "hideOnGuestMenu": {
            "type": "boolean",
            "description": "Do not list this ingredient on guest menus."
          },
          "guestName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Name shown to guests instead of the internal name."
          }
        },
        "required": [
          "name"
        ]
      },
      "IngredientUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 1000000
          },
          "link": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2048
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 255
            },
            "maxItems": 100
          },
          "units": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "unitId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "Unit of this workspace."
                },
                "volume": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "minimum": 0,
                  "maximum": 1000000,
                  "description": "Volume amount in the given unit."
                }
              },
              "required": [
                "unitId",
                "volume"
              ]
            },
            "maxItems": 100,
            "description": "Unit volumes (units of this workspace, each at most once). Replaces the existing volumes; omitting it keeps them unchanged."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000000,
            "pattern": "^data:image\\/(?:png|jpeg|jpg|gif|webp|avif|bmp|heic|heif|tiff);base64,[A-Za-z0-9+/]+={0,2}$",
            "description": "Base64 raster image (data URI); omitting it removes the current image.",
            "example": "data:image/png;base64,iVBORw0KGgo="
          },
          "imageCredit": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Attribution of the image (author, source, license), shown wherever the image is displayed. Omitted: kept while the image stays the same, cleared when a new image is uploaded; null or empty clears it.",
            "example": "\"Negroni\" by Jane Doe, https://commons.wikimedia.org/wiki/File:Negroni.jpg, CC BY-SA 4.0"
          },
          "abv": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100,
            "description": "Alcohol by volume in % vol (0–100), null if unknown."
          },
          "allergens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Allergen"
            },
            "maxItems": 100
          },
          "allergenSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AllergenSource"
            },
            "maxItems": 100,
            "description": "Specific cereals/nuts behind GLUTEN/NUTS. Sources whose allergen is not set are dropped."
          },
          "additives": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Additive"
            },
            "maxItems": 100
          },
          "guestInfoComplete": {
            "type": "boolean",
            "description": "Allergen/additive information has been verified as complete."
          },
          "hideOnGuestMenu": {
            "type": "boolean",
            "description": "Do not list this ingredient on guest menus."
          },
          "guestName": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Name shown to guests instead of the internal name."
          }
        },
        "required": [
          "name"
        ]
      },
      "IngredientCloneInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Name for the cloned ingredient."
          }
        },
        "required": [
          "name"
        ]
      },
      "IngredientReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "IngredientExportInput": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "minItems": 1,
            "maxItems": 500,
            "description": "IDs of the ingredients to export."
          }
        },
        "required": [
          "ids"
        ]
      },
      "IngredientImportInput": {
        "type": "object",
        "properties": {
          "phase": {
            "type": "string",
            "enum": [
              "validate",
              "prepare-mapping",
              "execute"
            ]
          },
          "exportData": {
            "anyOf": [
              {
                "type": "array",
                "items": {},
                "maxItems": 500
              },
              {
                "type": "object",
                "additionalProperties": {}
              }
            ],
            "description": "Ingredient export structure (single object or array). Required for `validate` and `prepare-mapping`."
          },
          "decisions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "exportName": {
                  "type": "string",
                  "maxLength": 255
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "import",
                    "overwrite",
                    "rename",
                    "skip"
                  ]
                },
                "existingId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 128,
                  "description": "Ingredient of this workspace to overwrite (required for `overwrite`)."
                },
                "newName": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 255
                },
                "data": {
                  "description": "Export item to import (validated unless the decision is `skip`)."
                }
              },
              "required": [
                "decision"
              ]
            },
            "maxItems": 500,
            "description": "Per-item decisions. Required for `execute`."
          }
        },
        "required": [
          "phase"
        ]
      },
      "JoinCode": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "expires": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "onlyUseOnce": {
            "type": "boolean"
          },
          "used": {
            "type": "integer",
            "description": "How many times the code has been used."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "code",
          "expires",
          "onlyUseOnce",
          "used",
          "createdAt"
        ]
      },
      "JoinCodeCreateInput": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{8,64}$",
            "description": "Join code (8–64 characters of `A-Z a-z 0-9 _ -`). Omit it to let the server generate a random code. Codes are unique across all workspaces; a taken code returns 409 `CODE_TAKEN`."
          },
          "expires": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 40,
            "description": "ISO expiry timestamp, or null/omitted for no expiry."
          },
          "onlyUseOnce": {
            "type": "boolean",
            "description": "Whether the code can only be used once (default false)."
          }
        }
      },
      "JoinRequest": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "user": {
            "$ref": "#/components/schemas/JoinRequestUser"
          }
        },
        "required": [
          "userId",
          "date",
          "user"
        ]
      },
      "JoinRequestUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Requester email — shown to managers to identify the person."
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "image"
        ]
      },
      "JoinRequestActionResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ]
      },
      "LeaveResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ]
      },
      "Onboarding": {
        "type": "object",
        "properties": {
          "setupCompletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "When the setup assistant was completed; null = not yet."
          },
          "checklist": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OnboardingChecklistItem"
            }
          }
        },
        "required": [
          "setupCompletedAt",
          "checklist"
        ]
      },
      "OnboardingChecklistItem": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/OnboardingChecklistItemId"
          },
          "done": {
            "type": "boolean",
            "description": "The condition is met by the data of the workspace."
          },
          "skipped": {
            "type": "boolean",
            "description": "A manager marked the item as done without doing it. Progress counts `done || skipped`."
          },
          "open": {
            "type": "integer",
            "description": "Items that still need work (e.g. cocktails without price); 0 when done."
          }
        },
        "required": [
          "id",
          "done",
          "skipped",
          "open"
        ]
      },
      "OnboardingChecklistItemId": {
        "type": "string",
        "enum": [
          "glasses",
          "ingredients",
          "cocktails",
          "cards",
          "prices",
          "guestInfo",
          "team",
          "guestMenu"
        ],
        "description": "`glasses`/`ingredients`/`cocktails`/`cards`: at least one exists, `prices`: every active cocktail has a price, `guestInfo`: guest information of all ingredients and garnishes is confirmed, `team`: more than one member or a join code, `guestMenu`: a published, enabled guest menu."
      },
      "OnboardingChecklistItemUpdateInput": {
        "type": "object",
        "properties": {
          "skipped": {
            "type": "boolean",
            "description": "true marks the item as done without doing it, false reverts that."
          }
        },
        "required": [
          "skipped"
        ]
      },
      "QueueItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "cocktail": {
            "$ref": "#/components/schemas/QueueCocktailRef"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "inProgress": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          }
        },
        "required": [
          "id",
          "cocktail",
          "notes",
          "inProgress",
          "createdAt"
        ]
      },
      "QueueCocktailRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "QueueUpdateInput": {
        "type": "object",
        "properties": {
          "inProgress": {
            "type": "boolean",
            "description": "Whether the queue item is currently being prepared."
          }
        },
        "required": [
          "inProgress"
        ]
      },
      "QueueAddInput": {
        "type": "object",
        "properties": {
          "cocktailId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "Optional notes. Empty or \"-\" is treated as no notes."
          },
          "amount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "description": "How many identical items to enqueue (default 1, at most 50)."
          }
        },
        "required": [
          "cocktailId"
        ]
      },
      "QueueRemoveInput": {
        "type": "object",
        "properties": {
          "cocktailId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "Notes to match. Empty or \"-\" matches items without notes."
          }
        },
        "required": [
          "cocktailId"
        ]
      },
      "WorkspaceSettingUpdateInput": {
        "type": "object",
        "properties": {
          "setting": {
            "$ref": "#/components/schemas/WorkspaceSettingKey"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000,
            "description": "New value for the setting; null clears it. `timezone` must be an IANA time zone (default Europe/Berlin), `currency` an ISO 4217 code (default EUR), `contentLocales` a JSON string `{\"primary\":\"de\",\"additional\":[\"en\"]}`, `onboardingChecklistSkipped` a JSON array of checklist item ids (prefer `PUT /onboarding/checklist/{itemId}`)."
          }
        },
        "required": [
          "setting"
        ]
      },
      "WorkspaceSettingKey": {
        "type": "string",
        "enum": [
          "translations",
          "usePrices",
          "statisticDayStartTime",
          "timezone",
          "currency",
          "contentLocales",
          "onboardingChecklistSkipped"
        ]
      },
      "AdvancedStatisticsCocktailRanking": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvancedStatisticsCocktailRankingRow"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of orders in the selected period."
          }
        },
        "required": [
          "data",
          "total"
        ]
      },
      "AdvancedStatisticsCocktailRankingRow": {
        "type": "object",
        "properties": {},
        "additionalProperties": {},
        "description": "Per-cocktail ranking row: `cocktailId`, `name`, `tags`, `count`, `percentage` (share of period orders), `delta` (% vs. previous period), `previousCount`, `rank`, and `ingredients[]` (each with ingredientId/name/price, amount, unitId/name and availableUnits)."
      },
      "AdvancedStatisticsCocktailDetail": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {},
            "additionalProperties": {},
            "description": "Single-cocktail analytics: `cocktail` `{ id, name, tags, price }`, `total`, `avgPerActiveHour`, `rank`, `delta` (% vs. previous period), `previousTotal`, `revenue`, `previousRevenue`, `timeSeries` `{ date, count }[]` (granularity auto-chosen by range), `hourDistribution` `{ hour, count }[]` (0–23), `dayDistribution` `{ day, count }[]` (0=Sun…6), and `ingredients` (ingredient name list). All-time range is used when startDate/endDate are omitted."
          }
        },
        "required": [
          "data"
        ]
      },
      "AdvancedStatisticsCocktailOrders": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvancedStatisticsCocktailOrderRow"
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer"
              },
              "limit": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              },
              "totalPages": {
                "type": "integer"
              }
            },
            "required": [
              "page",
              "limit",
              "total",
              "totalPages"
            ],
            "description": "Legacy pagination block (page/limit/total/totalPages), distinct from the standard PaginationMeta."
          }
        },
        "required": [
          "data",
          "pagination"
        ]
      },
      "AdvancedStatisticsCocktailOrderRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "user": {
            "$ref": "#/components/schemas/AdvancedStatisticsOrderUser"
          },
          "cocktailCard": {
            "$ref": "#/components/schemas/AdvancedStatisticsOrderCard"
          }
        },
        "required": [
          "id",
          "date",
          "user",
          "cocktailCard"
        ]
      },
      "AdvancedStatisticsOrderUser": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "email"
        ]
      },
      "AdvancedStatisticsOrderCard": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "AdvancedStatisticsCocktailAll": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvancedStatisticsCocktailAllRow"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of orders in the period across all cocktails."
          }
        },
        "required": [
          "data",
          "total"
        ]
      },
      "AdvancedStatisticsCocktailAllRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "description": "Order count in the period (0 when no date range or no orders)."
          }
        },
        "required": [
          "id",
          "name",
          "count"
        ]
      },
      "AdvancedStatisticsCompare": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {},
            "additionalProperties": {},
            "description": "Ad-hoc set comparison: `set` `{ name, type, logic }`, `kpis` (total, percentage, cocktailCount, totalStats, totalUniqueCocktailsInPeriod, cocktailPercentage, totalCocktailsInWorkspace, cocktailPercentageAll, revenue, totalRevenue), `cocktails` `{ cocktailId, name, count }[]`, and `aggregated` `{ name, count }[]` (ingredients for TAG_SET, tags for INGREDIENT_SET)."
          }
        },
        "required": [
          "data"
        ]
      },
      "AdvancedStatisticsIngredients": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvancedStatisticsIngredientRow"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of orders in the period."
          }
        },
        "required": [
          "data",
          "total"
        ]
      },
      "AdvancedStatisticsIngredientRow": {
        "type": "object",
        "properties": {
          "ingredient": {
            "type": "string",
            "description": "Ingredient name."
          },
          "count": {
            "type": "integer",
            "description": "Number of orders whose cocktail uses this ingredient."
          },
          "cocktailCount": {
            "type": "integer",
            "description": "Number of distinct cocktails that use this ingredient."
          },
          "percentage": {
            "type": "number",
            "description": "Share of period orders using this ingredient (%)."
          }
        },
        "required": [
          "ingredient",
          "count",
          "cocktailCount",
          "percentage"
        ]
      },
      "AdvancedStatisticsOverview": {
        "type": "object",
        "properties": {},
        "additionalProperties": {},
        "description": "Dashboard overview. `kpis` holds per-period KPI blocks (today/week/month/period/avgPerHour/allTime), each with totals, deltas vs. the previous period, top cocktail `{ name, count }` and revenue. `charts` holds per-period chart data (timeSeries `{ date, count }[]`, topCocktails `{ cocktailId, name, count }[]`, hourDistribution `{ hour, count }[]`). Legacy top-level `timeSeries`/`topCocktails`/`hourDistribution` mirror the `period` chart data."
      },
      "AdvancedStatisticsSavedSet": {
        "type": "object",
        "properties": {},
        "additionalProperties": {},
        "description": "A saved statistics set (id, workspaceId, name, type, logic, items[], createdAt, updatedAt)."
      },
      "AdvancedStatisticsSavedSetCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Set name."
          },
          "type": {
            "type": "string",
            "enum": [
              "TAG_SET",
              "INGREDIENT_SET",
              "COCKTAIL_SET"
            ],
            "description": "SavedSetType (COCKTAIL_SET | TAG_SET | INGREDIENT_SET)."
          },
          "logic": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "AND",
              "OR",
              null
            ],
            "description": "SavedSetLogic (AND | OR), or null."
          },
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "maxItems": 500,
            "description": "Member names/ids for the set (cocktail ids for COCKTAIL_SET, which must belong to the workspace)."
          }
        },
        "required": [
          "name",
          "type",
          "items"
        ]
      },
      "AdvancedStatisticsSavedSetUpdateInput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Id of the set to update."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "New name (optional)."
          },
          "logic": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "AND",
              "OR",
              null
            ],
            "description": "New logic (AND | OR) or null (optional)."
          },
          "items": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "maxItems": 500,
            "description": "New member list (optional)."
          }
        },
        "required": [
          "id"
        ]
      },
      "AdvancedStatisticsSetDetail": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {},
            "additionalProperties": {},
            "description": "Analytics for a saved set: `set` `{ id, name, type, logic, items }`, `kpis` (total, percentage, cocktailCount, totalStats, totalUniqueCocktailsInPeriod, cocktailPercentage, totalCocktailsInWorkspace, cocktailPercentageAll), `cocktails` `{ cocktailId, name, count }[]`, and `aggregated` `{ name, count }[]` (ingredients for TAG_SET, tags for INGREDIENT_SET)."
          }
        },
        "required": [
          "data"
        ]
      },
      "AdvancedStatisticsTags": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdvancedStatisticsTagRow"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of orders in the period."
          }
        },
        "required": [
          "data",
          "total"
        ]
      },
      "AdvancedStatisticsTagRow": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "description": "Number of orders whose cocktail carries this tag."
          },
          "cocktailCount": {
            "type": "integer",
            "description": "Number of distinct cocktails carrying this tag."
          },
          "percentage": {
            "type": "number",
            "description": "Share of period orders carrying this tag (%)."
          }
        },
        "required": [
          "tag",
          "count",
          "cocktailCount",
          "percentage"
        ]
      },
      "CocktailStatisticItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2026-07-04T12:00:00.000Z",
            "description": "ISO 8601 timestamp"
          },
          "actionSource": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where the statistic entry originated (free-form source tag), or null."
          },
          "cocktail": {
            "$ref": "#/components/schemas/StatisticCocktailRef"
          },
          "cocktailCard": {
            "$ref": "#/components/schemas/StatisticCocktailCardRef"
          },
          "user": {
            "$ref": "#/components/schemas/StatisticUser"
          }
        },
        "required": [
          "id",
          "date",
          "actionSource",
          "cocktail",
          "cocktailCard",
          "user"
        ]
      },
      "StatisticCocktailRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "StatisticCocktailCardRef": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "description": "The cocktail card the drink was served from, or null."
      },
      "StatisticUser": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name"
        ],
        "description": "The user who logged the statistic, or null if the user was removed."
      },
      "CocktailStatisticCreateInput": {
        "type": "object",
        "properties": {
          "cocktailId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "ID of the cocktail that was made."
          },
          "cocktailCardId": {
            "type": "string",
            "maxLength": 100,
            "description": "ID of the cocktail card. The sentinel value `search` is treated as no card."
          },
          "actionSource": {
            "type": "string",
            "maxLength": 100,
            "description": "Free-form origin tag for the statistic entry."
          },
          "notes": {
            "type": "string",
            "maxLength": 500,
            "description": "Queue note to match when removing a queued cocktail (`-` matches an empty note)."
          },
          "ignoreQueue": {
            "type": "boolean",
            "description": "When true, skips the cocktail-queue reconciliation."
          }
        },
        "required": [
          "cocktailId"
        ]
      },
      "Tags": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "TagCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "order": {
            "type": "integer"
          },
          "showAsGuestFilter": {
            "type": "boolean",
            "description": "Whether the category is offered as a filter on guest menus."
          },
          "tagCount": {
            "type": "integer",
            "description": "Number of tag definitions assigned to this category."
          }
        },
        "required": [
          "id",
          "name",
          "order",
          "showAsGuestFilter",
          "tagCount"
        ]
      },
      "LocalizedText": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "Text per content locale, e.g. { \"de\": \"Fruchtig\", \"en\": \"Fruity\" }.",
        "example": {
          "de": "Fruchtig",
          "en": "Fruity"
        }
      },
      "TagCategoryCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Text per content locale, e.g. { \"de\": \"Fruchtig\", \"en\": \"Fruity\" }.",
            "example": {
              "de": "Fruchtig",
              "en": "Fruity"
            }
          },
          "order": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000,
            "description": "Sort order; defaults to the end of the list."
          },
          "showAsGuestFilter": {
            "type": "boolean",
            "description": "Default true."
          }
        },
        "required": [
          "name"
        ]
      },
      "TagCategoriesBulkUpdateInput": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "Existing category id; omit to create a new category."
            },
            "name": {
              "type": "object",
              "additionalProperties": {
                "type": "string",
                "maxLength": 200
              },
              "description": "Text per content locale, e.g. { \"de\": \"Fruchtig\", \"en\": \"Fruity\" }.",
              "example": {
                "de": "Fruchtig",
                "en": "Fruity"
              }
            },
            "order": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000
            },
            "showAsGuestFilter": {
              "type": "boolean"
            }
          },
          "required": [
            "name",
            "order",
            "showAsGuestFilter"
          ]
        },
        "maxItems": 500,
        "description": "Categories to upsert (existing categories not listed stay untouched)."
      },
      "TagCategoryUpdateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Text per content locale, e.g. { \"de\": \"Fruchtig\", \"en\": \"Fruity\" }.",
            "example": {
              "de": "Fruchtig",
              "en": "Fruity"
            }
          },
          "order": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000
          },
          "showAsGuestFilter": {
            "type": "boolean"
          }
        }
      },
      "TagDefinition": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string",
            "description": "The raw tag string as stored on cocktails/ingredients."
          },
          "label": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocalizedText"
              },
              {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Display label per content locale; null = use the raw tag."
              }
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "isPublic": {
            "type": "boolean",
            "description": "Whether the tag may be shown on public guest menus."
          },
          "defined": {
            "type": "boolean",
            "description": "False when the tag is only in use and has no stored definition yet (defaults apply)."
          },
          "cocktailCount": {
            "type": "integer",
            "description": "Number of cocktails using the tag."
          },
          "ingredientCount": {
            "type": "integer",
            "description": "Number of ingredients using the tag."
          }
        },
        "required": [
          "tag",
          "label",
          "categoryId",
          "color",
          "isPublic",
          "defined",
          "cocktailCount",
          "ingredientCount"
        ]
      },
      "TagDefinitionsBulkUpdateInput": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/TagDefinitionUpsertInput"
        },
        "maxItems": 5000,
        "description": "Tag definitions to upsert by tag. Omitted fields keep their current value."
      },
      "TagDefinitionUpsertInput": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "label": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Text per content locale, e.g. { \"de\": \"Fruchtig\", \"en\": \"Fruity\" }.",
            "example": {
              "de": "Fruchtig",
              "en": "Fruity"
            }
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 100
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^#[0-9a-fA-F]{6}$",
            "description": "Hex color (#rrggbb) or null.",
            "example": "#e11d48"
          },
          "isPublic": {
            "type": "boolean"
          }
        },
        "required": [
          "tag"
        ]
      },
      "TemplateApplyResult": {
        "type": "object",
        "properties": {
          "template": {
            "type": "string"
          },
          "created": {
            "$ref": "#/components/schemas/TemplateCounts"
          },
          "linked": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TemplateCounts"
              },
              {
                "description": "Items that already existed (same name in any language) and were reused."
              }
            ]
          },
          "skipped": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TemplateCounts"
              },
              {
                "description": "Items that were not imported (cards with an existing name and guest menus built on them)."
              }
            ]
          }
        },
        "required": [
          "template",
          "created",
          "linked",
          "skipped"
        ]
      },
      "TemplateApplyInput": {
        "type": "object",
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/TemplateApplyMode"
          },
          "selection": {
            "$ref": "#/components/schemas/TemplateSelection"
          },
          "locale": {
            "type": "string",
            "maxLength": 35,
            "description": "Content language of the workspace; template texts in this language become the primary texts. Default: primary content language of the workspace."
          },
          "businessType": {
            "type": "string",
            "enum": [
              "bar",
              "restaurant",
              "event",
              "private"
            ],
            "description": "Business type from the setup wizard; picks the built-in design of guest menus that come with the template (`bar`: speakeasy, `restaurant`: classic + elegant print, `event`: modern, `private`: minimal). Default: the design of the template."
          }
        },
        "required": [
          "mode"
        ]
      },
      "TemplateApplyMode": {
        "type": "string",
        "enum": [
          "all",
          "basics",
          "selection"
        ],
        "description": "`all`: whole template, `basics`: glasses, ingredients and garnishes only, `selection`: the selected items plus their dependencies."
      },
      "TemplateSelection": {
        "type": "object",
        "properties": {
          "glasses": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "maxItems": 1000,
            "default": []
          },
          "ingredients": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "maxItems": 1000,
            "default": []
          },
          "garnishes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "maxItems": 1000,
            "default": []
          },
          "cocktails": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "maxItems": 1000,
            "default": []
          },
          "cards": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "maxItems": 1000,
            "default": []
          }
        },
        "description": "Ids from `GET /templates/{key}/items`. Dependencies (glass, ingredients, garnishes of cocktails; cocktails of cards) are added."
      },
      "Translations": {
        "type": "object",
        "additionalProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "description": "Display-name catalog keyed by language code, then by translation key."
      },
      "ContentTranslations": {
        "type": "object",
        "properties": {
          "primaryLocale": {
            "type": "string",
            "description": "Primary content language (source of `source`)."
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Locales included in `rows`."
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentTranslationRow"
            }
          }
        },
        "required": [
          "primaryLocale",
          "locales",
          "rows"
        ]
      },
      "ContentTranslationRow": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string",
            "enum": [
              "cocktail",
              "ingredient",
              "garnish",
              "glass"
            ],
            "description": "Entity type."
          },
          "entityId": {
            "type": "string"
          },
          "entityName": {
            "type": "string",
            "description": "Entity name in the primary content language (for context)."
          },
          "field": {
            "type": "string",
            "enum": [
              "name",
              "guestName",
              "description",
              "history"
            ],
            "description": "Translatable field. cocktail: name/description/history, ingredient: name/guestName/description, garnish: name/description, glass: name."
          },
          "locale": {
            "type": "string"
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "Value in the primary content language."
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Translated value, or null when missing."
          }
        },
        "required": [
          "entityType",
          "entityId",
          "entityName",
          "field",
          "locale",
          "source",
          "value"
        ]
      },
      "ContentTranslationsUpdateResult": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "integer",
            "description": "Number of items written."
          },
          "skipped": {
            "type": "integer",
            "description": "Items ignored because the entity does not exist in this workspace."
          }
        },
        "required": [
          "updated",
          "skipped"
        ]
      },
      "ContentTranslationsUpdateInput": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentTranslationUpsertItem"
            },
            "maxItems": 20000
          }
        },
        "required": [
          "items"
        ]
      },
      "ContentTranslationUpsertItem": {
        "type": "object",
        "properties": {
          "entityType": {
            "type": "string",
            "enum": [
              "cocktail",
              "ingredient",
              "garnish",
              "glass"
            ],
            "description": "Entity type."
          },
          "entityId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "field": {
            "type": "string",
            "enum": [
              "name",
              "guestName",
              "description",
              "history"
            ],
            "description": "Translatable field. cocktail: name/description/history, ingredient: name/guestName/description, garnish: name/description, glass: name."
          },
          "locale": {
            "type": "string",
            "maxLength": 35,
            "example": "en"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 10000,
            "description": "Translated value; null or empty string clears it."
          }
        },
        "required": [
          "entityType",
          "entityId",
          "field",
          "locale",
          "value"
        ]
      },
      "Unit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "UnitCreateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "translations": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 500
            },
            "description": "Optional display-name translations keyed by language code, e.g. { \"en\": \"Centiliter\" }."
          }
        },
        "required": [
          "name"
        ]
      },
      "UnitConversion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "fromUnitId": {
            "type": "string"
          },
          "toUnitId": {
            "type": "string"
          },
          "factor": {
            "type": "number",
            "description": "Multiplier to convert a quantity from the source unit to the target unit."
          },
          "autoGenerated": {
            "type": "boolean",
            "description": "Whether this conversion was derived automatically from other conversions."
          }
        },
        "required": [
          "id",
          "fromUnitId",
          "toUnitId",
          "factor",
          "autoGenerated"
        ]
      },
      "UnitConversionCreateInput": {
        "type": "object",
        "properties": {
          "fromUnitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "toUnitId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "factor": {
            "type": "number",
            "minimum": 1e-9,
            "maximum": 1000000000,
            "description": "Multiplier to convert a quantity from the source unit to the target unit (> 0)."
          }
        },
        "required": [
          "fromUnitId",
          "toUnitId",
          "factor"
        ]
      },
      "UnitConversionUpdateInput": {
        "type": "object",
        "properties": {
          "factor": {
            "type": "number",
            "minimum": 1e-9,
            "maximum": 1000000000,
            "description": "Multiplier to convert a quantity from the source unit to the target unit (> 0)."
          }
        },
        "required": [
          "factor"
        ]
      },
      "WorkspaceUser": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to the user's avatar image, or null."
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          }
        },
        "required": [
          "userId",
          "name",
          "email",
          "image",
          "role"
        ]
      },
      "Role": {
        "type": "string",
        "enum": [
          "OWNER",
          "ADMIN",
          "MANAGER",
          "USER"
        ]
      },
      "WorkspaceUserUpdateInput": {
        "type": "object",
        "properties": {
          "role": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Role"
              },
              {
                "description": "New workspace role for the membership."
              }
            ]
          }
        },
        "required": [
          "role"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/api/admin/templates": {
      "get": {
        "summary": "List all templates",
        "description": "**Authentication:** instance master API key only (instance administration).\n\nAll templates including unpublished ones (built-in templates are synced into the database first).",
        "tags": [
          "Admin / Templates"
        ],
        "security": [
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List all templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AdminTemplate"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Mark workspace as template",
        "description": "**Authentication:** instance master API key only (instance administration).\n\nMarks an existing workspace as (custom) template. Template workspaces cannot be deleted while marked.",
        "tags": [
          "Admin / Templates"
        ],
        "security": [
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTemplateCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Mark workspace as template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdminTemplate"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Key taken (`TEMPLATE_KEY_TAKEN`) or workspace already a template (`ALREADY_TEMPLATE`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/templates/{key}": {
      "patch": {
        "summary": "Update template metadata",
        "description": "**Authentication:** instance master API key only (instance administration).\n\nUpdates name, description, languages, source, `published`, `isDefault` (one default per kind) and `sortOrder`.",
        "tags": [
          "Admin / Templates"
        ],
        "security": [
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "description": "Template key",
              "example": "all-time-classics"
            },
            "required": true,
            "description": "Template key",
            "name": "key",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTemplateUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update template metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdminTemplate"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Unmark template",
        "description": "**Authentication:** instance master API key only (instance administration).\n\nRemoves the template mark of a custom template; its workspace stays. Built-in templates cannot be removed (409 `BUILT_IN_TEMPLATE`).",
        "tags": [
          "Admin / Templates"
        ],
        "security": [
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "description": "Template key",
              "example": "all-time-classics"
            },
            "required": true,
            "description": "Template key",
            "name": "key",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Unmark template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdminTemplate"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Built-in template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/templates/{key}/access": {
      "post": {
        "summary": "Create join code for a template",
        "description": "**Authentication:** instance master API key only (instance administration).\n\nOne-time join code for editing a custom template (memberless: the first member becomes owner; otherwise a join request). Built-in templates are read-only (409 `BUILT_IN_TEMPLATE`) – clone them instead.",
        "tags": [
          "Admin / Templates"
        ],
        "security": [
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "description": "Template key",
              "example": "all-time-classics"
            },
            "required": true,
            "description": "Template key",
            "name": "key",
            "in": "path"
          }
        ],
        "responses": {
          "201": {
            "description": "Create join code for a template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdminTemplateAccess"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Built-in template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/templates/{key}/clone": {
      "post": {
        "summary": "Clone template",
        "description": "**Authentication:** instance master API key only (instance administration).\n\nCopies the template into a new memberless workspace with a new key (custom, unpublished) and returns a one-time join code; the first member becomes its owner.",
        "tags": [
          "Admin / Templates"
        ],
        "security": [
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "description": "Template key",
              "example": "all-time-classics"
            },
            "required": true,
            "description": "Template key",
            "name": "key",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminTemplateCloneInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Clone template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdminTemplateAccess"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Key taken (`TEMPLATE_KEY_TAKEN`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "summary": "Get token identity",
        "description": "**Authentication:** requires a valid session or API key (no specific permission).\n\nReturns the workspace, granted permissions and key metadata for the authenticated API token. Use this to resolve the workspace ID from a token without knowing it up front.",
        "tags": [
          "Workspace / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": []
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Get token identity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Me"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/guides": {
      "get": {
        "summary": "List guide progress",
        "description": "**Authentication:** requires a logged-in session (any user). API keys are NOT accepted.\n\nProgress of all tours and checklists of the session user.",
        "tags": [
          "User / Guides"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List guide progress",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GuideProgress"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/guides/{guideId}": {
      "put": {
        "summary": "Set guide progress",
        "description": "**Authentication:** requires a logged-in session (any user). API keys are NOT accepted.\n\nCreates or updates the status of a guide for the session user.",
        "tags": [
          "User / Guides"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9:._-]*$",
              "description": "Guide id, e.g. `tour:basics-bar` or `checklist:<workspaceId>`.",
              "example": "tour:basics-bar"
            },
            "required": true,
            "description": "Guide id, e.g. `tour:basics-bar` or `checklist:<workspaceId>`.",
            "name": "guideId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuideProgressUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Set guide progress",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuideProgress"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/templates": {
      "get": {
        "summary": "List templates",
        "description": "**Authentication:** requires a logged-in session (any user). API keys are NOT accepted.\n\nPublished templates with names in the requested language and item counts, ordered by `sortOrder`.",
        "tags": [
          "Templates / Core"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/TemplateKind"
            },
            "required": false,
            "description": "`BASE`: defaults of every new workspace, `CATALOG`: start content collection, `DEMO`: complete example bar.",
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 35,
              "description": "Language for names and descriptions (falls back to the primary language of the template).",
              "example": "en"
            },
            "required": false,
            "description": "Language for names and descriptions (falls back to the primary language of the template).",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TemplateSummary"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/templates/{key}/items": {
      "get": {
        "summary": "List template items",
        "description": "**Authentication:** requires a logged-in session (any user). API keys are NOT accepted.\n\nGlasses, ingredients, garnishes, cocktails (with their dependencies) and cards of a published template, for selecting what to apply.",
        "tags": [
          "Templates / Core"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "description": "Template key",
              "example": "all-time-classics"
            },
            "required": true,
            "description": "Template key",
            "name": "key",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 35,
              "description": "Language for names and descriptions (falls back to the primary language of the template).",
              "example": "en"
            },
            "required": false,
            "description": "Language for names and descriptions (falls back to the primary language of the template).",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List template items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TemplateItems"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found or not published.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/settings": {
      "put": {
        "summary": "Upsert a user setting",
        "description": "**Authentication:** requires a logged-in workspace-member session. API keys (workspace or the instance master key) are NOT accepted for this operation.\n\nCreates or updates a setting for the authenticated session user. Session-only — API keys are not accepted.",
        "tags": [
          "User / Settings"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserSettingUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upsert a user setting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UserSetting"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspaceId}": {
      "get": {
        "summary": "Get workspace",
        "description": "**Required API-key permission:** `WORKSPACE_READ` — Read workspace settings and audit logs\n\nGet workspace details including settings and members. Expired demo workspaces are deleted and return 410.",
        "tags": [
          "Workspace / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Workspace"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Demo workspace has expired and has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_READ"
      },
      "put": {
        "summary": "Update workspace",
        "description": "**Required API-key permission:** `WORKSPACE_UPDATE` — Update workspace settings\n\nUpdate the workspace name, logo and/or the public guest-menu slug (409 when the slug is taken). API keys additionally need `GUEST_MENUS_PUBLISH` to change `publicSlug`.",
        "tags": [
          "Workspace / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Workspace"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "An API key without `GUEST_MENUS_PUBLISH` tried to change the public slug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The public slug is already used by another workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_UPDATE"
      },
      "delete": {
        "summary": "Delete workspace",
        "description": "**Authentication:** requires a logged-in workspace-member session. API keys (workspace or the instance master key) are NOT accepted for this operation.\n\nPermanently delete the workspace and all its data. Owner session only. Workspaces marked as template cannot be deleted.",
        "tags": [
          "Workspace / Core"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The workspace is a template (`TEMPLATE_IN_USE`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspaceId}/actions": {
      "get": {
        "summary": "List step actions",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nList all cocktail-recipe step actions of a workspace, optionally filtered by name.",
        "tags": [
          "Cocktails / Step actions"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Case-insensitive name filter."
            },
            "required": false,
            "description": "Case-insensitive name filter.",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List step actions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Action"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      },
      "post": {
        "summary": "Create step action",
        "description": "**Required API-key permission:** `COCKTAILS_UPDATE` — Update cocktail recipes",
        "tags": [
          "Cocktails / Step actions"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActionCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create step action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/actions/{actionId}": {
      "put": {
        "summary": "Update step action",
        "description": "**Required API-key permission:** `COCKTAILS_UPDATE` — Update cocktail recipes\n\nUpdates the action group and (optionally) the display-name translations.",
        "tags": [
          "Cocktails / Step actions"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "actionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActionUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update step action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Action not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_UPDATE"
      },
      "delete": {
        "summary": "Delete step action",
        "description": "**Required API-key permission:** `COCKTAILS_UPDATE` — Update cocktail recipes",
        "tags": [
          "Cocktails / Step actions"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "actionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete step action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Action not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "ACTION_IN_USE: the action is still used in cocktail recipes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/admin/signage": {
      "get": {
        "summary": "Get signage configuration",
        "description": "**Required API-key permission:** `MONITOR_READ` — Read signage/monitor configuration and slides\n\nSignage configuration and slides per format (landscape / portrait).",
        "tags": [
          "Monitor / Configuration"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get signage configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SignageFormat"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_READ"
      },
      "put": {
        "summary": "Update signage configuration",
        "description": "**Required API-key permission:** `MONITOR_UPDATE` — Update signage/monitor configuration and slides",
        "tags": [
          "Monitor / Configuration"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignageSettingsUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update signage configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SignageFormat"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/admin/signage/key": {
      "get": {
        "summary": "Get the monitor key",
        "description": "**Required API-key permission:** `MONITOR_UPDATE` — Update signage/monitor configuration and slides\n\nThe monitor link `/signage?id={workspaceId}&key={key}` is the only way for a monitor to show PIN-protected guest menus. Without the key, image slides and unprotected menus still work.",
        "tags": [
          "Monitor / Configuration"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get the monitor key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SignageKey"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_UPDATE"
      },
      "post": {
        "summary": "Generate / regenerate the monitor key",
        "description": "**Required API-key permission:** `MONITOR_UPDATE` — Update signage/monitor configuration and slides\n\nCreates a new random monitor key. Existing monitor links with the old key can no longer show PIN-protected guest menus.",
        "tags": [
          "Monitor / Configuration"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Generate / regenerate the monitor key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SignageKey"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/admin/signage/slides": {
      "post": {
        "summary": "Upload signage slides",
        "description": "**Required API-key permission:** `MONITOR_UPDATE` — Update signage/monitor configuration and slides",
        "tags": [
          "Monitor / Slides"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignageSlideCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload signage slides",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SignageSlide"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid slide upload payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_UPDATE"
      },
      "patch": {
        "summary": "Update signage slides (schedule / enabled)",
        "description": "**Required API-key permission:** `MONITOR_UPDATE` — Update signage/monitor configuration and slides",
        "tags": [
          "Monitor / Slides"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignageSlidePatchInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update signage slides (schedule / enabled)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SignageSlide"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "No slide ids or no update fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "At least one slide id is not a slide of this workspace (SLIDES_NOT_FOUND); nothing is changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Exclusive date ranges overlap.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/admin/signage/slides/{slideId}": {
      "delete": {
        "summary": "Delete signage slide",
        "description": "**Required API-key permission:** `MONITOR_UPDATE` — Update signage/monitor configuration and slides",
        "tags": [
          "Monitor / Slides"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "slideId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete signage slide",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Slide not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/admin/signage/slides/{slideId}/guest-menu": {
      "patch": {
        "summary": "Update a guest menu slide",
        "description": "**Required API-key permission:** `MONITOR_UPDATE` — Update signage/monitor configuration and slides\n\nChanges the menu and/or display options of a `GUEST_MENU` slide.",
        "tags": [
          "Monitor / Slides"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "slideId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignageGuestMenuSlideUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update a guest menu slide",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SignageSlide"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Not a guest menu slide.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Slide or guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/admin/signage/slides/{slideId}/image": {
      "get": {
        "summary": "Get signage slide image",
        "description": "**Required API-key permission:** `MONITOR_READ` — Read signage/monitor configuration and slides\n\nReturns the slide image bytes (the `imageUrl` target).",
        "tags": [
          "Monitor / Slides"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "slideId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The slide image bytes.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Slide not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/admin/signage/slides/guest-menu": {
      "post": {
        "summary": "Add a guest menu slide",
        "description": "**Required API-key permission:** `MONITOR_UPDATE` — Update signage/monitor configuration and slides\n\nAppends a `GUEST_MENU` slide that renders a guest menu (or the currently active one) on the monitor.",
        "tags": [
          "Monitor / Slides"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "MONITOR_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignageGuestMenuSlideCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Add a guest menu slide",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SignageSlide"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "MONITOR_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/admin/translation": {
      "put": {
        "summary": "Upsert a translation (legacy admin path)",
        "description": "**Required API-key permission:** `WORKSPACE_UPDATE` — Update workspace settings\n\nMerges display-name translations for a key into the workspace translation settings. Prefer PUT /translations.",
        "tags": [
          "Workspace / Settings"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TranslationUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upsert a translation (legacy admin path)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TranslationUpdateResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/api-keys": {
      "get": {
        "summary": "List API keys",
        "description": "**Required API-key permission:** `WORKSPACE_READ` — Read workspace settings and audit logs\n\nLists the workspace API keys (metadata only — the key value is shown only once, on create).",
        "tags": [
          "Workspace / API keys"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List API keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApiKey"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_READ"
      },
      "post": {
        "summary": "Create API key",
        "description": "**Authentication:** requires a logged-in workspace-member session. API keys (workspace or the instance master key) are NOT accepted for this operation.\n\nCreates a workspace API key and returns the signed token ONCE. Session-only — API keys cannot mint other keys.",
        "tags": [
          "Workspace / API keys"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ApiKeyCreateResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspaceId}/api-keys/{keyId}": {
      "get": {
        "summary": "Get API key",
        "description": "**Required API-key permission:** `WORKSPACE_READ` — Read workspace settings and audit logs",
        "tags": [
          "Workspace / API keys"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "required": true,
            "name": "keyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ApiKey"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "API key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_READ"
      },
      "delete": {
        "summary": "Revoke API key",
        "description": "**Authentication:** requires a logged-in workspace-member session. API keys (workspace or the instance master key) are NOT accepted for this operation.\n\nRevokes (deletes) a workspace API key. Session-only — API keys cannot revoke keys.",
        "tags": [
          "Workspace / API keys"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "required": true,
            "name": "keyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Revoke API key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "API key not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspaceId}/audit-logs": {
      "get": {
        "summary": "List audit logs",
        "description": "**Required API-key permission:** `WORKSPACE_READ` — Read workspace settings and audit logs\n\nList audit log entries of a workspace, newest first. Optionally filtered by entity type/ID. Paginated: the response is a `{ data, pagination }` envelope (not a bare array); `data` holds the `AuditLog[]` page.",
        "tags": [
          "Audit Logs / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Filter by entity type, e.g. `Glass`."
            },
            "required": false,
            "description": "Filter by entity type, e.g. `Glass`.",
            "name": "entityType",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Filter by entity ID."
            },
            "required": false,
            "description": "Filter by entity ID.",
            "name": "entityId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100000,
              "default": 1,
              "description": "1-based page number."
            },
            "required": false,
            "description": "1-based page number.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50,
              "description": "Items per page (max 200)."
            },
            "required": false,
            "description": "Items per page (max 200).",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List audit logs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuditLog"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/calculations": {
      "get": {
        "summary": "List calculations",
        "description": "**Required API-key permission:** `CALCULATIONS_READ` — Read cost calculations\n\nList all cocktail calculations of a workspace. Returns a slim summary (group ref + slim items); use GET /calculations/{calculationId} for the full calculation.",
        "tags": [
          "Calculations / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List calculations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CalculationSummary"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_READ"
      },
      "post": {
        "summary": "Create calculation",
        "description": "**Required API-key permission:** `CALCULATIONS_CREATE` — Create cost calculations\n\nNot available to the instance master key (calculations record the updating user).",
        "tags": [
          "Calculations / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create calculation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalculationSummary"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid group, or a cocktail/ingredient/unit that does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Master API key cannot write calculations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/calculations/{calculationId}": {
      "get": {
        "summary": "Get calculation",
        "description": "**Required API-key permission:** `CALCULATIONS_READ` — Read cost calculations\n\nReturns the full calculation including fully-hydrated cocktail items and ingredient shopping units.",
        "tags": [
          "Calculations / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calculationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get calculation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Calculation"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Calculation not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_READ"
      },
      "put": {
        "summary": "Update calculation",
        "description": "**Required API-key permission:** `CALCULATIONS_UPDATE` — Update cost calculations\n\nReplaces the calculation metadata and its full set of items and ingredient shopping units. Not available to the instance master key (calculations record the updating user).",
        "tags": [
          "Calculations / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calculationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update calculation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalculationSummary"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid group, or a cocktail/ingredient/unit that does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Master API key cannot write calculations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Calculation not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_UPDATE"
      },
      "delete": {
        "summary": "Delete calculation",
        "description": "**Required API-key permission:** `CALCULATIONS_DELETE` — Delete cost calculations",
        "tags": [
          "Calculations / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "calculationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete calculation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Calculation not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/calculations/export/json": {
      "post": {
        "summary": "Export calculations as JSON",
        "description": "**Required API-key permission:** `CALCULATIONS_READ` — Read cost calculations\n\nReturns a self-contained JSON dump of the selected calculations (metadata, cocktail items and ingredient shopping units, resolved to names) that can be re-imported via POST /calculations/import/json. A single selected calculation is returned as a bare object; multiple as an array. The exact dump shape is preserved verbatim for a lossless round-trip (not wrapped in a data envelope).",
        "tags": [
          "Calculations / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationExportJsonInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Export calculations as JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Raw export dump (see CocktailCalculationExportStructure). Returned verbatim, not wrapped in a data envelope."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "No calculations selected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No calculations found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Export failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/calculations/groups": {
      "get": {
        "summary": "List calculation groups",
        "description": "**Required API-key permission:** `CALCULATIONS_READ` — Read cost calculations\n\nList all calculation groups of a workspace, ordered by name.",
        "tags": [
          "Calculations / Groups"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List calculation groups",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CalculationGroup"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_READ"
      },
      "post": {
        "summary": "Create calculation group",
        "description": "**Required API-key permission:** `CALCULATIONS_UPDATE` — Update cost calculations",
        "tags": [
          "Calculations / Groups"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationGroupCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create calculation group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalculationGroup"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A group with this name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/calculations/groups/{groupId}": {
      "put": {
        "summary": "Update calculation group",
        "description": "**Required API-key permission:** `CALCULATIONS_UPDATE` — Update cost calculations",
        "tags": [
          "Calculations / Groups"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "groupId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationGroupUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update calculation group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalculationGroup"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Group not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A group with this name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_UPDATE"
      },
      "delete": {
        "summary": "Delete calculation group",
        "description": "**Required API-key permission:** `CALCULATIONS_UPDATE` — Update cost calculations\n\nDeletes the group; its calculations are unassigned (group set to null).",
        "tags": [
          "Calculations / Groups"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "groupId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete calculation group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Group not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/calculations/groups/assign": {
      "post": {
        "summary": "Assign calculations to a group",
        "description": "**Required API-key permission:** `CALCULATIONS_UPDATE` — Update cost calculations\n\nAssigns the given calculations to a group, or removes their group assignment when groupId is null.",
        "tags": [
          "Calculations / Groups"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationGroupAssignInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assign calculations to a group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GroupAssignmentResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A calculation does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Group not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/calculations/import/json": {
      "post": {
        "summary": "Import calculations from JSON",
        "description": "**Required API-key permission:** `CALCULATIONS_CREATE` — Create cost calculations\n\nThree-phase import (`validate` → `prepare-mapping` → `execute`) of an export dump produced by POST /calculations/export/json. The response shape depends on the phase and is returned verbatim (not wrapped in a data envelope). The execute phase is all-or-nothing: every decision and referenced id is validated first; any invalid item or foreign/unknown id writes nothing and returns 400 with per-item issues. All writes run in one transaction. Not available to the instance master key (calculations record the updating user).",
        "tags": [
          "Calculations / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CALCULATIONS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculationImportJsonInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import calculations from JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Phase-dependent import result (validation summary, mapping suggestions, or import results). Returned verbatim."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid phase, missing decisions, invalid items or references (nothing was imported).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Master API key cannot write calculations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict with a concurrent change (nothing was imported).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CALCULATIONS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cards": {
      "get": {
        "summary": "List cards",
        "description": "**Required API-key permission:** `CARDS_READ` — Read cocktail cards (menus)\n\nList all cocktail cards of a workspace. Returns a slim summary without nested groups; use GET /cards/{cardId} for the full card.",
        "tags": [
          "Cards / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CARDS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "boolean",
              "description": "Include archived cards when true (default false)."
            },
            "required": false,
            "description": "Include archived cards when true (default false).",
            "name": "withArchived",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List cards",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CardSummary"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CARDS_READ"
      },
      "post": {
        "summary": "Create card",
        "description": "**Required API-key permission:** `CARDS_CREATE` — Create cocktail cards",
        "tags": [
          "Cards / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CARDS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Card"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A cocktail does not exist in this workspace or appears twice in a group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A supplied id is already in use.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CARDS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cards/{cardId}": {
      "get": {
        "summary": "Get card",
        "description": "**Required API-key permission:** `CARDS_READ` — Read cocktail cards (menus)\n\nReturns the full card including nested groups and items.",
        "tags": [
          "Cards / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CARDS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cardId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Card"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Card not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CARDS_READ"
      },
      "put": {
        "summary": "Update card",
        "description": "**Required API-key permission:** `CARDS_UPDATE` — Update cocktail cards\n\nReplaces the card metadata and its full set of groups/items. Groups whose id belongs to this card keep their id (guest menus reference them); other groups are created, missing ones deleted.",
        "tags": [
          "Cards / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CARDS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cardId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Card"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A cocktail does not exist in this workspace or appears twice in a group.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Card not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "A supplied group id is already in use.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CARDS_UPDATE"
      },
      "delete": {
        "summary": "Delete card",
        "description": "**Required API-key permission:** `CARDS_DELETE` — Delete cocktail cards",
        "tags": [
          "Cards / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CARDS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cardId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Card not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CARDS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cards/{cardId}/archive": {
      "put": {
        "summary": "Archive card",
        "description": "**Required API-key permission:** `CARDS_UPDATE` — Update cocktail cards",
        "tags": [
          "Cards / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CARDS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cardId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Archive card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CardSummary"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Card not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CARDS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cards/{cardId}/clone": {
      "post": {
        "summary": "Clone card",
        "description": "**Required API-key permission:** `CARDS_CREATE` — Create cocktail cards\n\nCreates a deep copy of a card (groups and items) under a new name.",
        "tags": [
          "Cards / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CARDS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cardId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardCloneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Clone card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Card"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Card not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CARDS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cards/{cardId}/unarchive": {
      "put": {
        "summary": "Unarchive card",
        "description": "**Required API-key permission:** `CARDS_UPDATE` — Update cocktail cards",
        "tags": [
          "Cards / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "CARDS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cardId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Unarchive card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CardSummary"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Card not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "CARDS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails": {
      "get": {
        "summary": "List cocktails",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nList all cocktails of a workspace, optionally filtered by a free-text search over name, tags, garnishes and ingredients. Returns slim summaries; use GET /cocktails/{cocktailId} for the full recipe.",
        "tags": [
          "Cocktails / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Case-insensitive filter over name, tags, garnishes and ingredients."
            },
            "required": false,
            "description": "Case-insensitive filter over name, tags, garnishes and ingredients.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Comma-separated extra projections to embed in each summary: `garnishes`, `ingredients`."
            },
            "required": false,
            "description": "Comma-separated extra projections to embed in each summary: `garnishes`, `ingredients`.",
            "name": "include",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List cocktails",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CocktailSummary"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      },
      "post": {
        "summary": "Create cocktail",
        "description": "**Required API-key permission:** `COCKTAILS_CREATE` — Create cocktail recipes",
        "tags": [
          "Cocktails / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CocktailCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cocktail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/{cocktailId}": {
      "get": {
        "summary": "Get cocktail",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nReturns the full cocktail including nested steps, ingredients, garnishes and rating aggregates.",
        "tags": [
          "Cocktails / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cocktail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      },
      "put": {
        "summary": "Update cocktail",
        "description": "**Required API-key permission:** `COCKTAILS_UPDATE` — Update cocktail recipes\n\nUpdates the cocktail metadata and differentially applies its steps, ingredients and garnishes.",
        "tags": [
          "Cocktails / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CocktailUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cocktail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_UPDATE"
      },
      "delete": {
        "summary": "Delete cocktail",
        "description": "**Required API-key permission:** `COCKTAILS_DELETE` — Delete cocktail recipes",
        "tags": [
          "Cocktails / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/{cocktailId}/archive": {
      "put": {
        "summary": "Archive cocktail",
        "description": "**Required API-key permission:** `COCKTAILS_UPDATE` — Update cocktail recipes",
        "tags": [
          "Cocktails / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Archive cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cocktail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/{cocktailId}/availability": {
      "put": {
        "summary": "Set cocktail availability (\"heute aus\")",
        "description": "**Required API-key permission:** `COCKTAILS_UPDATE` — Update cocktail recipes\n\nMarks a cocktail as sold out for the current bar day (`unavailableUntil` = start of the next bar day, computed from the workspace `timezone` and `statisticDayStartTime`) or clears the flag.",
        "tags": [
          "Cocktails / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CocktailAvailabilityInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Set cocktail availability (\"heute aus\")",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cocktail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/{cocktailId}/clone": {
      "post": {
        "summary": "Clone cocktail",
        "description": "**Required API-key permission:** `COCKTAILS_CREATE` — Create cocktail recipes\n\nCreates a deep copy of a cocktail (image, steps, ingredients and garnishes) under a new name.",
        "tags": [
          "Cocktails / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CocktailCloneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Clone cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cocktail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/{cocktailId}/guest-info": {
      "get": {
        "summary": "Get derived guest information of a cocktail",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nAllergens, additives and alcohol content derived from the ingredients, garnishes and steps of the cocktail (plus manual extras/override), including which component contributes what.",
        "tags": [
          "Guest Info / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get derived guest information of a cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CocktailGuestInfo"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/{cocktailId}/image": {
      "get": {
        "summary": "Get cocktail image",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nReturns the cocktail image bytes (the `imageUrl` target). 404 when the cocktail has no image.",
        "tags": [
          "Cocktails / Media"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The cocktail image bytes.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The cocktail has no image.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/{cocktailId}/ratings": {
      "get": {
        "summary": "List ratings",
        "description": "**Required API-key permission:** `RATINGS_READ` — Read cocktail ratings\n\nList all ratings of a cocktail (newest first).",
        "tags": [
          "Ratings / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "RATINGS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List ratings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Rating"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "RATINGS_READ"
      },
      "post": {
        "summary": "Create rating",
        "description": "**Required API-key permission:** `RATINGS_CREATE` — Create cocktail ratings",
        "tags": [
          "Ratings / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "RATINGS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RatingCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create rating",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Rating"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "RATINGS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/{cocktailId}/ratings/{ratingId}": {
      "delete": {
        "summary": "Delete rating",
        "description": "**Required API-key permission:** `RATINGS_DELETE` — Delete cocktail ratings",
        "tags": [
          "Ratings / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "RATINGS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "ratingId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete rating",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Rating"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Rating not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "RATINGS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/{cocktailId}/unarchive": {
      "put": {
        "summary": "Unarchive cocktail",
        "description": "**Required API-key permission:** `COCKTAILS_UPDATE` — Update cocktail recipes",
        "tags": [
          "Cocktails / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Unarchive cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Cocktail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/check": {
      "get": {
        "summary": "Find similar cocktail",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nReturns the most similar existing cocktail by name, or null.",
        "tags": [
          "Cocktails / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 255,
              "description": "Name to check for a similar existing cocktail (min. 3 chars)."
            },
            "required": true,
            "description": "Name to check for a similar existing cocktail (min. 3 chars).",
            "name": "name",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Find similar cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/CocktailSummary"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/export/json": {
      "post": {
        "summary": "Export cocktails as JSON",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nReturns a self-contained JSON dump (cocktails plus their referenced glasses, garnishes, ingredients, units, ice and step actions, including images) that can be re-imported via POST /cocktails/import/json. The exact dump shape is preserved verbatim for a lossless round-trip.",
        "tags": [
          "Cocktails / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CocktailExportJsonInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Export cocktails as JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Raw export dump (see types/CocktailExportStructure.ts). Returned verbatim, not wrapped in a data envelope."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "No cocktails selected or too many ids.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No cocktails found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/export/pdf": {
      "post": {
        "summary": "Export cocktails as PDF",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nRenders the selected cocktails to a single PDF document. Requires the Chromium PDF service to be configured.",
        "tags": [
          "Cocktails / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CocktailExportPdfInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The generated PDF document.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "cocktailIds missing, empty or more than 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No cocktails found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PDF export service not configured/available.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/cocktails/import/json": {
      "post": {
        "summary": "Import cocktails from JSON",
        "description": "**Required API-key permission:** `COCKTAILS_CREATE` — Create cocktail recipes\n\nThree-phase import (`validate` → `prepare-mapping` → `execute`) of an export dump produced by POST /cocktails/export/json. The response shape depends on the phase and is returned verbatim (not wrapped in a data envelope). The import is all-or-nothing: every item and referenced id is validated first; on any problem nothing is written and 400 lists the issues. API keys additionally need COCKTAILS_UPDATE to overwrite existing cocktails.",
        "tags": [
          "Cocktails / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CocktailImportJsonInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import cocktails from JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Phase-dependent import result (validation summary, mapping suggestions, or import counts). Returned verbatim."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid structure/phase, missing mapping decisions or invalid items/references (nothing was imported).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "API key lacks COCKTAILS_UPDATE for overwrites.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflicting concurrent change (nothing was imported).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/garnishes": {
      "get": {
        "summary": "List garnishes",
        "description": "**Required API-key permission:** `GARNISHES_READ` — Read garnishes\n\nList all garnishes of a workspace, optionally filtered by name.",
        "tags": [
          "Garnishes / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 255,
              "description": "Case-insensitive name filter."
            },
            "required": false,
            "description": "Case-insensitive name filter.",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List garnishes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Garnish"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_READ"
      },
      "post": {
        "summary": "Create garnish",
        "description": "**Required API-key permission:** `GARNISHES_CREATE` — Create garnishes",
        "tags": [
          "Garnishes / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GarnishCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create garnish",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Garnish"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/garnishes/{garnishId}": {
      "get": {
        "summary": "Get garnish",
        "description": "**Required API-key permission:** `GARNISHES_READ` — Read garnishes",
        "tags": [
          "Garnishes / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "garnishId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get garnish",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Garnish"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Garnish not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_READ"
      },
      "put": {
        "summary": "Update garnish",
        "description": "**Required API-key permission:** `GARNISHES_UPDATE` — Update garnishes",
        "tags": [
          "Garnishes / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "garnishId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GarnishUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update garnish",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Garnish"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_UPDATE"
      },
      "delete": {
        "summary": "Delete garnish",
        "description": "**Required API-key permission:** `GARNISHES_DELETE` — Delete garnishes",
        "tags": [
          "Garnishes / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "garnishId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete garnish",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/garnishes/{garnishId}/clone": {
      "post": {
        "summary": "Clone garnish",
        "description": "**Required API-key permission:** `GARNISHES_CREATE` — Create garnishes\n\nCreates a copy of a garnish (including its image) under a new name.",
        "tags": [
          "Garnishes / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "garnishId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GarnishCloneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Clone garnish",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Garnish"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Garnish not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/garnishes/{garnishId}/image": {
      "get": {
        "summary": "Get garnish image",
        "description": "**Required API-key permission:** `GARNISHES_READ` — Read garnishes\n\nReturns the garnish image bytes (the `imageUrl` target). 404 when the garnish has no image.",
        "tags": [
          "Garnishes / Media"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "garnishId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The garnish image bytes.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The garnish has no image.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/garnishes/check": {
      "get": {
        "summary": "Find similar garnish",
        "description": "**Required API-key permission:** `GARNISHES_READ` — Read garnishes\n\nReturns the most similar existing garnish by name, or null.",
        "tags": [
          "Garnishes / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 255,
              "description": "Name to check for a similar existing garnish (min. 3 chars)."
            },
            "required": true,
            "description": "Name to check for a similar existing garnish (min. 3 chars).",
            "name": "name",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Find similar garnish",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Garnish"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/garnishes/export/json": {
      "post": {
        "summary": "Export garnishes as JSON",
        "description": "**Required API-key permission:** `GARNISHES_READ` — Read garnishes\n\nExports the selected garnishes in the portable JSON export format. A single garnish yields one export object; multiple garnishes yield an array. This payload is the exact input accepted by the import endpoint.",
        "tags": [
          "Garnishes / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GarnishExportInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Export garnishes as JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Legacy garnish export structure (single object or array). Round-trips with the import endpoint."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/garnishes/import/json": {
      "post": {
        "summary": "Import garnishes from JSON",
        "description": "**Required API-key permission:** `GARNISHES_CREATE` — Create garnishes\n\nImports garnishes from the portable JSON export format via a three-phase flow (validate / prepare-mapping / execute). Consumes exactly what the export endpoint produces. `execute` is all-or-nothing: if any item or referenced garnish is invalid nothing is written (400 with per-item issues), and all writes run in one transaction.",
        "tags": [
          "Garnishes / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GARNISHES_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GarnishImportInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import garnishes from JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Phase-dependent legacy import result (validation summary, mapping proposal or execution results)."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or import items; nothing was imported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GARNISHES_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/glasses": {
      "get": {
        "summary": "List glasses",
        "description": "**Required API-key permission:** `GLASSES_READ` — Read glasses\n\nList all glasses of a workspace, optionally filtered by name.",
        "tags": [
          "Glasses / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 255,
              "description": "Case-insensitive name filter."
            },
            "required": false,
            "description": "Case-insensitive name filter.",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List glasses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Glass"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_READ"
      },
      "post": {
        "summary": "Create glass",
        "description": "**Required API-key permission:** `GLASSES_CREATE` — Create glasses",
        "tags": [
          "Glasses / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GlassCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create glass",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Glass"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/glasses/{glassId}": {
      "get": {
        "summary": "Get glass",
        "description": "**Required API-key permission:** `GLASSES_READ` — Read glasses",
        "tags": [
          "Glasses / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "glassId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get glass",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Glass"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Glass not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_READ"
      },
      "put": {
        "summary": "Update glass",
        "description": "**Required API-key permission:** `GLASSES_UPDATE` — Update glasses",
        "tags": [
          "Glasses / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "glassId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GlassUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update glass",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Glass"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_UPDATE"
      },
      "delete": {
        "summary": "Delete glass",
        "description": "**Required API-key permission:** `GLASSES_DELETE` — Delete glasses",
        "tags": [
          "Glasses / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "glassId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete glass",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Glass is still referenced by cocktails and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/glasses/{glassId}/clone": {
      "post": {
        "summary": "Clone glass",
        "description": "**Required API-key permission:** `GLASSES_CREATE` — Create glasses\n\nCreates a copy of a glass (including its image) under a new name.",
        "tags": [
          "Glasses / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "glassId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GlassCloneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Clone glass",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Glass"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Glass not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/glasses/{glassId}/image": {
      "get": {
        "summary": "Get glass image",
        "description": "**Required API-key permission:** `GLASSES_READ` — Read glasses\n\nReturns the glass image bytes (the `imageUrl` target). 404 when the glass has no image.",
        "tags": [
          "Glasses / Media"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "glassId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The glass image bytes.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The glass has no image.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/glasses/{glassId}/references": {
      "get": {
        "summary": "List glass references",
        "description": "**Required API-key permission:** `GLASSES_READ` — Read glasses\n\nLists the cocktails that reference this glass.",
        "tags": [
          "Glasses / References"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "glassId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List glass references",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GlassReference"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/glasses/check": {
      "get": {
        "summary": "Find similar glass",
        "description": "**Required API-key permission:** `GLASSES_READ` — Read glasses\n\nReturns the most similar existing glass by name, or null.",
        "tags": [
          "Glasses / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 255,
              "description": "Name to check for a similar existing glass (min. 3 chars)."
            },
            "required": true,
            "description": "Name to check for a similar existing glass (min. 3 chars).",
            "name": "name",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Find similar glass",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Glass"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/glasses/export/json": {
      "post": {
        "summary": "Export glasses as JSON",
        "description": "**Required API-key permission:** `GLASSES_READ` — Read glasses\n\nExports the selected glasses in the portable JSON export format. A single glass yields one export object; multiple glasses yield an array. This payload is the exact input accepted by the import endpoint.",
        "tags": [
          "Glasses / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GlassExportInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Export glasses as JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Legacy glass export structure (single object or array). Round-trips with the import endpoint."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/glasses/import/json": {
      "post": {
        "summary": "Import glasses from JSON",
        "description": "**Required API-key permission:** `GLASSES_CREATE` — Create glasses\n\nImports glasses from the portable JSON export format via a three-phase flow (validate / prepare-mapping / execute). Consumes exactly what the export endpoint produces. `execute` is all-or-nothing: if any item or referenced glass is invalid nothing is written (400 with per-item issues), and all writes run in one transaction.",
        "tags": [
          "Glasses / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GLASSES_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GlassImportInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import glasses from JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Phase-dependent legacy import result (validation summary, mapping proposal or execution results)."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or import items; nothing was imported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GLASSES_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-info/bulk": {
      "put": {
        "summary": "Bulk-update guest information",
        "description": "**Required API-key permission:** `INGREDIENTS_UPDATE` — Update ingredients\n\nUpdates the guest-information fields of several ingredients and garnishes at once. Omitted fields stay unchanged. API keys need INGREDIENTS_UPDATE, and additionally GARNISHES_UPDATE when garnishes are included.",
        "tags": [
          "Guest Info / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestInfoBulkUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk-update guest information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "ingredients": {
                          "type": "integer",
                          "description": "Number of updated ingredients."
                        },
                        "garnishes": {
                          "type": "integer",
                          "description": "Number of updated garnishes."
                        }
                      },
                      "required": [
                        "ingredients",
                        "garnishes"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "An ingredient or garnish id does not belong to this workspace (nothing was updated).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-info/overview": {
      "get": {
        "summary": "Guest information overview",
        "description": "**Required API-key permission:** `INGREDIENTS_READ` — Read ingredients\n\nAll ingredients and garnishes with their guest-information fields, plus completeness statistics.",
        "tags": [
          "Guest Info / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Guest information overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestInfoOverview"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus": {
      "get": {
        "summary": "List guest menus",
        "description": "**Required API-key permission:** `GUEST_MENUS_READ` — Read guest menus (including drafts) and guest menu templates\n\nAll guest menus ordered by priority, with current schedule validity and the active flag.",
        "tags": [
          "Guest Menus / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List guest menus",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GuestMenuSummary"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_READ"
      },
      "post": {
        "summary": "Create guest menu",
        "description": "**Required API-key permission:** `GUEST_MENUS_CREATE` — Create guest menus and guest menu templates",
        "tags": [
          "Guest Menus / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestMenuCreateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create guest menu",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenu"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`sourceCardId` is not a card of this workspace (INVALID_REFERENCE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Slug already in use (SLUG_TAKEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}": {
      "get": {
        "summary": "Get guest menu",
        "description": "**Required API-key permission:** `GUEST_MENUS_READ` — Read guest menus (including drafts) and guest menu templates\n\nMeta data plus draft and published documents.",
        "tags": [
          "Guest Menus / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get guest menu",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenu"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_READ"
      },
      "patch": {
        "summary": "Update guest menu meta data",
        "description": "**Required API-key permission:** `GUEST_MENUS_UPDATE` — Update guest menu drafts, schedules and templates\n\nName, slug, enabled, default, priority, schedule, inactive behavior, source card, locales and the guest access code. Takes effect immediately (no publish needed).",
        "tags": [
          "Guest Menus / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestMenuUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update guest menu meta data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenu"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`sourceCardId` is not a card of this workspace (INVALID_REFERENCE).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Slug already in use (SLUG_TAKEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_UPDATE"
      },
      "delete": {
        "summary": "Delete guest menu",
        "description": "**Required API-key permission:** `GUEST_MENUS_DELETE` — Delete guest menus and guest menu templates",
        "tags": [
          "Guest Menus / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete guest menu",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/draft": {
      "put": {
        "summary": "Save guest menu draft",
        "description": "**Required API-key permission:** `GUEST_MENUS_UPDATE` — Update guest menu drafts, schedules and templates\n\nReplaces the draft document (validated against the document schema). Does not affect the published menu.",
        "tags": [
          "Guest Menus / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestMenuDocument"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Save guest menu draft",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenu"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/duplicate": {
      "post": {
        "summary": "Duplicate guest menu",
        "description": "**Required API-key permission:** `GUEST_MENUS_CREATE` — Create guest menus and guest menu templates\n\nCopies meta data and draft (not published, not default, disabled).",
        "tags": [
          "Guest Menus / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestMenuDuplicateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Duplicate guest menu",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenu"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Slug already in use (SLUG_TAKEN).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/export/html": {
      "get": {
        "summary": "Export guest menu print HTML",
        "description": "**Required API-key permission:** `GUEST_MENUS_READ` — Read guest menus (including drafts) and guest menu templates\n\nThe self-contained HTML document used for the PDF export (print preview & debugging).",
        "tags": [
          "Guest Menus / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published"
              ],
              "description": "Default draft."
            },
            "required": false,
            "description": "Default draft.",
            "name": "source",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
            },
            "required": false,
            "name": "locale",
            "in": "query"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/GuestMenuPrintPaper"
            },
            "required": false,
            "description": "A4, A5 or DL (99 × 210 mm).",
            "name": "paper",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "showQrCode",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Self-contained print HTML.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu (or published document) not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/export/pdf": {
      "post": {
        "summary": "Export guest menu as PDF",
        "description": "**Required API-key permission:** `GUEST_MENUS_READ` — Read guest menus (including drafts) and guest menu templates\n\nRenders the print output (print template, @page size per paper, inlined fonts/images, optional QR code to the public menu URL) via the Chromium PDF service.",
        "tags": [
          "Guest Menus / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestMenuPdfExportInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The generated PDF document.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu (or published document) not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PDF export service not configured/available.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/export/table-tent.pdf": {
      "get": {
        "summary": "Table tent QR card (PDF)",
        "description": "**Required API-key permission:** `GUEST_MENUS_READ` — Read guest menus (including drafts) and guest menu templates\n\nPrintable A6/A5 card with bar name/logo, localized \"Our menu\" text and a large QR code.",
        "tags": [
          "Guest Menus / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "bar",
                "menu"
              ],
              "description": "`bar` → /m/{bar} (always the active menu, default), `menu` → this menu."
            },
            "required": false,
            "description": "`bar` → /m/{bar} (always the active menu, default), `menu` → this menu.",
            "name": "target",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
              "description": "Language of the card texts."
            },
            "required": false,
            "description": "Language of the card texts.",
            "name": "locale",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "A6",
                "A5"
              ],
              "description": "Default A6."
            },
            "required": false,
            "description": "Default A6.",
            "name": "paper",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The generated PDF document.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu (or published document) not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PDF export service not configured/available.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/preview": {
      "get": {
        "summary": "Preview guest menu",
        "description": "**Required API-key permission:** `GUEST_MENUS_UPDATE` — Update guest menu drafts, schedules and templates\n\nResolved PublicMenuDto + rendered slots for the draft (default) or published document. Ignores the schedule. Image URLs carry the secret draft preview token, so this is restricted to MANAGER (API keys: GUEST_MENUS_UPDATE).",
        "tags": [
          "Guest Menus / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
            },
            "required": false,
            "name": "locale",
            "in": "query"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/GuestMenuOutput"
            },
            "required": false,
            "description": "Default web.",
            "name": "output",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published"
              ],
              "description": "Default draft."
            },
            "required": false,
            "description": "Default draft.",
            "name": "source",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Preview guest menu",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenuRendered"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu (or published document) not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/preview-token/regenerate": {
      "post": {
        "summary": "Regenerate draft preview token",
        "description": "**Required API-key permission:** `GUEST_MENUS_UPDATE` — Update guest menu drafts, schedules and templates\n\nReplaces `previewToken` with a new random token; all previously shared `?preview=` links stop working.",
        "tags": [
          "Guest Menus / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Regenerate draft preview token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenu"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/publish": {
      "post": {
        "summary": "Publish guest menu",
        "description": "**Required API-key permission:** `GUEST_MENUS_PUBLISH` — Publish and unpublish guest menus and set the public workspace slug\n\nValidates and test-renders all enabled outputs, then copies the draft to `published`.",
        "tags": [
          "Guest Menus / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_PUBLISH"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Publish guest menu",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenu"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The menu changed while publishing (CONFLICT) – publish again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Template validation failed (`error.issues`: GuestMenuPublishIssue[] with slot + line).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_PUBLISH"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/qr.svg": {
      "get": {
        "summary": "Guest menu QR code (SVG)",
        "description": "**Required API-key permission:** `GUEST_MENUS_READ` — Read guest menus (including drafts) and guest menu templates",
        "tags": [
          "Guest Menus / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "bar",
                "menu"
              ],
              "description": "`bar` → /m/{bar} (active menu), `menu` → /m/{bar}/{slug}. Default menu."
            },
            "required": false,
            "description": "`bar` → /m/{bar} (active menu), `menu` → /m/{bar}/{slug}. Default menu.",
            "name": "target",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10
            },
            "required": false,
            "name": "margin",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 32,
              "description": "Access code of a protected menu: the QR link gets `?code=…` (unlocks directly, e.g. for table QR codes). Must match the stored code (422 otherwise)."
            },
            "required": false,
            "description": "Access code of a protected menu: the QR link gets `?code=…` (unlocks directly, e.g. for table QR codes). Must match the stored code (422 otherwise).",
            "name": "code",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "QR code pointing to the public menu URL.",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "The access code does not match this menu.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/{menuId}/unpublish": {
      "post": {
        "summary": "Unpublish guest menu",
        "description": "**Required API-key permission:** `GUEST_MENUS_PUBLISH` — Publish and unpublish guest menus and set the public workspace slug\n\nRemoves the published snapshot; the draft is kept.",
        "tags": [
          "Guest Menus / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_PUBLISH"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "menuId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Unpublish guest menu",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenu"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Guest menu not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_PUBLISH"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/active/extras": {
      "get": {
        "summary": "Cocktails only on the active guest menu",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nCocktails shown on the currently active (published, scheduled) guest menu that are not on the given bartender card – for the \"only on guest menu\" group in the bartender view.",
        "tags": [
          "Guest Menus / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Bartender card currently shown."
            },
            "required": true,
            "description": "Bartender card currently shown.",
            "name": "cardId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Cocktails only on the active guest menu",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenuExtras"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/reorder": {
      "put": {
        "summary": "Reorder guest menu priorities",
        "description": "**Required API-key permission:** `GUEST_MENUS_UPDATE` — Update guest menu drafts, schedules and templates",
        "tags": [
          "Guest Menus / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestMenuReorderInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reorder guest menu priorities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GuestMenuSummary"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "A menu id is not a guest menu of this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/templates": {
      "get": {
        "summary": "List custom guest menu templates",
        "description": "**Required API-key permission:** `GUEST_MENUS_READ` — Read guest menus (including drafts) and guest menu templates",
        "tags": [
          "Guest Menus / Templates"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List custom guest menu templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GuestMenuTemplate"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_READ"
      },
      "post": {
        "summary": "Create custom guest menu template",
        "description": "**Required API-key permission:** `GUEST_MENUS_CREATE` — Create guest menus and guest menu templates",
        "tags": [
          "Guest Menus / Templates"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestMenuTemplateInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create custom guest menu template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenuTemplate"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Template validation failed (`error.issues`: GuestMenuPublishIssue[] with slot + line).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/templates/{templateId}": {
      "get": {
        "summary": "Get custom guest menu template",
        "description": "**Required API-key permission:** `GUEST_MENUS_READ` — Read guest menus (including drafts) and guest menu templates",
        "tags": [
          "Guest Menus / Templates"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "templateId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get custom guest menu template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenuTemplate"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_READ"
      },
      "put": {
        "summary": "Update custom guest menu template",
        "description": "**Required API-key permission:** `GUEST_MENUS_UPDATE` — Update guest menu drafts, schedules and templates\n\nPublished menus using it pick up the change immediately; syntax is validated first.",
        "tags": [
          "Guest Menus / Templates"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "templateId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestMenuTemplateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update custom guest menu template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestMenuTemplate"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Template validation failed (`error.issues`: GuestMenuPublishIssue[] with slot + line).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_UPDATE"
      },
      "delete": {
        "summary": "Delete custom guest menu template",
        "description": "**Required API-key permission:** `GUEST_MENUS_DELETE` — Delete guest menus and guest menu templates",
        "tags": [
          "Guest Menus / Templates"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "templateId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete custom guest menu template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Template is used by a guest menu.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/guest-menus/templates/built-in": {
      "get": {
        "summary": "List built-in guest menu templates",
        "description": "**Required API-key permission:** `GUEST_MENUS_READ` — Read guest menus (including drafts) and guest menu templates\n\nBuilt-in templates with metadata, Liquid slot sources and CSS, plus base CSS and partials (for forking in the builder).",
        "tags": [
          "Guest Menus / Templates"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "GUEST_MENUS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List built-in guest menu templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BuiltInGuestMenuTemplates"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "GUEST_MENUS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ice": {
      "get": {
        "summary": "List ice",
        "description": "**Required API-key permission:** `ICE_READ` — Read ice types\n\nList all ice of a workspace, optionally filtered by name.",
        "tags": [
          "Ice / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "ICE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Case-insensitive name filter."
            },
            "required": false,
            "description": "Case-insensitive name filter.",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List ice",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Ice"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "ICE_READ"
      },
      "post": {
        "summary": "Create ice",
        "description": "**Required API-key permission:** `ICE_CREATE` — Create ice types",
        "tags": [
          "Ice / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "ICE_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IceCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create ice",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Ice"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "ICE_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ice/{iceId}": {
      "get": {
        "summary": "Get ice",
        "description": "**Required API-key permission:** `ICE_READ` — Read ice types",
        "tags": [
          "Ice / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "ICE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "iceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get ice",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Ice"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ice not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "ICE_READ"
      },
      "put": {
        "summary": "Update ice",
        "description": "**Required API-key permission:** `ICE_UPDATE` — Update ice types",
        "tags": [
          "Ice / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "ICE_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "iceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IceUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update ice",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Ice"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ice not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "ICE_UPDATE"
      },
      "delete": {
        "summary": "Delete ice",
        "description": "**Required API-key permission:** `ICE_DELETE` — Delete ice types\n\nDeletes the ice; cocktails using it keep existing without ice.",
        "tags": [
          "Ice / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "ICE_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "iceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete ice",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Ice"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ice not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "ICE_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ingredients": {
      "get": {
        "summary": "List ingredients",
        "description": "**Required API-key permission:** `INGREDIENTS_READ` — Read ingredients\n\nList all ingredients of a workspace, optionally filtered by name or short name.",
        "tags": [
          "Ingredients / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 255,
              "description": "Case-insensitive name/short-name filter."
            },
            "required": false,
            "description": "Case-insensitive name/short-name filter.",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List ingredients",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Ingredient"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_READ"
      },
      "post": {
        "summary": "Create ingredient",
        "description": "**Required API-key permission:** `INGREDIENTS_CREATE` — Create ingredients",
        "tags": [
          "Ingredients / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngredientCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create ingredient",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Ingredient"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ingredients/{ingredientId}": {
      "get": {
        "summary": "Get ingredient",
        "description": "**Required API-key permission:** `INGREDIENTS_READ` — Read ingredients",
        "tags": [
          "Ingredients / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "ingredientId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get ingredient",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Ingredient"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ingredient not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_READ"
      },
      "put": {
        "summary": "Update ingredient",
        "description": "**Required API-key permission:** `INGREDIENTS_UPDATE` — Update ingredients",
        "tags": [
          "Ingredients / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "ingredientId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngredientUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update ingredient",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Ingredient"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_UPDATE"
      },
      "delete": {
        "summary": "Delete ingredient",
        "description": "**Required API-key permission:** `INGREDIENTS_DELETE` — Delete ingredients",
        "tags": [
          "Ingredients / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "ingredientId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete ingredient",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Ingredient is still referenced by cocktails and cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ingredients/{ingredientId}/clone": {
      "post": {
        "summary": "Clone ingredient",
        "description": "**Required API-key permission:** `INGREDIENTS_CREATE` — Create ingredients\n\nCreates a copy of an ingredient (including its image and unit volumes) under a new name.",
        "tags": [
          "Ingredients / Lifecycle"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "ingredientId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngredientCloneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Clone ingredient",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Ingredient"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Ingredient not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ingredients/{ingredientId}/image": {
      "get": {
        "summary": "Get ingredient image",
        "description": "**Required API-key permission:** `INGREDIENTS_READ` — Read ingredients\n\nReturns the ingredient image bytes (the `imageUrl` target). 404 when the ingredient has no image.",
        "tags": [
          "Ingredients / Media"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "ingredientId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The ingredient image bytes.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The ingredient has no image.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ingredients/{ingredientId}/references": {
      "get": {
        "summary": "List ingredient references",
        "description": "**Required API-key permission:** `INGREDIENTS_READ` — Read ingredients\n\nLists the cocktails that reference this ingredient.",
        "tags": [
          "Ingredients / References"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "required": true,
            "name": "ingredientId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List ingredient references",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IngredientReference"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ingredients/check": {
      "get": {
        "summary": "Find similar ingredient",
        "description": "**Required API-key permission:** `INGREDIENTS_READ` — Read ingredients\n\nReturns the most similar existing ingredient by name or link, or null.",
        "tags": [
          "Ingredients / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 255,
              "description": "Name to check for a similar existing ingredient (min. 3 chars)."
            },
            "required": false,
            "description": "Name to check for a similar existing ingredient (min. 3 chars).",
            "name": "name",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "description": "Link to check for a similar existing ingredient."
            },
            "required": false,
            "description": "Link to check for a similar existing ingredient.",
            "name": "link",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Find similar ingredient",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Ingredient"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ingredients/export/json": {
      "post": {
        "summary": "Export ingredients as JSON",
        "description": "**Required API-key permission:** `INGREDIENTS_READ` — Read ingredients\n\nExports the selected ingredients (with their unit volumes and units) in the portable JSON export format. A single ingredient yields one export object; multiple ingredients yield an array. This payload is the exact input accepted by the import endpoint.",
        "tags": [
          "Ingredients / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngredientExportInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Export ingredients as JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Legacy ingredient export structure (single object or array). Round-trips with the import endpoint."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/ingredients/import/json": {
      "post": {
        "summary": "Import ingredients from JSON",
        "description": "**Required API-key permission:** `INGREDIENTS_CREATE` — Create ingredients\n\nImports ingredients from the portable JSON export format via a three-phase flow (validate / prepare-mapping / execute). Consumes exactly what the export endpoint produces; missing units are recreated by name. `execute` is all-or-nothing: if any item or referenced ingredient is invalid nothing is written (400 with per-item issues), and all writes run in one transaction.",
        "tags": [
          "Ingredients / Import & export"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "INGREDIENTS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IngredientImportInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import ingredients from JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "Phase-dependent legacy import result (validation summary, mapping proposal or execution results)."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or import items; nothing was imported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "INGREDIENTS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/join-codes": {
      "get": {
        "summary": "List join codes",
        "description": "**Required API-key permission:** `USERS_READ` — Read workspace members",
        "tags": [
          "Workspace / Join codes"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "USERS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List join codes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/JoinCode"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "USERS_READ"
      },
      "post": {
        "summary": "Create join code",
        "description": "**Required API-key permission:** `USERS_UPDATE` — Update member roles",
        "tags": [
          "Workspace / Join codes"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "USERS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JoinCodeCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create join code",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/JoinCode"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The join code is already used (`CODE_TAKEN`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "USERS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/join-codes/{code}": {
      "delete": {
        "summary": "Delete join code",
        "description": "**Required API-key permission:** `USERS_UPDATE` — Update member roles",
        "tags": [
          "Workspace / Join codes"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "USERS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "required": true,
            "name": "code",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete join code",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Join code not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "USERS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/join-requests": {
      "get": {
        "summary": "List join requests",
        "description": "**Required API-key permission:** `USERS_READ` — Read workspace members",
        "tags": [
          "Workspace / Membership"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "USERS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List join requests",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/JoinRequest"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "USERS_READ"
      },
      "delete": {
        "summary": "Withdraw own join request",
        "description": "**Authentication:** requires a logged-in workspace-member session. API keys (workspace or the instance master key) are NOT accepted for this operation.\n\nWithdraws the calling user's own pending join request. The caller does not need to be a member (applicants are not). Session-only — API keys are not accepted.",
        "tags": [
          "Workspace / Membership"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Withdraw own join request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No pending join request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspaceId}/join-requests/{userId}/accept": {
      "post": {
        "summary": "Accept join request",
        "description": "**Required API-key permission:** `USERS_UPDATE` — Update member roles\n\nAccepts a pending join request: adds the user as a member (role USER) and notifies them.",
        "tags": [
          "Workspace / Membership"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "USERS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "required": true,
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Accept join request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/JoinRequestActionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No pending join request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "USERS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/join-requests/{userId}/reject": {
      "post": {
        "summary": "Reject join request",
        "description": "**Required API-key permission:** `USERS_UPDATE` — Update member roles\n\nRejects (deletes) a pending join request and notifies the user.",
        "tags": [
          "Workspace / Membership"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "USERS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "required": true,
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Reject join request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/JoinRequestActionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No pending join request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "USERS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/leave": {
      "post": {
        "summary": "Leave workspace",
        "description": "**Authentication:** requires a logged-in workspace-member session. API keys (workspace or the instance master key) are NOT accepted for this operation.\n\nRemoves the calling user from the workspace. Session-only — API keys are not accepted. The last owner cannot leave.",
        "tags": [
          "Workspace / Membership"
        ],
        "security": [
          {
            "SessionCookieAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Leave workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LeaveResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The caller is the last owner of the workspace (`LAST_OWNER`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspaceId}/onboarding": {
      "get": {
        "summary": "Get setup state and checklist",
        "description": "**Required API-key permission:** `WORKSPACE_READ` — Read workspace settings and audit logs\n\nSetup state of the workspace and the checklist computed from its data.",
        "tags": [
          "Onboarding / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get setup state and checklist",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Onboarding"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/onboarding/checklist/{itemId}": {
      "put": {
        "summary": "Mark checklist item as done",
        "description": "**Required API-key permission:** `WORKSPACE_UPDATE` — Update workspace settings\n\nMarks a checklist item as done without doing it (`skipped: true`, e.g. a bar that does not want a guest menu) or reverts that. Applies to the whole workspace; idempotent. Stored in the workspace setting `onboardingChecklistSkipped`.",
        "tags": [
          "Onboarding / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/OnboardingChecklistItemId"
            },
            "required": true,
            "description": "`glasses`/`ingredients`/`cocktails`/`cards`: at least one exists, `prices`: every active cocktail has a price, `guestInfo`: guest information of all ingredients and garnishes is confirmed, `team`: more than one member or a join code, `guestMenu`: a published, enabled guest menu.",
            "name": "itemId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OnboardingChecklistItemUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Mark checklist item as done",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Onboarding"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/onboarding/complete": {
      "post": {
        "summary": "Complete setup",
        "description": "**Required API-key permission:** `WORKSPACE_UPDATE` — Update workspace settings\n\nMarks the setup assistant as completed (idempotent: keeps the first completion time).",
        "tags": [
          "Onboarding / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Complete setup",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Onboarding"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/queue": {
      "get": {
        "summary": "List queue",
        "description": "**Required API-key permission:** `QUEUE_READ` — Read the cocktail queue\n\nList all cocktail queue items of a workspace.",
        "tags": [
          "Queue / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "QUEUE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List queue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QueueItem"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "QUEUE_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/queue/{queueItemId}": {
      "put": {
        "summary": "Update queue item",
        "description": "**Required API-key permission:** `QUEUE_UPDATE` — Update queue items\n\nUpdate the in-progress state of a queue item.",
        "tags": [
          "Queue / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "QUEUE_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "queueItemId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueueUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update queue item",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/QueueItem"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Queue item not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "QUEUE_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/queue/add": {
      "post": {
        "summary": "Add to queue",
        "description": "**Required API-key permission:** `QUEUE_CREATE` — Add cocktails to the queue\n\nEnqueue one or more identical cocktail queue items.",
        "tags": [
          "Queue / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "QUEUE_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueueAddInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Add to queue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QueueItem"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The cocktail does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "QUEUE_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/queue/remove": {
      "post": {
        "summary": "Remove from queue",
        "description": "**Required API-key permission:** `QUEUE_DELETE` — Remove cocktails from the queue\n\nAtomically remove the oldest queue item matching the given cocktail and notes (concurrent calls each remove a different item).",
        "tags": [
          "Queue / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "QUEUE_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueueRemoveInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Remove from queue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/QueueItem"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "No matching cocktail in queue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "QUEUE_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/settings": {
      "get": {
        "summary": "Get workspace settings",
        "description": "**Required API-key permission:** `WORKSPACE_READ` — Read workspace settings and audit logs\n\nGet all workspace settings as a key→value map.",
        "tags": [
          "Workspace / Settings"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get workspace settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkspaceSettings"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_READ"
      },
      "put": {
        "summary": "Update workspace setting",
        "description": "**Required API-key permission:** `WORKSPACE_UPDATE` — Update workspace settings\n\nUpsert a single scalar workspace setting and return the full settings map. The `translations` key is rejected — use GET/PUT /translations instead.",
        "tags": [
          "Workspace / Settings"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceSettingUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update workspace setting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkspaceSettings"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Setting key `translations` must be managed via /translations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/cocktails": {
      "get": {
        "summary": "Advanced cocktail ranking",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nRanks cocktails by order count for the given date range, with share/delta vs. the previous equal-length period and each cocktail’s ingredient breakdown. Emits a `{ data, total }` envelope (not the standard `{ data }`). Requires startDate and endDate.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive start date (interpreted with the workspace day-start-time setting).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive end date (interpreted with the workspace day-start-time setting).",
            "name": "endDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Advanced cocktail ranking",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsCocktailRanking"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "startDate and endDate are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/cocktails/{cocktailId}": {
      "get": {
        "summary": "Advanced single-cocktail analytics",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nDeep-dive analytics for one cocktail: totals, rank, deltas, revenue, time series and hour/day distributions. Emits a `{ data }` envelope. Uses the cocktail’s full order history when no date range is given.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive start date (interpreted with the workspace day-start-time setting).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive end date (interpreted with the workspace day-start-time setting).",
            "name": "endDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Advanced single-cocktail analytics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsCocktailDetail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/cocktails/{cocktailId}/orders": {
      "get": {
        "summary": "Paginated order log for a cocktail",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nNewest-first, searchable, paginated list of individual orders (statistic entries) for one cocktail. Search filters over formatted date/weekday, user and card. Emits a `{ data, pagination }` envelope with the legacy pagination block.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cocktailId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (day-start-time aware)."
            },
            "required": false,
            "description": "Inclusive start date (day-start-time aware).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (day-start-time aware)."
            },
            "required": false,
            "description": "Inclusive end date (day-start-time aware).",
            "name": "endDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Case-insensitive filter over formatted date, weekday, user (name/email) and card name."
            },
            "required": false,
            "description": "Case-insensitive filter over formatted date, weekday, user (name/email) and card name.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "1-based page number (default 1)."
            },
            "required": false,
            "description": "1-based page number (default 1).",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50,
              "description": "Items per page (default 50, at most 200)."
            },
            "required": false,
            "description": "Items per page (default 50, at most 200).",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated order log for a cocktail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsCocktailOrders"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/cocktails/all": {
      "get": {
        "summary": "All cocktails with order counts",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nLists every cocktail in the workspace (name-ordered) with its order count for the given range; cocktails without orders are included with count 0. Order counts are only computed when both startDate and endDate are supplied. Emits a `{ data, total }` envelope.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive start date (interpreted with the workspace day-start-time setting).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive end date (interpreted with the workspace day-start-time setting).",
            "name": "endDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "All cocktails with order counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsCocktailAll"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/compare": {
      "get": {
        "summary": "Compare an ad-hoc tag/ingredient set",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nComputes KPIs, matching cocktails and a cross-aggregate for an ad-hoc tag or ingredient set (with AND/OR logic). Emits a `{ data }` envelope. Uses all-time when no date range is given.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "TAG_SET",
                "INGREDIENT_SET"
              ],
              "description": "What the items represent."
            },
            "required": true,
            "description": "What the items represent.",
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 51800,
              "description": "JSON-encoded array of tag/ingredient names (a bare string is treated as a single item); at most 200 names."
            },
            "required": true,
            "description": "JSON-encoded array of tag/ingredient names (a bare string is treated as a single item); at most 200 names.",
            "name": "items",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "AND",
                "OR"
              ],
              "description": "Match logic across items (default AND)."
            },
            "required": false,
            "description": "Match logic across items (default AND).",
            "name": "logic",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (day-start-time aware); all-time when omitted."
            },
            "required": false,
            "description": "Inclusive start date (day-start-time aware); all-time when omitted.",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (day-start-time aware); all-time when omitted."
            },
            "required": false,
            "description": "Inclusive end date (day-start-time aware); all-time when omitted.",
            "name": "endDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Compare an ad-hoc tag/ingredient set",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsCompare"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "type and items are required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/ingredients": {
      "get": {
        "summary": "Ingredient usage statistics",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nLists every ingredient with its order-usage count, the number of distinct cocktails using it, and its share of period orders. Counts are only computed when both startDate and endDate are supplied. Emits a `{ data, total }` envelope.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive start date (interpreted with the workspace day-start-time setting).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive end date (interpreted with the workspace day-start-time setting).",
            "name": "endDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Ingredient usage statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsIngredients"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/overview": {
      "get": {
        "summary": "Advanced statistics overview",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nDashboard-style overview with per-period KPIs (today/week/month, a custom selected range, average-per-hour and all-time) plus their chart data. Defaults the selected range to the last 7 days when startDate/endDate are omitted.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive start date (interpreted with the workspace day-start-time setting).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive end date (interpreted with the workspace day-start-time setting).",
            "name": "endDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Advanced statistics overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsOverview"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/sets": {
      "get": {
        "summary": "List saved statistics sets",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nLists saved statistics sets of a workspace (newest first), optionally filtered by type/types. Emits a `{ data }` envelope.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "TAG_SET",
                "INGREDIENT_SET",
                "COCKTAIL_SET"
              ],
              "description": "Filter by a single SavedSetType."
            },
            "required": false,
            "description": "Filter by a single SavedSetType.",
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Comma-separated list of SavedSetTypes to filter by (ignored when `type` is set)."
            },
            "required": false,
            "description": "Comma-separated list of SavedSetTypes to filter by (ignored when `type` is set).",
            "name": "types",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List saved statistics sets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AdvancedStatisticsSavedSet"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      },
      "post": {
        "summary": "Create a saved statistics set",
        "description": "**Required API-key permission:** `STATISTICS_CREATE` — Record sales statistics",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdvancedStatisticsSavedSetCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create a saved statistics set",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsSavedSet"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields, invalid type/logic, or a cocktail that does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_CREATE"
      },
      "put": {
        "summary": "Update a saved statistics set",
        "description": "**Required API-key permission:** `STATISTICS_CREATE` — Record sales statistics",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdvancedStatisticsSavedSetUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update a saved statistics set",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsSavedSet"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "id is required, or a cocktail that does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Set not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_CREATE"
      },
      "delete": {
        "summary": "Delete a saved statistics set",
        "description": "**Required API-key permission:** `STATISTICS_DELETE` — Delete statistics entries",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "Id of the set to delete."
            },
            "required": true,
            "description": "Id of the set to delete.",
            "name": "id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete a saved statistics set",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "id is required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Set not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/sets/{setId}": {
      "get": {
        "summary": "Analytics for a saved set",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nResolves a saved set to its matching cocktails and computes KPIs, per-cocktail counts and a cross-aggregate. Emits a `{ data }` envelope. Uses all-time when no date range is given.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "setId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive start date (interpreted with the workspace day-start-time setting).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive end date (interpreted with the workspace day-start-time setting).",
            "name": "endDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Analytics for a saved set",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsSetDetail"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Set not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/advanced/tags": {
      "get": {
        "summary": "Tag usage statistics",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nLists every tag with its order-usage count, the number of distinct cocktails carrying it, and its share of period orders. Counts are only computed when both startDate and endDate are supplied. Emits a `{ data, total }` envelope.",
        "tags": [
          "Statistics / Advanced"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive start date (interpreted with the workspace day-start-time setting).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive end date (interpreted with the workspace day-start-time setting).",
            "name": "endDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag usage statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AdvancedStatisticsTags"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/cocktails": {
      "get": {
        "summary": "List cocktail statistics",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nList cocktail-statistic entries of a workspace, optionally filtered by a date range (day-start-time aware).",
        "tags": [
          "Statistics / Logging"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive start date (interpreted with the workspace day-start-time setting).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive end date (interpreted with the workspace day-start-time setting).",
            "name": "endDate",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List cocktail statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CocktailStatisticItem"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/cocktails/{cocktailStatisticId}": {
      "delete": {
        "summary": "Delete a cocktail statistic",
        "description": "**Required API-key permission:** `STATISTICS_DELETE` — Delete statistics entries",
        "tags": [
          "Statistics / Logging"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cocktailStatisticId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete a cocktail statistic",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail statistic not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/cocktails/add": {
      "post": {
        "summary": "Log a cocktail statistic",
        "description": "**Required API-key permission:** `STATISTICS_CREATE` — Record sales statistics\n\nRecords that a cocktail was made and reconciles the cocktail queue. Returns 400 when the queue contains ambiguous entries that require the caller to choose which one to remove.",
        "tags": [
          "Statistics / Logging"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CocktailStatisticCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Log a cocktail statistic",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CocktailStatisticItem"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Ambiguous cocktail-queue entries (specify a note to remove one), or the cocktail/card does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/logs": {
      "get": {
        "summary": "List statistic logs",
        "description": "**Required API-key permission:** `STATISTICS_READ` — Read sales statistics\n\nList cocktail-statistic entries of a workspace, newest first, filtered by date range and/or name search. Paginated: the response is a `{ data, pagination }` envelope (not a bare array); `data` holds the `CocktailStatisticItem[]` page.",
        "tags": [
          "Statistics / Logging"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive start date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive start date (interpreted with the workspace day-start-time setting).",
            "name": "startDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "Inclusive end date (interpreted with the workspace day-start-time setting)."
            },
            "required": false,
            "description": "Inclusive end date (interpreted with the workspace day-start-time setting).",
            "name": "endDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Case-insensitive filter over cocktail, card and user name."
            },
            "required": false,
            "description": "Case-insensitive filter over cocktail, card and user name.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "1-based page number."
            },
            "required": false,
            "description": "1-based page number.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50,
              "description": "Items per page (at most 200)."
            },
            "required": false,
            "description": "Items per page (at most 200).",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List statistic logs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CocktailStatisticItem"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/statistics/logs/{cocktailStatisticId}": {
      "delete": {
        "summary": "Delete a statistic log",
        "description": "**Required API-key permission:** `STATISTICS_DELETE` — Delete statistics entries",
        "tags": [
          "Statistics / Logging"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "STATISTICS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "cocktailStatisticId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete a statistic log",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cocktail statistic not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "STATISTICS_DELETE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/tags": {
      "get": {
        "summary": "List tags",
        "description": "**Required API-key permission:** `COCKTAILS_READ` — Read cocktail recipes\n\nList all distinct tags used across cocktails and ingredients of a workspace.",
        "tags": [
          "Tags / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List tags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Tags"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/tags/categories": {
      "get": {
        "summary": "List tag categories",
        "description": "**Required API-key permission:** `TAGS_READ` — Read tag definitions and tag categories\n\nList the tag categories of a workspace, ordered by `order`.",
        "tags": [
          "Tags / Metadata"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TAGS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List tag categories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TagCategory"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TAGS_READ"
      },
      "post": {
        "summary": "Create tag category",
        "description": "**Required API-key permission:** `TAGS_UPDATE` — Create, update, and delete tag definitions and tag categories",
        "tags": [
          "Tags / Metadata"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TAGS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagCategoryCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create tag category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TagCategory"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TAGS_UPDATE"
      },
      "put": {
        "summary": "Bulk upsert tag categories",
        "description": "**Required API-key permission:** `TAGS_UPDATE` — Create, update, and delete tag definitions and tag categories\n\nCreates or updates the given categories (e.g. after reordering) and returns the full list.",
        "tags": [
          "Tags / Metadata"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TAGS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagCategoriesBulkUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk upsert tag categories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TagCategory"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REFERENCE: a category id does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TAGS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/tags/categories/{categoryId}": {
      "put": {
        "summary": "Update tag category",
        "description": "**Required API-key permission:** `TAGS_UPDATE` — Create, update, and delete tag definitions and tag categories",
        "tags": [
          "Tags / Metadata"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TAGS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "categoryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagCategoryUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update tag category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TagCategory"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Category not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TAGS_UPDATE"
      },
      "delete": {
        "summary": "Delete tag category",
        "description": "**Required API-key permission:** `TAGS_UPDATE` — Create, update, and delete tag definitions and tag categories\n\nDeletes the category; assigned tag definitions keep existing without a category.",
        "tags": [
          "Tags / Metadata"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TAGS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "categoryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete tag category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Category not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TAGS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/tags/categories/defaults": {
      "post": {
        "summary": "Create default tag categories",
        "description": "**Required API-key permission:** `TAGS_UPDATE` — Create, update, and delete tag definitions and tag categories\n\nCreates the default categories (Flavor, Spirit, Style, Properties, Season) that do not exist yet and returns the full list.",
        "tags": [
          "Tags / Metadata"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TAGS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Create default tag categories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TagCategory"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TAGS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/tags/definitions": {
      "get": {
        "summary": "List tag definitions",
        "description": "**Required API-key permission:** `TAGS_READ` — Read tag definitions and tag categories\n\nLists every tag that is in use or has a stored definition, with usage counts. Tags without a definition use the defaults (no label/category/color, public).",
        "tags": [
          "Tags / Metadata"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TAGS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List tag definitions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TagDefinition"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TAGS_READ"
      },
      "put": {
        "summary": "Bulk upsert tag definitions",
        "description": "**Required API-key permission:** `TAGS_UPDATE` — Create, update, and delete tag definitions and tag categories\n\nCreates or updates tag definitions keyed by tag and returns the full list.",
        "tags": [
          "Tags / Metadata"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TAGS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagDefinitionsBulkUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk upsert tag definitions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TagDefinition"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REFERENCE: a category id does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TAGS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/templates/{key}/apply": {
      "post": {
        "summary": "Apply template",
        "description": "**Required API-key permission:** `COCKTAILS_CREATE` — Create cocktail recipes\n\nImports a published template (all, basics or a selection) in one transaction. Items with a name that already exists in the workspace (any language) are linked instead of created; catalog templates come without prices and with unconfirmed guest information. Guest menus of the template (with `all`, or built on a selected card) are enabled, published and default only when the workspace has no guest menu yet; otherwise they are created disabled and unpublished. API keys additionally need `INGREDIENTS_CREATE`, `GLASSES_CREATE`, `GARNISHES_CREATE` and `CARDS_CREATE`.",
        "tags": [
          "Templates / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "COCKTAILS_CREATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "description": "Template key",
              "example": "all-time-classics"
            },
            "required": true,
            "description": "Template key",
            "name": "key",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateApplyInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Apply template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TemplateApplyResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid selection (`INVALID_SELECTION`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found or not published.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "COCKTAILS_CREATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/translations": {
      "get": {
        "summary": "Get translations",
        "description": "**Required API-key permission:** `WORKSPACE_READ` — Read workspace settings and audit logs\n\nReturn the workspace display-name translation catalog as a parsed object.",
        "tags": [
          "Workspace / Settings"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get translations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Translations"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_READ"
      },
      "put": {
        "summary": "Upsert a translation",
        "description": "**Required API-key permission:** `WORKSPACE_UPDATE` — Update workspace settings\n\nMerges display-name translations for a key into the workspace translation catalog.",
        "tags": [
          "Workspace / Settings"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "WORKSPACE_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TranslationUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upsert a translation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TranslationUpdateResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "WORKSPACE_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/translations/content": {
      "get": {
        "summary": "List content translations",
        "description": "**Required API-key permission:** `TRANSLATIONS_READ` — Read content translations (cocktails, ingredients, garnishes, glasses)\n\nReturns one row per entity, translatable field and locale with the primary-language source value and the translation. Rows without source and translation are omitted. Internal notes are never translatable.",
        "tags": [
          "Translations / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TRANSLATIONS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 35,
              "example": "en",
              "description": "Target locale. Defaults to all additional content locales of the workspace."
            },
            "required": false,
            "description": "Target locale. Defaults to all additional content locales of the workspace.",
            "name": "locale",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "cocktail",
                "ingredient",
                "garnish",
                "glass"
              ],
              "description": "Only rows of this entity type."
            },
            "required": false,
            "description": "Only rows of this entity type.",
            "name": "entity",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Only rows of this entity (requires `entity`)."
            },
            "required": false,
            "description": "Only rows of this entity (requires `entity`).",
            "name": "entityId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "Only rows whose translation is missing (source present, value empty)."
            },
            "required": false,
            "description": "Only rows whose translation is missing (source present, value empty).",
            "name": "missingOnly",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List content translations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ContentTranslations"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The requested locale is the primary content language.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TRANSLATIONS_READ"
      },
      "put": {
        "summary": "Bulk upsert content translations",
        "description": "**Required API-key permission:** `TRANSLATIONS_UPDATE` — Update content translations (cocktails, ingredients, garnishes, glasses)\n\nWrites translated values per entity, field and locale in one transaction. Empty values clear a translation. Items of entities that do not exist in this workspace are skipped (counted in `skipped`).",
        "tags": [
          "Translations / Content"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "TRANSLATIONS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContentTranslationsUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk upsert content translations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ContentTranslationsUpdateResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A locale equals the primary content language.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "TRANSLATIONS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/units": {
      "get": {
        "summary": "List units",
        "description": "**Required API-key permission:** `UNITS_READ` — Read units and unit conversions\n\nList all units of a workspace, optionally filtered by name.",
        "tags": [
          "Units / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "UNITS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Case-insensitive name filter."
            },
            "required": false,
            "description": "Case-insensitive name filter.",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List units",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Unit"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "UNITS_READ"
      },
      "post": {
        "summary": "Create unit",
        "description": "**Required API-key permission:** `UNITS_UPDATE` — Create, update, and delete units and unit conversions",
        "tags": [
          "Units / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "UNITS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create unit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Unit"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "UNITS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/units/{unitId}": {
      "delete": {
        "summary": "Delete unit",
        "description": "**Required API-key permission:** `UNITS_UPDATE` — Create, update, and delete units and unit conversions\n\nDeletes a unit that no cocktail uses (ingredient volumes in this unit are removed) and regenerates the derived conversions.",
        "tags": [
          "Units / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "UNITS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "unitId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete unit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Unit"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unit not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "UNIT_IN_USE: the unit is still used in cocktail recipes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "UNITS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/units/conversions": {
      "get": {
        "summary": "List unit conversions",
        "description": "**Required API-key permission:** `UNITS_READ` — Read units and unit conversions\n\nList all unit conversions of a workspace.",
        "tags": [
          "Units / Conversions"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "UNITS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List unit conversions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnitConversion"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "UNITS_READ"
      },
      "post": {
        "summary": "Create unit conversion",
        "description": "**Required API-key permission:** `UNITS_UPDATE` — Create, update, and delete units and unit conversions\n\nCreate a unit conversion (plus its inverse) and regenerate all derived conversions.",
        "tags": [
          "Units / Conversions"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "UNITS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitConversionCreateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create unit conversion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/UnitConversion"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REFERENCE: a unit does not exist in this workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "UNIT_CONVERSION_EXISTS: a manual conversion between these units already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "UNITS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/units/conversions/{unitConversionId}": {
      "put": {
        "summary": "Update unit conversion",
        "description": "**Required API-key permission:** `UNITS_UPDATE` — Create, update, and delete units and unit conversions\n\nUpdate a conversion factor and regenerate all derived conversions.",
        "tags": [
          "Units / Conversions"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "UNITS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "unitConversionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitConversionUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update unit conversion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UnitConversion"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unit conversion not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "AUTO_GENERATED_CONVERSION: derived conversions cannot be changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "UNITS_UPDATE"
      },
      "delete": {
        "summary": "Delete unit conversion",
        "description": "**Required API-key permission:** `UNITS_UPDATE` — Create, update, and delete units and unit conversions\n\nDelete a conversion and regenerate all derived conversions.",
        "tags": [
          "Units / Conversions"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "UNITS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "unitConversionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete unit conversion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/UnitConversion"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unit conversion not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "AUTO_GENERATED_CONVERSION: derived conversions cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "UNITS_UPDATE"
      }
    },
    "/api/v1/workspaces/{workspaceId}/users": {
      "get": {
        "summary": "List workspace users",
        "description": "**Required API-key permission:** `USERS_READ` — Read workspace members\n\nList all users (memberships) of a workspace.",
        "tags": [
          "Workspace Users / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "USERS_READ"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List workspace users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkspaceUser"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "USERS_READ"
      }
    },
    "/api/v1/workspaces/{workspaceId}/users/{userId}": {
      "put": {
        "summary": "Update workspace user role",
        "description": "**Required API-key permission:** `USERS_UPDATE` — Update member roles\n\nChanges the role of a member. Granting `OWNER` or changing the role of an owner requires an owner session (or the instance master key); workspace API keys never may. The last owner cannot be demoted.",
        "tags": [
          "Workspace Users / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "USERS_UPDATE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "required": true,
            "name": "userId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceUserUpdateInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update workspace user role",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkspaceUser"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "A user cannot change their own role, or the owner role is granted/revoked without owner rights (`OWNER_REQUIRED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace user not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The last owner cannot be demoted (`LAST_OWNER`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "USERS_UPDATE"
      },
      "delete": {
        "summary": "Remove workspace user",
        "description": "**Required API-key permission:** `USERS_DELETE` — Remove members from the workspace\n\nRemoves a member. Removing an owner requires an owner session (or the instance master key); workspace API keys never may. The last owner cannot be removed.",
        "tags": [
          "Workspace Users / Core"
        ],
        "security": [
          {
            "WorkspaceApiKeyAuth": [
              "USERS_DELETE"
            ]
          },
          {
            "InstanceApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Workspace ID",
              "example": "ckw0a1b2c3d4e5f6g7h8"
            },
            "required": true,
            "description": "Workspace ID",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "required": true,
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Remove workspace user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DeletionResult"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "A user cannot remove themselves, or an owner is removed without owner rights (`OWNER_REQUIRED`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace user not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The last owner cannot be removed (`LAST_OWNER`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-required-permission": "USERS_DELETE"
      }
    }
  },
  "webhooks": {},
  "tags": [
    {
      "name": "Workspace / Core",
      "description": "Workspace identity and lifecycle.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Workspace / Settings",
      "description": "Workspace settings and translations.",
      "x-displayName": "Settings",
      "x-position": 2
    },
    {
      "name": "Workspace / API keys",
      "description": "Create, list and revoke workspace API keys.",
      "x-displayName": "API keys",
      "x-position": 3
    },
    {
      "name": "Workspace / Join codes",
      "description": "Invite codes for joining a workspace.",
      "x-displayName": "Join codes",
      "x-position": 4
    },
    {
      "name": "Workspace / Membership",
      "description": "Join requests and leaving a workspace.",
      "x-displayName": "Membership",
      "x-position": 5
    },
    {
      "name": "Workspace Users / Core",
      "description": "Workspace member list and roles.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Audit Logs / Core",
      "description": "Audit log entries.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Cocktails / Core",
      "description": "List, create, read, update and delete cocktail recipes.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Cocktails / Step actions",
      "description": "Cocktail-recipe step actions (SHAKE, STIR, …).",
      "x-displayName": "Step actions",
      "x-position": 2
    },
    {
      "name": "Cocktails / Lifecycle",
      "description": "Clone, archive and unarchive cocktails.",
      "x-displayName": "Lifecycle",
      "x-position": 3
    },
    {
      "name": "Cocktails / Import & export",
      "description": "JSON/PDF export and JSON import for cocktails.",
      "x-displayName": "Import & export",
      "x-position": 4
    },
    {
      "name": "Cocktails / Media",
      "description": "Cocktail image bytes.",
      "x-displayName": "Media",
      "x-position": 5
    },
    {
      "name": "Ingredients / Core",
      "description": "List, create, read, update and delete ingredients.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Ingredients / Lifecycle",
      "description": "Clone ingredients.",
      "x-displayName": "Lifecycle",
      "x-position": 2
    },
    {
      "name": "Ingredients / Import & export",
      "description": "JSON export and import for ingredients.",
      "x-displayName": "Import & export",
      "x-position": 3
    },
    {
      "name": "Ingredients / Media",
      "description": "Ingredient image bytes.",
      "x-displayName": "Media",
      "x-position": 4
    },
    {
      "name": "Ingredients / References",
      "description": "Cocktails that reference an ingredient.",
      "x-displayName": "References",
      "x-position": 5
    },
    {
      "name": "Garnishes / Core",
      "description": "List, create, read, update and delete garnishes.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Garnishes / Lifecycle",
      "description": "Clone garnishes.",
      "x-displayName": "Lifecycle",
      "x-position": 2
    },
    {
      "name": "Garnishes / Import & export",
      "description": "JSON export and import for garnishes.",
      "x-displayName": "Import & export",
      "x-position": 3
    },
    {
      "name": "Garnishes / Media",
      "description": "Garnish image bytes.",
      "x-displayName": "Media",
      "x-position": 4
    },
    {
      "name": "Guest Info / Core",
      "description": "Allergens, additives and alcohol content for guests.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Glasses / Core",
      "description": "List, create, read, update and delete glasses.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Glasses / Lifecycle",
      "description": "Clone glasses.",
      "x-displayName": "Lifecycle",
      "x-position": 2
    },
    {
      "name": "Glasses / Import & export",
      "description": "JSON export and import for glasses.",
      "x-displayName": "Import & export",
      "x-position": 3
    },
    {
      "name": "Glasses / Media",
      "description": "Glass image bytes.",
      "x-displayName": "Media",
      "x-position": 4
    },
    {
      "name": "Glasses / References",
      "description": "Cocktails that reference a glass.",
      "x-displayName": "References",
      "x-position": 5
    },
    {
      "name": "Ice / Core",
      "description": "List, create, read, update and delete ice types.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Tags / Core",
      "description": "List cocktail tags.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Tags / Metadata",
      "description": "Tag definitions (labels, colors, visibility) and tag categories.",
      "x-displayName": "Metadata",
      "x-position": 2
    },
    {
      "name": "Translations / Content",
      "description": "Translations of cocktail, ingredient, garnish and glass content.",
      "x-displayName": "Content",
      "x-position": 1
    },
    {
      "name": "Units / Core",
      "description": "List, create and delete measurement units.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Units / Conversions",
      "description": "Unit conversion factors.",
      "x-displayName": "Conversions",
      "x-position": 2
    },
    {
      "name": "Cards / Core",
      "description": "List, create, read, update and delete cocktail cards.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Cards / Lifecycle",
      "description": "Clone, archive and unarchive cards.",
      "x-displayName": "Lifecycle",
      "x-position": 2
    },
    {
      "name": "Guest Menus / Core",
      "description": "Guest menus: list, create, meta data, schedule, priorities.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Guest Menus / Content",
      "description": "Draft document, publishing, preview and QR codes.",
      "x-displayName": "Content",
      "x-position": 2
    },
    {
      "name": "Guest Menus / Templates",
      "description": "Built-in and custom Liquid templates.",
      "x-displayName": "Templates",
      "x-position": 3
    },
    {
      "name": "Calculations / Core",
      "description": "Price calculations CRUD.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Calculations / Groups",
      "description": "Calculation groups and assignments.",
      "x-displayName": "Groups",
      "x-position": 2
    },
    {
      "name": "Calculations / Import & export",
      "description": "JSON export and import for calculations.",
      "x-displayName": "Import & export",
      "x-position": 3
    },
    {
      "name": "Monitor / Configuration",
      "description": "Signage / monitor configuration.",
      "x-displayName": "Configuration",
      "x-position": 1
    },
    {
      "name": "Monitor / Slides",
      "description": "Signage slide upload, schedule and images.",
      "x-displayName": "Slides",
      "x-position": 2
    },
    {
      "name": "Queue / Core",
      "description": "Bar order queue.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Statistics / Logging",
      "description": "Cocktail statistics and logs.",
      "x-displayName": "Logging",
      "x-position": 1
    },
    {
      "name": "Statistics / Advanced",
      "description": "Advanced analytics, sets and comparisons.",
      "x-displayName": "Advanced",
      "x-position": 2
    },
    {
      "name": "Ratings / Core",
      "description": "Cocktail ratings.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "User / Settings",
      "description": "Authenticated user preferences (theme, language, display flags).",
      "x-displayName": "Settings",
      "x-position": 1
    },
    {
      "name": "User / Guides",
      "description": "Progress of tours and checklists of the authenticated user.",
      "x-displayName": "Guides",
      "x-position": 2
    },
    {
      "name": "Templates / Core",
      "description": "Published templates (start content collections) and applying them to a workspace.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Onboarding / Core",
      "description": "Setup state and checklist of a workspace.",
      "x-displayName": "Core",
      "x-position": 1
    },
    {
      "name": "Admin / Templates",
      "description": "Instance administration of templates (master key only).",
      "x-displayName": "Templates",
      "x-position": 1
    }
  ],
  "x-tagGroups": [
    {
      "name": "Workspace",
      "tags": [
        "Workspace / Core",
        "Workspace / Settings",
        "Workspace / API keys",
        "Workspace / Join codes",
        "Workspace / Membership"
      ]
    },
    {
      "name": "Workspace Users",
      "tags": [
        "Workspace Users / Core"
      ]
    },
    {
      "name": "Audit Logs",
      "tags": [
        "Audit Logs / Core"
      ]
    },
    {
      "name": "Cocktails",
      "tags": [
        "Cocktails / Core",
        "Cocktails / Step actions",
        "Cocktails / Lifecycle",
        "Cocktails / Import & export",
        "Cocktails / Media"
      ]
    },
    {
      "name": "Ingredients",
      "tags": [
        "Ingredients / Core",
        "Ingredients / Lifecycle",
        "Ingredients / Import & export",
        "Ingredients / Media",
        "Ingredients / References"
      ]
    },
    {
      "name": "Garnishes",
      "tags": [
        "Garnishes / Core",
        "Garnishes / Lifecycle",
        "Garnishes / Import & export",
        "Garnishes / Media"
      ]
    },
    {
      "name": "Guest Info",
      "tags": [
        "Guest Info / Core"
      ]
    },
    {
      "name": "Glasses",
      "tags": [
        "Glasses / Core",
        "Glasses / Lifecycle",
        "Glasses / Import & export",
        "Glasses / Media",
        "Glasses / References"
      ]
    },
    {
      "name": "Ice",
      "tags": [
        "Ice / Core"
      ]
    },
    {
      "name": "Tags",
      "tags": [
        "Tags / Core",
        "Tags / Metadata"
      ]
    },
    {
      "name": "Translations",
      "tags": [
        "Translations / Content"
      ]
    },
    {
      "name": "Units",
      "tags": [
        "Units / Core",
        "Units / Conversions"
      ]
    },
    {
      "name": "Cards",
      "tags": [
        "Cards / Core",
        "Cards / Lifecycle"
      ]
    },
    {
      "name": "Guest Menus",
      "tags": [
        "Guest Menus / Core",
        "Guest Menus / Content",
        "Guest Menus / Templates"
      ]
    },
    {
      "name": "Calculations",
      "tags": [
        "Calculations / Core",
        "Calculations / Groups",
        "Calculations / Import & export"
      ]
    },
    {
      "name": "Monitor",
      "tags": [
        "Monitor / Configuration",
        "Monitor / Slides"
      ]
    },
    {
      "name": "Queue",
      "tags": [
        "Queue / Core"
      ]
    },
    {
      "name": "Statistics",
      "tags": [
        "Statistics / Logging",
        "Statistics / Advanced"
      ]
    },
    {
      "name": "Ratings",
      "tags": [
        "Ratings / Core"
      ]
    },
    {
      "name": "User",
      "tags": [
        "User / Settings",
        "User / Guides"
      ]
    },
    {
      "name": "Templates",
      "tags": [
        "Templates / Core"
      ]
    },
    {
      "name": "Onboarding",
      "tags": [
        "Onboarding / Core"
      ]
    },
    {
      "name": "Admin",
      "tags": [
        "Admin / Templates"
      ]
    }
  ]
}
