diff --git a/src/BackOffice.BFF.Application/ClubMembershipCQ/Queries/GetAllClubMembers/GetAllClubMembersQueryHandler.cs b/src/BackOffice.BFF.Application/ClubMembershipCQ/Queries/GetAllClubMembers/GetAllClubMembersQueryHandler.cs index b5e223c..c7b9526 100644 --- a/src/BackOffice.BFF.Application/ClubMembershipCQ/Queries/GetAllClubMembers/GetAllClubMembersQueryHandler.cs +++ b/src/BackOffice.BFF.Application/ClubMembershipCQ/Queries/GetAllClubMembers/GetAllClubMembersQueryHandler.cs @@ -1,5 +1,5 @@ -using Foursat.BackOffice.BFF.ClubMembership.Protobuf; +using Foursat.BackOffice.BFF.ClubMembership.Protos; using GetAllClubMembershipsRequest = CMSMicroservice.Protobuf.Protos.ClubMembership.GetAllClubMembershipsRequest; namespace BackOffice.BFF.Application.ClubMembershipCQ.Queries.GetAllClubMembers; diff --git a/src/BackOffice.BFF.Application/CommissionCQ/Commands/ProcessWithdrawal/ProcessWithdrawalCommandHandler.cs b/src/BackOffice.BFF.Application/CommissionCQ/Commands/ProcessWithdrawal/ProcessWithdrawalCommandHandler.cs index ae1d004..7c560f6 100644 --- a/src/BackOffice.BFF.Application/CommissionCQ/Commands/ProcessWithdrawal/ProcessWithdrawalCommandHandler.cs +++ b/src/BackOffice.BFF.Application/CommissionCQ/Commands/ProcessWithdrawal/ProcessWithdrawalCommandHandler.cs @@ -1,4 +1,4 @@ -using BackOffice.BFF.Commission.Protobuf; +using Foursat.BackOffice.BFF.Commission.Protos; using Google.Protobuf.WellKnownTypes; namespace BackOffice.BFF.Application.CommissionCQ.Commands.ProcessWithdrawal; diff --git a/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/CreateOrUpdateConfiguration/CreateOrUpdateConfigurationCommandHandler.cs b/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/CreateOrUpdateConfiguration/CreateOrUpdateConfigurationCommandHandler.cs index e1a5002..d138799 100644 --- a/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/CreateOrUpdateConfiguration/CreateOrUpdateConfigurationCommandHandler.cs +++ b/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/CreateOrUpdateConfiguration/CreateOrUpdateConfigurationCommandHandler.cs @@ -1,4 +1,4 @@ -using BackOffice.BFF.Configuration.Protobuf; +using Foursat.BackOffice.BFF.Configuration.Protos; using Google.Protobuf.WellKnownTypes; namespace BackOffice.BFF.Application.ConfigurationCQ.Commands.CreateOrUpdateConfiguration; diff --git a/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/DeactivateConfiguration/DeactivateConfigurationCommandHandler.cs b/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/DeactivateConfiguration/DeactivateConfigurationCommandHandler.cs index 4969828..7d96d42 100644 --- a/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/DeactivateConfiguration/DeactivateConfigurationCommandHandler.cs +++ b/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/DeactivateConfiguration/DeactivateConfigurationCommandHandler.cs @@ -1,4 +1,4 @@ -using BackOffice.BFF.Configuration.Protobuf; +using Foursat.BackOffice.BFF.Configuration.Protos; namespace BackOffice.BFF.Application.ConfigurationCQ.Commands.DeactivateConfiguration; diff --git a/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/SetDefaultVatPercentage/SetDefaultVatPercentageCommandHandler.cs b/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/SetDefaultVatPercentage/SetDefaultVatPercentageCommandHandler.cs index 042e499..a420524 100644 --- a/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/SetDefaultVatPercentage/SetDefaultVatPercentageCommandHandler.cs +++ b/src/BackOffice.BFF.Application/ConfigurationCQ/Commands/SetDefaultVatPercentage/SetDefaultVatPercentageCommandHandler.cs @@ -1,5 +1,5 @@ using BackOffice.BFF.Application.Common.Interfaces; -using BackOffice.BFF.Configuration.Protobuf; +using Foursat.BackOffice.BFF.Configuration.Protos; using Google.Protobuf.WellKnownTypes; using MediatR; using Microsoft.Extensions.Logging; diff --git a/src/BackOffice.BFF.Application/ConfigurationCQ/Queries/GetAllConfigurations/GetAllConfigurationsQueryHandler.cs b/src/BackOffice.BFF.Application/ConfigurationCQ/Queries/GetAllConfigurations/GetAllConfigurationsQueryHandler.cs index f7f2d0f..33464fa 100644 --- a/src/BackOffice.BFF.Application/ConfigurationCQ/Queries/GetAllConfigurations/GetAllConfigurationsQueryHandler.cs +++ b/src/BackOffice.BFF.Application/ConfigurationCQ/Queries/GetAllConfigurations/GetAllConfigurationsQueryHandler.cs @@ -1,4 +1,4 @@ -using BackOffice.BFF.Configuration.Protobuf; +using Foursat.BackOffice.BFF.Configuration.Protos; namespace BackOffice.BFF.Application.ConfigurationCQ.Queries.GetAllConfigurations; diff --git a/src/BackOffice.BFF.Application/ConfigurationCQ/Queries/GetCurrentVatPercentage/GetCurrentVatPercentageQueryHandler.cs b/src/BackOffice.BFF.Application/ConfigurationCQ/Queries/GetCurrentVatPercentage/GetCurrentVatPercentageQueryHandler.cs index 4cce633..f9f5d1b 100644 --- a/src/BackOffice.BFF.Application/ConfigurationCQ/Queries/GetCurrentVatPercentage/GetCurrentVatPercentageQueryHandler.cs +++ b/src/BackOffice.BFF.Application/ConfigurationCQ/Queries/GetCurrentVatPercentage/GetCurrentVatPercentageQueryHandler.cs @@ -1,5 +1,5 @@ using BackOffice.BFF.Application.Common.Interfaces; -using BackOffice.BFF.Configuration.Protobuf; +using Foursat.BackOffice.BFF.Configuration.Protos; using MediatR; using Microsoft.Extensions.Logging; diff --git a/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeQuery.cs b/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeQuery.cs index 398598e..8b72d88 100644 --- a/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeQuery.cs +++ b/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeQuery.cs @@ -5,7 +5,7 @@ public record GetNetworkTreeQuery : IRequest /// /// شناسه کاربر ریشه (Root) /// - public long RootUserId { get; init; } + public long UserId { get; init; } /// /// حداکثر عمق درخت (اختیاری، پیش‌فرض: 5) diff --git a/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeQueryHandler.cs b/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeQueryHandler.cs index 33709d2..31a670b 100644 --- a/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeQueryHandler.cs +++ b/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeQueryHandler.cs @@ -14,6 +14,7 @@ public class GetNetworkTreeQueryHandler : IRequestHandler Handle(GetNetworkTreeQuery request, CancellationToken cancellationToken) { + var x=request.Adapt(); var response = await _context.NetworkMemberships.GetNetworkTreeAsync( request.Adapt(), cancellationToken: cancellationToken); diff --git a/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeResponseDto.cs b/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeResponseDto.cs index 8d9c5bf..13586a8 100644 --- a/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeResponseDto.cs +++ b/src/BackOffice.BFF.Application/NetworkMembershipCQ/Queries/GetNetworkTree/GetNetworkTreeResponseDto.cs @@ -28,20 +28,20 @@ public class NetworkTreeNodeDto /// /// موقعیت در شبکه (0=Left, 1=Right) /// - public int NetworkLeg { get; set; } + public int? NetworkLeg { get; set; } /// /// سطح در شبکه /// - public int NetworkLevel { get; set; } + public int? NetworkLevel { get; set; } /// /// وضعیت فعال/غیرفعال /// - public bool IsActive { get; set; } + public bool? IsActive { get; set; } /// /// تاریخ عضویت /// - public DateTime JoinedAt { get; set; } + public DateTime? JoinedAt { get; set; } } diff --git a/src/BackOffice.BFF.Domain/BackOffice.BFF.Domain.csproj b/src/BackOffice.BFF.Domain/BackOffice.BFF.Domain.csproj index 1187a28..c1131f2 100644 --- a/src/BackOffice.BFF.Domain/BackOffice.BFF.Domain.csproj +++ b/src/BackOffice.BFF.Domain/BackOffice.BFF.Domain.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/BackOffice.BFF.WebApi/BackOffice.BFF.WebApi.csproj b/src/BackOffice.BFF.WebApi/BackOffice.BFF.WebApi.csproj index 02a3b72..95cd681 100644 --- a/src/BackOffice.BFF.WebApi/BackOffice.BFF.WebApi.csproj +++ b/src/BackOffice.BFF.WebApi/BackOffice.BFF.WebApi.csproj @@ -43,6 +43,11 @@ + + + + + diff --git a/src/BackOffice.BFF.WebApi/Services/ClubMembershipService.cs b/src/BackOffice.BFF.WebApi/Services/ClubMembershipService.cs index a3d35fe..b9a66d6 100644 --- a/src/BackOffice.BFF.WebApi/Services/ClubMembershipService.cs +++ b/src/BackOffice.BFF.WebApi/Services/ClubMembershipService.cs @@ -1,7 +1,7 @@ using BackOffice.BFF.WebApi.Common.Services; using BackOffice.BFF.Application.ClubMembershipCQ.Commands.ActivateClub; using BackOffice.BFF.Application.ClubMembershipCQ.Queries.GetAllClubMembers; -using CMSMicroservice.Protobuf.Protos.ClubMembership; +using Foursat.BackOffice.BFF.ClubMembership.Protos; using Google.Protobuf.WellKnownTypes; namespace BackOffice.BFF.WebApi.Services; diff --git a/src/BackOffice.BFF.WebApi/Services/CommissionService.cs b/src/BackOffice.BFF.WebApi/Services/CommissionService.cs index 602ba8a..d61b2f7 100644 --- a/src/BackOffice.BFF.WebApi/Services/CommissionService.cs +++ b/src/BackOffice.BFF.WebApi/Services/CommissionService.cs @@ -8,7 +8,7 @@ using BackOffice.BFF.Application.CommissionCQ.Queries.GetWithdrawalReports; using BackOffice.BFF.Application.CommissionCQ.Commands.ApproveWithdrawal; using BackOffice.BFF.Application.CommissionCQ.Commands.RejectWithdrawal; // using BackOffice.BFF.Application.CommissionCQ.Commands.ProcessWithdrawal; // Excluded - needs proto fix -using CMSMicroservice.Protobuf.Protos.Commission; +using Foursat.BackOffice.BFF.Commission.Protos; using Google.Protobuf.WellKnownTypes; namespace BackOffice.BFF.WebApi.Services; diff --git a/src/BackOffice.BFF.WebApi/Services/ConfigurationService.cs b/src/BackOffice.BFF.WebApi/Services/ConfigurationService.cs index cd078b3..8a294cd 100644 --- a/src/BackOffice.BFF.WebApi/Services/ConfigurationService.cs +++ b/src/BackOffice.BFF.WebApi/Services/ConfigurationService.cs @@ -1,14 +1,10 @@ -using CMSMicroservice.Protobuf.Protos.Configuration; using BackOffice.BFF.WebApi.Common.Services; using BackOffice.BFF.Application.ConfigurationCQ.Commands.CreateOrUpdateConfiguration; using BackOffice.BFF.Application.ConfigurationCQ.Commands.DeactivateConfiguration; using BackOffice.BFF.Application.ConfigurationCQ.Queries.GetAllConfigurations; +using Foursat.BackOffice.BFF.Configuration.Protos; using Grpc.Core; using Google.Protobuf.WellKnownTypes; -using BFFConfigRequest = BackOffice.BFF.Configuration.Protobuf.CreateOrUpdateConfigurationRequest; -using BFFDeactivateRequest = BackOffice.BFF.Configuration.Protobuf.DeactivateConfigurationRequest; -using BFFGetAllRequest = BackOffice.BFF.Configuration.Protobuf.GetAllConfigurationsRequest; -using BFFGetAllResponse = BackOffice.BFF.Configuration.Protobuf.GetAllConfigurationsResponse; namespace BackOffice.BFF.WebApi.Services; diff --git a/src/BackOffice.BFF.WebApi/Services/NetworkMembershipService.cs b/src/BackOffice.BFF.WebApi/Services/NetworkMembershipService.cs index cb801da..4d20a69 100644 --- a/src/BackOffice.BFF.WebApi/Services/NetworkMembershipService.cs +++ b/src/BackOffice.BFF.WebApi/Services/NetworkMembershipService.cs @@ -2,7 +2,7 @@ using BackOffice.BFF.WebApi.Common.Services; using BackOffice.BFF.Application.NetworkMembershipCQ.Queries.GetUserNetworkInfo; using BackOffice.BFF.Application.NetworkMembershipCQ.Queries.GetNetworkTree; using BackOffice.BFF.Application.NetworkMembershipCQ.Queries.GetNetworkHistory; -using CMSMicroservice.Protobuf.Protos.NetworkMembership; +using Foursat.BackOffice.BFF.NetworkMembership.Protos; namespace BackOffice.BFF.WebApi.Services; @@ -28,6 +28,7 @@ public class NetworkMembershipService : NetworkMembershipContract.NetworkMembers GetNetworkTreeRequest request, ServerCallContext context) { + return await _dispatchRequestToCQRS.Handle( request, context); diff --git a/src/BackOffice.BFF.WebApi/appsettings.json b/src/BackOffice.BFF.WebApi/appsettings.json index 2263612..ff0a112 100644 --- a/src/BackOffice.BFF.WebApi/appsettings.json +++ b/src/BackOffice.BFF.WebApi/appsettings.json @@ -11,7 +11,8 @@ }, "GrpcChannelOptions": { "FMSMSAddress": "https://dl.afrino.co", - "CMSMSAddress": "http://cms-svc:80" +// "CMSMSAddress": "http://cms-svc:80" + "CMSMSAddress": "https://cms.foursat.afrino.co" }, "Authentication": { "Authority": "https://ids.domain.com/", diff --git a/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/BackOffice.BFF.ClubMembership.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/BackOffice.BFF.ClubMembership.Protobuf.csproj index d6757ed..a93ed81 100644 --- a/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/BackOffice.BFF.ClubMembership.Protobuf.csproj +++ b/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/BackOffice.BFF.ClubMembership.Protobuf.csproj @@ -20,10 +20,11 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + - + diff --git a/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/Protos/clubmembership.proto b/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/Protos/clubmembership.proto index 27730cb..49292b5 100644 --- a/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/Protos/clubmembership.proto +++ b/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/Protos/clubmembership.proto @@ -6,18 +6,50 @@ import "public_messages.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/wrappers.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; -option csharp_namespace = "Foursat.BackOffice.BFF.ClubMembership.Protobuf"; +option csharp_namespace = "Foursat.BackOffice.BFF.ClubMembership.Protos"; service ClubMembershipContract { - rpc ActivateClubMembership(ActivateClubMembershipRequest) returns (google.protobuf.Empty); - rpc DeactivateClubMembership(DeactivateClubMembershipRequest) returns (google.protobuf.Empty); - rpc AssignFeatureToMembership(AssignFeatureToMembershipRequest) returns (google.protobuf.Empty); - rpc GetClubMembership(GetClubMembershipRequest) returns (GetClubMembershipResponse); - rpc GetAllClubMemberships(GetAllClubMembershipsRequest) returns (GetAllClubMembershipsResponse); - rpc GetClubMembershipHistory(GetClubMembershipHistoryRequest) returns (GetClubMembershipHistoryResponse); - rpc GetClubStatistics(GetClubStatisticsRequest) returns (GetClubStatisticsResponse); + rpc ActivateClubMembership(ActivateClubMembershipRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/ActivateClubMembership" + body: "*" + }; + }; + rpc DeactivateClubMembership(DeactivateClubMembershipRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/DeactivateClubMembership" + body: "*" + }; + }; + rpc AssignFeatureToMembership(AssignFeatureToMembershipRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/AssignFeatureToMembership" + body: "*" + }; + }; + rpc GetClubMembership(GetClubMembershipRequest) returns (GetClubMembershipResponse){ + option (google.api.http) = { + get: "/GetClubMembership" + }; + }; + rpc GetAllClubMemberships(GetAllClubMembershipsRequest) returns (GetAllClubMembershipsResponse){ + option (google.api.http) = { + get: "/GetAllClubMemberships" + }; + }; + rpc GetClubMembershipHistory(GetClubMembershipHistoryRequest) returns (GetClubMembershipHistoryResponse){ + option (google.api.http) = { + get: "/GetClubMembershipHistory" + }; + }; + rpc GetClubStatistics(GetClubStatisticsRequest) returns (GetClubStatisticsResponse){ + option (google.api.http) = { + get: "/GetClubStatistics" + }; + }; } // Activate Command diff --git a/src/Protobufs/BackOffice.BFF.Commission.Protobuf/BackOffice.BFF.Commission.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.Commission.Protobuf/BackOffice.BFF.Commission.Protobuf.csproj index 9c496d3..884063d 100644 --- a/src/Protobufs/BackOffice.BFF.Commission.Protobuf/BackOffice.BFF.Commission.Protobuf.csproj +++ b/src/Protobufs/BackOffice.BFF.Commission.Protobuf/BackOffice.BFF.Commission.Protobuf.csproj @@ -24,7 +24,7 @@ - + diff --git a/src/Protobufs/BackOffice.BFF.Commission.Protobuf/Protos/commission.proto b/src/Protobufs/BackOffice.BFF.Commission.Protobuf/Protos/commission.proto index 3a754a3..0bae518 100644 --- a/src/Protobufs/BackOffice.BFF.Commission.Protobuf/Protos/commission.proto +++ b/src/Protobufs/BackOffice.BFF.Commission.Protobuf/Protos/commission.proto @@ -6,49 +6,109 @@ import "public_messages.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/wrappers.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; -option csharp_namespace = "BackOffice.BFF.Commission.Protobuf"; +option csharp_namespace = "Foursat.BackOffice.BFF.Commission.Protos"; service CommissionContract { // Commands rpc CalculateWeeklyBalances(CalculateWeeklyBalancesRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/CalculateWeeklyBalances" + body: "*" + }; }; rpc CalculateWeeklyCommissionPool(CalculateWeeklyCommissionPoolRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/CalculateWeeklyCommissionPool" + body: "*" + }; }; rpc ProcessUserPayouts(ProcessUserPayoutsRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/ProcessUserPayouts" + body: "*" + }; }; rpc RequestWithdrawal(RequestWithdrawalRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/RequestWithdrawal" + body: "*" + }; }; rpc ProcessWithdrawal(ProcessWithdrawalRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/ProcessWithdrawal" + body: "*" + }; }; // Queries rpc GetWeeklyCommissionPool(GetWeeklyCommissionPoolRequest) returns (GetWeeklyCommissionPoolResponse){ + option (google.api.http) = { + get: "/GetWeeklyCommissionPool" + }; }; rpc GetUserCommissionPayouts(GetUserCommissionPayoutsRequest) returns (GetUserCommissionPayoutsResponse){ + option (google.api.http) = { + get: "/GetUserCommissionPayouts" + }; }; rpc GetCommissionPayoutHistory(GetCommissionPayoutHistoryRequest) returns (GetCommissionPayoutHistoryResponse){ + option (google.api.http) = { + get: "/GetCommissionPayoutHistory" + }; }; rpc GetUserWeeklyBalances(GetUserWeeklyBalancesRequest) returns (GetUserWeeklyBalancesResponse){ + option (google.api.http) = { + get: "/GetUserWeeklyBalances" + }; }; rpc GetAllWeeklyPools(GetAllWeeklyPoolsRequest) returns (GetAllWeeklyPoolsResponse){ + option (google.api.http) = { + get: "/GetAllWeeklyPools" + }; }; rpc GetWithdrawalRequests(GetWithdrawalRequestsRequest) returns (GetWithdrawalRequestsResponse){ + option (google.api.http) = { + get: "/GetWithdrawalRequests" + }; }; rpc ApproveWithdrawal(ApproveWithdrawalRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/ApproveWithdrawal" + body: "*" + }; }; rpc RejectWithdrawal(RejectWithdrawalRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/RejectWithdrawal" + body: "*" + }; }; // Worker Control APIs rpc TriggerWeeklyCalculation(TriggerWeeklyCalculationRequest) returns (TriggerWeeklyCalculationResponse){ + option (google.api.http) = { + post: "/TriggerWeeklyCalculation" + body: "*" + }; }; rpc GetWorkerStatus(GetWorkerStatusRequest) returns (GetWorkerStatusResponse){ + option (google.api.http) = { + get: "/GetWorkerStatus" + }; }; rpc GetWorkerExecutionLogs(GetWorkerExecutionLogsRequest) returns (GetWorkerExecutionLogsResponse){ + option (google.api.http) = { + get: "/GetWorkerExecutionLogs" + }; }; rpc GetWithdrawalReports(GetWithdrawalReportsRequest) returns (GetWithdrawalReportsResponse){ + option (google.api.http) = { + get: "/GetWithdrawalReports" + }; }; } diff --git a/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/BackOffice.BFF.Configuration.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/BackOffice.BFF.Configuration.Protobuf.csproj index b193ad2..fed7a5e 100644 --- a/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/BackOffice.BFF.Configuration.Protobuf.csproj +++ b/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/BackOffice.BFF.Configuration.Protobuf.csproj @@ -20,10 +20,11 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + - + diff --git a/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/Protos/configuration.proto b/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/Protos/configuration.proto index 6582c73..32f2bb4 100644 --- a/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/Protos/configuration.proto +++ b/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/Protos/configuration.proto @@ -6,16 +6,39 @@ import "public_messages.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/wrappers.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; -option csharp_namespace = "Foursat.BackOffice.BFF.Configuration.Protobuf"; +option csharp_namespace = "Foursat.BackOffice.BFF.Configuration.Protos"; service ConfigurationContract { - rpc CreateOrUpdateConfiguration(CreateOrUpdateConfigurationRequest) returns (google.protobuf.Empty); - rpc DeactivateConfiguration(DeactivateConfigurationRequest) returns (google.protobuf.Empty); - rpc GetConfigurationByKey(GetConfigurationByKeyRequest) returns (GetConfigurationByKeyResponse); - rpc GetAllConfigurations(GetAllConfigurationsRequest) returns (GetAllConfigurationsResponse); - rpc GetConfigurationHistory(GetConfigurationHistoryRequest) returns (GetConfigurationHistoryResponse); + rpc CreateOrUpdateConfiguration(CreateOrUpdateConfigurationRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/CreateOrUpdateConfiguration" + body: "*" + }; + }; + rpc DeactivateConfiguration(DeactivateConfigurationRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/DeactivateConfiguration" + body: "*" + }; + }; + rpc GetConfigurationByKey(GetConfigurationByKeyRequest) returns (GetConfigurationByKeyResponse){ + option (google.api.http) = { + get: "/GetConfigurationByKey" + }; + }; + rpc GetAllConfigurations(GetAllConfigurationsRequest) returns (GetAllConfigurationsResponse){ + option (google.api.http) = { + get: "/GetAllConfigurations" + }; + }; + rpc GetConfigurationHistory(GetConfigurationHistoryRequest) returns (GetConfigurationHistoryResponse){ + option (google.api.http) = { + get: "/GetConfigurationHistory" + }; + }; } // CreateOrUpdate Command diff --git a/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/BackOffice.BFF.NetworkMembership.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/BackOffice.BFF.NetworkMembership.Protobuf.csproj index bbd7eee..2d8935c 100644 --- a/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/BackOffice.BFF.NetworkMembership.Protobuf.csproj +++ b/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/BackOffice.BFF.NetworkMembership.Protobuf.csproj @@ -20,10 +20,11 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + - + diff --git a/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/Protos/networkmembership.proto b/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/Protos/networkmembership.proto index 33fa96b..39ccec3 100644 --- a/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/Protos/networkmembership.proto +++ b/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/Protos/networkmembership.proto @@ -6,18 +6,50 @@ import "public_messages.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/wrappers.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; -option csharp_namespace = "BackOffice.BFF.NetworkMembership.Protobuf"; +option csharp_namespace = "Foursat.BackOffice.BFF.NetworkMembership.Protos"; service NetworkMembershipContract { - rpc JoinNetwork(JoinNetworkRequest) returns (google.protobuf.Empty); - rpc ChangeNetworkParent(ChangeNetworkParentRequest) returns (google.protobuf.Empty); - rpc RemoveFromNetwork(RemoveFromNetworkRequest) returns (google.protobuf.Empty); - rpc GetUserNetwork(GetUserNetworkRequest) returns (GetUserNetworkResponse); - rpc GetNetworkTree(GetNetworkTreeRequest) returns (GetNetworkTreeResponse); - rpc GetNetworkMembershipHistory(GetNetworkMembershipHistoryRequest) returns (GetNetworkMembershipHistoryResponse); - rpc GetNetworkStatistics(GetNetworkStatisticsRequest) returns (GetNetworkStatisticsResponse); + rpc JoinNetwork(JoinNetworkRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/JoinNetwork" + body: "*" + }; + }; + rpc ChangeNetworkParent(ChangeNetworkParentRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/ChangeNetworkParent" + body: "*" + }; + }; + rpc RemoveFromNetwork(RemoveFromNetworkRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + delete: "/RemoveFromNetwork" + body: "*" + }; + }; + rpc GetUserNetwork(GetUserNetworkRequest) returns (GetUserNetworkResponse){ + option (google.api.http) = { + get: "/GetUserNetwork" + }; + }; + rpc GetNetworkTree(GetNetworkTreeRequest) returns (GetNetworkTreeResponse){ + option (google.api.http) = { + get: "/GetNetworkTree" + }; + }; + rpc GetNetworkMembershipHistory(GetNetworkMembershipHistoryRequest) returns (GetNetworkMembershipHistoryResponse){ + option (google.api.http) = { + get: "/GetNetworkMembershipHistory" + }; + }; + rpc GetNetworkStatistics(GetNetworkStatisticsRequest) returns (GetNetworkStatisticsResponse){ + option (google.api.http) = { + get: "/GetNetworkStatistics" + }; + }; } // JoinNetwork Command @@ -72,7 +104,7 @@ message GetUserNetworkResponse // GetNetworkTree Query message GetNetworkTreeRequest { - int64 root_user_id = 1; + int64 user_id = 1; google.protobuf.Int32Value max_depth = 2; google.protobuf.BoolValue only_active = 3; } @@ -87,9 +119,9 @@ message NetworkTreeNodeModel int64 user_id = 1; string user_name = 2; google.protobuf.Int64Value parent_id = 3; - int32 network_leg = 4; - int32 network_level = 5; - bool is_active = 6; + google.protobuf.Int32Value network_leg = 4; + google.protobuf.Int32Value network_level = 5; + google.protobuf.BoolValue is_active = 6; google.protobuf.Timestamp joined_at = 7; }