2023-12-08 06:35:04 +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-08-02 13:35:03 +00:00
|
|
|
rpc CreateBookingSilvermobi(CreateBookingSilvermobiRequest) returns (CreateBookingSilvermobiResponse) {}
|
|
|
|
rpc UpdateBookingSilvermobi(UpdateBookingSilvermobiRequest) returns (UpdateBookingSilvermobiResponse) {}
|
|
|
|
rpc GetBookingSilvermobi(GetBookingSilvermobiRequest) returns (GetBookingSilvermobiResponse) {}
|
2023-12-08 06:35:04 +00:00
|
|
|
rpc GetBookingsByStatus(GetBookingsByStatusRequest) returns (GetBookingsByStatusResponse) {}
|
|
|
|
rpc DriverJourneys(DriverJourneysRequest) returns (DriverJourneysResponse) {}
|
|
|
|
rpc SetPassengerTrip(PassengerTripRequest) returns (PassengerTripResponse) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message PassengerTripRequest{
|
|
|
|
User passenger = 1;
|
2024-08-02 13:11:30 +00:00
|
|
|
Preferences preferences = 2;
|
2023-12-08 06:35:04 +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-08-02 13:11:30 +00:00
|
|
|
string message = 2;
|
2023-12-08 06:35:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DriverAvailabilitiesResponse {
|
|
|
|
bool success = 1;
|
2024-08-02 13:11:30 +00:00
|
|
|
string message = 2;
|
2023-12-08 06:35:04 +00:00
|
|
|
}
|
|
|
|
|
2024-08-02 13:35:03 +00:00
|
|
|
message CreateBookingSilvermobiRequest {
|
|
|
|
BookingSilvermobiRequest booking = 1;
|
2023-12-08 06:35:04 +00:00
|
|
|
}
|
2024-08-02 13:35:03 +00:00
|
|
|
message CreateBookingSilvermobiResponse {
|
|
|
|
BookingSilvermobi booking = 1;
|
2023-12-08 06:35:04 +00:00
|
|
|
}
|
|
|
|
|
2024-08-02 13:35:03 +00:00
|
|
|
message UpdateBookingSilvermobiRequest {
|
2023-12-08 06:35:04 +00:00
|
|
|
string booking_id = 1;
|
2024-08-02 13:35:03 +00:00
|
|
|
BookingSilvermobiStatus status = 2;
|
2024-08-02 13:11:30 +00:00
|
|
|
string message = 3;
|
2023-12-08 06:35:04 +00:00
|
|
|
}
|
|
|
|
|
2024-08-02 13:35:03 +00:00
|
|
|
message UpdateBookingSilvermobiResponse {
|
2023-12-08 06:35:04 +00:00
|
|
|
bool success = 1;
|
2024-08-02 13:11:30 +00:00
|
|
|
string message = 2;
|
2023-12-08 06:35:04 +00:00
|
|
|
}
|
|
|
|
|
2024-08-02 13:35:03 +00:00
|
|
|
message GetBookingSilvermobiRequest {
|
2023-12-08 06:35:04 +00:00
|
|
|
string booking_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-08-02 13:35:03 +00:00
|
|
|
message GetBookingSilvermobiResponse {
|
|
|
|
BookingSilvermobi booking = 1;
|
2023-12-08 06:35:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetBookingsByStatusRequest{
|
2024-08-02 13:35:03 +00:00
|
|
|
BookingSilvermobiStatus status = 1;
|
2023-12-08 06:35:04 +00:00
|
|
|
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-08-02 13:35:03 +00:00
|
|
|
repeated BookingSilvermobi booking = 1;
|
2023-12-08 06:35:04 +00:00
|
|
|
}
|