diff --git a/services/commtest/tests/identity_integration_tests.rs b/services/commtest/tests/identity_integration_tests.rs --- a/services/commtest/tests/identity_integration_tests.rs +++ b/services/commtest/tests/identity_integration_tests.rs @@ -2,20 +2,19 @@ register_user_device, DEVICE_TYPE, PLACEHOLDER_CODE_VERSION, }; use commtest::service_addr; -use grpc_clients::identity::protos::authenticated::find_user_id_request::Identifier; use grpc_clients::identity::{ - get_auth_client, protos::authenticated::FindUserIdRequest, + get_unauthenticated_client, + protos::unauthenticated::{ + find_user_id_request::Identifier, FindUserIdRequest, + }, }; #[tokio::test] async fn find_user_id_by_username() { let device_info = register_user_device(None, None).await; - let mut client = get_auth_client( + let mut client = get_unauthenticated_client( &service_addr::IDENTITY_GRPC.to_string(), - device_info.user_id.clone(), - device_info.device_id, - device_info.access_token, PLACEHOLDER_CODE_VERSION, DEVICE_TYPE.to_string(), ) diff --git a/services/identity/src/client_service.rs b/services/identity/src/client_service.rs --- a/services/identity/src/client_service.rs +++ b/services/identity/src/client_service.rs @@ -19,14 +19,14 @@ }; use crate::error::{DeviceListError, Error as DBError}; use crate::grpc_services::protos::unauth::{ - AddReservedUsernamesRequest, Empty, GenerateNonceResponse, - OpaqueLoginFinishRequest, OpaqueLoginFinishResponse, OpaqueLoginStartRequest, - OpaqueLoginStartResponse, RegistrationFinishRequest, - RegistrationFinishResponse, RegistrationStartRequest, - RegistrationStartResponse, RemoveReservedUsernameRequest, - ReservedRegistrationStartRequest, ReservedWalletLoginRequest, - VerifyUserAccessTokenRequest, VerifyUserAccessTokenResponse, - WalletLoginRequest, WalletLoginResponse, + find_user_id_request, AddReservedUsernamesRequest, Empty, FindUserIdRequest, + FindUserIdResponse, GenerateNonceResponse, OpaqueLoginFinishRequest, + OpaqueLoginFinishResponse, OpaqueLoginStartRequest, OpaqueLoginStartResponse, + RegistrationFinishRequest, RegistrationFinishResponse, + RegistrationStartRequest, RegistrationStartResponse, + RemoveReservedUsernameRequest, ReservedRegistrationStartRequest, + ReservedWalletLoginRequest, VerifyUserAccessTokenRequest, + VerifyUserAccessTokenResponse, WalletLoginRequest, WalletLoginResponse, }; use crate::grpc_services::shared::get_value; use crate::grpc_utils::DeviceKeyUploadActions; @@ -687,6 +687,38 @@ let response = Response::new(Empty {}); Ok(response) } + + async fn find_user_id( + &self, + request: tonic::Request, + ) -> Result, tonic::Status> { + let message = request.into_inner(); + + use find_user_id_request::Identifier; + let (user_ident, auth_type) = match message.identifier { + None => { + return Err(tonic::Status::invalid_argument("no identifier provided")) + } + Some(Identifier::Username(username)) => (username, AuthType::Password), + Some(Identifier::WalletAddress(address)) => (address, AuthType::Wallet), + }; + + let (is_reserved_result, user_id_result) = tokio::join!( + self + .client + .username_in_reserved_usernames_table(&user_ident), + self + .client + .get_user_id_from_user_info(user_ident.clone(), &auth_type), + ); + let is_reserved = is_reserved_result.map_err(handle_db_error)?; + let user_id = user_id_result.map_err(handle_db_error)?; + + Ok(Response::new(FindUserIdResponse { + user_id, + is_reserved, + })) + } } impl ClientService { diff --git a/services/identity/src/grpc_services/authenticated.rs b/services/identity/src/grpc_services/authenticated.rs --- a/services/identity/src/grpc_services/authenticated.rs +++ b/services/identity/src/grpc_services/authenticated.rs @@ -10,7 +10,6 @@ database::DatabaseClient, ddb_utils::DateTimeExt, grpc_services::shared::get_value, - token::AuthType, }; use chrono::{DateTime, Utc}; use comm_opaque2::grpc::protocol_error_to_grpc_status; @@ -19,15 +18,13 @@ use tracing::{debug, error, warn}; use super::protos::auth::{ - find_user_id_request, identity, - identity_client_service_server::IdentityClientService, FindUserIdRequest, - FindUserIdResponse, GetDeviceListRequest, GetDeviceListResponse, Identity, - InboundKeyInfo, InboundKeysForUserRequest, InboundKeysForUserResponse, - KeyserverKeysResponse, OutboundKeyInfo, OutboundKeysForUserRequest, - OutboundKeysForUserResponse, RefreshUserPrekeysRequest, - UpdateDeviceListRequest, UpdateUserPasswordFinishRequest, - UpdateUserPasswordStartRequest, UpdateUserPasswordStartResponse, - UploadOneTimeKeysRequest, + identity, identity_client_service_server::IdentityClientService, + GetDeviceListRequest, GetDeviceListResponse, Identity, InboundKeyInfo, + InboundKeysForUserRequest, InboundKeysForUserResponse, KeyserverKeysResponse, + OutboundKeyInfo, OutboundKeysForUserRequest, OutboundKeysForUserResponse, + RefreshUserPrekeysRequest, UpdateDeviceListRequest, + UpdateUserPasswordFinishRequest, UpdateUserPasswordStartRequest, + UpdateUserPasswordStartResponse, UploadOneTimeKeysRequest, }; use super::protos::unauth::Empty; @@ -239,38 +236,6 @@ Ok(tonic::Response::new(Empty {})) } - async fn find_user_id( - &self, - request: tonic::Request, - ) -> Result, tonic::Status> { - let message = request.into_inner(); - - use find_user_id_request::Identifier; - let (user_ident, auth_type) = match message.identifier { - None => { - return Err(tonic::Status::invalid_argument("no identifier provided")) - } - Some(Identifier::Username(username)) => (username, AuthType::Password), - Some(Identifier::WalletAddress(address)) => (address, AuthType::Wallet), - }; - - let (is_reserved_result, user_id_result) = tokio::join!( - self - .db_client - .username_in_reserved_usernames_table(&user_ident), - self - .db_client - .get_user_id_from_user_info(user_ident.clone(), &auth_type), - ); - let is_reserved = is_reserved_result.map_err(handle_db_error)?; - let user_id = user_id_result.map_err(handle_db_error)?; - - Ok(Response::new(FindUserIdResponse { - user_id, - is_reserved, - })) - } - async fn update_user_password_start( &self, request: tonic::Request, diff --git a/shared/protos/identity_auth.proto b/shared/protos/identity_auth.proto --- a/shared/protos/identity_auth.proto +++ b/shared/protos/identity_auth.proto @@ -51,9 +51,6 @@ rpc GetKeyserverKeys(OutboundKeysForUserRequest) returns (KeyserverKeysResponse) {} - // Returns userID for given username or wallet address - rpc FindUserID(FindUserIDRequest) returns (FindUserIDResponse) {} - // Returns device list history rpc GetDeviceListForUser(GetDeviceListRequest) returns (GetDeviceListResponse) {} @@ -138,24 +135,6 @@ string user_id = 1; } -// FindUserID - -message FindUserIDRequest { - oneof identifier { - string username = 1; - string wallet_address = 2; - } -} - -message FindUserIDResponse { - // userID if the user is registered with Identity Service, null otherwise - optional string user_id = 1; - // true if the identifier (username or wallet address) exists in the - // reserved usernames list, false otherwise. It doesn't take into account - // whether the user is registered with Identity Service (userID != null). - bool is_reserved = 2; -} - // UpdateUserPassword // Request for updating a user, similar to registration but need a diff --git a/shared/protos/identity_unauth.proto b/shared/protos/identity_unauth.proto --- a/shared/protos/identity_unauth.proto +++ b/shared/protos/identity_unauth.proto @@ -50,6 +50,9 @@ // Called by users periodically to check if their code version is supported rpc Ping(Empty) returns (Empty) {} + + // Returns userID for given username or wallet address + rpc FindUserID(FindUserIDRequest) returns (FindUserIDResponse) {} } // Helper types @@ -244,3 +247,21 @@ // Above message signed with Ashoat's keyserver's signing ed25519 key string signature = 2; } + +// FindUserID + +message FindUserIDRequest { + oneof identifier { + string username = 1; + string wallet_address = 2; + } +} + +message FindUserIDResponse { + // userID if the user is registered with Identity Service, null otherwise + optional string user_id = 1; + // true if the identifier (username or wallet address) exists in the + // reserved usernames list, false otherwise. It doesn't take into account + // whether the user is registered with Identity Service (userID != null). + bool is_reserved = 2; +} diff --git a/web/protobufs/identity-auth-client.cjs b/web/protobufs/identity-auth-client.cjs --- a/web/protobufs/identity-auth-client.cjs +++ b/web/protobufs/identity-auth-client.cjs @@ -627,67 +627,6 @@ }; -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.auth.FindUserIDRequest, - * !proto.identity.auth.FindUserIDResponse>} - */ -const methodDescriptor_IdentityClientService_FindUserID = new grpc.web.MethodDescriptor( - '/identity.auth.IdentityClientService/FindUserID', - grpc.web.MethodType.UNARY, - proto.identity.auth.FindUserIDRequest, - proto.identity.auth.FindUserIDResponse, - /** - * @param {!proto.identity.auth.FindUserIDRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.auth.FindUserIDResponse.deserializeBinary -); - - -/** - * @param {!proto.identity.auth.FindUserIDRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.auth.FindUserIDResponse)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.auth.IdentityClientServiceClient.prototype.findUserID = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.auth.IdentityClientService/FindUserID', - request, - metadata || {}, - methodDescriptor_IdentityClientService_FindUserID, - callback); -}; - - -/** - * @param {!proto.identity.auth.FindUserIDRequest} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.auth.IdentityClientServicePromiseClient.prototype.findUserID = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.auth.IdentityClientService/FindUserID', - request, - metadata || {}, - methodDescriptor_IdentityClientService_FindUserID); -}; - - /** * @const * @type {!grpc.web.MethodDescriptor< @@ -811,4 +750,3 @@ module.exports = proto.identity.auth; - diff --git a/web/protobufs/identity-auth-client.cjs.flow b/web/protobufs/identity-auth-client.cjs.flow --- a/web/protobufs/identity-auth-client.cjs.flow +++ b/web/protobufs/identity-auth-client.cjs.flow @@ -74,13 +74,6 @@ response: identityAuthStructs.KeyserverKeysResponse) => void ): grpcWeb.ClientReadableStream; - findUserID( - request: identityAuthStructs.FindUserIDRequest, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityAuthStructs.FindUserIDResponse) => void - ): grpcWeb.ClientReadableStream; - getDeviceListForUser( request: identityAuthStructs.GetDeviceListRequest, metadata: grpcWeb.Metadata | void, @@ -146,11 +139,6 @@ metadata?: grpcWeb.Metadata ): Promise; - findUserID( - request: identityAuthStructs.FindUserIDRequest, - metadata?: grpcWeb.Metadata - ): Promise; - getDeviceListForUser( request: identityAuthStructs.GetDeviceListRequest, metadata?: grpcWeb.Metadata diff --git a/web/protobufs/identity-auth-structs.cjs b/web/protobufs/identity-auth-structs.cjs --- a/web/protobufs/identity-auth-structs.cjs +++ b/web/protobufs/identity-auth-structs.cjs @@ -25,9 +25,6 @@ var identity_unauth_pb = require('./identity-unauth-structs.cjs'); goog.object.extend(proto, identity_unauth_pb); goog.exportSymbol('proto.identity.auth.EthereumIdentity', null, global); -goog.exportSymbol('proto.identity.auth.FindUserIDRequest', null, global); -goog.exportSymbol('proto.identity.auth.FindUserIDRequest.IdentifierCase', null, global); -goog.exportSymbol('proto.identity.auth.FindUserIDResponse', null, global); goog.exportSymbol('proto.identity.auth.GetDeviceListRequest', null, global); goog.exportSymbol('proto.identity.auth.GetDeviceListResponse', null, global); goog.exportSymbol('proto.identity.auth.Identity', null, global); @@ -276,48 +273,6 @@ */ proto.identity.auth.InboundKeysForUserRequest.displayName = 'proto.identity.auth.InboundKeysForUserRequest'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.identity.auth.FindUserIDRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.auth.FindUserIDRequest.oneofGroups_); -}; -goog.inherits(proto.identity.auth.FindUserIDRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.auth.FindUserIDRequest.displayName = 'proto.identity.auth.FindUserIDRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.identity.auth.FindUserIDResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.auth.FindUserIDResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.auth.FindUserIDResponse.displayName = 'proto.identity.auth.FindUserIDResponse'; -} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2620,406 +2575,6 @@ -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.identity.auth.FindUserIDRequest.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.identity.auth.FindUserIDRequest.IdentifierCase = { - IDENTIFIER_NOT_SET: 0, - USERNAME: 1, - WALLET_ADDRESS: 2 -}; - -/** - * @return {proto.identity.auth.FindUserIDRequest.IdentifierCase} - */ -proto.identity.auth.FindUserIDRequest.prototype.getIdentifierCase = function() { - return /** @type {proto.identity.auth.FindUserIDRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.auth.FindUserIDRequest.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.identity.auth.FindUserIDRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.auth.FindUserIDRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.identity.auth.FindUserIDRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.auth.FindUserIDRequest.toObject = function(includeInstance, msg) { - var f, obj = { - username: jspb.Message.getFieldWithDefault(msg, 1, ""), - walletAddress: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.auth.FindUserIDRequest} - */ -proto.identity.auth.FindUserIDRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.auth.FindUserIDRequest; - return proto.identity.auth.FindUserIDRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.auth.FindUserIDRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.auth.FindUserIDRequest} - */ -proto.identity.auth.FindUserIDRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUsername(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.auth.FindUserIDRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.auth.FindUserIDRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.identity.auth.FindUserIDRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.auth.FindUserIDRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string username = 1; - * @return {string} - */ -proto.identity.auth.FindUserIDRequest.prototype.getUsername = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.auth.FindUserIDRequest} returns this - */ -proto.identity.auth.FindUserIDRequest.prototype.setUsername = function(value) { - return jspb.Message.setOneofField(this, 1, proto.identity.auth.FindUserIDRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.auth.FindUserIDRequest} returns this - */ -proto.identity.auth.FindUserIDRequest.prototype.clearUsername = function() { - return jspb.Message.setOneofField(this, 1, proto.identity.auth.FindUserIDRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.auth.FindUserIDRequest.prototype.hasUsername = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string wallet_address = 2; - * @return {string} - */ -proto.identity.auth.FindUserIDRequest.prototype.getWalletAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.auth.FindUserIDRequest} returns this - */ -proto.identity.auth.FindUserIDRequest.prototype.setWalletAddress = function(value) { - return jspb.Message.setOneofField(this, 2, proto.identity.auth.FindUserIDRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.auth.FindUserIDRequest} returns this - */ -proto.identity.auth.FindUserIDRequest.prototype.clearWalletAddress = function() { - return jspb.Message.setOneofField(this, 2, proto.identity.auth.FindUserIDRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.auth.FindUserIDRequest.prototype.hasWalletAddress = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.identity.auth.FindUserIDResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.auth.FindUserIDResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.identity.auth.FindUserIDResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.auth.FindUserIDResponse.toObject = function(includeInstance, msg) { - var f, obj = { - userId: jspb.Message.getFieldWithDefault(msg, 1, ""), - isReserved: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.auth.FindUserIDResponse} - */ -proto.identity.auth.FindUserIDResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.auth.FindUserIDResponse; - return proto.identity.auth.FindUserIDResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.auth.FindUserIDResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.auth.FindUserIDResponse} - */ -proto.identity.auth.FindUserIDResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUserId(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsReserved(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.auth.FindUserIDResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.auth.FindUserIDResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.identity.auth.FindUserIDResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.auth.FindUserIDResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeString( - 1, - f - ); - } - f = message.getIsReserved(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional string user_id = 1; - * @return {string} - */ -proto.identity.auth.FindUserIDResponse.prototype.getUserId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.auth.FindUserIDResponse} returns this - */ -proto.identity.auth.FindUserIDResponse.prototype.setUserId = function(value) { - return jspb.Message.setField(this, 1, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.auth.FindUserIDResponse} returns this - */ -proto.identity.auth.FindUserIDResponse.prototype.clearUserId = function() { - return jspb.Message.setField(this, 1, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.auth.FindUserIDResponse.prototype.hasUserId = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional bool is_reserved = 2; - * @return {boolean} - */ -proto.identity.auth.FindUserIDResponse.prototype.getIsReserved = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.identity.auth.FindUserIDResponse} returns this - */ -proto.identity.auth.FindUserIDResponse.prototype.setIsReserved = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - - if (jspb.Message.GENERATE_TO_OBJECT) { diff --git a/web/protobufs/identity-auth-structs.cjs.flow b/web/protobufs/identity-auth-structs.cjs.flow --- a/web/protobufs/identity-auth-structs.cjs.flow +++ b/web/protobufs/identity-auth-structs.cjs.flow @@ -269,52 +269,6 @@ userId: string, }; -export type IdentifierCase = 0 | 1 | 2; - -declare export class FindUserIDRequest extends Message { - getUsername(): string; - setUsername(value: string): FindUserIDRequest; - - getWalletAddress(): string; - setWalletAddress(value: string): FindUserIDRequest; - - getIdentifierCase(): IdentifierCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FindUserIDRequestObject; - static toObject(includeInstance: boolean, msg: FindUserIDRequest): FindUserIDRequestObject; - static serializeBinaryToWriter(message: FindUserIDRequest, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FindUserIDRequest; - static deserializeBinaryFromReader(message: FindUserIDRequest, reader: BinaryReader): FindUserIDRequest; -} - -export type FindUserIDRequestObject = { - username: string, - walletAddress: string, -} - -declare export class FindUserIDResponse extends Message { - getUserId(): string; - setUserId(value: string): FindUserIDResponse; - hasUserId(): boolean; - clearUserId(): FindUserIDResponse; - - getIsReserved(): boolean; - setIsReserved(value: boolean): FindUserIDResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FindUserIDResponseObject; - static toObject(includeInstance: boolean, msg: FindUserIDResponse): FindUserIDResponseObject; - static serializeBinaryToWriter(message: FindUserIDResponse, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FindUserIDResponse; - static deserializeBinaryFromReader(message: FindUserIDResponse, reader: BinaryReader): FindUserIDResponse; -} - -export type FindUserIDResponseObject = { - userId?: string, - isReserved: boolean, -} - declare export class UpdateUserPasswordStartRequest extends Message { getOpaqueRegistrationRequest(): Uint8Array | string; getOpaqueRegistrationRequest_asU8(): Uint8Array; diff --git a/web/protobufs/identity-unauth-structs.cjs b/web/protobufs/identity-unauth-structs.cjs --- a/web/protobufs/identity-unauth-structs.cjs +++ b/web/protobufs/identity-unauth-structs.cjs @@ -26,6 +26,9 @@ goog.exportSymbol('proto.identity.unauth.DeviceKeyUpload', null, global); goog.exportSymbol('proto.identity.unauth.DeviceType', null, global); goog.exportSymbol('proto.identity.unauth.Empty', null, global); +goog.exportSymbol('proto.identity.unauth.FindUserIDRequest', null, global); +goog.exportSymbol('proto.identity.unauth.FindUserIDRequest.IdentifierCase', null, global); +goog.exportSymbol('proto.identity.unauth.FindUserIDResponse', null, global); goog.exportSymbol('proto.identity.unauth.GenerateNonceResponse', null, global); goog.exportSymbol('proto.identity.unauth.IdentityKeyInfo', null, global); goog.exportSymbol('proto.identity.unauth.OpaqueLoginFinishRequest', null, global); @@ -485,6 +488,48 @@ */ proto.identity.unauth.RemoveReservedUsernameRequest.displayName = 'proto.identity.unauth.RemoveReservedUsernameRequest'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.unauth.FindUserIDRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.unauth.FindUserIDRequest.oneofGroups_); +}; +goog.inherits(proto.identity.unauth.FindUserIDRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.unauth.FindUserIDRequest.displayName = 'proto.identity.unauth.FindUserIDRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.unauth.FindUserIDResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.unauth.FindUserIDResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.unauth.FindUserIDResponse.displayName = 'proto.identity.unauth.FindUserIDResponse'; +} @@ -4575,6 +4620,406 @@ }; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.identity.unauth.FindUserIDRequest.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.identity.unauth.FindUserIDRequest.IdentifierCase = { + IDENTIFIER_NOT_SET: 0, + USERNAME: 1, + WALLET_ADDRESS: 2 +}; + +/** + * @return {proto.identity.unauth.FindUserIDRequest.IdentifierCase} + */ +proto.identity.unauth.FindUserIDRequest.prototype.getIdentifierCase = function() { + return /** @type {proto.identity.unauth.FindUserIDRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.unauth.FindUserIDRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.unauth.FindUserIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.unauth.FindUserIDRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.unauth.FindUserIDRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.unauth.FindUserIDRequest.toObject = function(includeInstance, msg) { + var f, obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + walletAddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.unauth.FindUserIDRequest} + */ +proto.identity.unauth.FindUserIDRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.unauth.FindUserIDRequest; + return proto.identity.unauth.FindUserIDRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.unauth.FindUserIDRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.unauth.FindUserIDRequest} + */ +proto.identity.unauth.FindUserIDRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.unauth.FindUserIDRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.unauth.FindUserIDRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.unauth.FindUserIDRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.unauth.FindUserIDRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string username = 1; + * @return {string} + */ +proto.identity.unauth.FindUserIDRequest.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.unauth.FindUserIDRequest} returns this + */ +proto.identity.unauth.FindUserIDRequest.prototype.setUsername = function(value) { + return jspb.Message.setOneofField(this, 1, proto.identity.unauth.FindUserIDRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.unauth.FindUserIDRequest} returns this + */ +proto.identity.unauth.FindUserIDRequest.prototype.clearUsername = function() { + return jspb.Message.setOneofField(this, 1, proto.identity.unauth.FindUserIDRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.unauth.FindUserIDRequest.prototype.hasUsername = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string wallet_address = 2; + * @return {string} + */ +proto.identity.unauth.FindUserIDRequest.prototype.getWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.unauth.FindUserIDRequest} returns this + */ +proto.identity.unauth.FindUserIDRequest.prototype.setWalletAddress = function(value) { + return jspb.Message.setOneofField(this, 2, proto.identity.unauth.FindUserIDRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.unauth.FindUserIDRequest} returns this + */ +proto.identity.unauth.FindUserIDRequest.prototype.clearWalletAddress = function() { + return jspb.Message.setOneofField(this, 2, proto.identity.unauth.FindUserIDRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.unauth.FindUserIDRequest.prototype.hasWalletAddress = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.unauth.FindUserIDResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.unauth.FindUserIDResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.unauth.FindUserIDResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.unauth.FindUserIDResponse.toObject = function(includeInstance, msg) { + var f, obj = { + userId: jspb.Message.getFieldWithDefault(msg, 1, ""), + isReserved: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.unauth.FindUserIDResponse} + */ +proto.identity.unauth.FindUserIDResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.unauth.FindUserIDResponse; + return proto.identity.unauth.FindUserIDResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.unauth.FindUserIDResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.unauth.FindUserIDResponse} + */ +proto.identity.unauth.FindUserIDResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUserId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsReserved(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.unauth.FindUserIDResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.unauth.FindUserIDResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.unauth.FindUserIDResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.unauth.FindUserIDResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getIsReserved(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string user_id = 1; + * @return {string} + */ +proto.identity.unauth.FindUserIDResponse.prototype.getUserId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.unauth.FindUserIDResponse} returns this + */ +proto.identity.unauth.FindUserIDResponse.prototype.setUserId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.unauth.FindUserIDResponse} returns this + */ +proto.identity.unauth.FindUserIDResponse.prototype.clearUserId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.unauth.FindUserIDResponse.prototype.hasUserId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool is_reserved = 2; + * @return {boolean} + */ +proto.identity.unauth.FindUserIDResponse.prototype.getIsReserved = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.identity.unauth.FindUserIDResponse} returns this + */ +proto.identity.unauth.FindUserIDResponse.prototype.setIsReserved = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + /** * @enum {number} */ diff --git a/web/protobufs/identity-unauth-structs.cjs.flow b/web/protobufs/identity-unauth-structs.cjs.flow --- a/web/protobufs/identity-unauth-structs.cjs.flow +++ b/web/protobufs/identity-unauth-structs.cjs.flow @@ -504,4 +504,50 @@ signature: string, }; +export type IdentifierCase = 0 | 1 | 2; + +declare export class FindUserIDRequest extends Message { + getUsername(): string; + setUsername(value: string): FindUserIDRequest; + + getWalletAddress(): string; + setWalletAddress(value: string): FindUserIDRequest; + + getIdentifierCase(): IdentifierCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FindUserIDRequestObject; + static toObject(includeInstance: boolean, msg: FindUserIDRequest): FindUserIDRequestObject; + static serializeBinaryToWriter(message: FindUserIDRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FindUserIDRequest; + static deserializeBinaryFromReader(message: FindUserIDRequest, reader: BinaryReader): FindUserIDRequest; +} + +export type FindUserIDRequestObject = { + username: string, + walletAddress: string, +} + +declare export class FindUserIDResponse extends Message { + getUserId(): string; + setUserId(value: string): FindUserIDResponse; + hasUserId(): boolean; + clearUserId(): FindUserIDResponse; + + getIsReserved(): boolean; + setIsReserved(value: boolean): FindUserIDResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FindUserIDResponseObject; + static toObject(includeInstance: boolean, msg: FindUserIDResponse): FindUserIDResponseObject; + static serializeBinaryToWriter(message: FindUserIDResponse, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FindUserIDResponse; + static deserializeBinaryFromReader(message: FindUserIDResponse, reader: BinaryReader): FindUserIDResponse; +} + +export type FindUserIDResponseObject = { + userId?: string, + isReserved: boolean, +} + export type DeviceType = 0 | 1 | 2 | 3 | 4 | 5; diff --git a/web/protobufs/identity-unauth.cjs b/web/protobufs/identity-unauth.cjs --- a/web/protobufs/identity-unauth.cjs +++ b/web/protobufs/identity-unauth.cjs @@ -808,5 +808,65 @@ }; -module.exports = proto.identity.unauth; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.unauth.FindUserIDRequest, + * !proto.identity.unauth.FindUserIDResponse>} + */ +const methodDescriptor_IdentityClientService_FindUserID = new grpc.web.MethodDescriptor( + '/identity.unauth.IdentityClientService/FindUserID', + grpc.web.MethodType.UNARY, + proto.identity.unauth.FindUserIDRequest, + proto.identity.unauth.FindUserIDResponse, + /** + * @param {!proto.identity.unauth.FindUserIDRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.unauth.FindUserIDResponse.deserializeBinary +); + +/** + * @param {!proto.identity.unauth.FindUserIDRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.unauth.FindUserIDResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.unauth.IdentityClientServiceClient.prototype.findUserID = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.unauth.IdentityClientService/FindUserID', + request, + metadata || {}, + methodDescriptor_IdentityClientService_FindUserID, + callback); +}; + + +/** + * @param {!proto.identity.unauth.FindUserIDRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.unauth.IdentityClientServicePromiseClient.prototype.findUserID = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.unauth.IdentityClientService/FindUserID', + request, + metadata || {}, + methodDescriptor_IdentityClientService_FindUserID); +}; + + +module.exports = proto.identity.unauth; diff --git a/web/protobufs/identity-unauth.cjs.flow b/web/protobufs/identity-unauth.cjs.flow --- a/web/protobufs/identity-unauth.cjs.flow +++ b/web/protobufs/identity-unauth.cjs.flow @@ -93,6 +93,13 @@ response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; + findUserID( + request: identityStructs.FindUserIDRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.FindUserIDResponse) => void + ): grpcWeb.ClientReadableStream; + } declare export class IdentityClientServicePromiseClient { @@ -160,4 +167,9 @@ metadata?: grpcWeb.Metadata ): Promise; + findUserID( + request: identityStructs.FindUserIDRequest, + metadata?: grpcWeb.Metadata + ): Promise; + }