pub struct Invites<'c, C: Config> { /* private fields */ }
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<Q>(
&self,
query: &Q,
) -> Result<InviteListResponse, OpenAIError>
pub async fn list<Q>( &self, query: &Q, ) -> Result<InviteListResponse, OpenAIError>
Returns a list of invites in the organization. Returns a list of invites in the organization.
Sourcepub async fn list_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn list_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> 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. 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. 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. 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.