syntax = "proto3"; package identity; message UserID { string id = 1; string email = 2; } message UserProfile { string id = 1; string email = 2; bool email_verified = 3; string phone_number = 4; bool phone_number_verified = 5; string given_name = 6; string family_name = 7; string locale = 8; } message CreateUserProfile { string email = 1; string phone_number = 2; string given_name = 3; string family_name = 4; string locale = 5; } message UpdateUserProfile { string id = 1; string email = 2; bool email_verified = 3; string phone_number = 4; bool phone_number_verified = 5; string given_name = 6; string family_name = 7; string locale = 8; } message PasswordlessCode { UserID user = 1; string code = 2; } message PasswordlessResult { enum ResponseCode { SUCCESS = 0; CARRIER_ERROR = 1; VERIFICATION_ERROR = 2; } ResponseCode code = 1; string reason = 2; } service Identity { rpc GetUserProfile(UserID) returns (UserProfile) {}; rpc CreateUser(CreateUserProfile) returns (UserProfile) {}; rpc UpdateUser(UpdateUserProfile) returns (UserProfile) {}; rpc SendPasswordlessCode(UserID) returns (PasswordlessResult) {}; rpc VerifyPasswordlessCode(PasswordlessCode) returns (PasswordlessResult) {}; }