tino.models

Pydantic models for API request/response schemas.

class tino.models.AccessEntry(*, group: str, role: str)

Maps a Keycloak group to a role within a bucket.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.ApiKeyCreate(*, label: str, access: dict[str, str] = {})

Request body for creating or updating an API key.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.ApiKeyCreated(*, token: str, id: str, label: str, created: str, access: dict[str, str])

Response when an API key is first created — includes the raw token (shown once only).

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.ApiKeyInfo(*, id: str, label: str, created: str, access: dict[str, str])

API key metadata returned by the API (no raw token or hash).

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.BucketCreate(*, slug: Annotated[str, MinLen(min_length=1), MaxLen(max_length=50), _PydanticGeneralMetadata(pattern='^[a-z0-9]+(?:-[a-z0-9]+)*$')], name: Annotated[str, MaxLen(max_length=50)] = '', description: str = '', access: list[AccessEntry] = [], mcp_instructions: str = '')

Request body for creating a new bucket.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.BucketInfo(*, slug: str, name: str = '', description: str, access: list[AccessEntry], mcp_instructions: str = '')

Bucket metadata returned by the API.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.BucketUpdate(*, name: Annotated[str | None, MaxLen(max_length=50)] = None, description: str | None = None, access: list[AccessEntry] | None = None, mcp_instructions: str | None = None)

Request body for updating bucket metadata. Omitted fields are unchanged.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.CommitInfo(*, sha: str, message: str, author: str, timestamp: str, deleted: bool = False)

Metadata for a single git commit.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.CommitRequest(*, files: list[str], message: str)

Request body for committing selected files.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.DiffEntry(*, path: str, diff: str)

Unified diff output for a single file.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.FileCreate(*, path: str, content: str = '')

Request body for creating a new file in a bucket.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.FileEntry(*, path: str, type: str)

Single entry in a file listing.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.FileSave(*, content: str)

Request body for saving file content.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.FileStatus(*, path: str, status: str)

Git status of a single file in the working tree.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.FontEntry(*, filename: str, size: int)

Metadata for an installed font file.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.RestoreRequest(*, ref: str, paths: list[str])

Request body for restoring files from a specific commit.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.SearchResult(*, bucket: str, path: str, name_match: bool = False, snippets: list[SearchSnippet] = [])

A file whose name and/or content matched a search query.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.SearchSnippet(*, line: int, text: str)

A single content line that matched a search query.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.TemplateInit(*, name: str, namespace: str = 'preview', version: str, target_dir: str = '')

Request body for initializing a bucket from a Typst template.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class tino.models.User(*, username: str, email: str, groups: list[str], api_key_access: dict[str, str] | None = None)

Authenticated user with group memberships.

api_key_access: dict[str, str] | None

Per-bucket role map for API key authenticated requests (None for OIDC users).

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].