99
1010class Audiences :
1111
12+ class RemoveAudienceResponse (TypedDict ):
13+ """
14+ RemoveAudienceResponse is the type that wraps the response of the audience that was removed
15+
16+ Attributes:
17+ object (str): The object type, "audience"
18+ id (str): The ID of the removed audience
19+ deleted (bool): Whether the audience was deleted
20+ """
21+
22+ object : str
23+ """
24+ The object type, "audience"
25+ """
26+ id : str
27+ """
28+ The ID of the removed audience
29+ """
30+ deleted : bool
31+ """
32+ Whether the audience was deleted
33+ """
34+
1235 class ListResponse (TypedDict ):
1336 """
1437 ListResponse type that wraps a list of audience objects
@@ -105,7 +128,7 @@ def get(cls, id: str) -> Audience:
105128 return resp
106129
107130 @classmethod
108- def remove (cls , id : str ) -> Audience :
131+ def remove (cls , id : str ) -> RemoveAudienceResponse :
109132 """
110133 Delete a single audience.
111134 see more: https://resend.com/docs/api-reference/audiences/delete-audience
@@ -114,10 +137,10 @@ def remove(cls, id: str) -> Audience:
114137 id (str): The audience ID
115138
116139 Returns:
117- Audience : The audience object
140+ RemoveAudienceResponse : The removed audience response
118141 """
119142 path = f"/audiences/{ id } "
120- resp = request .Request [Audience ](
143+ resp = request .Request [Audiences . RemoveAudienceResponse ](
121144 path = path , params = {}, verb = "delete"
122145 ).perform_with_content ()
123146 return resp
0 commit comments