Skip to content

Commit fddba5c

Browse files
committed
add return type to params
1 parent 6ead149 commit fddba5c

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

jigsawstack/audio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .async_request import AsyncRequest, AsyncRequestConfig
55
from ._config import ClientConfig
66
from typing import Any, Dict, List, cast
7-
from typing_extensions import NotRequired, TypedDict
7+
from typing_extensions import NotRequired, TypedDict, Literal
88
from .custom_typing import SupportedAccents
99
from .helpers import build_path
1010

@@ -14,6 +14,7 @@ class TextToSpeechParams(TypedDict):
1414
accent: NotRequired[SupportedAccents]
1515
speaker_clone_url: NotRequired[str]
1616
speaker_clone_file_store_key: NotRequired[str]
17+
return_type: NotRequired[Literal["url", "binary", "base64"]]
1718

1819

1920
class TTSCloneParams(TypedDict):

jigsawstack/image_generation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class ImageGenerationParams(TypedDict):
5353
File store key to use as image input.
5454
"""
5555

56+
return_type: NotRequired[Literal["url", "binary", "base64"]]
57+
5658
class ImageGenerationResponse(TypedDict):
5759
success: bool
5860
"""

jigsawstack/translate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from typing import Any, Dict, List, Union, cast, overload
2-
from typing_extensions import NotRequired, TypedDict
2+
from typing_extensions import NotRequired, TypedDict, Literal
33
from .request import Request, RequestConfig
44
from .async_request import AsyncRequest
55
from typing import List, Union
@@ -20,6 +20,8 @@ class TranslateImageParams(TypedDict):
2020
The file store key of the image to translate.
2121
"""
2222

23+
return_type: NotRequired[Literal["url", "binary", "base64"]]
24+
2325
class TranslateParams(TypedDict):
2426
target_language: str
2527
"""

jigsawstack/web.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ class DNSResponse(TypedDict):
4242
# HTML to Any
4343
#
4444
class HTMLToAnyParams(TypedDict):
45-
html: str
46-
url: str
47-
goto_options: NotRequired[object]
45+
html: NotRequired[str]
46+
url: NotRequired[str]
47+
goto_options: NotRequired[Dict[str, Union[int, str]]]
4848
scale: NotRequired[int]
4949
full_page: NotRequired[bool]
5050
omit_background: NotRequired[bool]
@@ -59,6 +59,7 @@ class HTMLToAnyParams(TypedDict):
5959
is_mobile: NotRequired[bool]
6060
dark_mode: NotRequired[bool]
6161
use_graphic_renderer: NotRequired[bool]
62+
return_type: NotRequired[Literal["url", "binary", "base64"]]
6263

6364

6465
class HTMLToAnyResponse(TypedDict):

0 commit comments

Comments
 (0)