solidarity-service/servers/grpc/proto/solidarity-api.proto

87 lines
2.4 KiB
Protocol Buffer
Raw Normal View History

2023-10-20 11:41:39 +00:00
syntax = "proto3";
option go_package = "git.coopgo.io/coopgo-platform/solidarity-service/servers/grpc/proto";
import "google/protobuf/timestamp.proto";
import "solidarity-api-types.proto";
service SolidarityService {
rpc SetDriverRegularAvailabilities(DriverRegularAvailabilities) returns (DriverAvailabilitiesResponse) {}
rpc SetDriverPunctualAvailabilities(DriverPunctualAvailabilities) returns (DriverAvailabilitiesResponse) {}
2024-07-31 11:33:11 +00:00
rpc CreateBookingSilvermobi(CreateBookingSilvermobiRequest) returns (CreateBookingSilvermobiResponse) {}
rpc UpdateBookingSilvermobi(UpdateBookingSilvermobiRequest) returns (UpdateBookingSilvermobiResponse) {}
rpc GetBookingSilvermobi(GetBookingSilvermobiRequest) returns (GetBookingSilvermobiResponse) {}
2023-10-20 11:41:39 +00:00
rpc GetBookingsByStatus(GetBookingsByStatusRequest) returns (GetBookingsByStatusResponse) {}
rpc DriverJourneys(DriverJourneysRequest) returns (DriverJourneysResponse) {}
rpc SetPassengerTrip(PassengerTripRequest) returns (PassengerTripResponse) {}
}
message PassengerTripRequest{
2023-12-08 06:31:41 +00:00
User passenger = 1;
2024-07-31 11:33:11 +00:00
Preferences preferences = 2;
2023-10-20 11:41:39 +00:00
}
message DriverRegularAvailabilities{
DriverRequest driver_request = 1;
repeated RegularAvailabilitySlot driver_availabilities = 2;
}
message DriverPunctualAvailabilities{
DriverRequest driver_request = 1;
repeated PunctualAvailabilitySlot driver_availabilities = 2;
}
message PassengerTripResponse {
bool success = 1;
2024-07-31 11:33:11 +00:00
string message = 2;
2023-10-20 11:41:39 +00:00
}
message DriverAvailabilitiesResponse {
bool success = 1;
2024-07-31 11:33:11 +00:00
string message = 2;
2023-10-20 11:41:39 +00:00
}
2024-07-31 11:33:11 +00:00
message CreateBookingSilvermobiRequest {
2023-10-20 11:41:39 +00:00
BookingRequest booking = 1;
}
2024-07-31 11:33:11 +00:00
message CreateBookingSilvermobiResponse {
2024-07-26 09:21:05 +00:00
BookingSilvermobi booking = 1;
2023-10-20 11:41:39 +00:00
}
2024-07-31 11:33:11 +00:00
message UpdateBookingSilvermobiRequest {
2023-10-20 11:41:39 +00:00
string booking_id = 1;
BookingStatus status = 2;
2024-07-31 11:33:11 +00:00
string message = 3;
2023-10-20 11:41:39 +00:00
}
2024-07-31 11:33:11 +00:00
message UpdateBookingSilvermobiResponse {
2023-10-20 11:41:39 +00:00
bool success = 1;
2024-07-31 11:33:11 +00:00
string message = 2;
2023-10-20 11:41:39 +00:00
}
2024-07-31 11:33:11 +00:00
message GetBookingSilvermobiRequest {
2023-10-20 11:41:39 +00:00
string booking_id = 1;
}
2024-07-31 11:33:11 +00:00
message GetBookingSilvermobiResponse {
2024-07-26 09:21:05 +00:00
BookingSilvermobi booking = 1;
2023-10-20 11:41:39 +00:00
}
message GetBookingsByStatusRequest{
BookingStatus status = 1;
UserType type = 2;
string user_id = 3;
}
message DriverJourneysRequest {
Feature departure = 1;
google.protobuf.Timestamp departure_date = 2;
}
message DriverJourneysResponse {
repeated DriverJourney driver_journeys = 1;
}
message GetBookingsByStatusResponse{
2024-07-26 09:21:05 +00:00
repeated BookingSilvermobi booking = 1;
2023-10-20 11:41:39 +00:00
}