syntax = "proto3"; package rider; import "google/protobuf/empty.proto"; import "google/protobuf/wrappers.proto"; option go_package = "github.com/soardigital/klozr-protobuf/rider"; service RiderService { rpc createRider(RiderCreateRequest) returns (google.protobuf.StringValue); rpc updateRider(RiderUpdateRequest) returns (google.protobuf.BoolValue); rpc deleteRider(google.protobuf.StringValue) returns (google.protobuf.Empty); rpc getRiderByPid(google.protobuf.StringValue) returns (Rider); rpc getRidersByPids(RiderStringsRequest) returns (Riders); rpc verifyAccount(VerifyAccountRequest) returns (google.protobuf.BoolValue); rpc resendVerificationCode(google.protobuf.StringValue) returns (google.protobuf.BoolValue); rpc forgotPassword(google.protobuf.StringValue) returns (google.protobuf.Empty); rpc resetPassword(ResetPasswordRequest) returns (google.protobuf.BoolValue); rpc AddAuthorizationCode(AddPaystackAuthorizationCodeRequest) returns (google.protobuf.StringValue); rpc RemoveAuthorizationCode(RemovePaystackAuthorizationCodeRequest) returns (google.protobuf.BoolValue); } message ResetPasswordRequest { string identity = 1; string otp = 2; string password = 3; } message VerifyAccountRequest { string identity = 1; string otp = 2; } message RiderCreateRequest { google.protobuf.StringValue familyName = 1; google.protobuf.StringValue givenName = 2; Address address = 3; string email = 4; google.protobuf.StringValue phoneNumber = 5; string password = 6; } message RiderUpdateRequest { google.protobuf.StringValue familyName = 1; google.protobuf.StringValue givenName = 2; Address address = 3; google.protobuf.StringValue email = 4; google.protobuf.StringValue phoneNumber = 5; string pid = 6; } message Rider { string pid = 1; google.protobuf.StringValue familyName = 2; google.protobuf.StringValue givenName = 3; Address address = 4; string email = 5; google.protobuf.StringValue phoneNumber = 6; repeated PaystackAuthorizationCode paystackAuthorizations = 7; PaystackCustomerDetails paystack_customer_details = 8; repeated Vehicle vehicles = 9; } message PaystackCustomerDetails { string customer_code = 1; int64 customer_id = 2; } message AddPaystackAuthorizationCodeRequest { PaystackAuthorizationCode authorizationCode = 1; string ownerPid = 2; } message RemovePaystackAuthorizationCodeRequest { string authorizationCodePid = 1; string ownerPid = 2; } message PaystackAuthorizationCode { string authorization_code = 1; string bin = 2; string last4 = 3; string exp_month = 4; string exp_year = 5; string channel = 6; string card_type = 7; string bank = 8; string country_code = 9; string brand = 10; bool reusable = 11; string signature = 12; google.protobuf.StringValue account_name = 13; string pid = 14; } message Riders { repeated Rider riders = 1; } message Address { google.protobuf.StringValue address = 1; google.protobuf.StringValue city = 2; google.protobuf.StringValue country = 3; } message RiderStringsRequest { repeated string requests = 1; } service VehicleService { rpc AddVehicleToRider(VehicleRequest) returns (google.protobuf.BoolValue); rpc RemoveVehicleFromRider(RiderVehicleRequest) returns (google.protobuf.BoolValue); rpc AddDriverToVehicle(AddDriverToVehicleRequest) returns (google.protobuf.BoolValue); rpc RemoveDriverFromVehicle(DriverVehicleRequest) returns (google.protobuf.BoolValue); } message AddDriverToVehicleRequest { string vehicle_pid = 1; DriverRequest driver = 2; string rider_pid = 3; } message DriverVehicleRequest { string vehicle_pid = 1; string driver_pid = 2; string rider_pid = 3; } message RiderVehicleRequest { string vehicle_pid = 1; string rider_pid = 3; } message VehicleRequest { google.protobuf.StringValue v_type = 1; google.protobuf.StringValue manufacturer = 2; google.protobuf.StringValue model = 3; google.protobuf.StringValue year = 4; google.protobuf.StringValue license_plate = 5; google.protobuf.StringValue color = 6; repeated string vehicle_photos = 7; google.protobuf.StringValue vehicle_registration_certificate_front = 8; google.protobuf.StringValue vehicle_registration_certificate_back = 9; repeated DriverRequest drivers = 10; string rider_pid = 11; } message DriverRequest { google.protobuf.StringValue driver_license_number = 1; google.protobuf.StringValue driver_license_date_of_expiration = 2; google.protobuf.StringValue driver_license_front = 3; google.protobuf.StringValue driver_license_back = 4; google.protobuf.StringValue driver_profile_photo = 5; } message Vehicle { google.protobuf.StringValue v_type = 1; google.protobuf.StringValue manufacturer = 2; google.protobuf.StringValue model = 3; google.protobuf.StringValue year = 4; google.protobuf.StringValue license_plate = 5; google.protobuf.StringValue color = 6; repeated string vehicle_photos = 7; google.protobuf.StringValue vehicle_registration_certificate_front = 8; google.protobuf.StringValue vehicle_registration_certificate_back = 9; repeated Driver drivers = 10; string pid = 11; } message Driver { google.protobuf.StringValue driver_license_number = 1; google.protobuf.StringValue driver_license_date_of_expiration = 2; google.protobuf.StringValue driver_license_front = 3; google.protobuf.StringValue driver_license_back = 4; google.protobuf.StringValue driver_profile_photo = 5; string pid = 6; } service InviteService { rpc Invite(InviteRequest) returns (google.protobuf.BoolValue); } message InviteRequest { string email = 1; google.protobuf.StringValue family_name = 2; google.protobuf.StringValue given_name = 3; } message InviteResponse { string email = 1; google.protobuf.StringValue family_name = 2; google.protobuf.StringValue given_name = 3; string pid = 4; InviteStatus status = 5; string expiry_date = 6; } enum InviteStatus { ACCEPTED = 0; REJECTED = 1; PENDING = 2; }