Skip to content

Commit 87a02a7

Browse files
Adding new FileResponseParams.
1 parent 3f2c58d commit 87a02a7

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

jigsawstack/store.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ class FileUploadParams(TypedDict):
1414
content_type: NotRequired[str]
1515
temp_public_url: NotRequired[bool]
1616

17+
class FileUploadResponse(TypedDict):
18+
key: str
19+
url: str
20+
size: int
21+
temp_public_url: NotRequired[str] # Optional, only if temp_public_url is set to True in params
22+
23+
1724
class Store(ClientConfig):
1825

1926
config: RequestConfig
@@ -31,7 +38,7 @@ def __init__(
3138
disable_request_logging=disable_request_logging,
3239
)
3340

34-
def upload(self, file: bytes, options: Union[FileUploadParams, None] = None) -> Any:
41+
def upload(self, file: bytes, options: Union[FileUploadParams, None] = None) -> FileUploadResponse:
3542
if options is None:
3643
options = {}
3744

@@ -88,7 +95,7 @@ def __init__(
8895
)
8996

9097

91-
async def upload(self, file: bytes, options: Union[FileUploadParams, None] = None) -> Any:
98+
async def upload(self, file: bytes, options: Union[FileUploadParams, None] = None) -> FileUploadResponse:
9299
if options is None:
93100
options = {}
94101

0 commit comments

Comments
 (0)