Skip to content

Commit cee0650

Browse files
committed
fix: add completed_at, fix contacts __init__ alias, forward files/data in custom http client example
1 parent 30e0c8d commit cee0650

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

examples/with_custom_http_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def request(
3030
method=method,
3131
url=url,
3232
headers=headers,
33-
json=json,
33+
json=json if data is None and files is None else None,
34+
files=files,
35+
data=data,
3436
timeout=self.timeout,
3537
)
3638
return (

resend/contacts/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from .imports._contact_import import ContactImport as ContactImportObj
2-
from .imports._contact_import import ContactImportCounts
1+
from .imports._contact_import import ContactImport, ContactImportCounts
32
from .imports._contact_imports import ContactImports
43

5-
__all__ = ["ContactImports", "ContactImportObj", "ContactImportCounts"]
4+
__all__ = ["ContactImports", "ContactImport", "ContactImportCounts"]

resend/contacts/imports/_contact_import.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Optional
2+
13
from typing_extensions import NotRequired
24

35
from resend._base_response import BaseResponse
@@ -38,4 +40,5 @@ class ContactImport(BaseResponse):
3840
id: str
3941
status: str
4042
created_at: str
43+
completed_at: Optional[str]
4144
counts: NotRequired[ContactImportCounts]

0 commit comments

Comments
 (0)