@@ -71,6 +71,43 @@ def validate(self, resource_id: str, resource_data: ResourceData | None = None)
7171 )
7272
7373
74+ class InvitableMixin [Model ]:
75+ """Invitable mixin for sending and managing invites for resources."""
76+
77+ def accept_invite (self , resource_id : str , resource_data : ResourceData | None = None ) -> Model :
78+ """Accept an invite for a resource.
79+
80+ Args:
81+ resource_id: Resource ID
82+ resource_data: Resource data will be updated
83+ """
84+ return self ._resource_action ( # type: ignore[attr-defined, no-any-return]
85+ resource_id , "POST" , "accept-invite" , json = resource_data
86+ )
87+
88+ def resend_invite (self , resource_id : str , resource_data : ResourceData | None = None ) -> Model :
89+ """Resend an invite to a resource.
90+
91+ Args:
92+ resource_id: Resource ID
93+ resource_data: Resource data will be updated
94+ """
95+ return self ._resource_action ( # type: ignore[attr-defined, no-any-return]
96+ resource_id , "POST" , "resend-invite" , json = resource_data
97+ )
98+
99+ def send_new_invite (self , resource_id : str , resource_data : ResourceData | None = None ) -> Model :
100+ """Send a new invite to a resource.
101+
102+ Args:
103+ resource_id: Resource ID
104+ resource_data: Resource data will be updated
105+ """
106+ return self ._resource_action ( # type: ignore[attr-defined, no-any-return]
107+ resource_id , "POST" , "send-new-invite" , json = resource_data
108+ )
109+
110+
74111class AsyncActivatableMixin [Model ]:
75112 """Async activatable mixin for activating, enabling, disabling and deactivating resources."""
76113
@@ -138,3 +175,46 @@ async def validate(self, resource_id: str, resource_data: ResourceData | None =
138175 return await self ._resource_action ( # type: ignore[attr-defined, no-any-return]
139176 resource_id , "POST" , "validate" , json = resource_data
140177 )
178+
179+
180+ class AsyncInvitableMixin [Model ]:
181+ """Asynchronous Invitable mixin for sending and managing invites for resources."""
182+
183+ async def accept_invite (
184+ self , resource_id : str , resource_data : ResourceData | None = None
185+ ) -> Model :
186+ """Accept an invite for a resource.
187+
188+ Args:
189+ resource_id: Resource ID
190+ resource_data: Resource data will be updated
191+ """
192+ return await self ._resource_action ( # type: ignore[attr-defined, no-any-return]
193+ resource_id , "POST" , "accept-invite" , json = resource_data
194+ )
195+
196+ async def resend_invite (
197+ self , resource_id : str , resource_data : ResourceData | None = None
198+ ) -> Model :
199+ """Resend an invite to a resource.
200+
201+ Args:
202+ resource_id: Resource ID
203+ resource_data: Resource data will be updated
204+ """
205+ return await self ._resource_action ( # type: ignore[attr-defined, no-any-return]
206+ resource_id , "POST" , "resend-invite" , json = resource_data
207+ )
208+
209+ async def send_new_invite (
210+ self , resource_id : str , resource_data : ResourceData | None = None
211+ ) -> Model :
212+ """Send a new invite to a resource.
213+
214+ Args:
215+ resource_id: Resource ID
216+ resource_data: Resource data will be updated
217+ """
218+ return await self ._resource_action ( # type: ignore[attr-defined, no-any-return]
219+ resource_id , "POST" , "send-new-invite" , json = resource_data
220+ )
0 commit comments