diff --git a/api/proto/user/v1/host.pb.go b/api/proto/user/v1/host.pb.go index 80e68078..b351d93d 100644 --- a/api/proto/user/v1/host.pb.go +++ b/api/proto/user/v1/host.pb.go @@ -1917,6 +1917,118 @@ func (x *InviteBDResponse) GetInvitation() *RoleInvitation { return nil } +type InviteHostRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + CommandId string `protobuf:"bytes,2,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"` + InviterUserId int64 `protobuf:"varint,3,opt,name=inviter_user_id,json=inviterUserId,proto3" json:"inviter_user_id,omitempty"` + TargetUserId int64 `protobuf:"varint,4,opt,name=target_user_id,json=targetUserId,proto3" json:"target_user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InviteHostRequest) Reset() { + *x = InviteHostRequest{} + mi := &file_proto_user_v1_host_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InviteHostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InviteHostRequest) ProtoMessage() {} + +func (x *InviteHostRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_user_v1_host_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InviteHostRequest.ProtoReflect.Descriptor instead. +func (*InviteHostRequest) Descriptor() ([]byte, []int) { + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{21} +} + +func (x *InviteHostRequest) GetMeta() *RequestMeta { + if x != nil { + return x.Meta + } + return nil +} + +func (x *InviteHostRequest) GetCommandId() string { + if x != nil { + return x.CommandId + } + return "" +} + +func (x *InviteHostRequest) GetInviterUserId() int64 { + if x != nil { + return x.InviterUserId + } + return 0 +} + +func (x *InviteHostRequest) GetTargetUserId() int64 { + if x != nil { + return x.TargetUserId + } + return 0 +} + +type InviteHostResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Invitation *RoleInvitation `protobuf:"bytes,1,opt,name=invitation,proto3" json:"invitation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InviteHostResponse) Reset() { + *x = InviteHostResponse{} + mi := &file_proto_user_v1_host_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InviteHostResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InviteHostResponse) ProtoMessage() {} + +func (x *InviteHostResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_user_v1_host_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InviteHostResponse.ProtoReflect.Descriptor instead. +func (*InviteHostResponse) Descriptor() ([]byte, []int) { + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{22} +} + +func (x *InviteHostResponse) GetInvitation() *RoleInvitation { + if x != nil { + return x.Invitation + } + return nil +} + type ListBDLeaderBDsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` @@ -1929,7 +2041,7 @@ type ListBDLeaderBDsRequest struct { func (x *ListBDLeaderBDsRequest) Reset() { *x = ListBDLeaderBDsRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[21] + mi := &file_proto_user_v1_host_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1941,7 +2053,7 @@ func (x *ListBDLeaderBDsRequest) String() string { func (*ListBDLeaderBDsRequest) ProtoMessage() {} func (x *ListBDLeaderBDsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[21] + mi := &file_proto_user_v1_host_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1954,7 +2066,7 @@ func (x *ListBDLeaderBDsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBDLeaderBDsRequest.ProtoReflect.Descriptor instead. func (*ListBDLeaderBDsRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{21} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{23} } func (x *ListBDLeaderBDsRequest) GetMeta() *RequestMeta { @@ -1994,7 +2106,7 @@ type ListBDLeaderBDsResponse struct { func (x *ListBDLeaderBDsResponse) Reset() { *x = ListBDLeaderBDsResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[22] + mi := &file_proto_user_v1_host_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2006,7 +2118,7 @@ func (x *ListBDLeaderBDsResponse) String() string { func (*ListBDLeaderBDsResponse) ProtoMessage() {} func (x *ListBDLeaderBDsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[22] + mi := &file_proto_user_v1_host_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2019,7 +2131,7 @@ func (x *ListBDLeaderBDsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBDLeaderBDsResponse.ProtoReflect.Descriptor instead. func (*ListBDLeaderBDsResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{22} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{24} } func (x *ListBDLeaderBDsResponse) GetBdProfiles() []*BDProfile { @@ -2041,7 +2153,7 @@ type ListBDLeaderAgenciesRequest struct { func (x *ListBDLeaderAgenciesRequest) Reset() { *x = ListBDLeaderAgenciesRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[23] + mi := &file_proto_user_v1_host_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2053,7 +2165,7 @@ func (x *ListBDLeaderAgenciesRequest) String() string { func (*ListBDLeaderAgenciesRequest) ProtoMessage() {} func (x *ListBDLeaderAgenciesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[23] + mi := &file_proto_user_v1_host_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2066,7 +2178,7 @@ func (x *ListBDLeaderAgenciesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBDLeaderAgenciesRequest.ProtoReflect.Descriptor instead. func (*ListBDLeaderAgenciesRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{23} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{25} } func (x *ListBDLeaderAgenciesRequest) GetMeta() *RequestMeta { @@ -2106,7 +2218,7 @@ type ListBDLeaderAgenciesResponse struct { func (x *ListBDLeaderAgenciesResponse) Reset() { *x = ListBDLeaderAgenciesResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[24] + mi := &file_proto_user_v1_host_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2118,7 +2230,7 @@ func (x *ListBDLeaderAgenciesResponse) String() string { func (*ListBDLeaderAgenciesResponse) ProtoMessage() {} func (x *ListBDLeaderAgenciesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[24] + mi := &file_proto_user_v1_host_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2131,7 +2243,7 @@ func (x *ListBDLeaderAgenciesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBDLeaderAgenciesResponse.ProtoReflect.Descriptor instead. func (*ListBDLeaderAgenciesResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{24} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{26} } func (x *ListBDLeaderAgenciesResponse) GetAgencies() []*Agency { @@ -2153,7 +2265,7 @@ type ListBDAgenciesRequest struct { func (x *ListBDAgenciesRequest) Reset() { *x = ListBDAgenciesRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[25] + mi := &file_proto_user_v1_host_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2165,7 +2277,7 @@ func (x *ListBDAgenciesRequest) String() string { func (*ListBDAgenciesRequest) ProtoMessage() {} func (x *ListBDAgenciesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[25] + mi := &file_proto_user_v1_host_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2178,7 +2290,7 @@ func (x *ListBDAgenciesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBDAgenciesRequest.ProtoReflect.Descriptor instead. func (*ListBDAgenciesRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{25} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{27} } func (x *ListBDAgenciesRequest) GetMeta() *RequestMeta { @@ -2218,7 +2330,7 @@ type ListBDAgenciesResponse struct { func (x *ListBDAgenciesResponse) Reset() { *x = ListBDAgenciesResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[26] + mi := &file_proto_user_v1_host_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2230,7 +2342,7 @@ func (x *ListBDAgenciesResponse) String() string { func (*ListBDAgenciesResponse) ProtoMessage() {} func (x *ListBDAgenciesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[26] + mi := &file_proto_user_v1_host_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2243,7 +2355,7 @@ func (x *ListBDAgenciesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBDAgenciesResponse.ProtoReflect.Descriptor instead. func (*ListBDAgenciesResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{26} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{28} } func (x *ListBDAgenciesResponse) GetAgencies() []*Agency { @@ -2253,6 +2365,118 @@ func (x *ListBDAgenciesResponse) GetAgencies() []*Agency { return nil } +type ListRoleInvitationsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + TargetUserId int64 `protobuf:"varint,2,opt,name=target_user_id,json=targetUserId,proto3" json:"target_user_id,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRoleInvitationsRequest) Reset() { + *x = ListRoleInvitationsRequest{} + mi := &file_proto_user_v1_host_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRoleInvitationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRoleInvitationsRequest) ProtoMessage() {} + +func (x *ListRoleInvitationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_user_v1_host_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRoleInvitationsRequest.ProtoReflect.Descriptor instead. +func (*ListRoleInvitationsRequest) Descriptor() ([]byte, []int) { + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{29} +} + +func (x *ListRoleInvitationsRequest) GetMeta() *RequestMeta { + if x != nil { + return x.Meta + } + return nil +} + +func (x *ListRoleInvitationsRequest) GetTargetUserId() int64 { + if x != nil { + return x.TargetUserId + } + return 0 +} + +func (x *ListRoleInvitationsRequest) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *ListRoleInvitationsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type ListRoleInvitationsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Invitations []*RoleInvitation `protobuf:"bytes,1,rep,name=invitations,proto3" json:"invitations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRoleInvitationsResponse) Reset() { + *x = ListRoleInvitationsResponse{} + mi := &file_proto_user_v1_host_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRoleInvitationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRoleInvitationsResponse) ProtoMessage() {} + +func (x *ListRoleInvitationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_user_v1_host_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRoleInvitationsResponse.ProtoReflect.Descriptor instead. +func (*ListRoleInvitationsResponse) Descriptor() ([]byte, []int) { + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{30} +} + +func (x *ListRoleInvitationsResponse) GetInvitations() []*RoleInvitation { + if x != nil { + return x.Invitations + } + return nil +} + type ProcessRoleInvitationRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` @@ -2267,7 +2491,7 @@ type ProcessRoleInvitationRequest struct { func (x *ProcessRoleInvitationRequest) Reset() { *x = ProcessRoleInvitationRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[27] + mi := &file_proto_user_v1_host_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2279,7 +2503,7 @@ func (x *ProcessRoleInvitationRequest) String() string { func (*ProcessRoleInvitationRequest) ProtoMessage() {} func (x *ProcessRoleInvitationRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[27] + mi := &file_proto_user_v1_host_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2292,7 +2516,7 @@ func (x *ProcessRoleInvitationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ProcessRoleInvitationRequest.ProtoReflect.Descriptor instead. func (*ProcessRoleInvitationRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{27} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{31} } func (x *ProcessRoleInvitationRequest) GetMeta() *RequestMeta { @@ -2350,7 +2574,7 @@ type ProcessRoleInvitationResponse struct { func (x *ProcessRoleInvitationResponse) Reset() { *x = ProcessRoleInvitationResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[28] + mi := &file_proto_user_v1_host_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2362,7 +2586,7 @@ func (x *ProcessRoleInvitationResponse) String() string { func (*ProcessRoleInvitationResponse) ProtoMessage() {} func (x *ProcessRoleInvitationResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[28] + mi := &file_proto_user_v1_host_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2375,7 +2599,7 @@ func (x *ProcessRoleInvitationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ProcessRoleInvitationResponse.ProtoReflect.Descriptor instead. func (*ProcessRoleInvitationResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{28} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{32} } func (x *ProcessRoleInvitationResponse) GetInvitation() *RoleInvitation { @@ -2423,7 +2647,7 @@ type GetHostProfileRequest struct { func (x *GetHostProfileRequest) Reset() { *x = GetHostProfileRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[29] + mi := &file_proto_user_v1_host_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2435,7 +2659,7 @@ func (x *GetHostProfileRequest) String() string { func (*GetHostProfileRequest) ProtoMessage() {} func (x *GetHostProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[29] + mi := &file_proto_user_v1_host_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2448,7 +2672,7 @@ func (x *GetHostProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetHostProfileRequest.ProtoReflect.Descriptor instead. func (*GetHostProfileRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{29} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{33} } func (x *GetHostProfileRequest) GetMeta() *RequestMeta { @@ -2474,7 +2698,7 @@ type GetHostProfileResponse struct { func (x *GetHostProfileResponse) Reset() { *x = GetHostProfileResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[30] + mi := &file_proto_user_v1_host_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2486,7 +2710,7 @@ func (x *GetHostProfileResponse) String() string { func (*GetHostProfileResponse) ProtoMessage() {} func (x *GetHostProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[30] + mi := &file_proto_user_v1_host_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2499,7 +2723,7 @@ func (x *GetHostProfileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetHostProfileResponse.ProtoReflect.Descriptor instead. func (*GetHostProfileResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{30} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{34} } func (x *GetHostProfileResponse) GetHostProfile() *HostProfile { @@ -2520,7 +2744,7 @@ type GetBDProfileRequest struct { func (x *GetBDProfileRequest) Reset() { *x = GetBDProfileRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[31] + mi := &file_proto_user_v1_host_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2532,7 +2756,7 @@ func (x *GetBDProfileRequest) String() string { func (*GetBDProfileRequest) ProtoMessage() {} func (x *GetBDProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[31] + mi := &file_proto_user_v1_host_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2545,7 +2769,7 @@ func (x *GetBDProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBDProfileRequest.ProtoReflect.Descriptor instead. func (*GetBDProfileRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{31} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{35} } func (x *GetBDProfileRequest) GetMeta() *RequestMeta { @@ -2578,7 +2802,7 @@ type GetBDProfileResponse struct { func (x *GetBDProfileResponse) Reset() { *x = GetBDProfileResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[32] + mi := &file_proto_user_v1_host_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2590,7 +2814,7 @@ func (x *GetBDProfileResponse) String() string { func (*GetBDProfileResponse) ProtoMessage() {} func (x *GetBDProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[32] + mi := &file_proto_user_v1_host_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2603,7 +2827,7 @@ func (x *GetBDProfileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBDProfileResponse.ProtoReflect.Descriptor instead. func (*GetBDProfileResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{32} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{36} } func (x *GetBDProfileResponse) GetBdProfile() *BDProfile { @@ -2623,7 +2847,7 @@ type GetCoinSellerProfileRequest struct { func (x *GetCoinSellerProfileRequest) Reset() { *x = GetCoinSellerProfileRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[33] + mi := &file_proto_user_v1_host_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2635,7 +2859,7 @@ func (x *GetCoinSellerProfileRequest) String() string { func (*GetCoinSellerProfileRequest) ProtoMessage() {} func (x *GetCoinSellerProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[33] + mi := &file_proto_user_v1_host_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2648,7 +2872,7 @@ func (x *GetCoinSellerProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCoinSellerProfileRequest.ProtoReflect.Descriptor instead. func (*GetCoinSellerProfileRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{33} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{37} } func (x *GetCoinSellerProfileRequest) GetMeta() *RequestMeta { @@ -2674,7 +2898,7 @@ type GetCoinSellerProfileResponse struct { func (x *GetCoinSellerProfileResponse) Reset() { *x = GetCoinSellerProfileResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[34] + mi := &file_proto_user_v1_host_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2686,7 +2910,7 @@ func (x *GetCoinSellerProfileResponse) String() string { func (*GetCoinSellerProfileResponse) ProtoMessage() {} func (x *GetCoinSellerProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[34] + mi := &file_proto_user_v1_host_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2699,7 +2923,7 @@ func (x *GetCoinSellerProfileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCoinSellerProfileResponse.ProtoReflect.Descriptor instead. func (*GetCoinSellerProfileResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{34} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{38} } func (x *GetCoinSellerProfileResponse) GetCoinSellerProfile() *CoinSellerProfile { @@ -2719,7 +2943,7 @@ type ListActiveCoinSellersInMyRegionRequest struct { func (x *ListActiveCoinSellersInMyRegionRequest) Reset() { *x = ListActiveCoinSellersInMyRegionRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[35] + mi := &file_proto_user_v1_host_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2731,7 +2955,7 @@ func (x *ListActiveCoinSellersInMyRegionRequest) String() string { func (*ListActiveCoinSellersInMyRegionRequest) ProtoMessage() {} func (x *ListActiveCoinSellersInMyRegionRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[35] + mi := &file_proto_user_v1_host_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2744,7 +2968,7 @@ func (x *ListActiveCoinSellersInMyRegionRequest) ProtoReflect() protoreflect.Mes // Deprecated: Use ListActiveCoinSellersInMyRegionRequest.ProtoReflect.Descriptor instead. func (*ListActiveCoinSellersInMyRegionRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{35} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{39} } func (x *ListActiveCoinSellersInMyRegionRequest) GetMeta() *RequestMeta { @@ -2770,7 +2994,7 @@ type ListActiveCoinSellersInMyRegionResponse struct { func (x *ListActiveCoinSellersInMyRegionResponse) Reset() { *x = ListActiveCoinSellersInMyRegionResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[36] + mi := &file_proto_user_v1_host_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2782,7 +3006,7 @@ func (x *ListActiveCoinSellersInMyRegionResponse) String() string { func (*ListActiveCoinSellersInMyRegionResponse) ProtoMessage() {} func (x *ListActiveCoinSellersInMyRegionResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[36] + mi := &file_proto_user_v1_host_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2795,7 +3019,7 @@ func (x *ListActiveCoinSellersInMyRegionResponse) ProtoReflect() protoreflect.Me // Deprecated: Use ListActiveCoinSellersInMyRegionResponse.ProtoReflect.Descriptor instead. func (*ListActiveCoinSellersInMyRegionResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{36} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{40} } func (x *ListActiveCoinSellersInMyRegionResponse) GetCoinSellers() []*CoinSellerListItem { @@ -2815,7 +3039,7 @@ type GetUserRoleSummaryRequest struct { func (x *GetUserRoleSummaryRequest) Reset() { *x = GetUserRoleSummaryRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[37] + mi := &file_proto_user_v1_host_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2827,7 +3051,7 @@ func (x *GetUserRoleSummaryRequest) String() string { func (*GetUserRoleSummaryRequest) ProtoMessage() {} func (x *GetUserRoleSummaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[37] + mi := &file_proto_user_v1_host_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2840,7 +3064,7 @@ func (x *GetUserRoleSummaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserRoleSummaryRequest.ProtoReflect.Descriptor instead. func (*GetUserRoleSummaryRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{37} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{41} } func (x *GetUserRoleSummaryRequest) GetMeta() *RequestMeta { @@ -2866,7 +3090,7 @@ type GetUserRoleSummaryResponse struct { func (x *GetUserRoleSummaryResponse) Reset() { *x = GetUserRoleSummaryResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[38] + mi := &file_proto_user_v1_host_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2878,7 +3102,7 @@ func (x *GetUserRoleSummaryResponse) String() string { func (*GetUserRoleSummaryResponse) ProtoMessage() {} func (x *GetUserRoleSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[38] + mi := &file_proto_user_v1_host_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2891,7 +3115,7 @@ func (x *GetUserRoleSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserRoleSummaryResponse.ProtoReflect.Descriptor instead. func (*GetUserRoleSummaryResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{38} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{42} } func (x *GetUserRoleSummaryResponse) GetSummary() *UserRoleSummary { @@ -2911,7 +3135,7 @@ type GetAgencyRequest struct { func (x *GetAgencyRequest) Reset() { *x = GetAgencyRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[39] + mi := &file_proto_user_v1_host_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2923,7 +3147,7 @@ func (x *GetAgencyRequest) String() string { func (*GetAgencyRequest) ProtoMessage() {} func (x *GetAgencyRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[39] + mi := &file_proto_user_v1_host_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2936,7 +3160,7 @@ func (x *GetAgencyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgencyRequest.ProtoReflect.Descriptor instead. func (*GetAgencyRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{39} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{43} } func (x *GetAgencyRequest) GetMeta() *RequestMeta { @@ -2962,7 +3186,7 @@ type GetAgencyResponse struct { func (x *GetAgencyResponse) Reset() { *x = GetAgencyResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[40] + mi := &file_proto_user_v1_host_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2974,7 +3198,7 @@ func (x *GetAgencyResponse) String() string { func (*GetAgencyResponse) ProtoMessage() {} func (x *GetAgencyResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[40] + mi := &file_proto_user_v1_host_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2987,7 +3211,7 @@ func (x *GetAgencyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgencyResponse.ProtoReflect.Descriptor instead. func (*GetAgencyResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{40} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{44} } func (x *GetAgencyResponse) GetAgency() *Agency { @@ -3008,7 +3232,7 @@ type CheckBusinessCapabilityRequest struct { func (x *CheckBusinessCapabilityRequest) Reset() { *x = CheckBusinessCapabilityRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[41] + mi := &file_proto_user_v1_host_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3020,7 +3244,7 @@ func (x *CheckBusinessCapabilityRequest) String() string { func (*CheckBusinessCapabilityRequest) ProtoMessage() {} func (x *CheckBusinessCapabilityRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[41] + mi := &file_proto_user_v1_host_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3033,7 +3257,7 @@ func (x *CheckBusinessCapabilityRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckBusinessCapabilityRequest.ProtoReflect.Descriptor instead. func (*CheckBusinessCapabilityRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{41} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{45} } func (x *CheckBusinessCapabilityRequest) GetMeta() *RequestMeta { @@ -3067,7 +3291,7 @@ type CheckBusinessCapabilityResponse struct { func (x *CheckBusinessCapabilityResponse) Reset() { *x = CheckBusinessCapabilityResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[42] + mi := &file_proto_user_v1_host_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3079,7 +3303,7 @@ func (x *CheckBusinessCapabilityResponse) String() string { func (*CheckBusinessCapabilityResponse) ProtoMessage() {} func (x *CheckBusinessCapabilityResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[42] + mi := &file_proto_user_v1_host_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3092,7 +3316,7 @@ func (x *CheckBusinessCapabilityResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckBusinessCapabilityResponse.ProtoReflect.Descriptor instead. func (*CheckBusinessCapabilityResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{42} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{46} } func (x *CheckBusinessCapabilityResponse) GetAllowed() bool { @@ -3120,7 +3344,7 @@ type GetAgencyMembersRequest struct { func (x *GetAgencyMembersRequest) Reset() { *x = GetAgencyMembersRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[43] + mi := &file_proto_user_v1_host_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3132,7 +3356,7 @@ func (x *GetAgencyMembersRequest) String() string { func (*GetAgencyMembersRequest) ProtoMessage() {} func (x *GetAgencyMembersRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[43] + mi := &file_proto_user_v1_host_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3145,7 +3369,7 @@ func (x *GetAgencyMembersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgencyMembersRequest.ProtoReflect.Descriptor instead. func (*GetAgencyMembersRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{43} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{47} } func (x *GetAgencyMembersRequest) GetMeta() *RequestMeta { @@ -3178,7 +3402,7 @@ type GetAgencyMembersResponse struct { func (x *GetAgencyMembersResponse) Reset() { *x = GetAgencyMembersResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[44] + mi := &file_proto_user_v1_host_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3190,7 +3414,7 @@ func (x *GetAgencyMembersResponse) String() string { func (*GetAgencyMembersResponse) ProtoMessage() {} func (x *GetAgencyMembersResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[44] + mi := &file_proto_user_v1_host_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3203,7 +3427,7 @@ func (x *GetAgencyMembersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgencyMembersResponse.ProtoReflect.Descriptor instead. func (*GetAgencyMembersResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{44} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{48} } func (x *GetAgencyMembersResponse) GetMemberships() []*AgencyMembership { @@ -3224,7 +3448,7 @@ type GetAgencyApplicationsRequest struct { func (x *GetAgencyApplicationsRequest) Reset() { *x = GetAgencyApplicationsRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[45] + mi := &file_proto_user_v1_host_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3236,7 +3460,7 @@ func (x *GetAgencyApplicationsRequest) String() string { func (*GetAgencyApplicationsRequest) ProtoMessage() {} func (x *GetAgencyApplicationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[45] + mi := &file_proto_user_v1_host_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3249,7 +3473,7 @@ func (x *GetAgencyApplicationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgencyApplicationsRequest.ProtoReflect.Descriptor instead. func (*GetAgencyApplicationsRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{45} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{49} } func (x *GetAgencyApplicationsRequest) GetMeta() *RequestMeta { @@ -3282,7 +3506,7 @@ type GetAgencyApplicationsResponse struct { func (x *GetAgencyApplicationsResponse) Reset() { *x = GetAgencyApplicationsResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[46] + mi := &file_proto_user_v1_host_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3294,7 +3518,7 @@ func (x *GetAgencyApplicationsResponse) String() string { func (*GetAgencyApplicationsResponse) ProtoMessage() {} func (x *GetAgencyApplicationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[46] + mi := &file_proto_user_v1_host_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3307,7 +3531,7 @@ func (x *GetAgencyApplicationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgencyApplicationsResponse.ProtoReflect.Descriptor instead. func (*GetAgencyApplicationsResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{46} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{50} } func (x *GetAgencyApplicationsResponse) GetApplications() []*AgencyApplication { @@ -3330,7 +3554,7 @@ type CreateBDLeaderRequest struct { func (x *CreateBDLeaderRequest) Reset() { *x = CreateBDLeaderRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[47] + mi := &file_proto_user_v1_host_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3342,7 +3566,7 @@ func (x *CreateBDLeaderRequest) String() string { func (*CreateBDLeaderRequest) ProtoMessage() {} func (x *CreateBDLeaderRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[47] + mi := &file_proto_user_v1_host_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3355,7 +3579,7 @@ func (x *CreateBDLeaderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateBDLeaderRequest.ProtoReflect.Descriptor instead. func (*CreateBDLeaderRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{47} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{51} } func (x *CreateBDLeaderRequest) GetMeta() *RequestMeta { @@ -3402,7 +3626,7 @@ type CreateBDLeaderResponse struct { func (x *CreateBDLeaderResponse) Reset() { *x = CreateBDLeaderResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[48] + mi := &file_proto_user_v1_host_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3414,7 +3638,7 @@ func (x *CreateBDLeaderResponse) String() string { func (*CreateBDLeaderResponse) ProtoMessage() {} func (x *CreateBDLeaderResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[48] + mi := &file_proto_user_v1_host_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3427,7 +3651,7 @@ func (x *CreateBDLeaderResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateBDLeaderResponse.ProtoReflect.Descriptor instead. func (*CreateBDLeaderResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{48} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{52} } func (x *CreateBDLeaderResponse) GetBdProfile() *BDProfile { @@ -3451,7 +3675,7 @@ type CreateBDRequest struct { func (x *CreateBDRequest) Reset() { *x = CreateBDRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[49] + mi := &file_proto_user_v1_host_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3463,7 +3687,7 @@ func (x *CreateBDRequest) String() string { func (*CreateBDRequest) ProtoMessage() {} func (x *CreateBDRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[49] + mi := &file_proto_user_v1_host_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3476,7 +3700,7 @@ func (x *CreateBDRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateBDRequest.ProtoReflect.Descriptor instead. func (*CreateBDRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{49} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{53} } func (x *CreateBDRequest) GetMeta() *RequestMeta { @@ -3530,7 +3754,7 @@ type CreateBDResponse struct { func (x *CreateBDResponse) Reset() { *x = CreateBDResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[50] + mi := &file_proto_user_v1_host_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3542,7 +3766,7 @@ func (x *CreateBDResponse) String() string { func (*CreateBDResponse) ProtoMessage() {} func (x *CreateBDResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[50] + mi := &file_proto_user_v1_host_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3555,7 +3779,7 @@ func (x *CreateBDResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateBDResponse.ProtoReflect.Descriptor instead. func (*CreateBDResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{50} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{54} } func (x *CreateBDResponse) GetBdProfile() *BDProfile { @@ -3580,7 +3804,7 @@ type SetBDStatusRequest struct { func (x *SetBDStatusRequest) Reset() { *x = SetBDStatusRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[51] + mi := &file_proto_user_v1_host_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3592,7 +3816,7 @@ func (x *SetBDStatusRequest) String() string { func (*SetBDStatusRequest) ProtoMessage() {} func (x *SetBDStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[51] + mi := &file_proto_user_v1_host_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3605,7 +3829,7 @@ func (x *SetBDStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetBDStatusRequest.ProtoReflect.Descriptor instead. func (*SetBDStatusRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{51} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{55} } func (x *SetBDStatusRequest) GetMeta() *RequestMeta { @@ -3666,7 +3890,7 @@ type SetBDStatusResponse struct { func (x *SetBDStatusResponse) Reset() { *x = SetBDStatusResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[52] + mi := &file_proto_user_v1_host_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3678,7 +3902,7 @@ func (x *SetBDStatusResponse) String() string { func (*SetBDStatusResponse) ProtoMessage() {} func (x *SetBDStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[52] + mi := &file_proto_user_v1_host_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3691,7 +3915,7 @@ func (x *SetBDStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetBDStatusResponse.ProtoReflect.Descriptor instead. func (*SetBDStatusResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{52} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{56} } func (x *SetBDStatusResponse) GetBdProfile() *BDProfile { @@ -3714,7 +3938,7 @@ type CreateCoinSellerRequest struct { func (x *CreateCoinSellerRequest) Reset() { *x = CreateCoinSellerRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[53] + mi := &file_proto_user_v1_host_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3726,7 +3950,7 @@ func (x *CreateCoinSellerRequest) String() string { func (*CreateCoinSellerRequest) ProtoMessage() {} func (x *CreateCoinSellerRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[53] + mi := &file_proto_user_v1_host_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3739,7 +3963,7 @@ func (x *CreateCoinSellerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateCoinSellerRequest.ProtoReflect.Descriptor instead. func (*CreateCoinSellerRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{53} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{57} } func (x *CreateCoinSellerRequest) GetMeta() *RequestMeta { @@ -3786,7 +4010,7 @@ type CreateCoinSellerResponse struct { func (x *CreateCoinSellerResponse) Reset() { *x = CreateCoinSellerResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[54] + mi := &file_proto_user_v1_host_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3798,7 +4022,7 @@ func (x *CreateCoinSellerResponse) String() string { func (*CreateCoinSellerResponse) ProtoMessage() {} func (x *CreateCoinSellerResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[54] + mi := &file_proto_user_v1_host_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3811,7 +4035,7 @@ func (x *CreateCoinSellerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateCoinSellerResponse.ProtoReflect.Descriptor instead. func (*CreateCoinSellerResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{54} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{58} } func (x *CreateCoinSellerResponse) GetCoinSellerProfile() *CoinSellerProfile { @@ -3835,7 +4059,7 @@ type SetCoinSellerStatusRequest struct { func (x *SetCoinSellerStatusRequest) Reset() { *x = SetCoinSellerStatusRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[55] + mi := &file_proto_user_v1_host_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3847,7 +4071,7 @@ func (x *SetCoinSellerStatusRequest) String() string { func (*SetCoinSellerStatusRequest) ProtoMessage() {} func (x *SetCoinSellerStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[55] + mi := &file_proto_user_v1_host_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3860,7 +4084,7 @@ func (x *SetCoinSellerStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetCoinSellerStatusRequest.ProtoReflect.Descriptor instead. func (*SetCoinSellerStatusRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{55} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{59} } func (x *SetCoinSellerStatusRequest) GetMeta() *RequestMeta { @@ -3914,7 +4138,7 @@ type SetCoinSellerStatusResponse struct { func (x *SetCoinSellerStatusResponse) Reset() { *x = SetCoinSellerStatusResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[56] + mi := &file_proto_user_v1_host_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3926,7 +4150,7 @@ func (x *SetCoinSellerStatusResponse) String() string { func (*SetCoinSellerStatusResponse) ProtoMessage() {} func (x *SetCoinSellerStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[56] + mi := &file_proto_user_v1_host_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3939,7 +4163,7 @@ func (x *SetCoinSellerStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetCoinSellerStatusResponse.ProtoReflect.Descriptor instead. func (*SetCoinSellerStatusResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{56} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{60} } func (x *SetCoinSellerStatusResponse) GetCoinSellerProfile() *CoinSellerProfile { @@ -3967,7 +4191,7 @@ type CreateAgencyRequest struct { func (x *CreateAgencyRequest) Reset() { *x = CreateAgencyRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[57] + mi := &file_proto_user_v1_host_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3979,7 +4203,7 @@ func (x *CreateAgencyRequest) String() string { func (*CreateAgencyRequest) ProtoMessage() {} func (x *CreateAgencyRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[57] + mi := &file_proto_user_v1_host_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3992,7 +4216,7 @@ func (x *CreateAgencyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateAgencyRequest.ProtoReflect.Descriptor instead. func (*CreateAgencyRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{57} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{61} } func (x *CreateAgencyRequest) GetMeta() *RequestMeta { @@ -4069,7 +4293,7 @@ type CreateAgencyResponse struct { func (x *CreateAgencyResponse) Reset() { *x = CreateAgencyResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[58] + mi := &file_proto_user_v1_host_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4081,7 +4305,7 @@ func (x *CreateAgencyResponse) String() string { func (*CreateAgencyResponse) ProtoMessage() {} func (x *CreateAgencyResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[58] + mi := &file_proto_user_v1_host_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4094,7 +4318,7 @@ func (x *CreateAgencyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateAgencyResponse.ProtoReflect.Descriptor instead. func (*CreateAgencyResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{58} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{62} } func (x *CreateAgencyResponse) GetAgency() *Agency { @@ -4131,7 +4355,7 @@ type CloseAgencyRequest struct { func (x *CloseAgencyRequest) Reset() { *x = CloseAgencyRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[59] + mi := &file_proto_user_v1_host_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4143,7 +4367,7 @@ func (x *CloseAgencyRequest) String() string { func (*CloseAgencyRequest) ProtoMessage() {} func (x *CloseAgencyRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[59] + mi := &file_proto_user_v1_host_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4156,7 +4380,7 @@ func (x *CloseAgencyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CloseAgencyRequest.ProtoReflect.Descriptor instead. func (*CloseAgencyRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{59} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{63} } func (x *CloseAgencyRequest) GetMeta() *RequestMeta { @@ -4203,7 +4427,7 @@ type CloseAgencyResponse struct { func (x *CloseAgencyResponse) Reset() { *x = CloseAgencyResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[60] + mi := &file_proto_user_v1_host_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4215,7 +4439,7 @@ func (x *CloseAgencyResponse) String() string { func (*CloseAgencyResponse) ProtoMessage() {} func (x *CloseAgencyResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[60] + mi := &file_proto_user_v1_host_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4228,7 +4452,7 @@ func (x *CloseAgencyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CloseAgencyResponse.ProtoReflect.Descriptor instead. func (*CloseAgencyResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{60} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{64} } func (x *CloseAgencyResponse) GetAgency() *Agency { @@ -4251,7 +4475,7 @@ type DeleteAgencyRequest struct { func (x *DeleteAgencyRequest) Reset() { *x = DeleteAgencyRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[61] + mi := &file_proto_user_v1_host_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4263,7 +4487,7 @@ func (x *DeleteAgencyRequest) String() string { func (*DeleteAgencyRequest) ProtoMessage() {} func (x *DeleteAgencyRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[61] + mi := &file_proto_user_v1_host_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4276,7 +4500,7 @@ func (x *DeleteAgencyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteAgencyRequest.ProtoReflect.Descriptor instead. func (*DeleteAgencyRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{61} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{65} } func (x *DeleteAgencyRequest) GetMeta() *RequestMeta { @@ -4323,7 +4547,7 @@ type DeleteAgencyResponse struct { func (x *DeleteAgencyResponse) Reset() { *x = DeleteAgencyResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[62] + mi := &file_proto_user_v1_host_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4335,7 +4559,7 @@ func (x *DeleteAgencyResponse) String() string { func (*DeleteAgencyResponse) ProtoMessage() {} func (x *DeleteAgencyResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[62] + mi := &file_proto_user_v1_host_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4348,7 +4572,7 @@ func (x *DeleteAgencyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteAgencyResponse.ProtoReflect.Descriptor instead. func (*DeleteAgencyResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{62} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{66} } func (x *DeleteAgencyResponse) GetAgency() *Agency { @@ -4372,7 +4596,7 @@ type SetAgencyJoinEnabledRequest struct { func (x *SetAgencyJoinEnabledRequest) Reset() { *x = SetAgencyJoinEnabledRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[63] + mi := &file_proto_user_v1_host_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4384,7 +4608,7 @@ func (x *SetAgencyJoinEnabledRequest) String() string { func (*SetAgencyJoinEnabledRequest) ProtoMessage() {} func (x *SetAgencyJoinEnabledRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[63] + mi := &file_proto_user_v1_host_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4397,7 +4621,7 @@ func (x *SetAgencyJoinEnabledRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetAgencyJoinEnabledRequest.ProtoReflect.Descriptor instead. func (*SetAgencyJoinEnabledRequest) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{63} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{67} } func (x *SetAgencyJoinEnabledRequest) GetMeta() *RequestMeta { @@ -4451,7 +4675,7 @@ type SetAgencyJoinEnabledResponse struct { func (x *SetAgencyJoinEnabledResponse) Reset() { *x = SetAgencyJoinEnabledResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[64] + mi := &file_proto_user_v1_host_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4463,7 +4687,7 @@ func (x *SetAgencyJoinEnabledResponse) String() string { func (*SetAgencyJoinEnabledResponse) ProtoMessage() {} func (x *SetAgencyJoinEnabledResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[64] + mi := &file_proto_user_v1_host_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4476,7 +4700,7 @@ func (x *SetAgencyJoinEnabledResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetAgencyJoinEnabledResponse.ProtoReflect.Descriptor instead. func (*SetAgencyJoinEnabledResponse) Descriptor() ([]byte, []int) { - return file_proto_user_v1_host_proto_rawDescGZIP(), []int{64} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{68} } func (x *SetAgencyJoinEnabledResponse) GetAgency() *Agency { @@ -4686,6 +4910,16 @@ const file_proto_user_v1_host_proto_rawDesc = "" + "\x10InviteBDResponse\x12=\n" + "\n" + "invitation\x18\x01 \x01(\v2\x1d.hyapp.user.v1.RoleInvitationR\n" + + "invitation\"\xb0\x01\n" + + "\x11InviteHostRequest\x12.\n" + + "\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12\x1d\n" + + "\n" + + "command_id\x18\x02 \x01(\tR\tcommandId\x12&\n" + + "\x0finviter_user_id\x18\x03 \x01(\x03R\rinviterUserId\x12$\n" + + "\x0etarget_user_id\x18\x04 \x01(\x03R\ftargetUserId\"S\n" + + "\x12InviteHostResponse\x12=\n" + + "\n" + + "invitation\x18\x01 \x01(\v2\x1d.hyapp.user.v1.RoleInvitationR\n" + "invitation\"\xa3\x01\n" + "\x16ListBDLeaderBDsRequest\x12.\n" + "\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12$\n" + @@ -4709,7 +4943,14 @@ const file_proto_user_v1_host_proto_rawDesc = "" + "\x06status\x18\x03 \x01(\tR\x06status\x12\x1b\n" + "\tpage_size\x18\x04 \x01(\x05R\bpageSize\"K\n" + "\x16ListBDAgenciesResponse\x121\n" + - "\bagencies\x18\x01 \x03(\v2\x15.hyapp.user.v1.AgencyR\bagencies\"\xe6\x01\n" + + "\bagencies\x18\x01 \x03(\v2\x15.hyapp.user.v1.AgencyR\bagencies\"\xa7\x01\n" + + "\x1aListRoleInvitationsRequest\x12.\n" + + "\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12$\n" + + "\x0etarget_user_id\x18\x02 \x01(\x03R\ftargetUserId\x12\x16\n" + + "\x06status\x18\x03 \x01(\tR\x06status\x12\x1b\n" + + "\tpage_size\x18\x04 \x01(\x05R\bpageSize\"^\n" + + "\x1bListRoleInvitationsResponse\x12?\n" + + "\vinvitations\x18\x01 \x03(\v2\x1d.hyapp.user.v1.RoleInvitationR\vinvitations\"\xe6\x01\n" + "\x1cProcessRoleInvitationRequest\x12.\n" + "\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12\x1d\n" + "\n" + @@ -4878,17 +5119,20 @@ const file_proto_user_v1_host_proto_rawDesc = "" + "\fjoin_enabled\x18\x05 \x01(\bR\vjoinEnabled\x12\x16\n" + "\x06reason\x18\x06 \x01(\tR\x06reason\"M\n" + "\x1cSetAgencyJoinEnabledResponse\x12-\n" + - "\x06agency\x18\x01 \x01(\v2\x15.hyapp.user.v1.AgencyR\x06agency2\xbb\x0f\n" + + "\x06agency\x18\x01 \x01(\v2\x15.hyapp.user.v1.AgencyR\x06agency2\xfc\x10\n" + "\x0fUserHostService\x12]\n" + "\x0eSearchAgencies\x12$.hyapp.user.v1.SearchAgenciesRequest\x1a%.hyapp.user.v1.SearchAgenciesResponse\x12Z\n" + "\rApplyToAgency\x12#.hyapp.user.v1.ApplyToAgencyRequest\x1a$.hyapp.user.v1.ApplyToAgencyResponse\x12x\n" + "\x17ReviewAgencyApplication\x12-.hyapp.user.v1.ReviewAgencyApplicationRequest\x1a..hyapp.user.v1.ReviewAgencyApplicationResponse\x12]\n" + "\x0eKickAgencyHost\x12$.hyapp.user.v1.KickAgencyHostRequest\x1a%.hyapp.user.v1.KickAgencyHostResponse\x12W\n" + "\fInviteAgency\x12\".hyapp.user.v1.InviteAgencyRequest\x1a#.hyapp.user.v1.InviteAgencyResponse\x12K\n" + - "\bInviteBD\x12\x1e.hyapp.user.v1.InviteBDRequest\x1a\x1f.hyapp.user.v1.InviteBDResponse\x12`\n" + + "\bInviteBD\x12\x1e.hyapp.user.v1.InviteBDRequest\x1a\x1f.hyapp.user.v1.InviteBDResponse\x12Q\n" + + "\n" + + "InviteHost\x12 .hyapp.user.v1.InviteHostRequest\x1a!.hyapp.user.v1.InviteHostResponse\x12`\n" + "\x0fListBDLeaderBDs\x12%.hyapp.user.v1.ListBDLeaderBDsRequest\x1a&.hyapp.user.v1.ListBDLeaderBDsResponse\x12o\n" + "\x14ListBDLeaderAgencies\x12*.hyapp.user.v1.ListBDLeaderAgenciesRequest\x1a+.hyapp.user.v1.ListBDLeaderAgenciesResponse\x12]\n" + - "\x0eListBDAgencies\x12$.hyapp.user.v1.ListBDAgenciesRequest\x1a%.hyapp.user.v1.ListBDAgenciesResponse\x12r\n" + + "\x0eListBDAgencies\x12$.hyapp.user.v1.ListBDAgenciesRequest\x1a%.hyapp.user.v1.ListBDAgenciesResponse\x12l\n" + + "\x13ListRoleInvitations\x12).hyapp.user.v1.ListRoleInvitationsRequest\x1a*.hyapp.user.v1.ListRoleInvitationsResponse\x12r\n" + "\x15ProcessRoleInvitation\x12+.hyapp.user.v1.ProcessRoleInvitationRequest\x1a,.hyapp.user.v1.ProcessRoleInvitationResponse\x12]\n" + "\x0eGetHostProfile\x12$.hyapp.user.v1.GetHostProfileRequest\x1a%.hyapp.user.v1.GetHostProfileResponse\x12W\n" + "\fGetBDProfile\x12\".hyapp.user.v1.GetBDProfileRequest\x1a#.hyapp.user.v1.GetBDProfileResponse\x12o\n" + @@ -4922,7 +5166,7 @@ func file_proto_user_v1_host_proto_rawDescGZIP() []byte { return file_proto_user_v1_host_proto_rawDescData } -var file_proto_user_v1_host_proto_msgTypes = make([]protoimpl.MessageInfo, 65) +var file_proto_user_v1_host_proto_msgTypes = make([]protoimpl.MessageInfo, 69) var file_proto_user_v1_host_proto_goTypes = []any{ (*HostProfile)(nil), // 0: hyapp.user.v1.HostProfile (*Agency)(nil), // 1: hyapp.user.v1.Agency @@ -4945,178 +5189,190 @@ var file_proto_user_v1_host_proto_goTypes = []any{ (*InviteAgencyResponse)(nil), // 18: hyapp.user.v1.InviteAgencyResponse (*InviteBDRequest)(nil), // 19: hyapp.user.v1.InviteBDRequest (*InviteBDResponse)(nil), // 20: hyapp.user.v1.InviteBDResponse - (*ListBDLeaderBDsRequest)(nil), // 21: hyapp.user.v1.ListBDLeaderBDsRequest - (*ListBDLeaderBDsResponse)(nil), // 22: hyapp.user.v1.ListBDLeaderBDsResponse - (*ListBDLeaderAgenciesRequest)(nil), // 23: hyapp.user.v1.ListBDLeaderAgenciesRequest - (*ListBDLeaderAgenciesResponse)(nil), // 24: hyapp.user.v1.ListBDLeaderAgenciesResponse - (*ListBDAgenciesRequest)(nil), // 25: hyapp.user.v1.ListBDAgenciesRequest - (*ListBDAgenciesResponse)(nil), // 26: hyapp.user.v1.ListBDAgenciesResponse - (*ProcessRoleInvitationRequest)(nil), // 27: hyapp.user.v1.ProcessRoleInvitationRequest - (*ProcessRoleInvitationResponse)(nil), // 28: hyapp.user.v1.ProcessRoleInvitationResponse - (*GetHostProfileRequest)(nil), // 29: hyapp.user.v1.GetHostProfileRequest - (*GetHostProfileResponse)(nil), // 30: hyapp.user.v1.GetHostProfileResponse - (*GetBDProfileRequest)(nil), // 31: hyapp.user.v1.GetBDProfileRequest - (*GetBDProfileResponse)(nil), // 32: hyapp.user.v1.GetBDProfileResponse - (*GetCoinSellerProfileRequest)(nil), // 33: hyapp.user.v1.GetCoinSellerProfileRequest - (*GetCoinSellerProfileResponse)(nil), // 34: hyapp.user.v1.GetCoinSellerProfileResponse - (*ListActiveCoinSellersInMyRegionRequest)(nil), // 35: hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest - (*ListActiveCoinSellersInMyRegionResponse)(nil), // 36: hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse - (*GetUserRoleSummaryRequest)(nil), // 37: hyapp.user.v1.GetUserRoleSummaryRequest - (*GetUserRoleSummaryResponse)(nil), // 38: hyapp.user.v1.GetUserRoleSummaryResponse - (*GetAgencyRequest)(nil), // 39: hyapp.user.v1.GetAgencyRequest - (*GetAgencyResponse)(nil), // 40: hyapp.user.v1.GetAgencyResponse - (*CheckBusinessCapabilityRequest)(nil), // 41: hyapp.user.v1.CheckBusinessCapabilityRequest - (*CheckBusinessCapabilityResponse)(nil), // 42: hyapp.user.v1.CheckBusinessCapabilityResponse - (*GetAgencyMembersRequest)(nil), // 43: hyapp.user.v1.GetAgencyMembersRequest - (*GetAgencyMembersResponse)(nil), // 44: hyapp.user.v1.GetAgencyMembersResponse - (*GetAgencyApplicationsRequest)(nil), // 45: hyapp.user.v1.GetAgencyApplicationsRequest - (*GetAgencyApplicationsResponse)(nil), // 46: hyapp.user.v1.GetAgencyApplicationsResponse - (*CreateBDLeaderRequest)(nil), // 47: hyapp.user.v1.CreateBDLeaderRequest - (*CreateBDLeaderResponse)(nil), // 48: hyapp.user.v1.CreateBDLeaderResponse - (*CreateBDRequest)(nil), // 49: hyapp.user.v1.CreateBDRequest - (*CreateBDResponse)(nil), // 50: hyapp.user.v1.CreateBDResponse - (*SetBDStatusRequest)(nil), // 51: hyapp.user.v1.SetBDStatusRequest - (*SetBDStatusResponse)(nil), // 52: hyapp.user.v1.SetBDStatusResponse - (*CreateCoinSellerRequest)(nil), // 53: hyapp.user.v1.CreateCoinSellerRequest - (*CreateCoinSellerResponse)(nil), // 54: hyapp.user.v1.CreateCoinSellerResponse - (*SetCoinSellerStatusRequest)(nil), // 55: hyapp.user.v1.SetCoinSellerStatusRequest - (*SetCoinSellerStatusResponse)(nil), // 56: hyapp.user.v1.SetCoinSellerStatusResponse - (*CreateAgencyRequest)(nil), // 57: hyapp.user.v1.CreateAgencyRequest - (*CreateAgencyResponse)(nil), // 58: hyapp.user.v1.CreateAgencyResponse - (*CloseAgencyRequest)(nil), // 59: hyapp.user.v1.CloseAgencyRequest - (*CloseAgencyResponse)(nil), // 60: hyapp.user.v1.CloseAgencyResponse - (*DeleteAgencyRequest)(nil), // 61: hyapp.user.v1.DeleteAgencyRequest - (*DeleteAgencyResponse)(nil), // 62: hyapp.user.v1.DeleteAgencyResponse - (*SetAgencyJoinEnabledRequest)(nil), // 63: hyapp.user.v1.SetAgencyJoinEnabledRequest - (*SetAgencyJoinEnabledResponse)(nil), // 64: hyapp.user.v1.SetAgencyJoinEnabledResponse - (*RequestMeta)(nil), // 65: hyapp.user.v1.RequestMeta + (*InviteHostRequest)(nil), // 21: hyapp.user.v1.InviteHostRequest + (*InviteHostResponse)(nil), // 22: hyapp.user.v1.InviteHostResponse + (*ListBDLeaderBDsRequest)(nil), // 23: hyapp.user.v1.ListBDLeaderBDsRequest + (*ListBDLeaderBDsResponse)(nil), // 24: hyapp.user.v1.ListBDLeaderBDsResponse + (*ListBDLeaderAgenciesRequest)(nil), // 25: hyapp.user.v1.ListBDLeaderAgenciesRequest + (*ListBDLeaderAgenciesResponse)(nil), // 26: hyapp.user.v1.ListBDLeaderAgenciesResponse + (*ListBDAgenciesRequest)(nil), // 27: hyapp.user.v1.ListBDAgenciesRequest + (*ListBDAgenciesResponse)(nil), // 28: hyapp.user.v1.ListBDAgenciesResponse + (*ListRoleInvitationsRequest)(nil), // 29: hyapp.user.v1.ListRoleInvitationsRequest + (*ListRoleInvitationsResponse)(nil), // 30: hyapp.user.v1.ListRoleInvitationsResponse + (*ProcessRoleInvitationRequest)(nil), // 31: hyapp.user.v1.ProcessRoleInvitationRequest + (*ProcessRoleInvitationResponse)(nil), // 32: hyapp.user.v1.ProcessRoleInvitationResponse + (*GetHostProfileRequest)(nil), // 33: hyapp.user.v1.GetHostProfileRequest + (*GetHostProfileResponse)(nil), // 34: hyapp.user.v1.GetHostProfileResponse + (*GetBDProfileRequest)(nil), // 35: hyapp.user.v1.GetBDProfileRequest + (*GetBDProfileResponse)(nil), // 36: hyapp.user.v1.GetBDProfileResponse + (*GetCoinSellerProfileRequest)(nil), // 37: hyapp.user.v1.GetCoinSellerProfileRequest + (*GetCoinSellerProfileResponse)(nil), // 38: hyapp.user.v1.GetCoinSellerProfileResponse + (*ListActiveCoinSellersInMyRegionRequest)(nil), // 39: hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest + (*ListActiveCoinSellersInMyRegionResponse)(nil), // 40: hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse + (*GetUserRoleSummaryRequest)(nil), // 41: hyapp.user.v1.GetUserRoleSummaryRequest + (*GetUserRoleSummaryResponse)(nil), // 42: hyapp.user.v1.GetUserRoleSummaryResponse + (*GetAgencyRequest)(nil), // 43: hyapp.user.v1.GetAgencyRequest + (*GetAgencyResponse)(nil), // 44: hyapp.user.v1.GetAgencyResponse + (*CheckBusinessCapabilityRequest)(nil), // 45: hyapp.user.v1.CheckBusinessCapabilityRequest + (*CheckBusinessCapabilityResponse)(nil), // 46: hyapp.user.v1.CheckBusinessCapabilityResponse + (*GetAgencyMembersRequest)(nil), // 47: hyapp.user.v1.GetAgencyMembersRequest + (*GetAgencyMembersResponse)(nil), // 48: hyapp.user.v1.GetAgencyMembersResponse + (*GetAgencyApplicationsRequest)(nil), // 49: hyapp.user.v1.GetAgencyApplicationsRequest + (*GetAgencyApplicationsResponse)(nil), // 50: hyapp.user.v1.GetAgencyApplicationsResponse + (*CreateBDLeaderRequest)(nil), // 51: hyapp.user.v1.CreateBDLeaderRequest + (*CreateBDLeaderResponse)(nil), // 52: hyapp.user.v1.CreateBDLeaderResponse + (*CreateBDRequest)(nil), // 53: hyapp.user.v1.CreateBDRequest + (*CreateBDResponse)(nil), // 54: hyapp.user.v1.CreateBDResponse + (*SetBDStatusRequest)(nil), // 55: hyapp.user.v1.SetBDStatusRequest + (*SetBDStatusResponse)(nil), // 56: hyapp.user.v1.SetBDStatusResponse + (*CreateCoinSellerRequest)(nil), // 57: hyapp.user.v1.CreateCoinSellerRequest + (*CreateCoinSellerResponse)(nil), // 58: hyapp.user.v1.CreateCoinSellerResponse + (*SetCoinSellerStatusRequest)(nil), // 59: hyapp.user.v1.SetCoinSellerStatusRequest + (*SetCoinSellerStatusResponse)(nil), // 60: hyapp.user.v1.SetCoinSellerStatusResponse + (*CreateAgencyRequest)(nil), // 61: hyapp.user.v1.CreateAgencyRequest + (*CreateAgencyResponse)(nil), // 62: hyapp.user.v1.CreateAgencyResponse + (*CloseAgencyRequest)(nil), // 63: hyapp.user.v1.CloseAgencyRequest + (*CloseAgencyResponse)(nil), // 64: hyapp.user.v1.CloseAgencyResponse + (*DeleteAgencyRequest)(nil), // 65: hyapp.user.v1.DeleteAgencyRequest + (*DeleteAgencyResponse)(nil), // 66: hyapp.user.v1.DeleteAgencyResponse + (*SetAgencyJoinEnabledRequest)(nil), // 67: hyapp.user.v1.SetAgencyJoinEnabledRequest + (*SetAgencyJoinEnabledResponse)(nil), // 68: hyapp.user.v1.SetAgencyJoinEnabledResponse + (*RequestMeta)(nil), // 69: hyapp.user.v1.RequestMeta } var file_proto_user_v1_host_proto_depIdxs = []int32{ - 65, // 0: hyapp.user.v1.SearchAgenciesRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 69, // 0: hyapp.user.v1.SearchAgenciesRequest.meta:type_name -> hyapp.user.v1.RequestMeta 1, // 1: hyapp.user.v1.SearchAgenciesResponse.agencies:type_name -> hyapp.user.v1.Agency - 65, // 2: hyapp.user.v1.ApplyToAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 69, // 2: hyapp.user.v1.ApplyToAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta 7, // 3: hyapp.user.v1.ApplyToAgencyResponse.application:type_name -> hyapp.user.v1.AgencyApplication - 65, // 4: hyapp.user.v1.ReviewAgencyApplicationRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 69, // 4: hyapp.user.v1.ReviewAgencyApplicationRequest.meta:type_name -> hyapp.user.v1.RequestMeta 7, // 5: hyapp.user.v1.ReviewAgencyApplicationResponse.application:type_name -> hyapp.user.v1.AgencyApplication 0, // 6: hyapp.user.v1.ReviewAgencyApplicationResponse.host_profile:type_name -> hyapp.user.v1.HostProfile 6, // 7: hyapp.user.v1.ReviewAgencyApplicationResponse.membership:type_name -> hyapp.user.v1.AgencyMembership - 65, // 8: hyapp.user.v1.KickAgencyHostRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 69, // 8: hyapp.user.v1.KickAgencyHostRequest.meta:type_name -> hyapp.user.v1.RequestMeta 6, // 9: hyapp.user.v1.KickAgencyHostResponse.membership:type_name -> hyapp.user.v1.AgencyMembership 0, // 10: hyapp.user.v1.KickAgencyHostResponse.host_profile:type_name -> hyapp.user.v1.HostProfile - 65, // 11: hyapp.user.v1.InviteAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 69, // 11: hyapp.user.v1.InviteAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta 8, // 12: hyapp.user.v1.InviteAgencyResponse.invitation:type_name -> hyapp.user.v1.RoleInvitation - 65, // 13: hyapp.user.v1.InviteBDRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 69, // 13: hyapp.user.v1.InviteBDRequest.meta:type_name -> hyapp.user.v1.RequestMeta 8, // 14: hyapp.user.v1.InviteBDResponse.invitation:type_name -> hyapp.user.v1.RoleInvitation - 65, // 15: hyapp.user.v1.ListBDLeaderBDsRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 2, // 16: hyapp.user.v1.ListBDLeaderBDsResponse.bd_profiles:type_name -> hyapp.user.v1.BDProfile - 65, // 17: hyapp.user.v1.ListBDLeaderAgenciesRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 18: hyapp.user.v1.ListBDLeaderAgenciesResponse.agencies:type_name -> hyapp.user.v1.Agency - 65, // 19: hyapp.user.v1.ListBDAgenciesRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 20: hyapp.user.v1.ListBDAgenciesResponse.agencies:type_name -> hyapp.user.v1.Agency - 65, // 21: hyapp.user.v1.ProcessRoleInvitationRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 8, // 22: hyapp.user.v1.ProcessRoleInvitationResponse.invitation:type_name -> hyapp.user.v1.RoleInvitation - 0, // 23: hyapp.user.v1.ProcessRoleInvitationResponse.host_profile:type_name -> hyapp.user.v1.HostProfile - 1, // 24: hyapp.user.v1.ProcessRoleInvitationResponse.agency:type_name -> hyapp.user.v1.Agency - 6, // 25: hyapp.user.v1.ProcessRoleInvitationResponse.membership:type_name -> hyapp.user.v1.AgencyMembership - 2, // 26: hyapp.user.v1.ProcessRoleInvitationResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 65, // 27: hyapp.user.v1.GetHostProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 0, // 28: hyapp.user.v1.GetHostProfileResponse.host_profile:type_name -> hyapp.user.v1.HostProfile - 65, // 29: hyapp.user.v1.GetBDProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 2, // 30: hyapp.user.v1.GetBDProfileResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 65, // 31: hyapp.user.v1.GetCoinSellerProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 3, // 32: hyapp.user.v1.GetCoinSellerProfileResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile - 65, // 33: hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 4, // 34: hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse.coin_sellers:type_name -> hyapp.user.v1.CoinSellerListItem - 65, // 35: hyapp.user.v1.GetUserRoleSummaryRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 5, // 36: hyapp.user.v1.GetUserRoleSummaryResponse.summary:type_name -> hyapp.user.v1.UserRoleSummary - 65, // 37: hyapp.user.v1.GetAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 38: hyapp.user.v1.GetAgencyResponse.agency:type_name -> hyapp.user.v1.Agency - 65, // 39: hyapp.user.v1.CheckBusinessCapabilityRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 65, // 40: hyapp.user.v1.GetAgencyMembersRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 6, // 41: hyapp.user.v1.GetAgencyMembersResponse.memberships:type_name -> hyapp.user.v1.AgencyMembership - 65, // 42: hyapp.user.v1.GetAgencyApplicationsRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 7, // 43: hyapp.user.v1.GetAgencyApplicationsResponse.applications:type_name -> hyapp.user.v1.AgencyApplication - 65, // 44: hyapp.user.v1.CreateBDLeaderRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 2, // 45: hyapp.user.v1.CreateBDLeaderResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 65, // 46: hyapp.user.v1.CreateBDRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 2, // 47: hyapp.user.v1.CreateBDResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 65, // 48: hyapp.user.v1.SetBDStatusRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 2, // 49: hyapp.user.v1.SetBDStatusResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 65, // 50: hyapp.user.v1.CreateCoinSellerRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 3, // 51: hyapp.user.v1.CreateCoinSellerResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile - 65, // 52: hyapp.user.v1.SetCoinSellerStatusRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 3, // 53: hyapp.user.v1.SetCoinSellerStatusResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile - 65, // 54: hyapp.user.v1.CreateAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 55: hyapp.user.v1.CreateAgencyResponse.agency:type_name -> hyapp.user.v1.Agency - 0, // 56: hyapp.user.v1.CreateAgencyResponse.host_profile:type_name -> hyapp.user.v1.HostProfile - 6, // 57: hyapp.user.v1.CreateAgencyResponse.membership:type_name -> hyapp.user.v1.AgencyMembership - 65, // 58: hyapp.user.v1.CloseAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 59: hyapp.user.v1.CloseAgencyResponse.agency:type_name -> hyapp.user.v1.Agency - 65, // 60: hyapp.user.v1.DeleteAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 61: hyapp.user.v1.DeleteAgencyResponse.agency:type_name -> hyapp.user.v1.Agency - 65, // 62: hyapp.user.v1.SetAgencyJoinEnabledRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 63: hyapp.user.v1.SetAgencyJoinEnabledResponse.agency:type_name -> hyapp.user.v1.Agency - 9, // 64: hyapp.user.v1.UserHostService.SearchAgencies:input_type -> hyapp.user.v1.SearchAgenciesRequest - 11, // 65: hyapp.user.v1.UserHostService.ApplyToAgency:input_type -> hyapp.user.v1.ApplyToAgencyRequest - 13, // 66: hyapp.user.v1.UserHostService.ReviewAgencyApplication:input_type -> hyapp.user.v1.ReviewAgencyApplicationRequest - 15, // 67: hyapp.user.v1.UserHostService.KickAgencyHost:input_type -> hyapp.user.v1.KickAgencyHostRequest - 17, // 68: hyapp.user.v1.UserHostService.InviteAgency:input_type -> hyapp.user.v1.InviteAgencyRequest - 19, // 69: hyapp.user.v1.UserHostService.InviteBD:input_type -> hyapp.user.v1.InviteBDRequest - 21, // 70: hyapp.user.v1.UserHostService.ListBDLeaderBDs:input_type -> hyapp.user.v1.ListBDLeaderBDsRequest - 23, // 71: hyapp.user.v1.UserHostService.ListBDLeaderAgencies:input_type -> hyapp.user.v1.ListBDLeaderAgenciesRequest - 25, // 72: hyapp.user.v1.UserHostService.ListBDAgencies:input_type -> hyapp.user.v1.ListBDAgenciesRequest - 27, // 73: hyapp.user.v1.UserHostService.ProcessRoleInvitation:input_type -> hyapp.user.v1.ProcessRoleInvitationRequest - 29, // 74: hyapp.user.v1.UserHostService.GetHostProfile:input_type -> hyapp.user.v1.GetHostProfileRequest - 31, // 75: hyapp.user.v1.UserHostService.GetBDProfile:input_type -> hyapp.user.v1.GetBDProfileRequest - 33, // 76: hyapp.user.v1.UserHostService.GetCoinSellerProfile:input_type -> hyapp.user.v1.GetCoinSellerProfileRequest - 35, // 77: hyapp.user.v1.UserHostService.ListActiveCoinSellersInMyRegion:input_type -> hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest - 37, // 78: hyapp.user.v1.UserHostService.GetUserRoleSummary:input_type -> hyapp.user.v1.GetUserRoleSummaryRequest - 39, // 79: hyapp.user.v1.UserHostService.GetAgency:input_type -> hyapp.user.v1.GetAgencyRequest - 41, // 80: hyapp.user.v1.UserHostService.CheckBusinessCapability:input_type -> hyapp.user.v1.CheckBusinessCapabilityRequest - 43, // 81: hyapp.user.v1.UserHostService.GetAgencyMembers:input_type -> hyapp.user.v1.GetAgencyMembersRequest - 45, // 82: hyapp.user.v1.UserHostService.GetAgencyApplications:input_type -> hyapp.user.v1.GetAgencyApplicationsRequest - 47, // 83: hyapp.user.v1.UserHostAdminService.CreateBDLeader:input_type -> hyapp.user.v1.CreateBDLeaderRequest - 49, // 84: hyapp.user.v1.UserHostAdminService.CreateBD:input_type -> hyapp.user.v1.CreateBDRequest - 51, // 85: hyapp.user.v1.UserHostAdminService.SetBDStatus:input_type -> hyapp.user.v1.SetBDStatusRequest - 53, // 86: hyapp.user.v1.UserHostAdminService.CreateCoinSeller:input_type -> hyapp.user.v1.CreateCoinSellerRequest - 55, // 87: hyapp.user.v1.UserHostAdminService.SetCoinSellerStatus:input_type -> hyapp.user.v1.SetCoinSellerStatusRequest - 57, // 88: hyapp.user.v1.UserHostAdminService.CreateAgency:input_type -> hyapp.user.v1.CreateAgencyRequest - 59, // 89: hyapp.user.v1.UserHostAdminService.CloseAgency:input_type -> hyapp.user.v1.CloseAgencyRequest - 61, // 90: hyapp.user.v1.UserHostAdminService.DeleteAgency:input_type -> hyapp.user.v1.DeleteAgencyRequest - 63, // 91: hyapp.user.v1.UserHostAdminService.SetAgencyJoinEnabled:input_type -> hyapp.user.v1.SetAgencyJoinEnabledRequest - 10, // 92: hyapp.user.v1.UserHostService.SearchAgencies:output_type -> hyapp.user.v1.SearchAgenciesResponse - 12, // 93: hyapp.user.v1.UserHostService.ApplyToAgency:output_type -> hyapp.user.v1.ApplyToAgencyResponse - 14, // 94: hyapp.user.v1.UserHostService.ReviewAgencyApplication:output_type -> hyapp.user.v1.ReviewAgencyApplicationResponse - 16, // 95: hyapp.user.v1.UserHostService.KickAgencyHost:output_type -> hyapp.user.v1.KickAgencyHostResponse - 18, // 96: hyapp.user.v1.UserHostService.InviteAgency:output_type -> hyapp.user.v1.InviteAgencyResponse - 20, // 97: hyapp.user.v1.UserHostService.InviteBD:output_type -> hyapp.user.v1.InviteBDResponse - 22, // 98: hyapp.user.v1.UserHostService.ListBDLeaderBDs:output_type -> hyapp.user.v1.ListBDLeaderBDsResponse - 24, // 99: hyapp.user.v1.UserHostService.ListBDLeaderAgencies:output_type -> hyapp.user.v1.ListBDLeaderAgenciesResponse - 26, // 100: hyapp.user.v1.UserHostService.ListBDAgencies:output_type -> hyapp.user.v1.ListBDAgenciesResponse - 28, // 101: hyapp.user.v1.UserHostService.ProcessRoleInvitation:output_type -> hyapp.user.v1.ProcessRoleInvitationResponse - 30, // 102: hyapp.user.v1.UserHostService.GetHostProfile:output_type -> hyapp.user.v1.GetHostProfileResponse - 32, // 103: hyapp.user.v1.UserHostService.GetBDProfile:output_type -> hyapp.user.v1.GetBDProfileResponse - 34, // 104: hyapp.user.v1.UserHostService.GetCoinSellerProfile:output_type -> hyapp.user.v1.GetCoinSellerProfileResponse - 36, // 105: hyapp.user.v1.UserHostService.ListActiveCoinSellersInMyRegion:output_type -> hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse - 38, // 106: hyapp.user.v1.UserHostService.GetUserRoleSummary:output_type -> hyapp.user.v1.GetUserRoleSummaryResponse - 40, // 107: hyapp.user.v1.UserHostService.GetAgency:output_type -> hyapp.user.v1.GetAgencyResponse - 42, // 108: hyapp.user.v1.UserHostService.CheckBusinessCapability:output_type -> hyapp.user.v1.CheckBusinessCapabilityResponse - 44, // 109: hyapp.user.v1.UserHostService.GetAgencyMembers:output_type -> hyapp.user.v1.GetAgencyMembersResponse - 46, // 110: hyapp.user.v1.UserHostService.GetAgencyApplications:output_type -> hyapp.user.v1.GetAgencyApplicationsResponse - 48, // 111: hyapp.user.v1.UserHostAdminService.CreateBDLeader:output_type -> hyapp.user.v1.CreateBDLeaderResponse - 50, // 112: hyapp.user.v1.UserHostAdminService.CreateBD:output_type -> hyapp.user.v1.CreateBDResponse - 52, // 113: hyapp.user.v1.UserHostAdminService.SetBDStatus:output_type -> hyapp.user.v1.SetBDStatusResponse - 54, // 114: hyapp.user.v1.UserHostAdminService.CreateCoinSeller:output_type -> hyapp.user.v1.CreateCoinSellerResponse - 56, // 115: hyapp.user.v1.UserHostAdminService.SetCoinSellerStatus:output_type -> hyapp.user.v1.SetCoinSellerStatusResponse - 58, // 116: hyapp.user.v1.UserHostAdminService.CreateAgency:output_type -> hyapp.user.v1.CreateAgencyResponse - 60, // 117: hyapp.user.v1.UserHostAdminService.CloseAgency:output_type -> hyapp.user.v1.CloseAgencyResponse - 62, // 118: hyapp.user.v1.UserHostAdminService.DeleteAgency:output_type -> hyapp.user.v1.DeleteAgencyResponse - 64, // 119: hyapp.user.v1.UserHostAdminService.SetAgencyJoinEnabled:output_type -> hyapp.user.v1.SetAgencyJoinEnabledResponse - 92, // [92:120] is the sub-list for method output_type - 64, // [64:92] is the sub-list for method input_type - 64, // [64:64] is the sub-list for extension type_name - 64, // [64:64] is the sub-list for extension extendee - 0, // [0:64] is the sub-list for field type_name + 69, // 15: hyapp.user.v1.InviteHostRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 8, // 16: hyapp.user.v1.InviteHostResponse.invitation:type_name -> hyapp.user.v1.RoleInvitation + 69, // 17: hyapp.user.v1.ListBDLeaderBDsRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 2, // 18: hyapp.user.v1.ListBDLeaderBDsResponse.bd_profiles:type_name -> hyapp.user.v1.BDProfile + 69, // 19: hyapp.user.v1.ListBDLeaderAgenciesRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 20: hyapp.user.v1.ListBDLeaderAgenciesResponse.agencies:type_name -> hyapp.user.v1.Agency + 69, // 21: hyapp.user.v1.ListBDAgenciesRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 22: hyapp.user.v1.ListBDAgenciesResponse.agencies:type_name -> hyapp.user.v1.Agency + 69, // 23: hyapp.user.v1.ListRoleInvitationsRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 8, // 24: hyapp.user.v1.ListRoleInvitationsResponse.invitations:type_name -> hyapp.user.v1.RoleInvitation + 69, // 25: hyapp.user.v1.ProcessRoleInvitationRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 8, // 26: hyapp.user.v1.ProcessRoleInvitationResponse.invitation:type_name -> hyapp.user.v1.RoleInvitation + 0, // 27: hyapp.user.v1.ProcessRoleInvitationResponse.host_profile:type_name -> hyapp.user.v1.HostProfile + 1, // 28: hyapp.user.v1.ProcessRoleInvitationResponse.agency:type_name -> hyapp.user.v1.Agency + 6, // 29: hyapp.user.v1.ProcessRoleInvitationResponse.membership:type_name -> hyapp.user.v1.AgencyMembership + 2, // 30: hyapp.user.v1.ProcessRoleInvitationResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 69, // 31: hyapp.user.v1.GetHostProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 0, // 32: hyapp.user.v1.GetHostProfileResponse.host_profile:type_name -> hyapp.user.v1.HostProfile + 69, // 33: hyapp.user.v1.GetBDProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 2, // 34: hyapp.user.v1.GetBDProfileResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 69, // 35: hyapp.user.v1.GetCoinSellerProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 3, // 36: hyapp.user.v1.GetCoinSellerProfileResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile + 69, // 37: hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 4, // 38: hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse.coin_sellers:type_name -> hyapp.user.v1.CoinSellerListItem + 69, // 39: hyapp.user.v1.GetUserRoleSummaryRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 5, // 40: hyapp.user.v1.GetUserRoleSummaryResponse.summary:type_name -> hyapp.user.v1.UserRoleSummary + 69, // 41: hyapp.user.v1.GetAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 42: hyapp.user.v1.GetAgencyResponse.agency:type_name -> hyapp.user.v1.Agency + 69, // 43: hyapp.user.v1.CheckBusinessCapabilityRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 69, // 44: hyapp.user.v1.GetAgencyMembersRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 6, // 45: hyapp.user.v1.GetAgencyMembersResponse.memberships:type_name -> hyapp.user.v1.AgencyMembership + 69, // 46: hyapp.user.v1.GetAgencyApplicationsRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 7, // 47: hyapp.user.v1.GetAgencyApplicationsResponse.applications:type_name -> hyapp.user.v1.AgencyApplication + 69, // 48: hyapp.user.v1.CreateBDLeaderRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 2, // 49: hyapp.user.v1.CreateBDLeaderResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 69, // 50: hyapp.user.v1.CreateBDRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 2, // 51: hyapp.user.v1.CreateBDResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 69, // 52: hyapp.user.v1.SetBDStatusRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 2, // 53: hyapp.user.v1.SetBDStatusResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 69, // 54: hyapp.user.v1.CreateCoinSellerRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 3, // 55: hyapp.user.v1.CreateCoinSellerResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile + 69, // 56: hyapp.user.v1.SetCoinSellerStatusRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 3, // 57: hyapp.user.v1.SetCoinSellerStatusResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile + 69, // 58: hyapp.user.v1.CreateAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 59: hyapp.user.v1.CreateAgencyResponse.agency:type_name -> hyapp.user.v1.Agency + 0, // 60: hyapp.user.v1.CreateAgencyResponse.host_profile:type_name -> hyapp.user.v1.HostProfile + 6, // 61: hyapp.user.v1.CreateAgencyResponse.membership:type_name -> hyapp.user.v1.AgencyMembership + 69, // 62: hyapp.user.v1.CloseAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 63: hyapp.user.v1.CloseAgencyResponse.agency:type_name -> hyapp.user.v1.Agency + 69, // 64: hyapp.user.v1.DeleteAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 65: hyapp.user.v1.DeleteAgencyResponse.agency:type_name -> hyapp.user.v1.Agency + 69, // 66: hyapp.user.v1.SetAgencyJoinEnabledRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 67: hyapp.user.v1.SetAgencyJoinEnabledResponse.agency:type_name -> hyapp.user.v1.Agency + 9, // 68: hyapp.user.v1.UserHostService.SearchAgencies:input_type -> hyapp.user.v1.SearchAgenciesRequest + 11, // 69: hyapp.user.v1.UserHostService.ApplyToAgency:input_type -> hyapp.user.v1.ApplyToAgencyRequest + 13, // 70: hyapp.user.v1.UserHostService.ReviewAgencyApplication:input_type -> hyapp.user.v1.ReviewAgencyApplicationRequest + 15, // 71: hyapp.user.v1.UserHostService.KickAgencyHost:input_type -> hyapp.user.v1.KickAgencyHostRequest + 17, // 72: hyapp.user.v1.UserHostService.InviteAgency:input_type -> hyapp.user.v1.InviteAgencyRequest + 19, // 73: hyapp.user.v1.UserHostService.InviteBD:input_type -> hyapp.user.v1.InviteBDRequest + 21, // 74: hyapp.user.v1.UserHostService.InviteHost:input_type -> hyapp.user.v1.InviteHostRequest + 23, // 75: hyapp.user.v1.UserHostService.ListBDLeaderBDs:input_type -> hyapp.user.v1.ListBDLeaderBDsRequest + 25, // 76: hyapp.user.v1.UserHostService.ListBDLeaderAgencies:input_type -> hyapp.user.v1.ListBDLeaderAgenciesRequest + 27, // 77: hyapp.user.v1.UserHostService.ListBDAgencies:input_type -> hyapp.user.v1.ListBDAgenciesRequest + 29, // 78: hyapp.user.v1.UserHostService.ListRoleInvitations:input_type -> hyapp.user.v1.ListRoleInvitationsRequest + 31, // 79: hyapp.user.v1.UserHostService.ProcessRoleInvitation:input_type -> hyapp.user.v1.ProcessRoleInvitationRequest + 33, // 80: hyapp.user.v1.UserHostService.GetHostProfile:input_type -> hyapp.user.v1.GetHostProfileRequest + 35, // 81: hyapp.user.v1.UserHostService.GetBDProfile:input_type -> hyapp.user.v1.GetBDProfileRequest + 37, // 82: hyapp.user.v1.UserHostService.GetCoinSellerProfile:input_type -> hyapp.user.v1.GetCoinSellerProfileRequest + 39, // 83: hyapp.user.v1.UserHostService.ListActiveCoinSellersInMyRegion:input_type -> hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest + 41, // 84: hyapp.user.v1.UserHostService.GetUserRoleSummary:input_type -> hyapp.user.v1.GetUserRoleSummaryRequest + 43, // 85: hyapp.user.v1.UserHostService.GetAgency:input_type -> hyapp.user.v1.GetAgencyRequest + 45, // 86: hyapp.user.v1.UserHostService.CheckBusinessCapability:input_type -> hyapp.user.v1.CheckBusinessCapabilityRequest + 47, // 87: hyapp.user.v1.UserHostService.GetAgencyMembers:input_type -> hyapp.user.v1.GetAgencyMembersRequest + 49, // 88: hyapp.user.v1.UserHostService.GetAgencyApplications:input_type -> hyapp.user.v1.GetAgencyApplicationsRequest + 51, // 89: hyapp.user.v1.UserHostAdminService.CreateBDLeader:input_type -> hyapp.user.v1.CreateBDLeaderRequest + 53, // 90: hyapp.user.v1.UserHostAdminService.CreateBD:input_type -> hyapp.user.v1.CreateBDRequest + 55, // 91: hyapp.user.v1.UserHostAdminService.SetBDStatus:input_type -> hyapp.user.v1.SetBDStatusRequest + 57, // 92: hyapp.user.v1.UserHostAdminService.CreateCoinSeller:input_type -> hyapp.user.v1.CreateCoinSellerRequest + 59, // 93: hyapp.user.v1.UserHostAdminService.SetCoinSellerStatus:input_type -> hyapp.user.v1.SetCoinSellerStatusRequest + 61, // 94: hyapp.user.v1.UserHostAdminService.CreateAgency:input_type -> hyapp.user.v1.CreateAgencyRequest + 63, // 95: hyapp.user.v1.UserHostAdminService.CloseAgency:input_type -> hyapp.user.v1.CloseAgencyRequest + 65, // 96: hyapp.user.v1.UserHostAdminService.DeleteAgency:input_type -> hyapp.user.v1.DeleteAgencyRequest + 67, // 97: hyapp.user.v1.UserHostAdminService.SetAgencyJoinEnabled:input_type -> hyapp.user.v1.SetAgencyJoinEnabledRequest + 10, // 98: hyapp.user.v1.UserHostService.SearchAgencies:output_type -> hyapp.user.v1.SearchAgenciesResponse + 12, // 99: hyapp.user.v1.UserHostService.ApplyToAgency:output_type -> hyapp.user.v1.ApplyToAgencyResponse + 14, // 100: hyapp.user.v1.UserHostService.ReviewAgencyApplication:output_type -> hyapp.user.v1.ReviewAgencyApplicationResponse + 16, // 101: hyapp.user.v1.UserHostService.KickAgencyHost:output_type -> hyapp.user.v1.KickAgencyHostResponse + 18, // 102: hyapp.user.v1.UserHostService.InviteAgency:output_type -> hyapp.user.v1.InviteAgencyResponse + 20, // 103: hyapp.user.v1.UserHostService.InviteBD:output_type -> hyapp.user.v1.InviteBDResponse + 22, // 104: hyapp.user.v1.UserHostService.InviteHost:output_type -> hyapp.user.v1.InviteHostResponse + 24, // 105: hyapp.user.v1.UserHostService.ListBDLeaderBDs:output_type -> hyapp.user.v1.ListBDLeaderBDsResponse + 26, // 106: hyapp.user.v1.UserHostService.ListBDLeaderAgencies:output_type -> hyapp.user.v1.ListBDLeaderAgenciesResponse + 28, // 107: hyapp.user.v1.UserHostService.ListBDAgencies:output_type -> hyapp.user.v1.ListBDAgenciesResponse + 30, // 108: hyapp.user.v1.UserHostService.ListRoleInvitations:output_type -> hyapp.user.v1.ListRoleInvitationsResponse + 32, // 109: hyapp.user.v1.UserHostService.ProcessRoleInvitation:output_type -> hyapp.user.v1.ProcessRoleInvitationResponse + 34, // 110: hyapp.user.v1.UserHostService.GetHostProfile:output_type -> hyapp.user.v1.GetHostProfileResponse + 36, // 111: hyapp.user.v1.UserHostService.GetBDProfile:output_type -> hyapp.user.v1.GetBDProfileResponse + 38, // 112: hyapp.user.v1.UserHostService.GetCoinSellerProfile:output_type -> hyapp.user.v1.GetCoinSellerProfileResponse + 40, // 113: hyapp.user.v1.UserHostService.ListActiveCoinSellersInMyRegion:output_type -> hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse + 42, // 114: hyapp.user.v1.UserHostService.GetUserRoleSummary:output_type -> hyapp.user.v1.GetUserRoleSummaryResponse + 44, // 115: hyapp.user.v1.UserHostService.GetAgency:output_type -> hyapp.user.v1.GetAgencyResponse + 46, // 116: hyapp.user.v1.UserHostService.CheckBusinessCapability:output_type -> hyapp.user.v1.CheckBusinessCapabilityResponse + 48, // 117: hyapp.user.v1.UserHostService.GetAgencyMembers:output_type -> hyapp.user.v1.GetAgencyMembersResponse + 50, // 118: hyapp.user.v1.UserHostService.GetAgencyApplications:output_type -> hyapp.user.v1.GetAgencyApplicationsResponse + 52, // 119: hyapp.user.v1.UserHostAdminService.CreateBDLeader:output_type -> hyapp.user.v1.CreateBDLeaderResponse + 54, // 120: hyapp.user.v1.UserHostAdminService.CreateBD:output_type -> hyapp.user.v1.CreateBDResponse + 56, // 121: hyapp.user.v1.UserHostAdminService.SetBDStatus:output_type -> hyapp.user.v1.SetBDStatusResponse + 58, // 122: hyapp.user.v1.UserHostAdminService.CreateCoinSeller:output_type -> hyapp.user.v1.CreateCoinSellerResponse + 60, // 123: hyapp.user.v1.UserHostAdminService.SetCoinSellerStatus:output_type -> hyapp.user.v1.SetCoinSellerStatusResponse + 62, // 124: hyapp.user.v1.UserHostAdminService.CreateAgency:output_type -> hyapp.user.v1.CreateAgencyResponse + 64, // 125: hyapp.user.v1.UserHostAdminService.CloseAgency:output_type -> hyapp.user.v1.CloseAgencyResponse + 66, // 126: hyapp.user.v1.UserHostAdminService.DeleteAgency:output_type -> hyapp.user.v1.DeleteAgencyResponse + 68, // 127: hyapp.user.v1.UserHostAdminService.SetAgencyJoinEnabled:output_type -> hyapp.user.v1.SetAgencyJoinEnabledResponse + 98, // [98:128] is the sub-list for method output_type + 68, // [68:98] is the sub-list for method input_type + 68, // [68:68] is the sub-list for extension type_name + 68, // [68:68] is the sub-list for extension extendee + 0, // [0:68] is the sub-list for field type_name } func init() { file_proto_user_v1_host_proto_init() } @@ -5131,7 +5387,7 @@ func file_proto_user_v1_host_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_user_v1_host_proto_rawDesc), len(file_proto_user_v1_host_proto_rawDesc)), NumEnums: 0, - NumMessages: 65, + NumMessages: 69, NumExtensions: 0, NumServices: 2, }, diff --git a/api/proto/user/v1/host.proto b/api/proto/user/v1/host.proto index bf22a859..2a963db8 100644 --- a/api/proto/user/v1/host.proto +++ b/api/proto/user/v1/host.proto @@ -222,6 +222,17 @@ message InviteBDResponse { RoleInvitation invitation = 1; } +message InviteHostRequest { + RequestMeta meta = 1; + string command_id = 2; + int64 inviter_user_id = 3; + int64 target_user_id = 4; +} + +message InviteHostResponse { + RoleInvitation invitation = 1; +} + message ListBDLeaderBDsRequest { RequestMeta meta = 1; int64 leader_user_id = 2; @@ -255,6 +266,17 @@ message ListBDAgenciesResponse { repeated Agency agencies = 1; } +message ListRoleInvitationsRequest { + RequestMeta meta = 1; + int64 target_user_id = 2; + string status = 3; + int32 page_size = 4; +} + +message ListRoleInvitationsResponse { + repeated RoleInvitation invitations = 1; +} + message ProcessRoleInvitationRequest { RequestMeta meta = 1; string command_id = 2; @@ -486,9 +508,11 @@ service UserHostService { rpc KickAgencyHost(KickAgencyHostRequest) returns (KickAgencyHostResponse); rpc InviteAgency(InviteAgencyRequest) returns (InviteAgencyResponse); rpc InviteBD(InviteBDRequest) returns (InviteBDResponse); + rpc InviteHost(InviteHostRequest) returns (InviteHostResponse); rpc ListBDLeaderBDs(ListBDLeaderBDsRequest) returns (ListBDLeaderBDsResponse); rpc ListBDLeaderAgencies(ListBDLeaderAgenciesRequest) returns (ListBDLeaderAgenciesResponse); rpc ListBDAgencies(ListBDAgenciesRequest) returns (ListBDAgenciesResponse); + rpc ListRoleInvitations(ListRoleInvitationsRequest) returns (ListRoleInvitationsResponse); rpc ProcessRoleInvitation(ProcessRoleInvitationRequest) returns (ProcessRoleInvitationResponse); rpc GetHostProfile(GetHostProfileRequest) returns (GetHostProfileResponse); rpc GetBDProfile(GetBDProfileRequest) returns (GetBDProfileResponse); diff --git a/api/proto/user/v1/host_grpc.pb.go b/api/proto/user/v1/host_grpc.pb.go index 0e387868..cd3f8525 100644 --- a/api/proto/user/v1/host_grpc.pb.go +++ b/api/proto/user/v1/host_grpc.pb.go @@ -25,9 +25,11 @@ const ( UserHostService_KickAgencyHost_FullMethodName = "/hyapp.user.v1.UserHostService/KickAgencyHost" UserHostService_InviteAgency_FullMethodName = "/hyapp.user.v1.UserHostService/InviteAgency" UserHostService_InviteBD_FullMethodName = "/hyapp.user.v1.UserHostService/InviteBD" + UserHostService_InviteHost_FullMethodName = "/hyapp.user.v1.UserHostService/InviteHost" UserHostService_ListBDLeaderBDs_FullMethodName = "/hyapp.user.v1.UserHostService/ListBDLeaderBDs" UserHostService_ListBDLeaderAgencies_FullMethodName = "/hyapp.user.v1.UserHostService/ListBDLeaderAgencies" UserHostService_ListBDAgencies_FullMethodName = "/hyapp.user.v1.UserHostService/ListBDAgencies" + UserHostService_ListRoleInvitations_FullMethodName = "/hyapp.user.v1.UserHostService/ListRoleInvitations" UserHostService_ProcessRoleInvitation_FullMethodName = "/hyapp.user.v1.UserHostService/ProcessRoleInvitation" UserHostService_GetHostProfile_FullMethodName = "/hyapp.user.v1.UserHostService/GetHostProfile" UserHostService_GetBDProfile_FullMethodName = "/hyapp.user.v1.UserHostService/GetBDProfile" @@ -52,9 +54,11 @@ type UserHostServiceClient interface { KickAgencyHost(ctx context.Context, in *KickAgencyHostRequest, opts ...grpc.CallOption) (*KickAgencyHostResponse, error) InviteAgency(ctx context.Context, in *InviteAgencyRequest, opts ...grpc.CallOption) (*InviteAgencyResponse, error) InviteBD(ctx context.Context, in *InviteBDRequest, opts ...grpc.CallOption) (*InviteBDResponse, error) + InviteHost(ctx context.Context, in *InviteHostRequest, opts ...grpc.CallOption) (*InviteHostResponse, error) ListBDLeaderBDs(ctx context.Context, in *ListBDLeaderBDsRequest, opts ...grpc.CallOption) (*ListBDLeaderBDsResponse, error) ListBDLeaderAgencies(ctx context.Context, in *ListBDLeaderAgenciesRequest, opts ...grpc.CallOption) (*ListBDLeaderAgenciesResponse, error) ListBDAgencies(ctx context.Context, in *ListBDAgenciesRequest, opts ...grpc.CallOption) (*ListBDAgenciesResponse, error) + ListRoleInvitations(ctx context.Context, in *ListRoleInvitationsRequest, opts ...grpc.CallOption) (*ListRoleInvitationsResponse, error) ProcessRoleInvitation(ctx context.Context, in *ProcessRoleInvitationRequest, opts ...grpc.CallOption) (*ProcessRoleInvitationResponse, error) GetHostProfile(ctx context.Context, in *GetHostProfileRequest, opts ...grpc.CallOption) (*GetHostProfileResponse, error) GetBDProfile(ctx context.Context, in *GetBDProfileRequest, opts ...grpc.CallOption) (*GetBDProfileResponse, error) @@ -135,6 +139,16 @@ func (c *userHostServiceClient) InviteBD(ctx context.Context, in *InviteBDReques return out, nil } +func (c *userHostServiceClient) InviteHost(ctx context.Context, in *InviteHostRequest, opts ...grpc.CallOption) (*InviteHostResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InviteHostResponse) + err := c.cc.Invoke(ctx, UserHostService_InviteHost_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *userHostServiceClient) ListBDLeaderBDs(ctx context.Context, in *ListBDLeaderBDsRequest, opts ...grpc.CallOption) (*ListBDLeaderBDsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListBDLeaderBDsResponse) @@ -165,6 +179,16 @@ func (c *userHostServiceClient) ListBDAgencies(ctx context.Context, in *ListBDAg return out, nil } +func (c *userHostServiceClient) ListRoleInvitations(ctx context.Context, in *ListRoleInvitationsRequest, opts ...grpc.CallOption) (*ListRoleInvitationsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRoleInvitationsResponse) + err := c.cc.Invoke(ctx, UserHostService_ListRoleInvitations_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *userHostServiceClient) ProcessRoleInvitation(ctx context.Context, in *ProcessRoleInvitationRequest, opts ...grpc.CallOption) (*ProcessRoleInvitationResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ProcessRoleInvitationResponse) @@ -277,9 +301,11 @@ type UserHostServiceServer interface { KickAgencyHost(context.Context, *KickAgencyHostRequest) (*KickAgencyHostResponse, error) InviteAgency(context.Context, *InviteAgencyRequest) (*InviteAgencyResponse, error) InviteBD(context.Context, *InviteBDRequest) (*InviteBDResponse, error) + InviteHost(context.Context, *InviteHostRequest) (*InviteHostResponse, error) ListBDLeaderBDs(context.Context, *ListBDLeaderBDsRequest) (*ListBDLeaderBDsResponse, error) ListBDLeaderAgencies(context.Context, *ListBDLeaderAgenciesRequest) (*ListBDLeaderAgenciesResponse, error) ListBDAgencies(context.Context, *ListBDAgenciesRequest) (*ListBDAgenciesResponse, error) + ListRoleInvitations(context.Context, *ListRoleInvitationsRequest) (*ListRoleInvitationsResponse, error) ProcessRoleInvitation(context.Context, *ProcessRoleInvitationRequest) (*ProcessRoleInvitationResponse, error) GetHostProfile(context.Context, *GetHostProfileRequest) (*GetHostProfileResponse, error) GetBDProfile(context.Context, *GetBDProfileRequest) (*GetBDProfileResponse, error) @@ -318,6 +344,9 @@ func (UnimplementedUserHostServiceServer) InviteAgency(context.Context, *InviteA func (UnimplementedUserHostServiceServer) InviteBD(context.Context, *InviteBDRequest) (*InviteBDResponse, error) { return nil, status.Error(codes.Unimplemented, "method InviteBD not implemented") } +func (UnimplementedUserHostServiceServer) InviteHost(context.Context, *InviteHostRequest) (*InviteHostResponse, error) { + return nil, status.Error(codes.Unimplemented, "method InviteHost not implemented") +} func (UnimplementedUserHostServiceServer) ListBDLeaderBDs(context.Context, *ListBDLeaderBDsRequest) (*ListBDLeaderBDsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListBDLeaderBDs not implemented") } @@ -327,6 +356,9 @@ func (UnimplementedUserHostServiceServer) ListBDLeaderAgencies(context.Context, func (UnimplementedUserHostServiceServer) ListBDAgencies(context.Context, *ListBDAgenciesRequest) (*ListBDAgenciesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListBDAgencies not implemented") } +func (UnimplementedUserHostServiceServer) ListRoleInvitations(context.Context, *ListRoleInvitationsRequest) (*ListRoleInvitationsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListRoleInvitations not implemented") +} func (UnimplementedUserHostServiceServer) ProcessRoleInvitation(context.Context, *ProcessRoleInvitationRequest) (*ProcessRoleInvitationResponse, error) { return nil, status.Error(codes.Unimplemented, "method ProcessRoleInvitation not implemented") } @@ -486,6 +518,24 @@ func _UserHostService_InviteBD_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _UserHostService_InviteHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InviteHostRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserHostServiceServer).InviteHost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserHostService_InviteHost_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserHostServiceServer).InviteHost(ctx, req.(*InviteHostRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _UserHostService_ListBDLeaderBDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListBDLeaderBDsRequest) if err := dec(in); err != nil { @@ -540,6 +590,24 @@ func _UserHostService_ListBDAgencies_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _UserHostService_ListRoleInvitations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRoleInvitationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserHostServiceServer).ListRoleInvitations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserHostService_ListRoleInvitations_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserHostServiceServer).ListRoleInvitations(ctx, req.(*ListRoleInvitationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _UserHostService_ProcessRoleInvitation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ProcessRoleInvitationRequest) if err := dec(in); err != nil { @@ -751,6 +819,10 @@ var UserHostService_ServiceDesc = grpc.ServiceDesc{ MethodName: "InviteBD", Handler: _UserHostService_InviteBD_Handler, }, + { + MethodName: "InviteHost", + Handler: _UserHostService_InviteHost_Handler, + }, { MethodName: "ListBDLeaderBDs", Handler: _UserHostService_ListBDLeaderBDs_Handler, @@ -763,6 +835,10 @@ var UserHostService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListBDAgencies", Handler: _UserHostService_ListBDAgencies_Handler, }, + { + MethodName: "ListRoleInvitations", + Handler: _UserHostService_ListRoleInvitations_Handler, + }, { MethodName: "ProcessRoleInvitation", Handler: _UserHostService_ProcessRoleInvitation_Handler, diff --git a/services/gateway-service/internal/client/user_client.go b/services/gateway-service/internal/client/user_client.go index 25196b70..fdb03b3e 100644 --- a/services/gateway-service/internal/client/user_client.go +++ b/services/gateway-service/internal/client/user_client.go @@ -94,9 +94,12 @@ type UserHostClient interface { ApplyToAgency(ctx context.Context, req *userv1.ApplyToAgencyRequest) (*userv1.ApplyToAgencyResponse, error) InviteAgency(ctx context.Context, req *userv1.InviteAgencyRequest) (*userv1.InviteAgencyResponse, error) InviteBD(ctx context.Context, req *userv1.InviteBDRequest) (*userv1.InviteBDResponse, error) + InviteHost(ctx context.Context, req *userv1.InviteHostRequest) (*userv1.InviteHostResponse, error) ListBDLeaderBDs(ctx context.Context, req *userv1.ListBDLeaderBDsRequest) (*userv1.ListBDLeaderBDsResponse, error) ListBDLeaderAgencies(ctx context.Context, req *userv1.ListBDLeaderAgenciesRequest) (*userv1.ListBDLeaderAgenciesResponse, error) ListBDAgencies(ctx context.Context, req *userv1.ListBDAgenciesRequest) (*userv1.ListBDAgenciesResponse, error) + ListRoleInvitations(ctx context.Context, req *userv1.ListRoleInvitationsRequest) (*userv1.ListRoleInvitationsResponse, error) + ProcessRoleInvitation(ctx context.Context, req *userv1.ProcessRoleInvitationRequest) (*userv1.ProcessRoleInvitationResponse, error) GetHostProfile(ctx context.Context, req *userv1.GetHostProfileRequest) (*userv1.GetHostProfileResponse, error) GetBDProfile(ctx context.Context, req *userv1.GetBDProfileRequest) (*userv1.GetBDProfileResponse, error) GetCoinSellerProfile(ctx context.Context, req *userv1.GetCoinSellerProfileRequest) (*userv1.GetCoinSellerProfileResponse, error) @@ -433,6 +436,10 @@ func (c *grpcUserHostClient) InviteBD(ctx context.Context, req *userv1.InviteBDR return c.client.InviteBD(ctx, req) } +func (c *grpcUserHostClient) InviteHost(ctx context.Context, req *userv1.InviteHostRequest) (*userv1.InviteHostResponse, error) { + return c.client.InviteHost(ctx, req) +} + func (c *grpcUserHostClient) ListBDLeaderBDs(ctx context.Context, req *userv1.ListBDLeaderBDsRequest) (*userv1.ListBDLeaderBDsResponse, error) { return c.client.ListBDLeaderBDs(ctx, req) } @@ -445,6 +452,14 @@ func (c *grpcUserHostClient) ListBDAgencies(ctx context.Context, req *userv1.Lis return c.client.ListBDAgencies(ctx, req) } +func (c *grpcUserHostClient) ListRoleInvitations(ctx context.Context, req *userv1.ListRoleInvitationsRequest) (*userv1.ListRoleInvitationsResponse, error) { + return c.client.ListRoleInvitations(ctx, req) +} + +func (c *grpcUserHostClient) ProcessRoleInvitation(ctx context.Context, req *userv1.ProcessRoleInvitationRequest) (*userv1.ProcessRoleInvitationResponse, error) { + return c.client.ProcessRoleInvitation(ctx, req) +} + func (c *grpcUserHostClient) GetHostProfile(ctx context.Context, req *userv1.GetHostProfileRequest) (*userv1.GetHostProfileResponse, error) { return c.client.GetHostProfile(ctx, req) } diff --git a/services/gateway-service/internal/transport/http/httproutes/router.go b/services/gateway-service/internal/transport/http/httproutes/router.go index f1e557ed..31d51f1b 100644 --- a/services/gateway-service/internal/transport/http/httproutes/router.go +++ b/services/gateway-service/internal/transport/http/httproutes/router.go @@ -84,6 +84,7 @@ type UserHandlers struct { ListAgencyCenterApplications http.HandlerFunc ReviewAgencyCenterApplication http.HandlerFunc RemoveAgencyCenterHost http.HandlerFunc + InviteAgencyCenterHost http.HandlerFunc GetBDLeaderCenterOverview http.HandlerFunc ListBDLeaderCenterBDs http.HandlerFunc ListBDLeaderCenterAgencies http.HandlerFunc @@ -92,6 +93,8 @@ type UserHandlers struct { GetBDCenterOverview http.HandlerFunc ListBDCenterAgencies http.HandlerFunc InviteBDAgency http.HandlerFunc + ListMyRoleInvitations http.HandlerFunc + ProcessMyRoleInvitation http.HandlerFunc CompleteMyOnboarding http.HandlerFunc UpdateMyProfile http.HandlerFunc ChangeMyCountry http.HandlerFunc @@ -397,6 +400,7 @@ func (r routes) registerUserRoutes() { r.profile("/agency-center/applications", http.MethodGet, h.ListAgencyCenterApplications) r.profile("/agency-center/applications/{application_id}/review", http.MethodPost, h.ReviewAgencyCenterApplication) r.profile("/agency-center/hosts/{host_user_id}/remove", http.MethodPost, h.RemoveAgencyCenterHost) + r.profile("/agency-center/invitations/host", http.MethodPost, h.InviteAgencyCenterHost) r.profile("/bd-leader-center/overview", http.MethodGet, h.GetBDLeaderCenterOverview) r.profile("/bd-leader-center/bds", http.MethodGet, h.ListBDLeaderCenterBDs) r.profile("/bd-leader-center/agencies", http.MethodGet, h.ListBDLeaderCenterAgencies) @@ -405,6 +409,8 @@ func (r routes) registerUserRoutes() { r.profile("/bd-center/overview", http.MethodGet, h.GetBDCenterOverview) r.profile("/bd-center/agencies", http.MethodGet, h.ListBDCenterAgencies) r.profile("/bd/invitations/agency", http.MethodPost, h.InviteBDAgency) + r.profile("/role-invitations", http.MethodGet, h.ListMyRoleInvitations) + r.profile("/role-invitations/{invitation_id}/process", http.MethodPost, h.ProcessMyRoleInvitation) r.auth("/users/me/onboarding/complete", "", h.CompleteMyOnboarding) r.profile("/users/me/profile/update", "", h.UpdateMyProfile) r.profile("/users/me/country/change", "", h.ChangeMyCountry) diff --git a/services/gateway-service/internal/transport/http/response_test.go b/services/gateway-service/internal/transport/http/response_test.go index 4830ca86..c0cb1705 100644 --- a/services/gateway-service/internal/transport/http/response_test.go +++ b/services/gateway-service/internal/transport/http/response_test.go @@ -415,6 +415,9 @@ type fakeUserHostClient struct { lastInviteBD *userv1.InviteBDRequest inviteBDResp *userv1.InviteBDResponse inviteBDErr error + lastInviteHost *userv1.InviteHostRequest + inviteHostResp *userv1.InviteHostResponse + inviteHostErr error lastLeaderBDs *userv1.ListBDLeaderBDsRequest leaderBDsResp *userv1.ListBDLeaderBDsResponse leaderBDsErr error @@ -424,6 +427,12 @@ type fakeUserHostClient struct { lastBDAgencies *userv1.ListBDAgenciesRequest bdAgenciesResp *userv1.ListBDAgenciesResponse bdAgenciesErr error + lastRoleInvitations *userv1.ListRoleInvitationsRequest + roleInvitationsResp *userv1.ListRoleInvitationsResponse + roleInvitationsErr error + lastProcessInvite *userv1.ProcessRoleInvitationRequest + processInviteResp *userv1.ProcessRoleInvitationResponse + processInviteErr error last *userv1.GetCoinSellerProfileRequest profile *userv1.CoinSellerProfile err error @@ -1297,6 +1306,17 @@ func (f *fakeUserHostClient) InviteBD(_ context.Context, req *userv1.InviteBDReq return &userv1.InviteBDResponse{}, nil } +func (f *fakeUserHostClient) InviteHost(_ context.Context, req *userv1.InviteHostRequest) (*userv1.InviteHostResponse, error) { + f.lastInviteHost = req + if f.inviteHostErr != nil { + return nil, f.inviteHostErr + } + if f.inviteHostResp != nil { + return f.inviteHostResp, nil + } + return &userv1.InviteHostResponse{}, nil +} + func (f *fakeUserHostClient) ListBDLeaderBDs(_ context.Context, req *userv1.ListBDLeaderBDsRequest) (*userv1.ListBDLeaderBDsResponse, error) { f.lastLeaderBDs = req if f.leaderBDsErr != nil { @@ -1330,6 +1350,28 @@ func (f *fakeUserHostClient) ListBDAgencies(_ context.Context, req *userv1.ListB return &userv1.ListBDAgenciesResponse{}, nil } +func (f *fakeUserHostClient) ListRoleInvitations(_ context.Context, req *userv1.ListRoleInvitationsRequest) (*userv1.ListRoleInvitationsResponse, error) { + f.lastRoleInvitations = req + if f.roleInvitationsErr != nil { + return nil, f.roleInvitationsErr + } + if f.roleInvitationsResp != nil { + return f.roleInvitationsResp, nil + } + return &userv1.ListRoleInvitationsResponse{}, nil +} + +func (f *fakeUserHostClient) ProcessRoleInvitation(_ context.Context, req *userv1.ProcessRoleInvitationRequest) (*userv1.ProcessRoleInvitationResponse, error) { + f.lastProcessInvite = req + if f.processInviteErr != nil { + return nil, f.processInviteErr + } + if f.processInviteResp != nil { + return f.processInviteResp, nil + } + return &userv1.ProcessRoleInvitationResponse{}, nil +} + func (f *fakeUserHostClient) GetHostProfile(_ context.Context, req *userv1.GetHostProfileRequest) (*userv1.GetHostProfileResponse, error) { f.lastHost = req if f.hostErr != nil { @@ -4392,14 +4434,14 @@ func TestBDCenterOverviewUsesBDSalaryAndDirectAgencies(t *testing.T) { } } -func TestBDCenterInviteAgencyDirectlyForwardsInviteAgency(t *testing.T) { +func TestBDCenterInviteAgencyCreatesPendingInvitation(t *testing.T) { hostClient := &fakeUserHostClient{ bdProfile: &userv1.BDProfile{UserId: 42, Role: "bd", Status: "active", RegionId: 1001}, inviteAgencyResp: &userv1.InviteAgencyResponse{Invitation: &userv1.RoleInvitation{ InvitationId: 9001, CommandId: "cmd-bd-invite-agency", InvitationType: "agency", - Status: "accepted", + Status: "pending", InviterUserId: 42, TargetUserId: 99, AgencyName: "Target Agency", @@ -4429,7 +4471,7 @@ func TestBDCenterInviteAgencyDirectlyForwardsInviteAgency(t *testing.T) { } data := response.Data.(map[string]any) invitation := data["invitation"].(map[string]any) - if invitation["status"] != "accepted" || invitation["target_user_id"] != "99" { + if invitation["status"] != "pending" || invitation["target_user_id"] != "99" { t.Fatalf("bd invite response mismatch: %+v", data) } } @@ -4441,7 +4483,7 @@ func TestBDLeaderInviteBDForwardsSelfInvite(t *testing.T) { InvitationId: 9002, CommandId: "cmd-bd-self", InvitationType: "bd", - Status: "accepted", + Status: "pending", InviterUserId: 42, InviterBdUserId: 42, TargetUserId: 42, @@ -4470,11 +4512,103 @@ func TestBDLeaderInviteBDForwardsSelfInvite(t *testing.T) { } data := response.Data.(map[string]any) invitation := data["invitation"].(map[string]any) - if invitation["status"] != "accepted" || invitation["target_user_id"] != "42" || invitation["parent_leader_user_id"] != "42" { + if invitation["status"] != "pending" || invitation["target_user_id"] != "42" || invitation["parent_leader_user_id"] != "42" { t.Fatalf("bd self invite response mismatch: %+v", data) } } +func TestAgencyCenterInviteHostCreatesPendingInvitation(t *testing.T) { + hostClient := &fakeUserHostClient{ + roleSummary: &userv1.UserRoleSummary{UserId: 42, IsManager: true, AgencyId: 7001}, + getAgencyResp: &userv1.GetAgencyResponse{Agency: &userv1.Agency{AgencyId: 7001, OwnerUserId: 42, Status: "active"}}, + inviteHostResp: &userv1.InviteHostResponse{Invitation: &userv1.RoleInvitation{ + InvitationId: 9010, + CommandId: "cmd-host-invite", + InvitationType: "host", + Status: "pending", + InviterUserId: 42, + TargetUserId: 100, + AgencyName: "Voice Agency", + }}, + } + handler := NewHandlerWithClients(&fakeRoomClient{}, nil, nil, &fakeUserProfileClient{}) + handler.SetUserHostClient(hostClient) + router := handler.Routes(auth.NewVerifier("secret")) + request := httptest.NewRequest(http.MethodPost, "/api/v1/agency-center/invitations/host", bytes.NewReader([]byte(`{"command_id":"cmd-host-invite","target_user_id":"100"}`))) + request.Header.Set("Authorization", "Bearer "+signGatewayToken(t, "secret", 42)) + recorder := httptest.NewRecorder() + + router.ServeHTTP(recorder, request) + + if recorder.Code != http.StatusOK { + t.Fatalf("status mismatch: got %d body=%s", recorder.Code, recorder.Body.String()) + } + if hostClient.lastInviteHost == nil || hostClient.lastInviteHost.GetInviterUserId() != 42 || hostClient.lastInviteHost.GetTargetUserId() != 100 { + t.Fatalf("host invite request mismatch: %+v", hostClient.lastInviteHost) + } + var response httpkit.ResponseEnvelope + if err := json.NewDecoder(recorder.Body).Decode(&response); err != nil { + t.Fatalf("decode response failed: %v", err) + } + invitation := response.Data.(map[string]any)["invitation"].(map[string]any) + if invitation["status"] != "pending" || invitation["invitation_type"] != "host" { + t.Fatalf("host invite response mismatch: %+v", response.Data) + } +} + +func TestRoleInvitationsListAndProcessForwardCurrentUser(t *testing.T) { + hostClient := &fakeUserHostClient{ + roleInvitationsResp: &userv1.ListRoleInvitationsResponse{Invitations: []*userv1.RoleInvitation{{ + InvitationId: 9011, + InvitationType: "agency", + Status: "pending", + InviterUserId: 77, + TargetUserId: 42, + AgencyName: "Target Agency", + CreatedAtMs: 1700000000000, + }}}, + processInviteResp: &userv1.ProcessRoleInvitationResponse{ + Invitation: &userv1.RoleInvitation{ + InvitationId: 9011, + InvitationType: "agency", + Status: "accepted", + InviterUserId: 77, + TargetUserId: 42, + }, + Agency: &userv1.Agency{AgencyId: 7008, OwnerUserId: 42, Status: "active", Name: "Target Agency"}, + Membership: &userv1.AgencyMembership{MembershipId: 3008, AgencyId: 7008, HostUserId: 42, MembershipType: "owner", Status: "active"}, + }, + } + profileClient := &fakeUserProfileClient{usersByID: map[int64]*userv1.User{ + 77: {UserId: 77, DisplayUserId: "163077", Username: "Leader Rose"}, + }} + handler := NewHandlerWithClients(&fakeRoomClient{}, nil, nil, profileClient) + handler.SetUserHostClient(hostClient) + router := handler.Routes(auth.NewVerifier("secret")) + + listRequest := httptest.NewRequest(http.MethodGet, "/api/v1/role-invitations?status=pending", nil) + listRequest.Header.Set("Authorization", "Bearer "+signGatewayToken(t, "secret", 42)) + listRecorder := httptest.NewRecorder() + router.ServeHTTP(listRecorder, listRequest) + if listRecorder.Code != http.StatusOK { + t.Fatalf("list status mismatch: got %d body=%s", listRecorder.Code, listRecorder.Body.String()) + } + if hostClient.lastRoleInvitations == nil || hostClient.lastRoleInvitations.GetTargetUserId() != 42 || hostClient.lastRoleInvitations.GetStatus() != "pending" { + t.Fatalf("list invitations request mismatch: %+v", hostClient.lastRoleInvitations) + } + + processRequest := httptest.NewRequest(http.MethodPost, "/api/v1/role-invitations/9011/process", bytes.NewReader([]byte(`{"command_id":"cmd-accept-9011","action":"accept"}`))) + processRequest.Header.Set("Authorization", "Bearer "+signGatewayToken(t, "secret", 42)) + processRecorder := httptest.NewRecorder() + router.ServeHTTP(processRecorder, processRequest) + if processRecorder.Code != http.StatusOK { + t.Fatalf("process status mismatch: got %d body=%s", processRecorder.Code, processRecorder.Body.String()) + } + if hostClient.lastProcessInvite == nil || hostClient.lastProcessInvite.GetActorUserId() != 42 || hostClient.lastProcessInvite.GetInvitationId() != 9011 || hostClient.lastProcessInvite.GetAction() != "accept" { + t.Fatalf("process invitation request mismatch: %+v", hostClient.lastProcessInvite) + } +} + func TestAgencyCenterOverviewRejectsNonOwner(t *testing.T) { hostClient := &fakeUserHostClient{roleSummary: &userv1.UserRoleSummary{UserId: 42, IsManager: false, AgencyId: 7001}} handler := NewHandlerWithClients(&fakeRoomClient{}, nil, nil, &fakeUserProfileClient{}) @@ -4645,6 +4779,7 @@ func TestThirdPartyLoginUsesPublicEnvelopeAndPropagatesRequestID(t *testing.T) { request := httptest.NewRequest(http.MethodPost, "/api/v1/auth/third-party/login", bytes.NewReader(body)) request.Header.Set("X-Request-ID", "req-auth-third") request.Header.Set("X-Forwarded-For", "203.0.113.10, 10.0.0.1") + request.Header.Set("X-Real-IP", "129.226.91.24") request.Header.Set("User-Agent", "hyapp-test/1.0") request.Header.Set("CF-IPCountry", "sg") recorder := httptest.NewRecorder() @@ -4684,6 +4819,17 @@ func TestThirdPartyLoginUsesPublicEnvelopeAndPropagatesRequestID(t *testing.T) { } } +func TestAuthClientIPPrefersForwardedPublicIPOverProxyRealIP(t *testing.T) { + request := httptest.NewRequest(http.MethodPost, "/api/v1/auth/third-party/login", nil) + request.RemoteAddr = "10.0.0.9:54123" + request.Header.Set("X-Forwarded-For", "114.8.228.33, 10.0.0.1") + request.Header.Set("X-Real-IP", "129.226.91.24") + + if got := clientIP(request); got != "114.8.228.33" { + t.Fatalf("clientIP must use the first public X-Forwarded-For address before proxy X-Real-IP, got %q", got) + } +} + func TestThirdPartyLoginRateLimitByProviderAndIP(t *testing.T) { userClient := &fakeUserAuthClient{} handler := NewHandler(&fakeRoomClient{}, userClient) diff --git a/services/gateway-service/internal/transport/http/userapi/agency_center_handler.go b/services/gateway-service/internal/transport/http/userapi/agency_center_handler.go index 2273bc34..91d00d33 100644 --- a/services/gateway-service/internal/transport/http/userapi/agency_center_handler.go +++ b/services/gateway-service/internal/transport/http/userapi/agency_center_handler.go @@ -332,6 +332,37 @@ func (h *Handler) removeAgencyCenterHost(writer http.ResponseWriter, request *ht httpkit.WriteOK(writer, request, map[string]any{"membership": agencyMembershipData(resp.GetMembership())}) } +func (h *Handler) inviteAgencyCenterHost(writer http.ResponseWriter, request *http.Request) { + if _, ok := h.resolveCurrentOwnerAgency(writer, request); !ok { + return + } + var body struct { + CommandID string `json:"command_id"` + TargetUserID string `json:"target_user_id"` + } + if !httpkit.Decode(writer, request, &body) { + return + } + targetUserID := int64JSONValue(body.TargetUserID) + if strings.TrimSpace(body.CommandID) == "" || targetUserID <= 0 { + httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") + return + } + + // Agency owner 只负责发送邀请;目标用户接受后 user-service 再原子创建 Host 身份和成员关系。 + resp, err := h.userHostClient.InviteHost(request.Context(), &userv1.InviteHostRequest{ + Meta: httpkit.UserMeta(request, ""), + CommandId: strings.TrimSpace(body.CommandID), + InviterUserId: auth.UserIDFromContext(request.Context()), + TargetUserId: targetUserID, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + httpkit.WriteOK(writer, request, map[string]any{"invitation": roleInvitationData(resp.GetInvitation())}) +} + func (h *Handler) resolveCurrentOwnerAgency(writer http.ResponseWriter, request *http.Request) (*userv1.Agency, bool) { if h.userHostClient == nil { httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") diff --git a/services/gateway-service/internal/transport/http/userapi/bd_leader_center_handler.go b/services/gateway-service/internal/transport/http/userapi/bd_leader_center_handler.go index 62202b2f..ccf6fab5 100644 --- a/services/gateway-service/internal/transport/http/userapi/bd_leader_center_handler.go +++ b/services/gateway-service/internal/transport/http/userapi/bd_leader_center_handler.go @@ -372,7 +372,7 @@ func (h *Handler) inviteBDAgency(writer http.ResponseWriter, request *http.Reque target := users[targetUserID] agencyName = firstBDLeaderNonBlank(target.Username, target.DisplayUserID, int64String(targetUserID)) } - // InviteAgency is already a direct-accept transaction in user-service, so this HTTP endpoint does not create a pending approval step. + // InviteAgency 只发送 pending 邀请;Agency 身份必须由目标用户在消息中心接受后才创建。 resp, err := h.userHostClient.InviteAgency(request.Context(), &userv1.InviteAgencyRequest{ Meta: httpkit.UserMeta(request, ""), CommandId: commandID, @@ -457,6 +457,7 @@ func roleInvitationData(invitation *userv1.RoleInvitation) map[string]any { "invitation_type": invitation.GetInvitationType(), "status": invitation.GetStatus(), "inviter_user_id": int64String(invitation.GetInviterUserId()), + "inviter_bd_user_id": int64String(invitation.GetInviterBdUserId()), "target_user_id": int64String(invitation.GetTargetUserId()), "region_id": invitation.GetRegionId(), "agency_name": invitation.GetAgencyName(), diff --git a/services/gateway-service/internal/transport/http/userapi/handler.go b/services/gateway-service/internal/transport/http/userapi/handler.go index 5a3b0c22..61c37080 100644 --- a/services/gateway-service/internal/transport/http/userapi/handler.go +++ b/services/gateway-service/internal/transport/http/userapi/handler.go @@ -68,6 +68,7 @@ func (h *Handler) UserHandlers() httproutes.UserHandlers { ListAgencyCenterApplications: h.listAgencyCenterApplications, ReviewAgencyCenterApplication: h.reviewAgencyCenterApplication, RemoveAgencyCenterHost: h.removeAgencyCenterHost, + InviteAgencyCenterHost: h.inviteAgencyCenterHost, GetBDLeaderCenterOverview: h.getBDLeaderCenterOverview, ListBDLeaderCenterBDs: h.listBDLeaderCenterBDs, ListBDLeaderCenterAgencies: h.listBDLeaderCenterAgencies, @@ -76,6 +77,8 @@ func (h *Handler) UserHandlers() httproutes.UserHandlers { GetBDCenterOverview: h.getBDCenterOverview, ListBDCenterAgencies: h.listBDCenterAgencies, InviteBDAgency: h.inviteBDAgency, + ListMyRoleInvitations: h.listMyRoleInvitations, + ProcessMyRoleInvitation: h.processMyRoleInvitation, CompleteMyOnboarding: h.completeMyOnboarding, UpdateMyProfile: h.updateMyProfile, ChangeMyCountry: h.changeMyCountry, diff --git a/services/gateway-service/internal/transport/http/userapi/role_invitation_handler.go b/services/gateway-service/internal/transport/http/userapi/role_invitation_handler.go new file mode 100644 index 00000000..c6ee0651 --- /dev/null +++ b/services/gateway-service/internal/transport/http/userapi/role_invitation_handler.go @@ -0,0 +1,126 @@ +package userapi + +import ( + "net/http" + "strings" + + userv1 "hyapp.local/api/proto/user/v1" + "hyapp/services/gateway-service/internal/auth" + "hyapp/services/gateway-service/internal/transport/http/httpkit" +) + +func (h *Handler) listMyRoleInvitations(writer http.ResponseWriter, request *http.Request) { + if h.userHostClient == nil { + httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") + return + } + userID := auth.UserIDFromContext(request.Context()) + status := strings.TrimSpace(request.URL.Query().Get("status")) + if status == "" { + status = "pending" + } + + // 收件箱只按当前登录用户读取 target_user_id,前端不能传入任意用户 ID 枚举邀请消息。 + resp, err := h.userHostClient.ListRoleInvitations(request.Context(), &userv1.ListRoleInvitationsRequest{ + Meta: httpkit.UserMeta(request, ""), + TargetUserId: userID, + Status: status, + PageSize: int32(queryPageSize(request, 50)), + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + + userIDs := make([]int64, 0, len(resp.GetInvitations())*2) + for _, invitation := range resp.GetInvitations() { + if invitation.GetInviterUserId() > 0 { + userIDs = append(userIDs, invitation.GetInviterUserId()) + } + if invitation.GetTargetUserId() > 0 { + userIDs = append(userIDs, invitation.GetTargetUserId()) + } + } + users, err := h.userProfiles(request, userIDs) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + + items := make([]map[string]any, 0, len(resp.GetInvitations())) + for _, invitation := range resp.GetInvitations() { + items = append(items, map[string]any{ + "invitation": roleInvitationData(invitation), + "inviter": users[invitation.GetInviterUserId()], + "target": users[invitation.GetTargetUserId()], + }) + } + httpkit.WriteOK(writer, request, map[string]any{"items": items, "total": len(items)}) +} + +func (h *Handler) processMyRoleInvitation(writer http.ResponseWriter, request *http.Request) { + if h.userHostClient == nil { + httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") + return + } + invitationID, ok := httpkit.PositiveInt64PathValue(request, "invitation_id") + if !ok { + httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid invitation_id") + return + } + var body map[string]any + if !httpkit.Decode(writer, request, &body) { + return + } + commandID := stringJSONValue(body["command_id"]) + action := strings.ToLower(strings.TrimSpace(stringJSONValue(body["action"]))) + if action == "agree" { + action = "accept" + } else if action == "refuse" { + action = "reject" + } + if commandID == "" || (action != "accept" && action != "reject") { + httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") + return + } + + // 接受/拒绝入口只使用当前登录用户作为 actor_user_id;user-service 会再次校验他是否是邀请目标。 + resp, err := h.userHostClient.ProcessRoleInvitation(request.Context(), &userv1.ProcessRoleInvitationRequest{ + Meta: httpkit.UserMeta(request, ""), + CommandId: commandID, + ActorUserId: auth.UserIDFromContext(request.Context()), + InvitationId: invitationID, + Action: action, + Reason: strings.TrimSpace(stringJSONValue(body["reason"])), + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + + httpkit.WriteOK(writer, request, map[string]any{ + "invitation": roleInvitationData(resp.GetInvitation()), + "host_profile": hostProfileData(resp.GetHostProfile()), + "agency": hostAgencyFromProto(resp.GetAgency()), + "membership": agencyMembershipData(resp.GetMembership()), + "bd_profile": bdLeaderProfileFromProto(resp.GetBdProfile()), + }) +} + +func hostProfileData(profile *userv1.HostProfile) map[string]any { + if profile == nil { + return map[string]any{} + } + return map[string]any{ + "user_id": int64String(profile.GetUserId()), + "status": profile.GetStatus(), + "region_id": profile.GetRegionId(), + "current_agency_id": int64String(profile.GetCurrentAgencyId()), + "current_membership_id": int64String(profile.GetCurrentMembershipId()), + "source": profile.GetSource(), + "first_became_host_at_ms": profile.GetFirstBecameHostAtMs(), + "created_at_ms": profile.GetCreatedAtMs(), + "updated_at_ms": profile.GetUpdatedAtMs(), + "current_agency_owner_user_id": int64String(profile.GetCurrentAgencyOwnerUserId()), + } +} diff --git a/services/user-service/internal/domain/host/host.go b/services/user-service/internal/domain/host/host.go index 36170afd..239df2bd 100644 --- a/services/user-service/internal/domain/host/host.go +++ b/services/user-service/internal/domain/host/host.go @@ -68,6 +68,8 @@ const ( InvitationTypeAgency = "agency" // InvitationTypeBD 表示邀请用户成为 BD。 InvitationTypeBD = "bd" + // InvitationTypeHost 表示 Agency owner 邀请用户成为本 Agency 的 Host 成员。 + InvitationTypeHost = "host" // InvitationStatusPending 表示等待目标用户处理。 InvitationStatusPending = "pending" @@ -97,6 +99,8 @@ const ( CommandTypeInviteAgency = "invite_agency" // CommandTypeInviteBD 记录 BD 邀请命令。 CommandTypeInviteBD = "invite_bd" + // CommandTypeInviteHost 记录 Agency owner 邀请 Host 加入团队的命令。 + CommandTypeInviteHost = "invite_host" // CommandTypeProcessRoleInvitation 记录邀请处理命令。 CommandTypeProcessRoleInvitation = "process_role_invitation" // CommandTypeCreateBDLeader 记录后台创建 BD Leader 命令。 diff --git a/services/user-service/internal/service/host/commands.go b/services/user-service/internal/service/host/commands.go index e0d8c7e3..280cfa5c 100644 --- a/services/user-service/internal/service/host/commands.go +++ b/services/user-service/internal/service/host/commands.go @@ -102,6 +102,29 @@ type InviteBDCommand struct { NowMs int64 } +// InviteHostInput 是 Agency owner 邀请用户成为 Host 成员的外部输入。 +type InviteHostInput struct { + CommandID string + InviterUserID int64 + TargetUserID int64 +} + +// InviteHostCommand 是 Agency 邀请 Host 事务所需的完整命令。 +type InviteHostCommand struct { + CommandID string + InvitationID int64 + InviterUserID int64 + TargetUserID int64 + NowMs int64 +} + +// ListRoleInvitationsCommand 描述当前用户收件箱读取条件。 +type ListRoleInvitationsCommand struct { + TargetUserID int64 + Status string + PageSize int +} + // ListBDLeaderBDsCommand 描述 BD Leader 查询直属 BD 列表的条件。 type ListBDLeaderBDsCommand struct { LeaderUserID int64 diff --git a/services/user-service/internal/service/host/service.go b/services/user-service/internal/service/host/service.go index e1051ee2..ef0a2852 100644 --- a/services/user-service/internal/service/host/service.go +++ b/services/user-service/internal/service/host/service.go @@ -20,6 +20,8 @@ type Repository interface { KickAgencyHost(ctx context.Context, command KickAgencyHostCommand) (hostdomain.KickAgencyHostResult, error) InviteAgency(ctx context.Context, command InviteAgencyCommand) (hostdomain.RoleInvitation, error) InviteBD(ctx context.Context, command InviteBDCommand) (hostdomain.RoleInvitation, error) + InviteHost(ctx context.Context, command InviteHostCommand) (hostdomain.RoleInvitation, error) + ListRoleInvitations(ctx context.Context, command ListRoleInvitationsCommand) ([]hostdomain.RoleInvitation, error) ListBDLeaderBDs(ctx context.Context, command ListBDLeaderBDsCommand) ([]hostdomain.BDProfile, error) ListBDLeaderAgencies(ctx context.Context, command ListBDLeaderAgenciesCommand) ([]hostdomain.Agency, error) ListBDAgencies(ctx context.Context, command ListBDAgenciesCommand) ([]hostdomain.Agency, error) @@ -200,12 +202,12 @@ func (s *Service) GetAgency(ctx context.Context, agencyID int64) (hostdomain.Age return s.repository.GetAgency(ctx, agencyID) } -// InviteAgency 由 BD 直接创建用户的 Agency owner 身份,不再等待目标用户确认。 +// InviteAgency 由 BD 或 BD Leader 创建 Agency owner 邀请;目标用户接受前不创建 Agency 身份。 func (s *Service) InviteAgency(ctx context.Context, command InviteAgencyInput) (hostdomain.RoleInvitation, error) { if err := s.requireWriteDependencies(); err != nil { return hostdomain.RoleInvitation{}, err } - // Agency 名称在邀请动作里固化;持久化层会在同一事务中写 accepted invitation、Agency、owner Host 和 owner membership。 + // Agency 名称在邀请动作里固化,接受时按这份快照创建 Agency,避免目标确认后前端再传入不同名称。 agencyName := strings.TrimSpace(command.AgencyName) if strings.TrimSpace(command.CommandID) == "" || command.InviterUserID <= 0 || command.TargetUserID <= 0 || agencyName == "" { return hostdomain.RoleInvitation{}, xerr.New(xerr.InvalidArgument, "command_id, inviter_user_id, target_user_id and agency_name are required") @@ -218,19 +220,16 @@ func (s *Service) InviteAgency(ctx context.Context, command InviteAgencyInput) ( InviterUserID: command.InviterUserID, TargetUserID: command.TargetUserID, AgencyName: agencyName, - AgencyID: s.idGenerator.NewInt64(), - MembershipID: s.idGenerator.NewInt64(), - EventID: s.nextEventIDRange(3), NowMs: nowMs, }) } -// InviteBD 由 BD Leader 直接创建用户的 BD 身份,不再等待目标用户确认。 +// InviteBD 由 BD Leader 创建 BD 邀请;目标用户接受前不创建普通 BD 身份。 func (s *Service) InviteBD(ctx context.Context, command InviteBDInput) (hostdomain.RoleInvitation, error) { if err := s.requireWriteDependencies(); err != nil { return hostdomain.RoleInvitation{}, err } - // 负责人身份、区域、目标是否已有 BD 都交给持久化层在同一事务中校验,并和 accepted invitation 一起提交。 + // 负责人身份、区域、目标是否已有 BD 都交给持久化层在同一事务中校验,避免发出不可处理的待确认消息。 if strings.TrimSpace(command.CommandID) == "" || command.InviterUserID <= 0 || command.TargetUserID <= 0 { return hostdomain.RoleInvitation{}, xerr.New(xerr.InvalidArgument, "command_id, inviter_user_id and target_user_id are required") } @@ -241,11 +240,45 @@ func (s *Service) InviteBD(ctx context.Context, command InviteBDInput) (hostdoma InvitationID: s.idGenerator.NewInt64(), InviterUserID: command.InviterUserID, TargetUserID: command.TargetUserID, - EventID: s.idGenerator.NewInt64(), NowMs: nowMs, }) } +// InviteHost 由 active Agency owner 邀请用户加入自己的 Agency,接受前不创建 Host 或成员关系。 +func (s *Service) InviteHost(ctx context.Context, command InviteHostInput) (hostdomain.RoleInvitation, error) { + if err := s.requireWriteDependencies(); err != nil { + return hostdomain.RoleInvitation{}, err + } + // command_id 仍是发送动作的幂等边界;目标处理时会使用新的 command_id 推进邀请终态。 + if strings.TrimSpace(command.CommandID) == "" || command.InviterUserID <= 0 || command.TargetUserID <= 0 { + return hostdomain.RoleInvitation{}, xerr.New(xerr.InvalidArgument, "command_id, inviter_user_id and target_user_id are required") + } + nowMs := s.now().UnixMilli() + + return s.repository.InviteHost(ctx, InviteHostCommand{ + CommandID: strings.TrimSpace(command.CommandID), + InvitationID: s.idGenerator.NewInt64(), + InviterUserID: command.InviterUserID, + TargetUserID: command.TargetUserID, + NowMs: nowMs, + }) +} + +// ListRoleInvitations 返回当前用户收到的角色/团队邀请收件箱。 +func (s *Service) ListRoleInvitations(ctx context.Context, command ListRoleInvitationsCommand) ([]hostdomain.RoleInvitation, error) { + if s.repository == nil { + return nil, xerr.New(xerr.Unavailable, "host repository is not configured") + } + if command.TargetUserID <= 0 { + return nil, xerr.New(xerr.InvalidArgument, "target_user_id is required") + } + return s.repository.ListRoleInvitations(ctx, ListRoleInvitationsCommand{ + TargetUserID: command.TargetUserID, + Status: normalizeStatus(command.Status), + PageSize: normalizePageSize(command.PageSize), + }) +} + // ListBDLeaderBDs 返回当前 BD Leader 直属的有效 BD 列表。 func (s *Service) ListBDLeaderBDs(ctx context.Context, command ListBDLeaderBDsCommand) ([]hostdomain.BDProfile, error) { if s.repository == nil { diff --git a/services/user-service/internal/storage/mysql/host/invitations.go b/services/user-service/internal/storage/mysql/host/invitations.go index 6e15cb82..24393a25 100644 --- a/services/user-service/internal/storage/mysql/host/invitations.go +++ b/services/user-service/internal/storage/mysql/host/invitations.go @@ -65,7 +65,7 @@ func (r *Repository) InviteAgency(ctx context.Context, command hostservice.Invit InvitationID: command.InvitationID, CommandID: command.CommandID, InvitationType: hostdomain.InvitationTypeAgency, - Status: hostdomain.InvitationStatusAccepted, + Status: hostdomain.InvitationStatusPending, InviterUserID: command.InviterUserID, InviterBDUserID: inviter.UserID, TargetUserID: command.TargetUserID, @@ -73,42 +73,13 @@ func (r *Repository) InviteAgency(ctx context.Context, command hostservice.Invit AgencyName: command.AgencyName, ParentBDUserID: inviter.UserID, ParentLeaderUserID: parentLeaderUserID, - ProcessedByUserID: command.InviterUserID, - ProcessReason: "direct_invite", - ProcessedAtMs: command.NowMs, CreatedAtMs: command.NowMs, UpdatedAtMs: command.NowMs, } - // 新邀请不再等待目标用户确认:accepted invitation、Agency、owner Host 和 owner membership 必须同事务提交。 + // 邀请创建只落 pending 消息;Agency、owner Host 和 owner membership 必须等目标用户接受时再同事务创建。 if err := insertRoleInvitation(ctx, tx, invitation); err != nil { return hostdomain.RoleInvitation{}, mapHostDuplicateError(err) } - result := hostdomain.ProcessRoleInvitationResult{Invitation: invitation} - hostProfileCreated, err := r.acceptAgencyInvitation(ctx, tx, hostservice.ProcessRoleInvitationCommand{ - CommandID: command.CommandID, - ActorUserID: command.InviterUserID, - InvitationID: command.InvitationID, - Action: hostdomain.InvitationActionAccept, - Reason: "direct_invite", - AgencyID: command.AgencyID, - MembershipID: command.MembershipID, - EventID: command.EventID, - NowMs: command.NowMs, - }, &invitation, &result) - if err != nil { - return hostdomain.RoleInvitation{}, err - } - if hostProfileCreated { - if err := insertHostOutbox(ctx, tx, command.EventID, "HostCreated", "host_profile", invitation.TargetUserID, command.NowMs); err != nil { - return hostdomain.RoleInvitation{}, err - } - } - if err := insertHostOutbox(ctx, tx, command.EventID+1, "AgencyCreated", "agency", command.AgencyID, command.NowMs); err != nil { - return hostdomain.RoleInvitation{}, err - } - if err := insertHostOutbox(ctx, tx, command.EventID+2, "AgencyMembershipChanged", "agency_membership", command.MembershipID, command.NowMs); err != nil { - return hostdomain.RoleInvitation{}, err - } if err := insertCommandResult(ctx, tx, hostdomain.CommandResult{ CommandID: command.CommandID, CommandType: hostdomain.CommandTypeInviteAgency, @@ -171,47 +142,105 @@ func (r *Repository) InviteBD(ctx context.Context, command hostservice.InviteBDC InvitationID: command.InvitationID, CommandID: command.CommandID, InvitationType: hostdomain.InvitationTypeBD, - Status: hostdomain.InvitationStatusAccepted, + Status: hostdomain.InvitationStatusPending, InviterUserID: command.InviterUserID, InviterBDUserID: inviter.UserID, TargetUserID: command.TargetUserID, RegionID: targetRegionID, ParentLeaderUserID: inviter.UserID, - ProcessedByUserID: command.InviterUserID, - ProcessReason: "direct_invite", - ProcessedAtMs: command.NowMs, CreatedAtMs: command.NowMs, UpdatedAtMs: command.NowMs, } - // 新 BD 邀请直接创建 BD 身份;accepted invitation 只作为审计事实和幂等回放结果。 + // 新 BD 邀请只产生待确认消息;BD 身份要等目标用户接受后才创建。 if err := insertRoleInvitation(ctx, tx, invitation); err != nil { return hostdomain.RoleInvitation{}, mapHostDuplicateError(err) } - recordCommandResult := func() error { - return insertCommandResult(ctx, tx, hostdomain.CommandResult{ - CommandID: command.CommandID, - CommandType: hostdomain.CommandTypeInviteBD, - ResultType: hostdomain.ResultTypeInvitation, - ResultID: invitation.InvitationID, - CreatedAtMs: command.NowMs, - }) + if err := insertCommandResult(ctx, tx, hostdomain.CommandResult{ + CommandID: command.CommandID, + CommandType: hostdomain.CommandTypeInviteBD, + ResultType: hostdomain.ResultTypeInvitation, + ResultID: invitation.InvitationID, + CreatedAtMs: command.NowMs, + }); err != nil { + return hostdomain.RoleInvitation{}, mapHostDuplicateError(err) } - result := hostdomain.ProcessRoleInvitationResult{Invitation: invitation} - if err := r.acceptBDInvitation(ctx, tx, hostservice.ProcessRoleInvitationCommand{ - CommandID: command.CommandID, - ActorUserID: command.InviterUserID, - InvitationID: command.InvitationID, - Action: hostdomain.InvitationActionAccept, - Reason: "direct_invite", - EventID: command.EventID, - NowMs: command.NowMs, - }, &invitation, &result); err != nil { + if err := tx.Commit(); err != nil { return hostdomain.RoleInvitation{}, err } - if err := insertHostOutbox(ctx, tx, command.EventID, "BDCreated", "bd_profile", invitation.TargetUserID, command.NowMs); err != nil { + + return invitation, nil +} + +// InviteHost 创建 Agency owner 到目标用户的 Host 入会邀请。 +func (r *Repository) InviteHost(ctx context.Context, command hostservice.InviteHostCommand) (hostdomain.RoleInvitation, error) { + tx, err := r.db.BeginTx(ctx, nil) + if err != nil { return hostdomain.RoleInvitation{}, err } - if err := recordCommandResult(); err != nil { + defer tx.Rollback() + + // 发送邀请是独立写命令;重试只回放同一条 pending/终态邀请,不重新读取 owner 当前权限。 + if existing, ok, err := commandResult(ctx, tx, command.CommandID); err != nil { + return hostdomain.RoleInvitation{}, err + } else if ok { + if err := requireCommandResult(existing, hostdomain.CommandTypeInviteHost, hostdomain.ResultTypeInvitation); err != nil { + return hostdomain.RoleInvitation{}, err + } + return queryRoleInvitation(ctx, tx, "WHERE invitation_id = ?", existing.ResultID) + } + + // Agency owner 是邀请 Host 的唯一授权身份;锁 active agency 行可以让关闭、删除、禁入和邀请创建串行。 + agency, ok, err := queryActiveAgencyByOwner(ctx, tx, command.InviterUserID, true) + if err != nil { + return hostdomain.RoleInvitation{}, err + } + if !ok || !agency.JoinEnabled { + return hostdomain.RoleInvitation{}, xerr.New(xerr.PermissionDenied, "inviter agency is not active or joinable") + } + // 目标用户可能还没有 host_profile,所以用 users 行作为目标身份变化的串行化锁。 + targetRegionID, err := r.userRegion(ctx, tx, command.TargetUserID, "FOR UPDATE") + if err != nil { + return hostdomain.RoleInvitation{}, err + } + if targetRegionID != agency.RegionID { + return hostdomain.RoleInvitation{}, xerr.New(xerr.PermissionDenied, "target region does not match agency region") + } + // Host 入会邀请不能绕过“一人一个有效 Agency 归属”的硬约束,接受时还会再次校验当前状态。 + if _, ok, err := queryActiveMembershipByHost(ctx, tx, command.TargetUserID, true); err != nil { + return hostdomain.RoleInvitation{}, err + } else if ok { + return hostdomain.RoleInvitation{}, xerr.New(xerr.Conflict, "target already has active agency membership") + } + if _, ok, err := queryActiveAgencyByOwner(ctx, tx, command.TargetUserID, true); err != nil { + return hostdomain.RoleInvitation{}, err + } else if ok { + return hostdomain.RoleInvitation{}, xerr.New(xerr.Conflict, "target already owns active agency") + } + + invitation := hostdomain.RoleInvitation{ + InvitationID: command.InvitationID, + CommandID: command.CommandID, + InvitationType: hostdomain.InvitationTypeHost, + Status: hostdomain.InvitationStatusPending, + InviterUserID: command.InviterUserID, + InviterBDUserID: agency.ParentBDUserID, + TargetUserID: command.TargetUserID, + RegionID: targetRegionID, + AgencyName: agency.Name, + ParentBDUserID: agency.ParentBDUserID, + CreatedAtMs: command.NowMs, + UpdatedAtMs: command.NowMs, + } + if err := insertRoleInvitation(ctx, tx, invitation); err != nil { + return hostdomain.RoleInvitation{}, mapHostDuplicateError(err) + } + if err := insertCommandResult(ctx, tx, hostdomain.CommandResult{ + CommandID: command.CommandID, + CommandType: hostdomain.CommandTypeInviteHost, + ResultType: hostdomain.ResultTypeInvitation, + ResultID: invitation.InvitationID, + CreatedAtMs: command.NowMs, + }); err != nil { return hostdomain.RoleInvitation{}, mapHostDuplicateError(err) } if err := tx.Commit(); err != nil { @@ -231,7 +260,7 @@ func queryActiveAgencyInviterProfile(ctx context.Context, tx *sql.Tx, userID int return hostdomain.BDProfile{}, xerr.New(xerr.PermissionDenied, "inviter bd is not active") } -// ProcessRoleInvitation 处理角色邀请,接受路径在同一事务内创建 Agency/BD 角色事实。 +// ProcessRoleInvitation 处理角色邀请,接受路径在同一事务内创建 Host/Agency/BD 角色事实。 func (r *Repository) ProcessRoleInvitation(ctx context.Context, command hostservice.ProcessRoleInvitationCommand) (hostdomain.ProcessRoleInvitationResult, error) { tx, err := r.db.BeginTx(ctx, nil) if err != nil { @@ -309,6 +338,20 @@ func (r *Repository) ProcessRoleInvitation(ctx context.Context, command hostserv if err := insertHostOutbox(ctx, tx, command.EventID, "BDCreated", "bd_profile", invitation.TargetUserID, command.NowMs); err != nil { return hostdomain.ProcessRoleInvitationResult{}, err } + } else if invitation.InvitationType == hostdomain.InvitationTypeHost { + // Host 邀请只创建或复用 Host 身份,并把当前成员关系挂到发起 Agency。 + hostProfileCreated, err := r.acceptHostInvitation(ctx, tx, command, &invitation, &result) + if err != nil { + return hostdomain.ProcessRoleInvitationResult{}, err + } + if hostProfileCreated { + if err := insertHostOutbox(ctx, tx, command.EventID, "HostCreated", "host_profile", invitation.TargetUserID, command.NowMs); err != nil { + return hostdomain.ProcessRoleInvitationResult{}, err + } + } + if err := insertHostOutbox(ctx, tx, command.EventID+1, "AgencyMembershipChanged", "agency_membership", command.MembershipID, command.NowMs); err != nil { + return hostdomain.ProcessRoleInvitationResult{}, err + } } else { return hostdomain.ProcessRoleInvitationResult{}, xerr.New(xerr.InvalidArgument, "invitation type is invalid") } @@ -404,6 +447,59 @@ func (r *Repository) acceptAgencyInvitation(ctx context.Context, tx *sql.Tx, com return hostProfileCreated, nil } +func (r *Repository) acceptHostInvitation(ctx context.Context, tx *sql.Tx, command hostservice.ProcessRoleInvitationCommand, invitation *hostdomain.RoleInvitation, result *hostdomain.ProcessRoleInvitationResult) (bool, error) { + // Host 邀请绑定的是发起人当前 active Agency,而不是客户端传入的 agency_id; + // 这样邀请消息无法被目标用户篡改成加入其他团队。 + agency, ok, err := queryActiveAgencyByOwner(ctx, tx, invitation.InviterUserID, true) + if err != nil { + return false, err + } + if !ok || !agency.JoinEnabled { + return false, xerr.New(xerr.Conflict, "inviter agency is no longer active or joinable") + } + targetRegionID, err := r.userRegion(ctx, tx, invitation.TargetUserID, "FOR UPDATE") + if err != nil { + return false, err + } + if targetRegionID != agency.RegionID { + return false, xerr.New(xerr.PermissionDenied, "target region no longer matches agency") + } + // 接受时再次检查有效归属和 Agency owner 身份,覆盖邀请发出后用户已经加入或创建团队的情况。 + if _, ok, err := queryActiveMembershipByHost(ctx, tx, invitation.TargetUserID, true); err != nil { + return false, err + } else if ok { + return false, xerr.New(xerr.Conflict, "target already has active agency membership") + } + if _, ok, err := queryActiveAgencyByOwner(ctx, tx, invitation.TargetUserID, true); err != nil { + return false, err + } else if ok { + return false, xerr.New(xerr.Conflict, "target already owns active agency") + } + + hostProfile, hostProfileCreated, err := ensureHostProfileForMembership(ctx, tx, invitation.TargetUserID, targetRegionID, command.MembershipID, agency.AgencyID, hostdomain.HostSourceAgencyInvitation, command.NowMs) + if err != nil { + return false, err + } + membership := hostdomain.AgencyMembership{ + MembershipID: command.MembershipID, + AgencyID: agency.AgencyID, + HostUserID: invitation.TargetUserID, + RegionID: targetRegionID, + MembershipType: hostdomain.MembershipTypeMember, + Status: hostdomain.MembershipStatusActive, + JoinedAtMs: command.NowMs, + CreatedAtMs: command.NowMs, + UpdatedAtMs: command.NowMs, + } + if err := insertAgencyMembership(ctx, tx, membership); err != nil { + return false, mapHostDuplicateError(err) + } + result.HostProfile = hostProfile + result.Agency = agency + result.Membership = membership + return hostProfileCreated, nil +} + func (r *Repository) acceptBDInvitation(ctx context.Context, tx *sql.Tx, command hostservice.ProcessRoleInvitationCommand, invitation *hostdomain.RoleInvitation, result *hostdomain.ProcessRoleInvitationResult) error { // BD 邀请同样以目标用户和发起 Leader 的 users 当前区域为准;旧邀请快照不能继续授权跨区接受。 targetRegionID, err := r.userRegion(ctx, tx, invitation.TargetUserID, "FOR UPDATE") diff --git a/services/user-service/internal/storage/mysql/host/queries.go b/services/user-service/internal/storage/mysql/host/queries.go index 796ddad3..a34b1936 100644 --- a/services/user-service/internal/storage/mysql/host/queries.go +++ b/services/user-service/internal/storage/mysql/host/queries.go @@ -353,6 +353,20 @@ func (r *Repository) ListBDAgencies(ctx context.Context, command hostservice.Lis return queryAgencies(ctx, r.db, clause, args...) } +// ListRoleInvitations 读取目标用户收到的角色邀请消息;默认由业务层传入 pending 状态用于消息中心。 +func (r *Repository) ListRoleInvitations(ctx context.Context, command hostservice.ListRoleInvitationsCommand) ([]hostdomain.RoleInvitation, error) { + query := fmt.Sprintf(`SELECT %s FROM role_invitations WHERE app_code = ? AND target_user_id = ?`, roleInvitationColumns) + args := []any{appcode.FromContext(ctx), command.TargetUserID} + if command.Status != "" { + query += " AND status = ?" + args = append(args, command.Status) + } + // 消息中心优先展示最新邀请;同毫秒内用 invitation_id 保持稳定排序。 + query += " ORDER BY created_at_ms DESC, invitation_id DESC LIMIT ?" + args = append(args, command.PageSize) + return queryRoleInvitations(ctx, r.db, query, args...) +} + // ListAgencyMembers 读取 Agency 成员关系列表。 func (r *Repository) ListAgencyMembers(ctx context.Context, agencyID int64, status string) ([]hostdomain.AgencyMembership, error) { query := fmt.Sprintf(`SELECT %s FROM agency_memberships WHERE app_code = ? AND agency_id = ?`, agencyMembershipColumns) @@ -812,6 +826,23 @@ func queryRoleInvitation(ctx context.Context, q sqlQueryer, clause string, args return invitation, err } +func queryRoleInvitations(ctx context.Context, q sqlQueryer, query string, args ...any) ([]hostdomain.RoleInvitation, error) { + rows, err := q.QueryContext(ctx, query, args...) + if err != nil { + return nil, err + } + defer rows.Close() + invitations := make([]hostdomain.RoleInvitation, 0) + for rows.Next() { + invitation, err := scanRoleInvitation(rows) + if err != nil { + return nil, err + } + invitations = append(invitations, invitation) + } + return invitations, rows.Err() +} + func scanRoleInvitation(scanner rowScanner) (hostdomain.RoleInvitation, error) { var invitation hostdomain.RoleInvitation err := scanner.Scan( @@ -877,7 +908,10 @@ func processResultByInvitationID(ctx context.Context, q sqlQueryer, invitationID if invitation.Status != hostdomain.InvitationStatusAccepted { return result, nil } - if invitation.InvitationType == hostdomain.InvitationTypeAgency { + + // 只有接受动作会创建后续身份事实;按邀请类型回填前端需要立即刷新的最新关系。 + switch invitation.InvitationType { + case hostdomain.InvitationTypeAgency: if profile, err := queryHostProfile(ctx, q, "WHERE user_id = ?", invitation.TargetUserID); err == nil { result.HostProfile = profile if profile.CurrentMembershipID > 0 { @@ -889,10 +923,20 @@ func processResultByInvitationID(ctx context.Context, q sqlQueryer, invitationID } else if ok { result.Agency = agency } - } else if invitation.InvitationType == hostdomain.InvitationTypeBD { + case hostdomain.InvitationTypeBD: if bd, err := queryBDProfile(ctx, q, "WHERE user_id = ?", invitation.TargetUserID); err == nil { result.BDProfile = bd } + case hostdomain.InvitationTypeHost: + if profile, err := queryHostProfile(ctx, q, "WHERE user_id = ?", invitation.TargetUserID); err == nil { + result.HostProfile = profile + if profile.CurrentMembershipID > 0 { + result.Membership, _ = queryAgencyMembership(ctx, q, "WHERE membership_id = ?", profile.CurrentMembershipID) + } + if profile.CurrentAgencyID > 0 { + result.Agency, _ = queryAgency(ctx, q, "WHERE agency_id = ?", profile.CurrentAgencyID) + } + } } return result, nil } diff --git a/services/user-service/internal/transport/grpc/bd_identity_flow_test.go b/services/user-service/internal/transport/grpc/bd_identity_flow_test.go index d90063d2..494442a9 100644 --- a/services/user-service/internal/transport/grpc/bd_identity_flow_test.go +++ b/services/user-service/internal/transport/grpc/bd_identity_flow_test.go @@ -66,7 +66,7 @@ func TestBDLeaderSelfInviteFlowThroughGRPCUsesSplitIdentityTables(t *testing.T) t.Fatalf("InviteBD self RPC failed: %v", err) } invitation := inviteResp.GetInvitation() - if invitation.GetStatus() != hostdomain.InvitationStatusAccepted || invitation.GetTargetUserId() != 10001 || invitation.GetParentLeaderUserId() != 10001 { + if invitation.GetStatus() != hostdomain.InvitationStatusPending || invitation.GetTargetUserId() != 10001 || invitation.GetParentLeaderUserId() != 10001 { t.Fatalf("self invite response mismatch: %+v", invitation) } retryInviteResp, err := server.InviteBD(ctx, &userv1.InviteBDRequest{ @@ -82,9 +82,39 @@ func TestBDLeaderSelfInviteFlowThroughGRPCUsesSplitIdentityTables(t *testing.T) t.Fatalf("self invite retry must replay same invitation: first=%+v retry=%+v", invitation, retryInviteResp.GetInvitation()) } + if _, err := server.GetBDProfile(ctx, &userv1.GetBDProfileRequest{Meta: meta, UserId: 10001, Role: hostdomain.BDRoleBD}); xerr.ReasonFromGRPC(err) != xerr.NotFound { + t.Fatalf("pending self invite must not create ordinary bd before accept: err=%v", err) + } + listResp, err := server.ListRoleInvitations(ctx, &userv1.ListRoleInvitationsRequest{ + Meta: meta, + TargetUserId: 10001, + Status: hostdomain.InvitationStatusPending, + PageSize: 20, + }) + if err != nil { + t.Fatalf("ListRoleInvitations RPC failed: %v", err) + } + if len(listResp.GetInvitations()) != 1 || listResp.GetInvitations()[0].GetInvitationId() != invitation.GetInvitationId() { + t.Fatalf("pending invitation list mismatch: %+v", listResp.GetInvitations()) + } + processResp, err := server.ProcessRoleInvitation(ctx, &userv1.ProcessRoleInvitationRequest{ + Meta: meta, + CommandId: "rpc-accept-self-bd-10001", + ActorUserId: 10001, + InvitationId: invitation.GetInvitationId(), + Action: hostdomain.InvitationActionAccept, + Reason: "accept self bd", + }) + if err != nil { + t.Fatalf("ProcessRoleInvitation accept RPC failed: %v", err) + } + if processResp.GetInvitation().GetStatus() != hostdomain.InvitationStatusAccepted || processResp.GetBdProfile().GetRole() != hostdomain.BDRoleBD { + t.Fatalf("accepted self invite response mismatch: %+v bd=%+v", processResp.GetInvitation(), processResp.GetBdProfile()) + } + bdResp, err := server.GetBDProfile(ctx, &userv1.GetBDProfileRequest{Meta: meta, UserId: 10001, Role: hostdomain.BDRoleBD}) if err != nil { - t.Fatalf("GetBDProfile role=bd RPC failed after self invite: %v", err) + t.Fatalf("GetBDProfile role=bd RPC failed after accepting self invite: %v", err) } if bdResp.GetBdProfile().GetRole() != hostdomain.BDRoleBD || bdResp.GetBdProfile().GetParentLeaderUserId() != 10001 { t.Fatalf("ordinary bd profile mismatch: %+v", bdResp.GetBdProfile()) diff --git a/services/user-service/internal/transport/grpc/host.go b/services/user-service/internal/transport/grpc/host.go index c6877162..81f19650 100644 --- a/services/user-service/internal/transport/grpc/host.go +++ b/services/user-service/internal/transport/grpc/host.go @@ -98,7 +98,7 @@ func (s *Server) KickAgencyHost(ctx context.Context, req *userv1.KickAgencyHostR }, nil } -// InviteAgency 直接创建用户成为 Agency owner 的关系事实,不再等待目标用户确认。 +// InviteAgency 创建用户成为 Agency owner 的待确认邀请,目标接受后才创建关系事实。 func (s *Server) InviteAgency(ctx context.Context, req *userv1.InviteAgencyRequest) (*userv1.InviteAgencyResponse, error) { if s.hostSvc == nil { return nil, xerr.ToGRPCError(xerr.New(xerr.Unavailable, "host service is not configured")) @@ -118,7 +118,7 @@ func (s *Server) InviteAgency(ctx context.Context, req *userv1.InviteAgencyReque return &userv1.InviteAgencyResponse{Invitation: toProtoRoleInvitation(invitation)}, nil } -// InviteBD 直接创建用户成为 BD 的关系事实,只有 BD 负责人可调用。 +// InviteBD 创建用户成为普通 BD 的待确认邀请,只有 BD 负责人可调用。 func (s *Server) InviteBD(ctx context.Context, req *userv1.InviteBDRequest) (*userv1.InviteBDResponse, error) { if s.hostSvc == nil { return nil, xerr.ToGRPCError(xerr.New(xerr.Unavailable, "host service is not configured")) @@ -137,6 +137,25 @@ func (s *Server) InviteBD(ctx context.Context, req *userv1.InviteBDRequest) (*us return &userv1.InviteBDResponse{Invitation: toProtoRoleInvitation(invitation)}, nil } +// InviteHost 创建用户加入 Agency 的待确认邀请,只有 active Agency owner 可调用。 +func (s *Server) InviteHost(ctx context.Context, req *userv1.InviteHostRequest) (*userv1.InviteHostResponse, error) { + if s.hostSvc == nil { + return nil, xerr.ToGRPCError(xerr.New(xerr.Unavailable, "host service is not configured")) + } + ctx = contextWithApp(ctx, req.GetMeta()) + // 发起人是否拥有 active Agency、目标是否同区和是否已有归属都在持久化事务内锁定判断。 + invitation, err := s.hostSvc.InviteHost(ctx, hostservice.InviteHostInput{ + CommandID: req.GetCommandId(), + InviterUserID: req.GetInviterUserId(), + TargetUserID: req.GetTargetUserId(), + }) + if err != nil { + return nil, xerr.ToGRPCError(err) + } + + return &userv1.InviteHostResponse{Invitation: toProtoRoleInvitation(invitation)}, nil +} + // ListBDLeaderBDs 返回当前 BD Leader 直属 BD 列表。 func (s *Server) ListBDLeaderBDs(ctx context.Context, req *userv1.ListBDLeaderBDsRequest) (*userv1.ListBDLeaderBDsResponse, error) { if s.hostSvc == nil { @@ -203,7 +222,30 @@ func (s *Server) ListBDAgencies(ctx context.Context, req *userv1.ListBDAgenciesR return resp, nil } -// ProcessRoleInvitation 处理 Agency 或 BD 邀请。 +// ListRoleInvitations 返回目标用户收到的角色邀请消息。 +func (s *Server) ListRoleInvitations(ctx context.Context, req *userv1.ListRoleInvitationsRequest) (*userv1.ListRoleInvitationsResponse, error) { + if s.hostSvc == nil { + return nil, xerr.ToGRPCError(xerr.New(xerr.Unavailable, "host service is not configured")) + } + ctx = contextWithApp(ctx, req.GetMeta()) + // 查询只接受 target_user_id,不允许调用方按 inviter 任意枚举别人的消息。 + invitations, err := s.hostSvc.ListRoleInvitations(ctx, hostservice.ListRoleInvitationsCommand{ + TargetUserID: req.GetTargetUserId(), + Status: req.GetStatus(), + PageSize: int(req.GetPageSize()), + }) + if err != nil { + return nil, xerr.ToGRPCError(err) + } + + resp := &userv1.ListRoleInvitationsResponse{Invitations: make([]*userv1.RoleInvitation, 0, len(invitations))} + for _, invitation := range invitations { + resp.Invitations = append(resp.Invitations, toProtoRoleInvitation(invitation)) + } + return resp, nil +} + +// ProcessRoleInvitation 处理 Host、Agency 或 BD 邀请。 func (s *Server) ProcessRoleInvitation(ctx context.Context, req *userv1.ProcessRoleInvitationRequest) (*userv1.ProcessRoleInvitationResponse, error) { if s.hostSvc == nil { return nil, xerr.ToGRPCError(xerr.New(xerr.Unavailable, "host service is not configured"))