{
  "swagger": "2.0",
  "info": {
    "title": "evey/v1/user.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "UserService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/api/v1/admin/profiles": {
      "get": {
        "summary": "ListAllProfiles returns every profile on the server, owner included\n(Profile.user_id). Admin-only: it is what lets the admin panel show one\nrow per user WITH its profiles in a single call instead of an N+1 fan-out\nof ListProfiles, and what fills the \"whose history?\" profile picker.",
        "operationId": "UserService_ListAllProfiles",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListAllProfilesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/api-keys": {
      "get": {
        "operationId": "UserService_ListAPIKeys",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListAPIKeysResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "UserService"
        ]
      },
      "post": {
        "operationId": "UserService_CreateAPIKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1APIKey"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1CreateAPIKeyRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/api-keys/{id}": {
      "delete": {
        "operationId": "UserService_RevokeAPIKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1RevokeAPIKeyResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/auth/forgot-password": {
      "post": {
        "operationId": "UserService_RequestPasswordReset",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1RequestPasswordResetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1RequestPasswordResetRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "operationId": "UserService_Login",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1AuthResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1LoginRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "UserService_Logout",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1LogoutResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1LogoutRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/auth/quick-connect/authorize": {
      "post": {
        "operationId": "UserService_AuthorizeQuickConnect",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1AuthorizeQuickConnectResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1AuthorizeQuickConnectRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/auth/quick-connect/initiate": {
      "post": {
        "operationId": "UserService_InitiateQuickConnect",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1QuickConnectResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/auth/quick-connect/{code}": {
      "get": {
        "operationId": "UserService_CheckQuickConnect",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1CheckQuickConnectResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/auth/refresh": {
      "post": {
        "operationId": "UserService_RefreshToken",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1AuthResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1RefreshTokenRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "operationId": "UserService_RegisterWithInvite",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1AuthResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1RegisterWithInviteRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/auth/reset-password": {
      "post": {
        "operationId": "UserService_ResetPassword",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ResetPasswordResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1ResetPasswordRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/invites": {
      "get": {
        "operationId": "UserService_ListInviteLinks",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListInviteLinksResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "UserService"
        ]
      },
      "post": {
        "operationId": "UserService_CreateInviteLink",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1InviteLink"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1CreateInviteLinkRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/invites/{code}/validate": {
      "get": {
        "summary": "ValidateInvite reports whether an invite code can still be used to\nregister, so the registration form can show a clear \"link no longer\nvalid\" state instead of a full form that only fails on submit. Public\n(the code is the capability); reveals nothing beyond usability + whether\nthe resulting account is an admin one.",
        "operationId": "UserService_ValidateInvite",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ValidateInviteResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/invites/{id}": {
      "delete": {
        "operationId": "UserService_RevokeInviteLink",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1RevokeInviteLinkResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/profiles/{id}": {
      "delete": {
        "operationId": "UserService_DeleteProfile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1DeleteProfileResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "UserService"
        ]
      },
      "patch": {
        "operationId": "UserService_UpdateProfile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1Profile"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserServiceUpdateProfileBody"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/profiles/{id}/default": {
      "post": {
        "operationId": "UserService_SetDefaultProfile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1Profile"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserServiceSetDefaultProfileBody"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/users": {
      "get": {
        "operationId": "UserService_ListUsers",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListUsersResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "UserService"
        ]
      },
      "post": {
        "operationId": "UserService_CreateUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1User"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1CreateUserRequest"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/users/me": {
      "get": {
        "operationId": "UserService_GetCurrentUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1User"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/users/{id}": {
      "delete": {
        "operationId": "UserService_DeleteUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1DeleteUserResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "UserService"
        ]
      },
      "patch": {
        "operationId": "UserService_UpdateUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1User"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserServiceUpdateUserBody"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/users/{id}/disable": {
      "post": {
        "operationId": "UserService_DisableUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1User"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "disabled",
            "description": "Ignored: this route always disables. Re-enable with EnableUser.",
            "in": "query",
            "required": false,
            "type": "boolean"
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/users/{id}/enable": {
      "post": {
        "operationId": "UserService_EnableUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1User"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/users/{userId}/impersonate": {
      "post": {
        "summary": "ImpersonateUser mints a short-lived access token that lets an admin act as\nthe target user/profile (\"connect as\"). Admin-only; rejected for API-key\ncallers (interactive web/mobile sessions only). The returned AuthResponse\ncarries an access_token with no refresh_token: the session is bounded by the\naccess TTL and the admin re-impersonates to extend it.",
        "operationId": "UserService_ImpersonateUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1AuthResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserServiceImpersonateUserBody"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    },
    "/api/v1/users/{userId}/profiles": {
      "get": {
        "operationId": "UserService_ListProfiles",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListProfilesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "UserService"
        ]
      },
      "post": {
        "operationId": "UserService_CreateProfile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1Profile"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserServiceCreateProfileBody"
            }
          }
        ],
        "tags": [
          "UserService"
        ]
      }
    }
  },
  "definitions": {
    "UserServiceCreateProfileBody": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "avatarPath": {
          "type": "string"
        },
        "preferences": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "maxRating": {
          "type": "string"
        },
        "isKids": {
          "type": "boolean"
        },
        "pin": {
          "type": "string",
          "title": "4-digit PIN required when kids profile exists"
        },
        "locale": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "maxAge": {
          "type": "integer",
          "format": "int32",
          "description": "Parental age cap. Only honored when is_kids=true; ignored otherwise.\nUnset = fall back to the implicit kids default (12)."
        }
      }
    },
    "UserServiceImpersonateUserBody": {
      "type": "object",
      "properties": {
        "profileId": {
          "type": "string",
          "description": "Optional: which of the target's profiles to activate. Empty = the target's\ndefault profile. Must belong to user_id or the request is rejected."
        }
      }
    },
    "UserServiceSetDefaultProfileBody": {
      "type": "object"
    },
    "UserServiceUpdateProfileBody": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "avatarPath": {
          "type": "string"
        },
        "preferences": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "maxRating": {
          "type": "string"
        },
        "maxBitrateKbps": {
          "type": "integer",
          "format": "int32"
        },
        "locale": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "isKids": {
          "type": "boolean"
        },
        "pin": {
          "type": "string",
          "title": "empty string clears the PIN; 4 digits sets it"
        },
        "maxAge": {
          "type": "integer",
          "format": "int32",
          "description": "Parental age cap. Only honored when the profile is_kids=true; ignored\notherwise. Sentinel: -1 clears any stored value, 0+ sets it."
        },
        "currentPin": {
          "type": "string",
          "description": "Proof required when `pin` is set, the same rule as the parental HTTP\nroute: a profile that already has a PIN needs its CURRENT PIN to change\nor clear it (current_pin); a first PIN needs the caller's account\npassword (current_password). An admin editing another user's profile\nproves their own password in both cases."
        },
        "currentPassword": {
          "type": "string"
        }
      }
    },
    "UserServiceUpdateUserBody": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "isAdmin": {
          "type": "boolean"
        },
        "maxStreams": {
          "type": "integer",
          "format": "int32"
        },
        "maxProfiles": {
          "type": "integer",
          "format": "int32"
        },
        "maxDevicesPerProfile": {
          "type": "integer",
          "format": "int32"
        },
        "currentPassword": {
          "type": "string",
          "description": "Required when the caller edits their OWN password, e-mail or username:\na stolen access token alone must not take the account over."
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "v1APIKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "lastUsedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "v1AuthResponse": {
      "type": "object",
      "properties": {
        "accessToken": {
          "type": "string"
        },
        "refreshToken": {
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/v1User"
        }
      }
    },
    "v1AuthorizeQuickConnectRequest": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        }
      }
    },
    "v1AuthorizeQuickConnectResponse": {
      "type": "object"
    },
    "v1CheckQuickConnectResponse": {
      "type": "object",
      "properties": {
        "authorized": {
          "type": "boolean"
        },
        "auth": {
          "$ref": "#/definitions/v1AuthResponse"
        }
      }
    },
    "v1CreateAPIKeyRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "v1CreateInviteLinkRequest": {
      "type": "object",
      "properties": {
        "maxUses": {
          "type": "integer",
          "format": "int32"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "libraryIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isAdmin": {
          "type": "boolean"
        },
        "maxProfiles": {
          "type": "integer",
          "format": "int32",
          "description": "Cap on the profiles of the account this invite creates, like\nCreateUserRequest.max_profiles (unset = no cap, must be \u003e= 0)."
        }
      }
    },
    "v1CreateUserRequest": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "isAdmin": {
          "type": "boolean"
        },
        "maxProfiles": {
          "type": "integer",
          "format": "int32"
        },
        "maxDevicesPerProfile": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "v1DeleteProfileResponse": {
      "type": "object"
    },
    "v1DeleteUserResponse": {
      "type": "object"
    },
    "v1InviteLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "createdBy": {
          "type": "string"
        },
        "maxUses": {
          "type": "integer",
          "format": "int32"
        },
        "timesUsed": {
          "type": "integer",
          "format": "int32"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "libraryIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isAdmin": {
          "type": "boolean"
        },
        "maxProfiles": {
          "type": "integer",
          "format": "int32",
          "description": "Cap on the profiles of the account this invite creates (unset = no cap)."
        }
      }
    },
    "v1ListAPIKeysResponse": {
      "type": "object",
      "properties": {
        "apiKeys": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1APIKey"
          }
        }
      }
    },
    "v1ListAllProfilesResponse": {
      "type": "object",
      "properties": {
        "profiles": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Profile"
          }
        }
      }
    },
    "v1ListInviteLinksResponse": {
      "type": "object",
      "properties": {
        "inviteLinks": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1InviteLink"
          }
        }
      }
    },
    "v1ListProfilesResponse": {
      "type": "object",
      "properties": {
        "profiles": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Profile"
          }
        }
      }
    },
    "v1ListUsersResponse": {
      "type": "object",
      "properties": {
        "users": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1User"
          }
        }
      }
    },
    "v1LoginRequest": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "v1LogoutRequest": {
      "type": "object",
      "properties": {
        "refreshToken": {
          "type": "string"
        }
      }
    },
    "v1LogoutResponse": {
      "type": "object"
    },
    "v1Profile": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "avatarPath": {
          "type": "string"
        },
        "preferences": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "maxRating": {
          "type": "string"
        },
        "isDefault": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "maxBitrateKbps": {
          "type": "integer",
          "format": "int32"
        },
        "locale": {
          "type": "string"
        },
        "region": {
          "type": "string",
          "title": "ISO 3166-1 alpha-2, empty/absent = resolve via server/locale fallback"
        },
        "isKids": {
          "type": "boolean",
          "description": "Kids profile: restricted content by default + forces non-kids profiles\non the same user to have a PIN set."
        },
        "maxAge": {
          "type": "integer",
          "format": "int32",
          "description": "Parental MaxAge cap stored on the profile. Only meaningful when\nis_kids=true; absent means \"use the implicit kids default (12)\"."
        },
        "lastActiveAt": {
          "type": "string",
          "format": "date-time",
          "description": "When an access token was last minted for this profile (login or refresh).\nAbsent = never. Admin impersonation does not count."
        },
        "hasPin": {
          "type": "boolean",
          "description": "Whether a parental PIN is set: tells an edit dialog which proof to ask\nfor before changing it (the current PIN, or the account password for a\nfirst one). The hash itself never leaves the server."
        }
      }
    },
    "v1QuickConnectResponse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "secret": {
          "type": "string"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "v1RefreshTokenRequest": {
      "type": "object",
      "properties": {
        "refreshToken": {
          "type": "string"
        },
        "profileId": {
          "type": "string",
          "description": "Optional profile id to activate on the new access token.\nMust belong to the same user or the refresh is rejected; absent falls\nback to the profile the token was issued for (else the default)."
        },
        "pinToken": {
          "type": "string",
          "description": "Short-lived proof, minted by /parental/verify-pin, that the caller entered\nthe target profile's PIN. Required only when switching FROM a kids profile\nTO a non-kids one; ignored otherwise."
        }
      }
    },
    "v1RegisterWithInviteRequest": {
      "type": "object",
      "properties": {
        "inviteCode": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      }
    },
    "v1RequestPasswordResetRequest": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        }
      }
    },
    "v1RequestPasswordResetResponse": {
      "type": "object"
    },
    "v1ResetPasswordRequest": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "newPassword": {
          "type": "string"
        }
      }
    },
    "v1ResetPasswordResponse": {
      "type": "object"
    },
    "v1RevokeAPIKeyResponse": {
      "type": "object"
    },
    "v1RevokeInviteLinkResponse": {
      "type": "object"
    },
    "v1User": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "isAdmin": {
          "type": "boolean"
        },
        "enabled": {
          "type": "boolean"
        },
        "maxStreams": {
          "type": "integer",
          "format": "int32"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "maxProfiles": {
          "type": "integer",
          "format": "int32",
          "description": "Per-user caps. 0 / absent = unlimited."
        },
        "maxDevicesPerProfile": {
          "type": "integer",
          "format": "int32"
        },
        "lastLogin": {
          "type": "string",
          "format": "date-time",
          "description": "Most recent successful login (local or OIDC); absent until first login."
        }
      }
    },
    "v1ValidateInviteResponse": {
      "type": "object",
      "properties": {
        "valid": {
          "type": "boolean",
          "title": "false = revoked, expired, or exhausted"
        },
        "isAdmin": {
          "type": "boolean",
          "title": "the account this invite would create is an admin one"
        }
      }
    }
  }
}
