fmn.rules.notification module

class fmn.rules.notification.EmailNotification(*, protocol: Literal['email'], content: EmailNotificationContent)[source]

Bases: FrozenModel

content: EmailNotificationContent
model_config = {'frozen': True}

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

protocol: Literal['email']
class fmn.rules.notification.EmailNotificationContent(*, headers: EmailNotificationHeaders, body: str, footer: str | None = None)[source]

Bases: FrozenModel

body: str
footer: str | None
headers: EmailNotificationHeaders
model_config = {'frozen': True}

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

class fmn.rules.notification.EmailNotificationHeaders(*, To: str, Subject: str)[source]

Bases: FrozenModel

Subject: str
To: str
model_config = {'frozen': True}

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

class fmn.rules.notification.FrozenModel[source]

Bases: BaseModel

model_config = {'frozen': True}

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

class fmn.rules.notification.IRCNotification(*, protocol: Literal['irc'], content: IRCNotificationContent)[source]

Bases: FrozenModel

content: IRCNotificationContent
model_config = {'frozen': True}

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

protocol: Literal['irc']
class fmn.rules.notification.IRCNotificationContent(*, to: str, message: str)[source]

Bases: FrozenModel

message: str
model_config = {'frozen': True}

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

to: str
class fmn.rules.notification.MatrixNotification(*, protocol: Literal['matrix'], content: MatrixNotificationContent)[source]

Bases: FrozenModel

content: MatrixNotificationContent
model_config = {'frozen': True}

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

protocol: Literal['matrix']
class fmn.rules.notification.MatrixNotificationContent(*, to: str, message: str)[source]

Bases: FrozenModel

message: str
model_config = {'frozen': True}

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

to: str
class fmn.rules.notification.Notification(root: RootModelRootType = PydanticUndefined)[source]

Bases: RootModel

model_config = {'frozen': True}

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

root: Annotated[EmailNotification | IRCNotification | MatrixNotification, FieldInfo(annotation=NoneType, required=True, discriminator='protocol')]