# Generated by ariadne-codegen
# Source: /usr/share/sourcehut/lists.sr.ht.graphqls

from typing import Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import Visibility, WebhookEvent


class MailingListInput(BaseModel):
    description: Optional[str] = None
    visibility: Optional[Visibility] = None
    permit_mime: Optional[list[str]] = Field(alias="permitMime", default=None)
    "List of globs for permitted or rejected mimetypes on this list\ne.g. text/*"
    reject_mime: Optional[list[str]] = Field(alias="rejectMime", default=None)


class ACLInput(BaseModel):
    browse: bool
    reply: bool
    post: bool
    moderate: bool


class UserWebhookInput(BaseModel):
    url: str
    events: list[WebhookEvent]
    query: str


class MailingListWebhookInput(BaseModel):
    url: str
    events: list[WebhookEvent]
    query: str


class PreferencesInput(BaseModel):
    copy_self: bool = Field(alias="copySelf")
