Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Services/Email #9

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions docs/source/Services/Email_Type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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



Expand Down Expand Up @@ -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'


Expand Down
14 changes: 7 additions & 7 deletions src/tagoio_sdk/modules/Services/Email.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand All @@ -41,7 +41,7 @@ class EmailBase(TypedDict):

:example: "myclien@tago.io"
"""
from_name: str
from_name: Optional[str]
"""
Name of origin

Expand All @@ -53,7 +53,7 @@ class EmailBase(TypedDict):

only allow with message or html
"""
attachment: AttachmentOptions
attachment: Optional[AttachmentOptions]
"""
Attachment for the e-mail
"""
Expand All @@ -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

Expand Down