"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .notificationtriggerresponse import (
    NotificationTriggerResponse,
    NotificationTriggerResponseTypedDict,
)
from novu_py.types import BaseModel
import pydantic
from typing import List
from typing_extensions import Annotated, TypedDict


class TemplateResponseTypedDict(TypedDict):
    id: str
    r"""Unique identifier of the workflow"""
    name: str
    r"""Name of the workflow"""
    critical: bool
    r"""Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen"""
    triggers: List[NotificationTriggerResponseTypedDict]
    r"""Triggers are the events that will trigger the workflow."""


class TemplateResponse(BaseModel):
    id: Annotated[str, pydantic.Field(alias="_id")]
    r"""Unique identifier of the workflow"""

    name: str
    r"""Name of the workflow"""

    critical: bool
    r"""Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen"""

    triggers: List[NotificationTriggerResponse]
    r"""Triggers are the events that will trigger the workflow."""
