refactor: update protobuf imports and add HTTP annotations
This commit is contained in:
@@ -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"
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user