@@ -97,6 +97,43 @@ def unblock(self, resource_id: str, resource_data: ResourceData | None = None) -
9797 )
9898
9999
100+ class InvitableMixin [Model ]:
101+ """Invitable mixin for sending and managing invites for resources."""
102+
103+ def accept_invite (self , resource_id : str , resource_data : ResourceData | None = None ) -> Model :
104+ """Accept an invite for a resource.
105+
106+ Args:
107+ resource_id: Resource ID
108+ resource_data: Resource data will be updated
109+ """
110+ return self ._resource_action ( # type: ignore[attr-defined, no-any-return]
111+ resource_id , "POST" , "accept-invite" , json = resource_data
112+ )
113+
114+ def resend_invite (self , resource_id : str , resource_data : ResourceData | None = None ) -> Model :
115+ """Resend an invite to a resource.
116+
117+ Args:
118+ resource_id: Resource ID
119+ resource_data: Resource data will be updated
120+ """
121+ return self ._resource_action ( # type: ignore[attr-defined, no-any-return]
122+ resource_id , "POST" , "resend-invite" , json = resource_data
123+ )
124+
125+ def send_new_invite (self , resource_id : str , resource_data : ResourceData | None = None ) -> Model :
126+ """Send a new invite to a resource.
127+
128+ Args:
129+ resource_id: Resource ID
130+ resource_data: Resource data will be updated
131+ """
132+ return self ._resource_action ( # type: ignore[attr-defined, no-any-return]
133+ resource_id , "POST" , "send-new-invite" , json = resource_data
134+ )
135+
136+
100137class AsyncActivatableMixin [Model ]:
101138 """Async activatable mixin for activating, enabling, disabling and deactivating resources."""
102139
@@ -190,3 +227,46 @@ async def unblock(self, resource_id: str, resource_data: ResourceData | None = N
190227 return await self ._resource_action ( # type: ignore[attr-defined, no-any-return]
191228 resource_id , "POST" , "unblock" , json = resource_data
192229 )
230+
231+
232+ class AsyncInvitableMixin [Model ]:
233+ """Asynchronous Invitable mixin for sending and managing invites for resources."""
234+
235+ async def accept_invite (
236+ self , resource_id : str , resource_data : ResourceData | None = None
237+ ) -> Model :
238+ """Accept an invite for a resource.
239+
240+ Args:
241+ resource_id: Resource ID
242+ resource_data: Resource data will be updated
243+ """
244+ return await self ._resource_action ( # type: ignore[attr-defined, no-any-return]
245+ resource_id , "POST" , "accept-invite" , json = resource_data
246+ )
247+
248+ async def resend_invite (
249+ self , resource_id : str , resource_data : ResourceData | None = None
250+ ) -> Model :
251+ """Resend an invite to a resource.
252+
253+ Args:
254+ resource_id: Resource ID
255+ resource_data: Resource data will be updated
256+ """
257+ return await self ._resource_action ( # type: ignore[attr-defined, no-any-return]
258+ resource_id , "POST" , "resend-invite" , json = resource_data
259+ )
260+
261+ async def send_new_invite (
262+ self , resource_id : str , resource_data : ResourceData | None = None
263+ ) -> Model :
264+ """Send a new invite to a resource.
265+
266+ Args:
267+ resource_id: Resource ID
268+ resource_data: Resource data will be updated
269+ """
270+ return await self ._resource_action ( # type: ignore[attr-defined, no-any-return]
271+ resource_id , "POST" , "send-new-invite" , json = resource_data
272+ )
0 commit comments