pub struct Invites<'c, C: Config> { /* private fields */ }Available on crate feature
administration only.Expand description
Invite and manage invitations for an organization. Invited users are automatically added to the Default project.
Implementations§
Source§impl<'c, C: Config> Invites<'c, C>
impl<'c, C: Config> Invites<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn list(&self) -> Result<InviteListResponse, OpenAIError>
pub async fn list(&self) -> Result<InviteListResponse, OpenAIError>
Returns a list of invites in the organization.
Sourcepub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
pub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
Returns a list of invites in the organization.
Sourcepub async fn retrieve(&self, invite_id: &str) -> Result<Invite, OpenAIError>
pub async fn retrieve(&self, invite_id: &str) -> Result<Invite, OpenAIError>
Retrieves an invite.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
invite_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, invite_id: T0, ) -> Result<R, OpenAIError>
Retrieves an invite.
Sourcepub async fn create(
&self,
request: InviteRequest,
) -> Result<Invite, OpenAIError>
pub async fn create( &self, request: InviteRequest, ) -> Result<Invite, OpenAIError>
Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
Sourcepub async fn create_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
Sourcepub async fn delete(
&self,
invite_id: &str,
) -> Result<InviteDeleteResponse, OpenAIError>
pub async fn delete( &self, invite_id: &str, ) -> Result<InviteDeleteResponse, OpenAIError>
Delete an invite. If the invite has already been accepted, it cannot be deleted.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
invite_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, invite_id: T0, ) -> Result<R, OpenAIError>
Delete an invite. If the invite has already been accepted, it cannot be deleted.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for Invites<'c, C>
Available on crate feature _api only.
impl<'c, C: Config> RequestOptionsBuilder for Invites<'c, C>
Available on crate feature
_api only.Source§fn options_mut(&mut self) -> &mut RequestOptions
fn options_mut(&mut self) -> &mut RequestOptions
Get mutable reference to RequestOptions (for building)
Source§fn options(&self) -> &RequestOptions
fn options(&self) -> &RequestOptions
Get reference to RequestOptions
Source§fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
Add a single header to RequestOptions
Auto Trait Implementations§
impl<'c, C> Freeze for Invites<'c, C>
impl<'c, C> !RefUnwindSafe for Invites<'c, C>
impl<'c, C> Send for Invites<'c, C>
impl<'c, C> Sync for Invites<'c, C>
impl<'c, C> Unpin for Invites<'c, C>
impl<'c, C> !UnwindSafe for Invites<'c, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more