typarr.models

Pydantic models for API request/response schemas.

class typarr.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 typarr.models.BucketCreate(*, slug: Annotated[str, MinLen(min_length=1), MaxLen(max_length=64), _PydanticGeneralMetadata(pattern='^[a-z0-9]+(?:-[a-z0-9]+)*$')], description: str = '', access: list[AccessEntry] = [])

Request body for creating a new bucket.

model_config = {}

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

class typarr.models.BucketInfo(*, slug: str, description: str, created: str | None, access: list[AccessEntry])

Bucket metadata returned by the API.

model_config = {}

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

class typarr.models.BucketUpdate(*, description: str | None = None, access: list[AccessEntry] | 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 typarr.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 typarr.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 typarr.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 typarr.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 typarr.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 typarr.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 typarr.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 typarr.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 typarr.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 typarr.models.TemplateInit(*, name: str, namespace: str = 'preview', version: 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 typarr.models.User(*, username: str, email: str, groups: list[str])

Authenticated user with group memberships.

model_config = {}

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