syntax = "proto3"; package owner; import "google/protobuf/empty.proto"; import "google/protobuf/wrappers.proto"; option go_package = "github.com/soardigital/klozr-protobuf/owner"; service OwnerService { rpc createOwner(OwnerCreateRequest) returns (google.protobuf.StringValue); rpc updateOwner(OwnerUpdateRequest) returns (google.protobuf.BoolValue); rpc deleteOwner(google.protobuf.StringValue) returns (google.protobuf.Empty); rpc getOwnerByPid(google.protobuf.StringValue) returns (Owner); rpc getOwnersByPids(OwnerStringsRequest) returns (Owners); rpc verifyAccount(VerifyAccountRequest) returns (google.protobuf.BoolValue); rpc resendVerificationCode(google.protobuf.StringValue) returns (google.protobuf.BoolValue); rpc resetPassword(ResetPasswordRequest) returns (google.protobuf.BoolValue); rpc forgotPassword(google.protobuf.StringValue) returns (google.protobuf.Empty); rpc AddAuthorizationCode(AddPaystackAuthorizationCodeRequest) returns (google.protobuf.StringValue); rpc RemoveAuthorizationCode(RemovePaystackAuthorizationCodeRequest) returns (google.protobuf.BoolValue); rpc BusinessOnboarding(BusinessRequest) returns (google.protobuf.StringValue); } message ResetPasswordRequest { string identity = 1; string otp = 2; string password = 3; } message VerifyAccountRequest { string identity = 1; string otp = 2; } message OwnerCreateRequest { google.protobuf.StringValue family_name = 1; google.protobuf.StringValue given_name = 2; Address address = 3; string email = 4; google.protobuf.StringValue phone_number = 5; string password = 6; } message OwnerUpdateRequest { google.protobuf.StringValue family_name = 1; google.protobuf.StringValue given_name = 2; Address address = 3; google.protobuf.StringValue email = 4; google.protobuf.StringValue phone_number = 5; string pid = 6; google.protobuf.StringValue primary_use = 7; google.protobuf.StringValue location = 8; } message BusinessRequest { string name = 1; google.protobuf.StringValue phone_number = 2; google.protobuf.StringValue email = 3; google.protobuf.StringValue address = 4; } message Business { google.protobuf.StringValue name = 1; google.protobuf.StringValue phone_number = 2; google.protobuf.StringValue email = 3; google.protobuf.StringValue address = 4; string pid = 5; } message Owner { string pid = 1; google.protobuf.StringValue family_name = 2; google.protobuf.StringValue given_name = 3; Address address = 4; string email = 5; google.protobuf.StringValue phone_number = 6; repeated PaystackAuthorizationCode paystack_authorizations = 7; PaystackCustomerDetails paystack_customer_details = 8; google.protobuf.StringValue primary_use = 9; google.protobuf.StringValue location = 10; repeated Business business = 11; } message PaystackCustomerDetails { string customer_code = 1; int64 customer_id = 2; } message Owners { repeated Owner owners = 1; } message Address { google.protobuf.StringValue address = 1; google.protobuf.StringValue city = 2; google.protobuf.StringValue country = 3; } message OwnerStringsRequest { repeated string requests = 1; } message AddPaystackAuthorizationCodeRequest { PaystackAuthorizationCode authorization_code = 1; string owner_pid = 2; } message RemovePaystackAuthorizationCodeRequest { string authorization_code_pid = 1; string owner_pid = 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; }