diff --git a/docs/source/Services/Email_Type.rst b/docs/source/Services/Email_Type.rst index aa1a663..6f68ffb 100644 --- a/docs/source/Services/Email_Type.rst +++ b/docs/source/Services/Email_Type.rst @@ -26,8 +26,8 @@ TemplateOptions | Template name | You can create an e-mail template on TagoRUN options at https://admin.tago.io/run - | **params**: dict[str, Union[int, float]] - | Parameters to parse on Template + | **params**: Optional[dict[str, Union[int, float]]] + | [Optional] Parameters to parse on Template | You can use that parameter as local variable using $PARAMETER_KEY$ example params = { name: 'John' } will be $name$ on template document .. _EmailBase: @@ -41,15 +41,15 @@ EmailBase | E-mail address to be sent | example: "myclien@tago.io" - | **from_name**: str - | Name of origin + | **from_name**: Optional[str] + | [Optional] Name of origin | example: "My Run" | **subject**: str | Subject of the e-mail only allow with message or html - | **attachment**: :ref:`AttachmentOptions` - | Attachment for the e-mail + | **attachment**: Optional[:ref:`AttachmentOptions`] + | [Optional] Attachment for the e-mail @@ -87,15 +87,15 @@ EmailWithTemplate | E-mail address to be sent | example: "myclien@tago.io" - | **from_name**: str - | Name of origin + | **from_name**: Optional[str] + | [Optional] Name of origin | example: "My Run" - | **attachment**: :ref:`AttachmentOptions` - | Attachment for the e-mail + | **attachment**: Optional[:ref:`AttachmentOptions`] + | [Optional] Attachment for the e-mail - | **template**: :ref:`TemplateOptions` - | Use TagoRUN E-Mail Template + | **template**: Optional[:ref:`TemplateOptions`] + | [Optional] Use TagoRUN E-Mail Template | If you use template together with attachment the back-end will generate a parameter called 'URL' diff --git a/src/tagoio_sdk/modules/Services/Email.py b/src/tagoio_sdk/modules/Services/Email.py index dc5488f..f1326f8 100644 --- a/src/tagoio_sdk/modules/Services/Email.py +++ b/src/tagoio_sdk/modules/Services/Email.py @@ -1,5 +1,5 @@ import warnings -from typing import Any, TypedDict, Union +from typing import Any, Optional, TypedDict, Union from tagoio_sdk.common.tagoio_module import TagoIOModule @@ -22,7 +22,7 @@ class TemplateOptions(TypedDict): You can create an e-mail template on TagoRUN options at https://admin.tago.io/run """ - params: dict[str, Union[int, float]] + params: Optional[dict[str, Union[int, float]]] """ Parameters to parse on Template @@ -41,7 +41,7 @@ class EmailBase(TypedDict): :example: "myclien@tago.io" """ - from_name: str + from_name: Optional[str] """ Name of origin @@ -53,7 +53,7 @@ class EmailBase(TypedDict): only allow with message or html """ - attachment: AttachmentOptions + attachment: Optional[AttachmentOptions] """ Attachment for the e-mail """ @@ -80,17 +80,17 @@ class EmailWithTemplate(TypedDict): :example: "myclien@tago.io" """ - from_name: str + from_name: Optional[str] """ Name of origin :example: "My Run" """ - attachment: AttachmentOptions + attachment: Optional[AttachmentOptions] """ Attachment for the e-mail """ - template: TemplateOptions + template: Optional[TemplateOptions] """ Use TagoRUN E-Mail Template