scufflecloud_core/services/
organization_invitations.rs1use crate::operations::Operation;
2use crate::services::CoreSvc;
3
4#[async_trait::async_trait]
5impl<G: core_traits::Global>
6 pb::scufflecloud::core::v1::organization_invitations_service_server::OrganizationInvitationsService for CoreSvc<G>
7{
8 async fn create_organization_invitation(
9 &self,
10 req: tonic::Request<pb::scufflecloud::core::v1::CreateOrganizationInvitationRequest>,
11 ) -> Result<tonic::Response<pb::scufflecloud::core::v1::OrganizationInvitation>, tonic::Status> {
12 Operation::<G>::run(req).await.map(tonic::Response::new)
13 }
14
15 async fn list_organization_invitations_by_organization(
16 &self,
17 req: tonic::Request<pb::scufflecloud::core::v1::ListOrganizationInvitationsByOrganizationRequest>,
18 ) -> Result<tonic::Response<pb::scufflecloud::core::v1::OrganizationInvitationList>, tonic::Status> {
19 Operation::<G>::run(req).await.map(tonic::Response::new)
20 }
21
22 async fn list_orgnization_invites_by_user(
23 &self,
24 req: tonic::Request<pb::scufflecloud::core::v1::ListOrgnizationInvitesByUserRequest>,
25 ) -> Result<tonic::Response<pb::scufflecloud::core::v1::OrganizationInvitationList>, tonic::Status> {
26 Operation::<G>::run(req).await.map(tonic::Response::new)
27 }
28
29 async fn get_organization_invitation(
30 &self,
31 req: tonic::Request<pb::scufflecloud::core::v1::GetOrganizationInvitationRequest>,
32 ) -> Result<tonic::Response<pb::scufflecloud::core::v1::OrganizationInvitation>, tonic::Status> {
33 Operation::<G>::run(req).await.map(tonic::Response::new)
34 }
35
36 async fn accept_organization_invitation(
37 &self,
38 req: tonic::Request<pb::scufflecloud::core::v1::AcceptOrganizationInvitationRequest>,
39 ) -> Result<tonic::Response<pb::scufflecloud::core::v1::OrganizationMember>, tonic::Status> {
40 Operation::<G>::run(req).await.map(tonic::Response::new)
41 }
42
43 async fn decline_organization_invitation(
44 &self,
45 req: tonic::Request<pb::scufflecloud::core::v1::DeclineOrganizationInvitationRequest>,
46 ) -> Result<tonic::Response<()>, tonic::Status> {
47 Operation::<G>::run(req).await.map(tonic::Response::new)
48 }
49}