diff --git a/api/proto/user/v1/host.pb.go b/api/proto/user/v1/host.pb.go index 2f366d19..c54d3b88 100644 --- a/api/proto/user/v1/host.pb.go +++ b/api/proto/user/v1/host.pb.go @@ -1916,6 +1916,230 @@ func (x *InviteBDResponse) GetInvitation() *RoleInvitation { return nil } +type ListBDLeaderBDsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + LeaderUserId int64 `protobuf:"varint,2,opt,name=leader_user_id,json=leaderUserId,proto3" json:"leader_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 *ListBDLeaderBDsRequest) Reset() { + *x = ListBDLeaderBDsRequest{} + mi := &file_proto_user_v1_host_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBDLeaderBDsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBDLeaderBDsRequest) ProtoMessage() {} + +func (x *ListBDLeaderBDsRequest) 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 ListBDLeaderBDsRequest.ProtoReflect.Descriptor instead. +func (*ListBDLeaderBDsRequest) Descriptor() ([]byte, []int) { + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{21} +} + +func (x *ListBDLeaderBDsRequest) GetMeta() *RequestMeta { + if x != nil { + return x.Meta + } + return nil +} + +func (x *ListBDLeaderBDsRequest) GetLeaderUserId() int64 { + if x != nil { + return x.LeaderUserId + } + return 0 +} + +func (x *ListBDLeaderBDsRequest) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *ListBDLeaderBDsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type ListBDLeaderBDsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + BdProfiles []*BDProfile `protobuf:"bytes,1,rep,name=bd_profiles,json=bdProfiles,proto3" json:"bd_profiles,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBDLeaderBDsResponse) Reset() { + *x = ListBDLeaderBDsResponse{} + mi := &file_proto_user_v1_host_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBDLeaderBDsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBDLeaderBDsResponse) ProtoMessage() {} + +func (x *ListBDLeaderBDsResponse) 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 ListBDLeaderBDsResponse.ProtoReflect.Descriptor instead. +func (*ListBDLeaderBDsResponse) Descriptor() ([]byte, []int) { + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{22} +} + +func (x *ListBDLeaderBDsResponse) GetBdProfiles() []*BDProfile { + if x != nil { + return x.BdProfiles + } + return nil +} + +type ListBDLeaderAgenciesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + LeaderUserId int64 `protobuf:"varint,2,opt,name=leader_user_id,json=leaderUserId,proto3" json:"leader_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 *ListBDLeaderAgenciesRequest) Reset() { + *x = ListBDLeaderAgenciesRequest{} + mi := &file_proto_user_v1_host_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBDLeaderAgenciesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBDLeaderAgenciesRequest) ProtoMessage() {} + +func (x *ListBDLeaderAgenciesRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_user_v1_host_proto_msgTypes[23] + 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 ListBDLeaderAgenciesRequest.ProtoReflect.Descriptor instead. +func (*ListBDLeaderAgenciesRequest) Descriptor() ([]byte, []int) { + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{23} +} + +func (x *ListBDLeaderAgenciesRequest) GetMeta() *RequestMeta { + if x != nil { + return x.Meta + } + return nil +} + +func (x *ListBDLeaderAgenciesRequest) GetLeaderUserId() int64 { + if x != nil { + return x.LeaderUserId + } + return 0 +} + +func (x *ListBDLeaderAgenciesRequest) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *ListBDLeaderAgenciesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +type ListBDLeaderAgenciesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Agencies []*Agency `protobuf:"bytes,1,rep,name=agencies,proto3" json:"agencies,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBDLeaderAgenciesResponse) Reset() { + *x = ListBDLeaderAgenciesResponse{} + mi := &file_proto_user_v1_host_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBDLeaderAgenciesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBDLeaderAgenciesResponse) ProtoMessage() {} + +func (x *ListBDLeaderAgenciesResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_user_v1_host_proto_msgTypes[24] + 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 ListBDLeaderAgenciesResponse.ProtoReflect.Descriptor instead. +func (*ListBDLeaderAgenciesResponse) Descriptor() ([]byte, []int) { + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{24} +} + +func (x *ListBDLeaderAgenciesResponse) GetAgencies() []*Agency { + if x != nil { + return x.Agencies + } + return nil +} + type ProcessRoleInvitationRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` @@ -1930,7 +2154,7 @@ type ProcessRoleInvitationRequest struct { func (x *ProcessRoleInvitationRequest) Reset() { *x = ProcessRoleInvitationRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[21] + mi := &file_proto_user_v1_host_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1942,7 +2166,7 @@ func (x *ProcessRoleInvitationRequest) String() string { func (*ProcessRoleInvitationRequest) ProtoMessage() {} func (x *ProcessRoleInvitationRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[21] + mi := &file_proto_user_v1_host_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1955,7 +2179,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{21} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{25} } func (x *ProcessRoleInvitationRequest) GetMeta() *RequestMeta { @@ -2013,7 +2237,7 @@ type ProcessRoleInvitationResponse struct { func (x *ProcessRoleInvitationResponse) Reset() { *x = ProcessRoleInvitationResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[22] + mi := &file_proto_user_v1_host_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2025,7 +2249,7 @@ func (x *ProcessRoleInvitationResponse) String() string { func (*ProcessRoleInvitationResponse) ProtoMessage() {} func (x *ProcessRoleInvitationResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[22] + mi := &file_proto_user_v1_host_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2038,7 +2262,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{22} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{26} } func (x *ProcessRoleInvitationResponse) GetInvitation() *RoleInvitation { @@ -2086,7 +2310,7 @@ type GetHostProfileRequest struct { func (x *GetHostProfileRequest) Reset() { *x = GetHostProfileRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[23] + mi := &file_proto_user_v1_host_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2098,7 +2322,7 @@ func (x *GetHostProfileRequest) String() string { func (*GetHostProfileRequest) ProtoMessage() {} func (x *GetHostProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[23] + mi := &file_proto_user_v1_host_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2111,7 +2335,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{23} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{27} } func (x *GetHostProfileRequest) GetMeta() *RequestMeta { @@ -2137,7 +2361,7 @@ type GetHostProfileResponse struct { func (x *GetHostProfileResponse) Reset() { *x = GetHostProfileResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[24] + mi := &file_proto_user_v1_host_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2149,7 +2373,7 @@ func (x *GetHostProfileResponse) String() string { func (*GetHostProfileResponse) ProtoMessage() {} func (x *GetHostProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[24] + mi := &file_proto_user_v1_host_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2162,7 +2386,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{24} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{28} } func (x *GetHostProfileResponse) GetHostProfile() *HostProfile { @@ -2182,7 +2406,7 @@ type GetBDProfileRequest struct { func (x *GetBDProfileRequest) Reset() { *x = GetBDProfileRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[25] + mi := &file_proto_user_v1_host_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2194,7 +2418,7 @@ func (x *GetBDProfileRequest) String() string { func (*GetBDProfileRequest) ProtoMessage() {} func (x *GetBDProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[25] + mi := &file_proto_user_v1_host_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2207,7 +2431,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{25} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{29} } func (x *GetBDProfileRequest) GetMeta() *RequestMeta { @@ -2233,7 +2457,7 @@ type GetBDProfileResponse struct { func (x *GetBDProfileResponse) Reset() { *x = GetBDProfileResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[26] + mi := &file_proto_user_v1_host_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2245,7 +2469,7 @@ func (x *GetBDProfileResponse) String() string { func (*GetBDProfileResponse) ProtoMessage() {} func (x *GetBDProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_user_v1_host_proto_msgTypes[26] + mi := &file_proto_user_v1_host_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2258,7 +2482,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{26} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{30} } func (x *GetBDProfileResponse) GetBdProfile() *BDProfile { @@ -2278,7 +2502,7 @@ type GetCoinSellerProfileRequest struct { func (x *GetCoinSellerProfileRequest) Reset() { *x = GetCoinSellerProfileRequest{} - 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) } @@ -2290,7 +2514,7 @@ func (x *GetCoinSellerProfileRequest) String() string { func (*GetCoinSellerProfileRequest) ProtoMessage() {} func (x *GetCoinSellerProfileRequest) 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 { @@ -2303,7 +2527,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{27} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{31} } func (x *GetCoinSellerProfileRequest) GetMeta() *RequestMeta { @@ -2329,7 +2553,7 @@ type GetCoinSellerProfileResponse struct { func (x *GetCoinSellerProfileResponse) Reset() { *x = GetCoinSellerProfileResponse{} - 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) } @@ -2341,7 +2565,7 @@ func (x *GetCoinSellerProfileResponse) String() string { func (*GetCoinSellerProfileResponse) ProtoMessage() {} func (x *GetCoinSellerProfileResponse) 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 { @@ -2354,7 +2578,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{28} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{32} } func (x *GetCoinSellerProfileResponse) GetCoinSellerProfile() *CoinSellerProfile { @@ -2374,7 +2598,7 @@ type ListActiveCoinSellersInMyRegionRequest struct { func (x *ListActiveCoinSellersInMyRegionRequest) Reset() { *x = ListActiveCoinSellersInMyRegionRequest{} - 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) } @@ -2386,7 +2610,7 @@ func (x *ListActiveCoinSellersInMyRegionRequest) String() string { func (*ListActiveCoinSellersInMyRegionRequest) ProtoMessage() {} func (x *ListActiveCoinSellersInMyRegionRequest) 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 { @@ -2399,7 +2623,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{29} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{33} } func (x *ListActiveCoinSellersInMyRegionRequest) GetMeta() *RequestMeta { @@ -2425,7 +2649,7 @@ type ListActiveCoinSellersInMyRegionResponse struct { func (x *ListActiveCoinSellersInMyRegionResponse) Reset() { *x = ListActiveCoinSellersInMyRegionResponse{} - 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) } @@ -2437,7 +2661,7 @@ func (x *ListActiveCoinSellersInMyRegionResponse) String() string { func (*ListActiveCoinSellersInMyRegionResponse) ProtoMessage() {} func (x *ListActiveCoinSellersInMyRegionResponse) 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 { @@ -2450,7 +2674,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{30} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{34} } func (x *ListActiveCoinSellersInMyRegionResponse) GetCoinSellers() []*CoinSellerListItem { @@ -2470,7 +2694,7 @@ type GetUserRoleSummaryRequest struct { func (x *GetUserRoleSummaryRequest) Reset() { *x = GetUserRoleSummaryRequest{} - 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) } @@ -2482,7 +2706,7 @@ func (x *GetUserRoleSummaryRequest) String() string { func (*GetUserRoleSummaryRequest) ProtoMessage() {} func (x *GetUserRoleSummaryRequest) 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 { @@ -2495,7 +2719,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{31} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{35} } func (x *GetUserRoleSummaryRequest) GetMeta() *RequestMeta { @@ -2521,7 +2745,7 @@ type GetUserRoleSummaryResponse struct { func (x *GetUserRoleSummaryResponse) Reset() { *x = GetUserRoleSummaryResponse{} - 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) } @@ -2533,7 +2757,7 @@ func (x *GetUserRoleSummaryResponse) String() string { func (*GetUserRoleSummaryResponse) ProtoMessage() {} func (x *GetUserRoleSummaryResponse) 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 { @@ -2546,7 +2770,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{32} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{36} } func (x *GetUserRoleSummaryResponse) GetSummary() *UserRoleSummary { @@ -2566,7 +2790,7 @@ type GetAgencyRequest struct { func (x *GetAgencyRequest) Reset() { *x = GetAgencyRequest{} - 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) } @@ -2578,7 +2802,7 @@ func (x *GetAgencyRequest) String() string { func (*GetAgencyRequest) ProtoMessage() {} func (x *GetAgencyRequest) 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 { @@ -2591,7 +2815,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{33} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{37} } func (x *GetAgencyRequest) GetMeta() *RequestMeta { @@ -2617,7 +2841,7 @@ type GetAgencyResponse struct { func (x *GetAgencyResponse) Reset() { *x = GetAgencyResponse{} - 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) } @@ -2629,7 +2853,7 @@ func (x *GetAgencyResponse) String() string { func (*GetAgencyResponse) ProtoMessage() {} func (x *GetAgencyResponse) 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 { @@ -2642,7 +2866,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{34} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{38} } func (x *GetAgencyResponse) GetAgency() *Agency { @@ -2663,7 +2887,7 @@ type CheckBusinessCapabilityRequest struct { func (x *CheckBusinessCapabilityRequest) Reset() { *x = CheckBusinessCapabilityRequest{} - 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) } @@ -2675,7 +2899,7 @@ func (x *CheckBusinessCapabilityRequest) String() string { func (*CheckBusinessCapabilityRequest) ProtoMessage() {} func (x *CheckBusinessCapabilityRequest) 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 { @@ -2688,7 +2912,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{35} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{39} } func (x *CheckBusinessCapabilityRequest) GetMeta() *RequestMeta { @@ -2722,7 +2946,7 @@ type CheckBusinessCapabilityResponse struct { func (x *CheckBusinessCapabilityResponse) Reset() { *x = CheckBusinessCapabilityResponse{} - 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) } @@ -2734,7 +2958,7 @@ func (x *CheckBusinessCapabilityResponse) String() string { func (*CheckBusinessCapabilityResponse) ProtoMessage() {} func (x *CheckBusinessCapabilityResponse) 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 { @@ -2747,7 +2971,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{36} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{40} } func (x *CheckBusinessCapabilityResponse) GetAllowed() bool { @@ -2775,7 +2999,7 @@ type GetAgencyMembersRequest struct { func (x *GetAgencyMembersRequest) Reset() { *x = GetAgencyMembersRequest{} - 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) } @@ -2787,7 +3011,7 @@ func (x *GetAgencyMembersRequest) String() string { func (*GetAgencyMembersRequest) ProtoMessage() {} func (x *GetAgencyMembersRequest) 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 { @@ -2800,7 +3024,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{37} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{41} } func (x *GetAgencyMembersRequest) GetMeta() *RequestMeta { @@ -2833,7 +3057,7 @@ type GetAgencyMembersResponse struct { func (x *GetAgencyMembersResponse) Reset() { *x = GetAgencyMembersResponse{} - 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) } @@ -2845,7 +3069,7 @@ func (x *GetAgencyMembersResponse) String() string { func (*GetAgencyMembersResponse) ProtoMessage() {} func (x *GetAgencyMembersResponse) 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 { @@ -2858,7 +3082,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{38} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{42} } func (x *GetAgencyMembersResponse) GetMemberships() []*AgencyMembership { @@ -2879,7 +3103,7 @@ type GetAgencyApplicationsRequest struct { func (x *GetAgencyApplicationsRequest) Reset() { *x = GetAgencyApplicationsRequest{} - 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) } @@ -2891,7 +3115,7 @@ func (x *GetAgencyApplicationsRequest) String() string { func (*GetAgencyApplicationsRequest) ProtoMessage() {} func (x *GetAgencyApplicationsRequest) 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 { @@ -2904,7 +3128,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{39} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{43} } func (x *GetAgencyApplicationsRequest) GetMeta() *RequestMeta { @@ -2937,7 +3161,7 @@ type GetAgencyApplicationsResponse struct { func (x *GetAgencyApplicationsResponse) Reset() { *x = GetAgencyApplicationsResponse{} - 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) } @@ -2949,7 +3173,7 @@ func (x *GetAgencyApplicationsResponse) String() string { func (*GetAgencyApplicationsResponse) ProtoMessage() {} func (x *GetAgencyApplicationsResponse) 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 { @@ -2962,7 +3186,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{40} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{44} } func (x *GetAgencyApplicationsResponse) GetApplications() []*AgencyApplication { @@ -2986,7 +3210,7 @@ type CreateBDLeaderRequest struct { func (x *CreateBDLeaderRequest) Reset() { *x = CreateBDLeaderRequest{} - 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) } @@ -2998,7 +3222,7 @@ func (x *CreateBDLeaderRequest) String() string { func (*CreateBDLeaderRequest) ProtoMessage() {} func (x *CreateBDLeaderRequest) 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 { @@ -3011,7 +3235,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{41} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{45} } func (x *CreateBDLeaderRequest) GetMeta() *RequestMeta { @@ -3065,7 +3289,7 @@ type CreateBDLeaderResponse struct { func (x *CreateBDLeaderResponse) Reset() { *x = CreateBDLeaderResponse{} - 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) } @@ -3077,7 +3301,7 @@ func (x *CreateBDLeaderResponse) String() string { func (*CreateBDLeaderResponse) ProtoMessage() {} func (x *CreateBDLeaderResponse) 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 { @@ -3090,7 +3314,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{42} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{46} } func (x *CreateBDLeaderResponse) GetBdProfile() *BDProfile { @@ -3114,7 +3338,7 @@ type CreateBDRequest struct { func (x *CreateBDRequest) Reset() { *x = CreateBDRequest{} - 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) } @@ -3126,7 +3350,7 @@ func (x *CreateBDRequest) String() string { func (*CreateBDRequest) ProtoMessage() {} func (x *CreateBDRequest) 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 { @@ -3139,7 +3363,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{43} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{47} } func (x *CreateBDRequest) GetMeta() *RequestMeta { @@ -3193,7 +3417,7 @@ type CreateBDResponse struct { func (x *CreateBDResponse) Reset() { *x = CreateBDResponse{} - 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) } @@ -3205,7 +3429,7 @@ func (x *CreateBDResponse) String() string { func (*CreateBDResponse) ProtoMessage() {} func (x *CreateBDResponse) 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 { @@ -3218,7 +3442,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{44} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{48} } func (x *CreateBDResponse) GetBdProfile() *BDProfile { @@ -3242,7 +3466,7 @@ type SetBDStatusRequest struct { func (x *SetBDStatusRequest) Reset() { *x = SetBDStatusRequest{} - 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) } @@ -3254,7 +3478,7 @@ func (x *SetBDStatusRequest) String() string { func (*SetBDStatusRequest) ProtoMessage() {} func (x *SetBDStatusRequest) 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 { @@ -3267,7 +3491,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{45} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{49} } func (x *SetBDStatusRequest) GetMeta() *RequestMeta { @@ -3321,7 +3545,7 @@ type SetBDStatusResponse struct { func (x *SetBDStatusResponse) Reset() { *x = SetBDStatusResponse{} - 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) } @@ -3333,7 +3557,7 @@ func (x *SetBDStatusResponse) String() string { func (*SetBDStatusResponse) ProtoMessage() {} func (x *SetBDStatusResponse) 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 { @@ -3346,7 +3570,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{46} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{50} } func (x *SetBDStatusResponse) GetBdProfile() *BDProfile { @@ -3369,7 +3593,7 @@ type CreateCoinSellerRequest struct { func (x *CreateCoinSellerRequest) Reset() { *x = CreateCoinSellerRequest{} - 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) } @@ -3381,7 +3605,7 @@ func (x *CreateCoinSellerRequest) String() string { func (*CreateCoinSellerRequest) ProtoMessage() {} func (x *CreateCoinSellerRequest) 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 { @@ -3394,7 +3618,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{47} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{51} } func (x *CreateCoinSellerRequest) GetMeta() *RequestMeta { @@ -3441,7 +3665,7 @@ type CreateCoinSellerResponse struct { func (x *CreateCoinSellerResponse) Reset() { *x = CreateCoinSellerResponse{} - 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) } @@ -3453,7 +3677,7 @@ func (x *CreateCoinSellerResponse) String() string { func (*CreateCoinSellerResponse) ProtoMessage() {} func (x *CreateCoinSellerResponse) 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 { @@ -3466,7 +3690,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{48} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{52} } func (x *CreateCoinSellerResponse) GetCoinSellerProfile() *CoinSellerProfile { @@ -3490,7 +3714,7 @@ type SetCoinSellerStatusRequest struct { func (x *SetCoinSellerStatusRequest) Reset() { *x = SetCoinSellerStatusRequest{} - 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) } @@ -3502,7 +3726,7 @@ func (x *SetCoinSellerStatusRequest) String() string { func (*SetCoinSellerStatusRequest) ProtoMessage() {} func (x *SetCoinSellerStatusRequest) 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 { @@ -3515,7 +3739,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{49} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{53} } func (x *SetCoinSellerStatusRequest) GetMeta() *RequestMeta { @@ -3569,7 +3793,7 @@ type SetCoinSellerStatusResponse struct { func (x *SetCoinSellerStatusResponse) Reset() { *x = SetCoinSellerStatusResponse{} - 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) } @@ -3581,7 +3805,7 @@ func (x *SetCoinSellerStatusResponse) String() string { func (*SetCoinSellerStatusResponse) ProtoMessage() {} func (x *SetCoinSellerStatusResponse) 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 { @@ -3594,7 +3818,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{50} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{54} } func (x *SetCoinSellerStatusResponse) GetCoinSellerProfile() *CoinSellerProfile { @@ -3621,7 +3845,7 @@ type CreateAgencyRequest struct { func (x *CreateAgencyRequest) Reset() { *x = CreateAgencyRequest{} - 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) } @@ -3633,7 +3857,7 @@ func (x *CreateAgencyRequest) String() string { func (*CreateAgencyRequest) ProtoMessage() {} func (x *CreateAgencyRequest) 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 { @@ -3646,7 +3870,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{51} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{55} } func (x *CreateAgencyRequest) GetMeta() *RequestMeta { @@ -3723,7 +3947,7 @@ type CreateAgencyResponse struct { func (x *CreateAgencyResponse) Reset() { *x = CreateAgencyResponse{} - 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) } @@ -3735,7 +3959,7 @@ func (x *CreateAgencyResponse) String() string { func (*CreateAgencyResponse) ProtoMessage() {} func (x *CreateAgencyResponse) 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 { @@ -3748,7 +3972,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{52} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{56} } func (x *CreateAgencyResponse) GetAgency() *Agency { @@ -3785,7 +4009,7 @@ type CloseAgencyRequest struct { func (x *CloseAgencyRequest) Reset() { *x = CloseAgencyRequest{} - 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) } @@ -3797,7 +4021,7 @@ func (x *CloseAgencyRequest) String() string { func (*CloseAgencyRequest) ProtoMessage() {} func (x *CloseAgencyRequest) 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 { @@ -3810,7 +4034,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{53} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{57} } func (x *CloseAgencyRequest) GetMeta() *RequestMeta { @@ -3857,7 +4081,7 @@ type CloseAgencyResponse struct { func (x *CloseAgencyResponse) Reset() { *x = CloseAgencyResponse{} - 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) } @@ -3869,7 +4093,7 @@ func (x *CloseAgencyResponse) String() string { func (*CloseAgencyResponse) ProtoMessage() {} func (x *CloseAgencyResponse) 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 { @@ -3882,7 +4106,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{54} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{58} } func (x *CloseAgencyResponse) GetAgency() *Agency { @@ -3906,7 +4130,7 @@ type SetAgencyJoinEnabledRequest struct { func (x *SetAgencyJoinEnabledRequest) Reset() { *x = SetAgencyJoinEnabledRequest{} - 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) } @@ -3918,7 +4142,7 @@ func (x *SetAgencyJoinEnabledRequest) String() string { func (*SetAgencyJoinEnabledRequest) ProtoMessage() {} func (x *SetAgencyJoinEnabledRequest) 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 { @@ -3931,7 +4155,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{55} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{59} } func (x *SetAgencyJoinEnabledRequest) GetMeta() *RequestMeta { @@ -3985,7 +4209,7 @@ type SetAgencyJoinEnabledResponse struct { func (x *SetAgencyJoinEnabledResponse) Reset() { *x = SetAgencyJoinEnabledResponse{} - 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) } @@ -3997,7 +4221,7 @@ func (x *SetAgencyJoinEnabledResponse) String() string { func (*SetAgencyJoinEnabledResponse) ProtoMessage() {} func (x *SetAgencyJoinEnabledResponse) 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 { @@ -4010,7 +4234,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{56} + return file_proto_user_v1_host_proto_rawDescGZIP(), []int{60} } func (x *SetAgencyJoinEnabledResponse) GetAgency() *Agency { @@ -4220,7 +4444,22 @@ const file_proto_user_v1_host_proto_rawDesc = "" + "\x10InviteBDResponse\x12=\n" + "\n" + "invitation\x18\x01 \x01(\v2\x1d.hyapp.user.v1.RoleInvitationR\n" + - "invitation\"\xe6\x01\n" + + "invitation\"\xa3\x01\n" + + "\x16ListBDLeaderBDsRequest\x12.\n" + + "\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12$\n" + + "\x0eleader_user_id\x18\x02 \x01(\x03R\fleaderUserId\x12\x16\n" + + "\x06status\x18\x03 \x01(\tR\x06status\x12\x1b\n" + + "\tpage_size\x18\x04 \x01(\x05R\bpageSize\"T\n" + + "\x17ListBDLeaderBDsResponse\x129\n" + + "\vbd_profiles\x18\x01 \x03(\v2\x18.hyapp.user.v1.BDProfileR\n" + + "bdProfiles\"\xa8\x01\n" + + "\x1bListBDLeaderAgenciesRequest\x12.\n" + + "\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12$\n" + + "\x0eleader_user_id\x18\x02 \x01(\x03R\fleaderUserId\x12\x16\n" + + "\x06status\x18\x03 \x01(\tR\x06status\x12\x1b\n" + + "\tpage_size\x18\x04 \x01(\x05R\bpageSize\"Q\n" + + "\x1cListBDLeaderAgenciesResponse\x121\n" + + "\bagencies\x18\x01 \x03(\v2\x15.hyapp.user.v1.AgencyR\bagencies\"\xe6\x01\n" + "\x1cProcessRoleInvitationRequest\x12.\n" + "\x04meta\x18\x01 \x01(\v2\x1a.hyapp.user.v1.RequestMetaR\x04meta\x12\x1d\n" + "\n" + @@ -4379,14 +4618,16 @@ 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\x89\r\n" + + "\x06agency\x18\x01 \x01(\v2\x15.hyapp.user.v1.AgencyR\x06agency2\xdc\x0e\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\x12r\n" + + "\bInviteBD\x12\x1e.hyapp.user.v1.InviteBDRequest\x1a\x1f.hyapp.user.v1.InviteBDResponse\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\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" + @@ -4419,7 +4660,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, 57) +var file_proto_user_v1_host_proto_msgTypes = make([]protoimpl.MessageInfo, 61) var file_proto_user_v1_host_proto_goTypes = []any{ (*HostProfile)(nil), // 0: hyapp.user.v1.HostProfile (*Agency)(nil), // 1: hyapp.user.v1.Agency @@ -4442,154 +4683,166 @@ 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 - (*ProcessRoleInvitationRequest)(nil), // 21: hyapp.user.v1.ProcessRoleInvitationRequest - (*ProcessRoleInvitationResponse)(nil), // 22: hyapp.user.v1.ProcessRoleInvitationResponse - (*GetHostProfileRequest)(nil), // 23: hyapp.user.v1.GetHostProfileRequest - (*GetHostProfileResponse)(nil), // 24: hyapp.user.v1.GetHostProfileResponse - (*GetBDProfileRequest)(nil), // 25: hyapp.user.v1.GetBDProfileRequest - (*GetBDProfileResponse)(nil), // 26: hyapp.user.v1.GetBDProfileResponse - (*GetCoinSellerProfileRequest)(nil), // 27: hyapp.user.v1.GetCoinSellerProfileRequest - (*GetCoinSellerProfileResponse)(nil), // 28: hyapp.user.v1.GetCoinSellerProfileResponse - (*ListActiveCoinSellersInMyRegionRequest)(nil), // 29: hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest - (*ListActiveCoinSellersInMyRegionResponse)(nil), // 30: hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse - (*GetUserRoleSummaryRequest)(nil), // 31: hyapp.user.v1.GetUserRoleSummaryRequest - (*GetUserRoleSummaryResponse)(nil), // 32: hyapp.user.v1.GetUserRoleSummaryResponse - (*GetAgencyRequest)(nil), // 33: hyapp.user.v1.GetAgencyRequest - (*GetAgencyResponse)(nil), // 34: hyapp.user.v1.GetAgencyResponse - (*CheckBusinessCapabilityRequest)(nil), // 35: hyapp.user.v1.CheckBusinessCapabilityRequest - (*CheckBusinessCapabilityResponse)(nil), // 36: hyapp.user.v1.CheckBusinessCapabilityResponse - (*GetAgencyMembersRequest)(nil), // 37: hyapp.user.v1.GetAgencyMembersRequest - (*GetAgencyMembersResponse)(nil), // 38: hyapp.user.v1.GetAgencyMembersResponse - (*GetAgencyApplicationsRequest)(nil), // 39: hyapp.user.v1.GetAgencyApplicationsRequest - (*GetAgencyApplicationsResponse)(nil), // 40: hyapp.user.v1.GetAgencyApplicationsResponse - (*CreateBDLeaderRequest)(nil), // 41: hyapp.user.v1.CreateBDLeaderRequest - (*CreateBDLeaderResponse)(nil), // 42: hyapp.user.v1.CreateBDLeaderResponse - (*CreateBDRequest)(nil), // 43: hyapp.user.v1.CreateBDRequest - (*CreateBDResponse)(nil), // 44: hyapp.user.v1.CreateBDResponse - (*SetBDStatusRequest)(nil), // 45: hyapp.user.v1.SetBDStatusRequest - (*SetBDStatusResponse)(nil), // 46: hyapp.user.v1.SetBDStatusResponse - (*CreateCoinSellerRequest)(nil), // 47: hyapp.user.v1.CreateCoinSellerRequest - (*CreateCoinSellerResponse)(nil), // 48: hyapp.user.v1.CreateCoinSellerResponse - (*SetCoinSellerStatusRequest)(nil), // 49: hyapp.user.v1.SetCoinSellerStatusRequest - (*SetCoinSellerStatusResponse)(nil), // 50: hyapp.user.v1.SetCoinSellerStatusResponse - (*CreateAgencyRequest)(nil), // 51: hyapp.user.v1.CreateAgencyRequest - (*CreateAgencyResponse)(nil), // 52: hyapp.user.v1.CreateAgencyResponse - (*CloseAgencyRequest)(nil), // 53: hyapp.user.v1.CloseAgencyRequest - (*CloseAgencyResponse)(nil), // 54: hyapp.user.v1.CloseAgencyResponse - (*SetAgencyJoinEnabledRequest)(nil), // 55: hyapp.user.v1.SetAgencyJoinEnabledRequest - (*SetAgencyJoinEnabledResponse)(nil), // 56: hyapp.user.v1.SetAgencyJoinEnabledResponse - (*RequestMeta)(nil), // 57: hyapp.user.v1.RequestMeta + (*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 + (*ProcessRoleInvitationRequest)(nil), // 25: hyapp.user.v1.ProcessRoleInvitationRequest + (*ProcessRoleInvitationResponse)(nil), // 26: hyapp.user.v1.ProcessRoleInvitationResponse + (*GetHostProfileRequest)(nil), // 27: hyapp.user.v1.GetHostProfileRequest + (*GetHostProfileResponse)(nil), // 28: hyapp.user.v1.GetHostProfileResponse + (*GetBDProfileRequest)(nil), // 29: hyapp.user.v1.GetBDProfileRequest + (*GetBDProfileResponse)(nil), // 30: hyapp.user.v1.GetBDProfileResponse + (*GetCoinSellerProfileRequest)(nil), // 31: hyapp.user.v1.GetCoinSellerProfileRequest + (*GetCoinSellerProfileResponse)(nil), // 32: hyapp.user.v1.GetCoinSellerProfileResponse + (*ListActiveCoinSellersInMyRegionRequest)(nil), // 33: hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest + (*ListActiveCoinSellersInMyRegionResponse)(nil), // 34: hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse + (*GetUserRoleSummaryRequest)(nil), // 35: hyapp.user.v1.GetUserRoleSummaryRequest + (*GetUserRoleSummaryResponse)(nil), // 36: hyapp.user.v1.GetUserRoleSummaryResponse + (*GetAgencyRequest)(nil), // 37: hyapp.user.v1.GetAgencyRequest + (*GetAgencyResponse)(nil), // 38: hyapp.user.v1.GetAgencyResponse + (*CheckBusinessCapabilityRequest)(nil), // 39: hyapp.user.v1.CheckBusinessCapabilityRequest + (*CheckBusinessCapabilityResponse)(nil), // 40: hyapp.user.v1.CheckBusinessCapabilityResponse + (*GetAgencyMembersRequest)(nil), // 41: hyapp.user.v1.GetAgencyMembersRequest + (*GetAgencyMembersResponse)(nil), // 42: hyapp.user.v1.GetAgencyMembersResponse + (*GetAgencyApplicationsRequest)(nil), // 43: hyapp.user.v1.GetAgencyApplicationsRequest + (*GetAgencyApplicationsResponse)(nil), // 44: hyapp.user.v1.GetAgencyApplicationsResponse + (*CreateBDLeaderRequest)(nil), // 45: hyapp.user.v1.CreateBDLeaderRequest + (*CreateBDLeaderResponse)(nil), // 46: hyapp.user.v1.CreateBDLeaderResponse + (*CreateBDRequest)(nil), // 47: hyapp.user.v1.CreateBDRequest + (*CreateBDResponse)(nil), // 48: hyapp.user.v1.CreateBDResponse + (*SetBDStatusRequest)(nil), // 49: hyapp.user.v1.SetBDStatusRequest + (*SetBDStatusResponse)(nil), // 50: hyapp.user.v1.SetBDStatusResponse + (*CreateCoinSellerRequest)(nil), // 51: hyapp.user.v1.CreateCoinSellerRequest + (*CreateCoinSellerResponse)(nil), // 52: hyapp.user.v1.CreateCoinSellerResponse + (*SetCoinSellerStatusRequest)(nil), // 53: hyapp.user.v1.SetCoinSellerStatusRequest + (*SetCoinSellerStatusResponse)(nil), // 54: hyapp.user.v1.SetCoinSellerStatusResponse + (*CreateAgencyRequest)(nil), // 55: hyapp.user.v1.CreateAgencyRequest + (*CreateAgencyResponse)(nil), // 56: hyapp.user.v1.CreateAgencyResponse + (*CloseAgencyRequest)(nil), // 57: hyapp.user.v1.CloseAgencyRequest + (*CloseAgencyResponse)(nil), // 58: hyapp.user.v1.CloseAgencyResponse + (*SetAgencyJoinEnabledRequest)(nil), // 59: hyapp.user.v1.SetAgencyJoinEnabledRequest + (*SetAgencyJoinEnabledResponse)(nil), // 60: hyapp.user.v1.SetAgencyJoinEnabledResponse + (*RequestMeta)(nil), // 61: hyapp.user.v1.RequestMeta } var file_proto_user_v1_host_proto_depIdxs = []int32{ - 57, // 0: hyapp.user.v1.SearchAgenciesRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 61, // 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 - 57, // 2: hyapp.user.v1.ApplyToAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 61, // 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 - 57, // 4: hyapp.user.v1.ReviewAgencyApplicationRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 61, // 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 - 57, // 8: hyapp.user.v1.KickAgencyHostRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 61, // 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 - 57, // 11: hyapp.user.v1.InviteAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 61, // 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 - 57, // 13: hyapp.user.v1.InviteBDRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 61, // 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 - 57, // 15: hyapp.user.v1.ProcessRoleInvitationRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 8, // 16: hyapp.user.v1.ProcessRoleInvitationResponse.invitation:type_name -> hyapp.user.v1.RoleInvitation - 0, // 17: hyapp.user.v1.ProcessRoleInvitationResponse.host_profile:type_name -> hyapp.user.v1.HostProfile - 1, // 18: hyapp.user.v1.ProcessRoleInvitationResponse.agency:type_name -> hyapp.user.v1.Agency - 6, // 19: hyapp.user.v1.ProcessRoleInvitationResponse.membership:type_name -> hyapp.user.v1.AgencyMembership - 2, // 20: hyapp.user.v1.ProcessRoleInvitationResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 57, // 21: hyapp.user.v1.GetHostProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 0, // 22: hyapp.user.v1.GetHostProfileResponse.host_profile:type_name -> hyapp.user.v1.HostProfile - 57, // 23: hyapp.user.v1.GetBDProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 2, // 24: hyapp.user.v1.GetBDProfileResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 57, // 25: hyapp.user.v1.GetCoinSellerProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 3, // 26: hyapp.user.v1.GetCoinSellerProfileResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile - 57, // 27: hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 4, // 28: hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse.coin_sellers:type_name -> hyapp.user.v1.CoinSellerListItem - 57, // 29: hyapp.user.v1.GetUserRoleSummaryRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 5, // 30: hyapp.user.v1.GetUserRoleSummaryResponse.summary:type_name -> hyapp.user.v1.UserRoleSummary - 57, // 31: hyapp.user.v1.GetAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 32: hyapp.user.v1.GetAgencyResponse.agency:type_name -> hyapp.user.v1.Agency - 57, // 33: hyapp.user.v1.CheckBusinessCapabilityRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 57, // 34: hyapp.user.v1.GetAgencyMembersRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 6, // 35: hyapp.user.v1.GetAgencyMembersResponse.memberships:type_name -> hyapp.user.v1.AgencyMembership - 57, // 36: hyapp.user.v1.GetAgencyApplicationsRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 7, // 37: hyapp.user.v1.GetAgencyApplicationsResponse.applications:type_name -> hyapp.user.v1.AgencyApplication - 57, // 38: hyapp.user.v1.CreateBDLeaderRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 2, // 39: hyapp.user.v1.CreateBDLeaderResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 57, // 40: hyapp.user.v1.CreateBDRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 2, // 41: hyapp.user.v1.CreateBDResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 57, // 42: hyapp.user.v1.SetBDStatusRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 2, // 43: hyapp.user.v1.SetBDStatusResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile - 57, // 44: hyapp.user.v1.CreateCoinSellerRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 3, // 45: hyapp.user.v1.CreateCoinSellerResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile - 57, // 46: hyapp.user.v1.SetCoinSellerStatusRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 3, // 47: hyapp.user.v1.SetCoinSellerStatusResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile - 57, // 48: hyapp.user.v1.CreateAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 49: hyapp.user.v1.CreateAgencyResponse.agency:type_name -> hyapp.user.v1.Agency - 0, // 50: hyapp.user.v1.CreateAgencyResponse.host_profile:type_name -> hyapp.user.v1.HostProfile - 6, // 51: hyapp.user.v1.CreateAgencyResponse.membership:type_name -> hyapp.user.v1.AgencyMembership - 57, // 52: hyapp.user.v1.CloseAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 53: hyapp.user.v1.CloseAgencyResponse.agency:type_name -> hyapp.user.v1.Agency - 57, // 54: hyapp.user.v1.SetAgencyJoinEnabledRequest.meta:type_name -> hyapp.user.v1.RequestMeta - 1, // 55: hyapp.user.v1.SetAgencyJoinEnabledResponse.agency:type_name -> hyapp.user.v1.Agency - 9, // 56: hyapp.user.v1.UserHostService.SearchAgencies:input_type -> hyapp.user.v1.SearchAgenciesRequest - 11, // 57: hyapp.user.v1.UserHostService.ApplyToAgency:input_type -> hyapp.user.v1.ApplyToAgencyRequest - 13, // 58: hyapp.user.v1.UserHostService.ReviewAgencyApplication:input_type -> hyapp.user.v1.ReviewAgencyApplicationRequest - 15, // 59: hyapp.user.v1.UserHostService.KickAgencyHost:input_type -> hyapp.user.v1.KickAgencyHostRequest - 17, // 60: hyapp.user.v1.UserHostService.InviteAgency:input_type -> hyapp.user.v1.InviteAgencyRequest - 19, // 61: hyapp.user.v1.UserHostService.InviteBD:input_type -> hyapp.user.v1.InviteBDRequest - 21, // 62: hyapp.user.v1.UserHostService.ProcessRoleInvitation:input_type -> hyapp.user.v1.ProcessRoleInvitationRequest - 23, // 63: hyapp.user.v1.UserHostService.GetHostProfile:input_type -> hyapp.user.v1.GetHostProfileRequest - 25, // 64: hyapp.user.v1.UserHostService.GetBDProfile:input_type -> hyapp.user.v1.GetBDProfileRequest - 27, // 65: hyapp.user.v1.UserHostService.GetCoinSellerProfile:input_type -> hyapp.user.v1.GetCoinSellerProfileRequest - 29, // 66: hyapp.user.v1.UserHostService.ListActiveCoinSellersInMyRegion:input_type -> hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest - 31, // 67: hyapp.user.v1.UserHostService.GetUserRoleSummary:input_type -> hyapp.user.v1.GetUserRoleSummaryRequest - 33, // 68: hyapp.user.v1.UserHostService.GetAgency:input_type -> hyapp.user.v1.GetAgencyRequest - 35, // 69: hyapp.user.v1.UserHostService.CheckBusinessCapability:input_type -> hyapp.user.v1.CheckBusinessCapabilityRequest - 37, // 70: hyapp.user.v1.UserHostService.GetAgencyMembers:input_type -> hyapp.user.v1.GetAgencyMembersRequest - 39, // 71: hyapp.user.v1.UserHostService.GetAgencyApplications:input_type -> hyapp.user.v1.GetAgencyApplicationsRequest - 41, // 72: hyapp.user.v1.UserHostAdminService.CreateBDLeader:input_type -> hyapp.user.v1.CreateBDLeaderRequest - 43, // 73: hyapp.user.v1.UserHostAdminService.CreateBD:input_type -> hyapp.user.v1.CreateBDRequest - 45, // 74: hyapp.user.v1.UserHostAdminService.SetBDStatus:input_type -> hyapp.user.v1.SetBDStatusRequest - 47, // 75: hyapp.user.v1.UserHostAdminService.CreateCoinSeller:input_type -> hyapp.user.v1.CreateCoinSellerRequest - 49, // 76: hyapp.user.v1.UserHostAdminService.SetCoinSellerStatus:input_type -> hyapp.user.v1.SetCoinSellerStatusRequest - 51, // 77: hyapp.user.v1.UserHostAdminService.CreateAgency:input_type -> hyapp.user.v1.CreateAgencyRequest - 53, // 78: hyapp.user.v1.UserHostAdminService.CloseAgency:input_type -> hyapp.user.v1.CloseAgencyRequest - 55, // 79: hyapp.user.v1.UserHostAdminService.SetAgencyJoinEnabled:input_type -> hyapp.user.v1.SetAgencyJoinEnabledRequest - 10, // 80: hyapp.user.v1.UserHostService.SearchAgencies:output_type -> hyapp.user.v1.SearchAgenciesResponse - 12, // 81: hyapp.user.v1.UserHostService.ApplyToAgency:output_type -> hyapp.user.v1.ApplyToAgencyResponse - 14, // 82: hyapp.user.v1.UserHostService.ReviewAgencyApplication:output_type -> hyapp.user.v1.ReviewAgencyApplicationResponse - 16, // 83: hyapp.user.v1.UserHostService.KickAgencyHost:output_type -> hyapp.user.v1.KickAgencyHostResponse - 18, // 84: hyapp.user.v1.UserHostService.InviteAgency:output_type -> hyapp.user.v1.InviteAgencyResponse - 20, // 85: hyapp.user.v1.UserHostService.InviteBD:output_type -> hyapp.user.v1.InviteBDResponse - 22, // 86: hyapp.user.v1.UserHostService.ProcessRoleInvitation:output_type -> hyapp.user.v1.ProcessRoleInvitationResponse - 24, // 87: hyapp.user.v1.UserHostService.GetHostProfile:output_type -> hyapp.user.v1.GetHostProfileResponse - 26, // 88: hyapp.user.v1.UserHostService.GetBDProfile:output_type -> hyapp.user.v1.GetBDProfileResponse - 28, // 89: hyapp.user.v1.UserHostService.GetCoinSellerProfile:output_type -> hyapp.user.v1.GetCoinSellerProfileResponse - 30, // 90: hyapp.user.v1.UserHostService.ListActiveCoinSellersInMyRegion:output_type -> hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse - 32, // 91: hyapp.user.v1.UserHostService.GetUserRoleSummary:output_type -> hyapp.user.v1.GetUserRoleSummaryResponse - 34, // 92: hyapp.user.v1.UserHostService.GetAgency:output_type -> hyapp.user.v1.GetAgencyResponse - 36, // 93: hyapp.user.v1.UserHostService.CheckBusinessCapability:output_type -> hyapp.user.v1.CheckBusinessCapabilityResponse - 38, // 94: hyapp.user.v1.UserHostService.GetAgencyMembers:output_type -> hyapp.user.v1.GetAgencyMembersResponse - 40, // 95: hyapp.user.v1.UserHostService.GetAgencyApplications:output_type -> hyapp.user.v1.GetAgencyApplicationsResponse - 42, // 96: hyapp.user.v1.UserHostAdminService.CreateBDLeader:output_type -> hyapp.user.v1.CreateBDLeaderResponse - 44, // 97: hyapp.user.v1.UserHostAdminService.CreateBD:output_type -> hyapp.user.v1.CreateBDResponse - 46, // 98: hyapp.user.v1.UserHostAdminService.SetBDStatus:output_type -> hyapp.user.v1.SetBDStatusResponse - 48, // 99: hyapp.user.v1.UserHostAdminService.CreateCoinSeller:output_type -> hyapp.user.v1.CreateCoinSellerResponse - 50, // 100: hyapp.user.v1.UserHostAdminService.SetCoinSellerStatus:output_type -> hyapp.user.v1.SetCoinSellerStatusResponse - 52, // 101: hyapp.user.v1.UserHostAdminService.CreateAgency:output_type -> hyapp.user.v1.CreateAgencyResponse - 54, // 102: hyapp.user.v1.UserHostAdminService.CloseAgency:output_type -> hyapp.user.v1.CloseAgencyResponse - 56, // 103: hyapp.user.v1.UserHostAdminService.SetAgencyJoinEnabled:output_type -> hyapp.user.v1.SetAgencyJoinEnabledResponse - 80, // [80:104] is the sub-list for method output_type - 56, // [56:80] is the sub-list for method input_type - 56, // [56:56] is the sub-list for extension type_name - 56, // [56:56] is the sub-list for extension extendee - 0, // [0:56] is the sub-list for field type_name + 61, // 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 + 61, // 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 + 61, // 19: hyapp.user.v1.ProcessRoleInvitationRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 8, // 20: hyapp.user.v1.ProcessRoleInvitationResponse.invitation:type_name -> hyapp.user.v1.RoleInvitation + 0, // 21: hyapp.user.v1.ProcessRoleInvitationResponse.host_profile:type_name -> hyapp.user.v1.HostProfile + 1, // 22: hyapp.user.v1.ProcessRoleInvitationResponse.agency:type_name -> hyapp.user.v1.Agency + 6, // 23: hyapp.user.v1.ProcessRoleInvitationResponse.membership:type_name -> hyapp.user.v1.AgencyMembership + 2, // 24: hyapp.user.v1.ProcessRoleInvitationResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 61, // 25: hyapp.user.v1.GetHostProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 0, // 26: hyapp.user.v1.GetHostProfileResponse.host_profile:type_name -> hyapp.user.v1.HostProfile + 61, // 27: hyapp.user.v1.GetBDProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 2, // 28: hyapp.user.v1.GetBDProfileResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 61, // 29: hyapp.user.v1.GetCoinSellerProfileRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 3, // 30: hyapp.user.v1.GetCoinSellerProfileResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile + 61, // 31: hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 4, // 32: hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse.coin_sellers:type_name -> hyapp.user.v1.CoinSellerListItem + 61, // 33: hyapp.user.v1.GetUserRoleSummaryRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 5, // 34: hyapp.user.v1.GetUserRoleSummaryResponse.summary:type_name -> hyapp.user.v1.UserRoleSummary + 61, // 35: hyapp.user.v1.GetAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 36: hyapp.user.v1.GetAgencyResponse.agency:type_name -> hyapp.user.v1.Agency + 61, // 37: hyapp.user.v1.CheckBusinessCapabilityRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 61, // 38: hyapp.user.v1.GetAgencyMembersRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 6, // 39: hyapp.user.v1.GetAgencyMembersResponse.memberships:type_name -> hyapp.user.v1.AgencyMembership + 61, // 40: hyapp.user.v1.GetAgencyApplicationsRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 7, // 41: hyapp.user.v1.GetAgencyApplicationsResponse.applications:type_name -> hyapp.user.v1.AgencyApplication + 61, // 42: hyapp.user.v1.CreateBDLeaderRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 2, // 43: hyapp.user.v1.CreateBDLeaderResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 61, // 44: hyapp.user.v1.CreateBDRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 2, // 45: hyapp.user.v1.CreateBDResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 61, // 46: hyapp.user.v1.SetBDStatusRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 2, // 47: hyapp.user.v1.SetBDStatusResponse.bd_profile:type_name -> hyapp.user.v1.BDProfile + 61, // 48: hyapp.user.v1.CreateCoinSellerRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 3, // 49: hyapp.user.v1.CreateCoinSellerResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile + 61, // 50: hyapp.user.v1.SetCoinSellerStatusRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 3, // 51: hyapp.user.v1.SetCoinSellerStatusResponse.coin_seller_profile:type_name -> hyapp.user.v1.CoinSellerProfile + 61, // 52: hyapp.user.v1.CreateAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 53: hyapp.user.v1.CreateAgencyResponse.agency:type_name -> hyapp.user.v1.Agency + 0, // 54: hyapp.user.v1.CreateAgencyResponse.host_profile:type_name -> hyapp.user.v1.HostProfile + 6, // 55: hyapp.user.v1.CreateAgencyResponse.membership:type_name -> hyapp.user.v1.AgencyMembership + 61, // 56: hyapp.user.v1.CloseAgencyRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 57: hyapp.user.v1.CloseAgencyResponse.agency:type_name -> hyapp.user.v1.Agency + 61, // 58: hyapp.user.v1.SetAgencyJoinEnabledRequest.meta:type_name -> hyapp.user.v1.RequestMeta + 1, // 59: hyapp.user.v1.SetAgencyJoinEnabledResponse.agency:type_name -> hyapp.user.v1.Agency + 9, // 60: hyapp.user.v1.UserHostService.SearchAgencies:input_type -> hyapp.user.v1.SearchAgenciesRequest + 11, // 61: hyapp.user.v1.UserHostService.ApplyToAgency:input_type -> hyapp.user.v1.ApplyToAgencyRequest + 13, // 62: hyapp.user.v1.UserHostService.ReviewAgencyApplication:input_type -> hyapp.user.v1.ReviewAgencyApplicationRequest + 15, // 63: hyapp.user.v1.UserHostService.KickAgencyHost:input_type -> hyapp.user.v1.KickAgencyHostRequest + 17, // 64: hyapp.user.v1.UserHostService.InviteAgency:input_type -> hyapp.user.v1.InviteAgencyRequest + 19, // 65: hyapp.user.v1.UserHostService.InviteBD:input_type -> hyapp.user.v1.InviteBDRequest + 21, // 66: hyapp.user.v1.UserHostService.ListBDLeaderBDs:input_type -> hyapp.user.v1.ListBDLeaderBDsRequest + 23, // 67: hyapp.user.v1.UserHostService.ListBDLeaderAgencies:input_type -> hyapp.user.v1.ListBDLeaderAgenciesRequest + 25, // 68: hyapp.user.v1.UserHostService.ProcessRoleInvitation:input_type -> hyapp.user.v1.ProcessRoleInvitationRequest + 27, // 69: hyapp.user.v1.UserHostService.GetHostProfile:input_type -> hyapp.user.v1.GetHostProfileRequest + 29, // 70: hyapp.user.v1.UserHostService.GetBDProfile:input_type -> hyapp.user.v1.GetBDProfileRequest + 31, // 71: hyapp.user.v1.UserHostService.GetCoinSellerProfile:input_type -> hyapp.user.v1.GetCoinSellerProfileRequest + 33, // 72: hyapp.user.v1.UserHostService.ListActiveCoinSellersInMyRegion:input_type -> hyapp.user.v1.ListActiveCoinSellersInMyRegionRequest + 35, // 73: hyapp.user.v1.UserHostService.GetUserRoleSummary:input_type -> hyapp.user.v1.GetUserRoleSummaryRequest + 37, // 74: hyapp.user.v1.UserHostService.GetAgency:input_type -> hyapp.user.v1.GetAgencyRequest + 39, // 75: hyapp.user.v1.UserHostService.CheckBusinessCapability:input_type -> hyapp.user.v1.CheckBusinessCapabilityRequest + 41, // 76: hyapp.user.v1.UserHostService.GetAgencyMembers:input_type -> hyapp.user.v1.GetAgencyMembersRequest + 43, // 77: hyapp.user.v1.UserHostService.GetAgencyApplications:input_type -> hyapp.user.v1.GetAgencyApplicationsRequest + 45, // 78: hyapp.user.v1.UserHostAdminService.CreateBDLeader:input_type -> hyapp.user.v1.CreateBDLeaderRequest + 47, // 79: hyapp.user.v1.UserHostAdminService.CreateBD:input_type -> hyapp.user.v1.CreateBDRequest + 49, // 80: hyapp.user.v1.UserHostAdminService.SetBDStatus:input_type -> hyapp.user.v1.SetBDStatusRequest + 51, // 81: hyapp.user.v1.UserHostAdminService.CreateCoinSeller:input_type -> hyapp.user.v1.CreateCoinSellerRequest + 53, // 82: hyapp.user.v1.UserHostAdminService.SetCoinSellerStatus:input_type -> hyapp.user.v1.SetCoinSellerStatusRequest + 55, // 83: hyapp.user.v1.UserHostAdminService.CreateAgency:input_type -> hyapp.user.v1.CreateAgencyRequest + 57, // 84: hyapp.user.v1.UserHostAdminService.CloseAgency:input_type -> hyapp.user.v1.CloseAgencyRequest + 59, // 85: hyapp.user.v1.UserHostAdminService.SetAgencyJoinEnabled:input_type -> hyapp.user.v1.SetAgencyJoinEnabledRequest + 10, // 86: hyapp.user.v1.UserHostService.SearchAgencies:output_type -> hyapp.user.v1.SearchAgenciesResponse + 12, // 87: hyapp.user.v1.UserHostService.ApplyToAgency:output_type -> hyapp.user.v1.ApplyToAgencyResponse + 14, // 88: hyapp.user.v1.UserHostService.ReviewAgencyApplication:output_type -> hyapp.user.v1.ReviewAgencyApplicationResponse + 16, // 89: hyapp.user.v1.UserHostService.KickAgencyHost:output_type -> hyapp.user.v1.KickAgencyHostResponse + 18, // 90: hyapp.user.v1.UserHostService.InviteAgency:output_type -> hyapp.user.v1.InviteAgencyResponse + 20, // 91: hyapp.user.v1.UserHostService.InviteBD:output_type -> hyapp.user.v1.InviteBDResponse + 22, // 92: hyapp.user.v1.UserHostService.ListBDLeaderBDs:output_type -> hyapp.user.v1.ListBDLeaderBDsResponse + 24, // 93: hyapp.user.v1.UserHostService.ListBDLeaderAgencies:output_type -> hyapp.user.v1.ListBDLeaderAgenciesResponse + 26, // 94: hyapp.user.v1.UserHostService.ProcessRoleInvitation:output_type -> hyapp.user.v1.ProcessRoleInvitationResponse + 28, // 95: hyapp.user.v1.UserHostService.GetHostProfile:output_type -> hyapp.user.v1.GetHostProfileResponse + 30, // 96: hyapp.user.v1.UserHostService.GetBDProfile:output_type -> hyapp.user.v1.GetBDProfileResponse + 32, // 97: hyapp.user.v1.UserHostService.GetCoinSellerProfile:output_type -> hyapp.user.v1.GetCoinSellerProfileResponse + 34, // 98: hyapp.user.v1.UserHostService.ListActiveCoinSellersInMyRegion:output_type -> hyapp.user.v1.ListActiveCoinSellersInMyRegionResponse + 36, // 99: hyapp.user.v1.UserHostService.GetUserRoleSummary:output_type -> hyapp.user.v1.GetUserRoleSummaryResponse + 38, // 100: hyapp.user.v1.UserHostService.GetAgency:output_type -> hyapp.user.v1.GetAgencyResponse + 40, // 101: hyapp.user.v1.UserHostService.CheckBusinessCapability:output_type -> hyapp.user.v1.CheckBusinessCapabilityResponse + 42, // 102: hyapp.user.v1.UserHostService.GetAgencyMembers:output_type -> hyapp.user.v1.GetAgencyMembersResponse + 44, // 103: hyapp.user.v1.UserHostService.GetAgencyApplications:output_type -> hyapp.user.v1.GetAgencyApplicationsResponse + 46, // 104: hyapp.user.v1.UserHostAdminService.CreateBDLeader:output_type -> hyapp.user.v1.CreateBDLeaderResponse + 48, // 105: hyapp.user.v1.UserHostAdminService.CreateBD:output_type -> hyapp.user.v1.CreateBDResponse + 50, // 106: hyapp.user.v1.UserHostAdminService.SetBDStatus:output_type -> hyapp.user.v1.SetBDStatusResponse + 52, // 107: hyapp.user.v1.UserHostAdminService.CreateCoinSeller:output_type -> hyapp.user.v1.CreateCoinSellerResponse + 54, // 108: hyapp.user.v1.UserHostAdminService.SetCoinSellerStatus:output_type -> hyapp.user.v1.SetCoinSellerStatusResponse + 56, // 109: hyapp.user.v1.UserHostAdminService.CreateAgency:output_type -> hyapp.user.v1.CreateAgencyResponse + 58, // 110: hyapp.user.v1.UserHostAdminService.CloseAgency:output_type -> hyapp.user.v1.CloseAgencyResponse + 60, // 111: hyapp.user.v1.UserHostAdminService.SetAgencyJoinEnabled:output_type -> hyapp.user.v1.SetAgencyJoinEnabledResponse + 86, // [86:112] is the sub-list for method output_type + 60, // [60:86] is the sub-list for method input_type + 60, // [60:60] is the sub-list for extension type_name + 60, // [60:60] is the sub-list for extension extendee + 0, // [0:60] is the sub-list for field type_name } func init() { file_proto_user_v1_host_proto_init() } @@ -4604,7 +4857,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: 57, + NumMessages: 61, NumExtensions: 0, NumServices: 2, }, diff --git a/api/proto/user/v1/host.proto b/api/proto/user/v1/host.proto index d69d85bb..b18edc2d 100644 --- a/api/proto/user/v1/host.proto +++ b/api/proto/user/v1/host.proto @@ -221,6 +221,28 @@ message InviteBDResponse { RoleInvitation invitation = 1; } +message ListBDLeaderBDsRequest { + RequestMeta meta = 1; + int64 leader_user_id = 2; + string status = 3; + int32 page_size = 4; +} + +message ListBDLeaderBDsResponse { + repeated BDProfile bd_profiles = 1; +} + +message ListBDLeaderAgenciesRequest { + RequestMeta meta = 1; + int64 leader_user_id = 2; + string status = 3; + int32 page_size = 4; +} + +message ListBDLeaderAgenciesResponse { + repeated Agency agencies = 1; +} + message ProcessRoleInvitationRequest { RequestMeta meta = 1; string command_id = 2; @@ -438,6 +460,8 @@ service UserHostService { rpc KickAgencyHost(KickAgencyHostRequest) returns (KickAgencyHostResponse); rpc InviteAgency(InviteAgencyRequest) returns (InviteAgencyResponse); rpc InviteBD(InviteBDRequest) returns (InviteBDResponse); + rpc ListBDLeaderBDs(ListBDLeaderBDsRequest) returns (ListBDLeaderBDsResponse); + rpc ListBDLeaderAgencies(ListBDLeaderAgenciesRequest) returns (ListBDLeaderAgenciesResponse); 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 623dadb9..7765209f 100644 --- a/api/proto/user/v1/host_grpc.pb.go +++ b/api/proto/user/v1/host_grpc.pb.go @@ -25,6 +25,8 @@ 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_ListBDLeaderBDs_FullMethodName = "/hyapp.user.v1.UserHostService/ListBDLeaderBDs" + UserHostService_ListBDLeaderAgencies_FullMethodName = "/hyapp.user.v1.UserHostService/ListBDLeaderAgencies" UserHostService_ProcessRoleInvitation_FullMethodName = "/hyapp.user.v1.UserHostService/ProcessRoleInvitation" UserHostService_GetHostProfile_FullMethodName = "/hyapp.user.v1.UserHostService/GetHostProfile" UserHostService_GetBDProfile_FullMethodName = "/hyapp.user.v1.UserHostService/GetBDProfile" @@ -49,6 +51,8 @@ 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) + ListBDLeaderBDs(ctx context.Context, in *ListBDLeaderBDsRequest, opts ...grpc.CallOption) (*ListBDLeaderBDsResponse, error) + ListBDLeaderAgencies(ctx context.Context, in *ListBDLeaderAgenciesRequest, opts ...grpc.CallOption) (*ListBDLeaderAgenciesResponse, 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) @@ -129,6 +133,26 @@ func (c *userHostServiceClient) InviteBD(ctx context.Context, in *InviteBDReques 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) + err := c.cc.Invoke(ctx, UserHostService_ListBDLeaderBDs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userHostServiceClient) ListBDLeaderAgencies(ctx context.Context, in *ListBDLeaderAgenciesRequest, opts ...grpc.CallOption) (*ListBDLeaderAgenciesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListBDLeaderAgenciesResponse) + err := c.cc.Invoke(ctx, UserHostService_ListBDLeaderAgencies_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) @@ -241,6 +265,8 @@ type UserHostServiceServer interface { KickAgencyHost(context.Context, *KickAgencyHostRequest) (*KickAgencyHostResponse, error) InviteAgency(context.Context, *InviteAgencyRequest) (*InviteAgencyResponse, error) InviteBD(context.Context, *InviteBDRequest) (*InviteBDResponse, error) + ListBDLeaderBDs(context.Context, *ListBDLeaderBDsRequest) (*ListBDLeaderBDsResponse, error) + ListBDLeaderAgencies(context.Context, *ListBDLeaderAgenciesRequest) (*ListBDLeaderAgenciesResponse, error) ProcessRoleInvitation(context.Context, *ProcessRoleInvitationRequest) (*ProcessRoleInvitationResponse, error) GetHostProfile(context.Context, *GetHostProfileRequest) (*GetHostProfileResponse, error) GetBDProfile(context.Context, *GetBDProfileRequest) (*GetBDProfileResponse, error) @@ -279,6 +305,12 @@ 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) ListBDLeaderBDs(context.Context, *ListBDLeaderBDsRequest) (*ListBDLeaderBDsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListBDLeaderBDs not implemented") +} +func (UnimplementedUserHostServiceServer) ListBDLeaderAgencies(context.Context, *ListBDLeaderAgenciesRequest) (*ListBDLeaderAgenciesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListBDLeaderAgencies not implemented") +} func (UnimplementedUserHostServiceServer) ProcessRoleInvitation(context.Context, *ProcessRoleInvitationRequest) (*ProcessRoleInvitationResponse, error) { return nil, status.Error(codes.Unimplemented, "method ProcessRoleInvitation not implemented") } @@ -438,6 +470,42 @@ func _UserHostService_InviteBD_Handler(srv interface{}, ctx context.Context, dec 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 { + return nil, err + } + if interceptor == nil { + return srv.(UserHostServiceServer).ListBDLeaderBDs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserHostService_ListBDLeaderBDs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserHostServiceServer).ListBDLeaderBDs(ctx, req.(*ListBDLeaderBDsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserHostService_ListBDLeaderAgencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBDLeaderAgenciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserHostServiceServer).ListBDLeaderAgencies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserHostService_ListBDLeaderAgencies_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserHostServiceServer).ListBDLeaderAgencies(ctx, req.(*ListBDLeaderAgenciesRequest)) + } + 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 { @@ -649,6 +717,14 @@ var UserHostService_ServiceDesc = grpc.ServiceDesc{ MethodName: "InviteBD", Handler: _UserHostService_InviteBD_Handler, }, + { + MethodName: "ListBDLeaderBDs", + Handler: _UserHostService_ListBDLeaderBDs_Handler, + }, + { + MethodName: "ListBDLeaderAgencies", + Handler: _UserHostService_ListBDLeaderAgencies_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 b5ac0aff..c1d14479 100644 --- a/services/gateway-service/internal/client/user_client.go +++ b/services/gateway-service/internal/client/user_client.go @@ -69,6 +69,10 @@ type UserCountryQueryClient interface { type UserHostClient interface { SearchAgencies(ctx context.Context, req *userv1.SearchAgenciesRequest) (*userv1.SearchAgenciesResponse, error) 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) + ListBDLeaderBDs(ctx context.Context, req *userv1.ListBDLeaderBDsRequest) (*userv1.ListBDLeaderBDsResponse, error) + ListBDLeaderAgencies(ctx context.Context, req *userv1.ListBDLeaderAgenciesRequest) (*userv1.ListBDLeaderAgenciesResponse, 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) @@ -315,6 +319,22 @@ func (c *grpcUserHostClient) ApplyToAgency(ctx context.Context, req *userv1.Appl return c.client.ApplyToAgency(ctx, req) } +func (c *grpcUserHostClient) InviteAgency(ctx context.Context, req *userv1.InviteAgencyRequest) (*userv1.InviteAgencyResponse, error) { + return c.client.InviteAgency(ctx, req) +} + +func (c *grpcUserHostClient) InviteBD(ctx context.Context, req *userv1.InviteBDRequest) (*userv1.InviteBDResponse, error) { + return c.client.InviteBD(ctx, req) +} + +func (c *grpcUserHostClient) ListBDLeaderBDs(ctx context.Context, req *userv1.ListBDLeaderBDsRequest) (*userv1.ListBDLeaderBDsResponse, error) { + return c.client.ListBDLeaderBDs(ctx, req) +} + +func (c *grpcUserHostClient) ListBDLeaderAgencies(ctx context.Context, req *userv1.ListBDLeaderAgenciesRequest) (*userv1.ListBDLeaderAgenciesResponse, error) { + return c.client.ListBDLeaderAgencies(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 7fda6ab5..68447200 100644 --- a/services/gateway-service/internal/transport/http/httproutes/router.go +++ b/services/gateway-service/internal/transport/http/httproutes/router.go @@ -79,6 +79,11 @@ type UserHandlers struct { ListAgencyCenterApplications http.HandlerFunc ReviewAgencyCenterApplication http.HandlerFunc RemoveAgencyCenterHost http.HandlerFunc + GetBDLeaderCenterOverview http.HandlerFunc + ListBDLeaderCenterBDs http.HandlerFunc + ListBDLeaderCenterAgencies http.HandlerFunc + InviteBDLeaderBD http.HandlerFunc + InviteBDLeaderAgency http.HandlerFunc CompleteMyOnboarding http.HandlerFunc UpdateMyProfile http.HandlerFunc ChangeMyCountry http.HandlerFunc @@ -310,6 +315,11 @@ 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("/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) + r.profile("/bd-leader/invitations/bd", http.MethodPost, h.InviteBDLeaderBD) + r.profile("/bd-leader/invitations/agency", http.MethodPost, h.InviteBDLeaderAgency) 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 a4f27e09..5744270b 100644 --- a/services/gateway-service/internal/transport/http/response_test.go +++ b/services/gateway-service/internal/transport/http/response_test.go @@ -395,6 +395,18 @@ type fakeUserHostClient struct { lastApplyAgency *userv1.ApplyToAgencyRequest applyAgencyResp *userv1.ApplyToAgencyResponse applyAgencyErr error + lastInviteAgency *userv1.InviteAgencyRequest + inviteAgencyResp *userv1.InviteAgencyResponse + inviteAgencyErr error + lastInviteBD *userv1.InviteBDRequest + inviteBDResp *userv1.InviteBDResponse + inviteBDErr error + lastLeaderBDs *userv1.ListBDLeaderBDsRequest + leaderBDsResp *userv1.ListBDLeaderBDsResponse + leaderBDsErr error + lastLeaderAgencies *userv1.ListBDLeaderAgenciesRequest + leaderAgenciesResp *userv1.ListBDLeaderAgenciesResponse + leaderAgenciesErr error last *userv1.GetCoinSellerProfileRequest profile *userv1.CoinSellerProfile err error @@ -1082,6 +1094,50 @@ func (f *fakeUserHostClient) ApplyToAgency(_ context.Context, req *userv1.ApplyT return &userv1.ApplyToAgencyResponse{}, nil } +func (f *fakeUserHostClient) InviteAgency(_ context.Context, req *userv1.InviteAgencyRequest) (*userv1.InviteAgencyResponse, error) { + f.lastInviteAgency = req + if f.inviteAgencyErr != nil { + return nil, f.inviteAgencyErr + } + if f.inviteAgencyResp != nil { + return f.inviteAgencyResp, nil + } + return &userv1.InviteAgencyResponse{}, nil +} + +func (f *fakeUserHostClient) InviteBD(_ context.Context, req *userv1.InviteBDRequest) (*userv1.InviteBDResponse, error) { + f.lastInviteBD = req + if f.inviteBDErr != nil { + return nil, f.inviteBDErr + } + if f.inviteBDResp != nil { + return f.inviteBDResp, nil + } + return &userv1.InviteBDResponse{}, nil +} + +func (f *fakeUserHostClient) ListBDLeaderBDs(_ context.Context, req *userv1.ListBDLeaderBDsRequest) (*userv1.ListBDLeaderBDsResponse, error) { + f.lastLeaderBDs = req + if f.leaderBDsErr != nil { + return nil, f.leaderBDsErr + } + if f.leaderBDsResp != nil { + return f.leaderBDsResp, nil + } + return &userv1.ListBDLeaderBDsResponse{}, nil +} + +func (f *fakeUserHostClient) ListBDLeaderAgencies(_ context.Context, req *userv1.ListBDLeaderAgenciesRequest) (*userv1.ListBDLeaderAgenciesResponse, error) { + f.lastLeaderAgencies = req + if f.leaderAgenciesErr != nil { + return nil, f.leaderAgenciesErr + } + if f.leaderAgenciesResp != nil { + return f.leaderAgenciesResp, nil + } + return &userv1.ListBDLeaderAgenciesResponse{}, nil +} + func (f *fakeUserHostClient) GetHostProfile(_ context.Context, req *userv1.GetHostProfileRequest) (*userv1.GetHostProfileResponse, error) { f.lastHost = req if f.hostErr != nil { 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 new file mode 100644 index 00000000..460dbddc --- /dev/null +++ b/services/gateway-service/internal/transport/http/userapi/bd_leader_center_handler.go @@ -0,0 +1,363 @@ +package userapi + +import ( + "net/http" + "strconv" + "strings" + + userv1 "hyapp.local/api/proto/user/v1" + "hyapp/services/gateway-service/internal/auth" + "hyapp/services/gateway-service/internal/transport/http/httpkit" +) + +const ( + adminSalaryAssetType = "ADMIN_SALARY_USD" + bdStatusActive = "active" +) + +type bdLeaderProfileData struct { + UserID string `json:"user_id"` + Role string `json:"role"` + RegionID int64 `json:"region_id"` + ParentLeaderUserID string `json:"parent_leader_user_id,omitempty"` + Status string `json:"status"` + CreatedByUserID string `json:"created_by_user_id,omitempty"` + CreatedAtMS int64 `json:"created_at_ms"` + UpdatedAtMS int64 `json:"updated_at_ms"` +} + +func (h *Handler) getBDLeaderCenterOverview(writer http.ResponseWriter, request *http.Request) { + userID := auth.UserIDFromContext(request.Context()) + profile, ok := h.resolveActiveBDLeader(writer, request, userID) + if !ok { + return + } + if h.walletClient == nil { + httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") + return + } + + users, err := h.userProfiles(request, []int64{userID}) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + salary, err := h.salaryBalance(request, userID, adminSalaryAssetType) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + bdResp, err := h.userHostClient.ListBDLeaderBDs(request.Context(), &userv1.ListBDLeaderBDsRequest{ + Meta: httpkit.UserMeta(request, ""), + LeaderUserId: userID, + Status: bdStatusActive, + PageSize: 100, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + agencyResp, err := h.userHostClient.ListBDLeaderAgencies(request.Context(), &userv1.ListBDLeaderAgenciesRequest{ + Meta: httpkit.UserMeta(request, ""), + LeaderUserId: userID, + Status: agencyStatusActive, + PageSize: 100, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + + httpkit.WriteOK(writer, request, map[string]any{ + "profile": users[userID], + "bd_profile": bdLeaderProfileFromProto(profile), + "salary": salary, + "overview": map[string]any{ + "total_bd": len(bdResp.GetBdProfiles()), + "total_agency": len(agencyResp.GetAgencies()), + }, + }) +} + +func (h *Handler) listBDLeaderCenterBDs(writer http.ResponseWriter, request *http.Request) { + userID := auth.UserIDFromContext(request.Context()) + if _, ok := h.resolveActiveBDLeader(writer, request, userID); !ok { + return + } + pageSize := queryPageSize(request, 20) + resp, err := h.userHostClient.ListBDLeaderBDs(request.Context(), &userv1.ListBDLeaderBDsRequest{ + Meta: httpkit.UserMeta(request, ""), + LeaderUserId: userID, + Status: bdStatusActive, + PageSize: int32(pageSize), + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + agencyResp, err := h.userHostClient.ListBDLeaderAgencies(request.Context(), &userv1.ListBDLeaderAgenciesRequest{ + Meta: httpkit.UserMeta(request, ""), + LeaderUserId: userID, + Status: agencyStatusActive, + PageSize: 100, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + agencyCounts := make(map[int64]int) + for _, agency := range agencyResp.GetAgencies() { + agencyCounts[agency.GetParentBdUserId()]++ + } + + userIDs := make([]int64, 0, len(resp.GetBdProfiles())) + for _, profile := range resp.GetBdProfiles() { + userIDs = append(userIDs, profile.GetUserId()) + } + users, err := h.userProfiles(request, userIDs) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + + items := make([]map[string]any, 0, len(resp.GetBdProfiles())) + for _, profile := range resp.GetBdProfiles() { + user := users[profile.GetUserId()] + items = append(items, map[string]any{ + "user_id": int64String(profile.GetUserId()), + "display_user_id": user.DisplayUserID, + "username": user.Username, + "avatar": user.Avatar, + "role": profile.GetRole(), + "status": profile.GetStatus(), + "region_id": profile.GetRegionId(), + "agency_count": agencyCounts[profile.GetUserId()], + }) + } + httpkit.WriteOK(writer, request, map[string]any{"items": items, "total": len(items)}) +} + +func (h *Handler) listBDLeaderCenterAgencies(writer http.ResponseWriter, request *http.Request) { + userID := auth.UserIDFromContext(request.Context()) + if _, ok := h.resolveActiveBDLeader(writer, request, userID); !ok { + return + } + pageSize := queryPageSize(request, 20) + resp, err := h.userHostClient.ListBDLeaderAgencies(request.Context(), &userv1.ListBDLeaderAgenciesRequest{ + Meta: httpkit.UserMeta(request, ""), + LeaderUserId: userID, + Status: agencyStatusActive, + PageSize: int32(pageSize), + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + + userIDs := make([]int64, 0, len(resp.GetAgencies())) + for _, agency := range resp.GetAgencies() { + userIDs = append(userIDs, agency.GetOwnerUserId(), agency.GetParentBdUserId()) + } + users, err := h.userProfiles(request, userIDs) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + + items := make([]map[string]any, 0, len(resp.GetAgencies())) + for _, agency := range resp.GetAgencies() { + membersResp, err := h.userHostClient.GetAgencyMembers(request.Context(), &userv1.GetAgencyMembersRequest{ + Meta: httpkit.UserMeta(request, ""), + AgencyId: agency.GetAgencyId(), + Status: membershipStatusActive, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + owner := users[agency.GetOwnerUserId()] + parentBD := users[agency.GetParentBdUserId()] + items = append(items, map[string]any{ + "agency": hostAgencyFromProto(agency), + "owner": owner, + "parent_bd": parentBD, + "host_count": len(membersResp.GetMemberships()), + "created_at_ms": agency.GetCreatedAtMs(), + }) + } + httpkit.WriteOK(writer, request, map[string]any{"items": items, "total": len(items)}) +} + +func (h *Handler) inviteBDLeaderBD(writer http.ResponseWriter, request *http.Request) { + h.inviteBDLeaderRole(writer, request, "bd") +} + +func (h *Handler) inviteBDLeaderAgency(writer http.ResponseWriter, request *http.Request) { + h.inviteBDLeaderRole(writer, request, "agency") +} + +func (h *Handler) inviteBDLeaderRole(writer http.ResponseWriter, request *http.Request, role string) { + userID := auth.UserIDFromContext(request.Context()) + if _, ok := h.resolveActiveBDLeader(writer, request, userID); !ok { + return + } + var body map[string]any + if !httpkit.Decode(writer, request, &body) { + return + } + commandID := stringJSONValue(body["command_id"]) + targetUserID := int64JSONValue(body["target_user_id"]) + if commandID == "" || targetUserID <= 0 { + httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") + return + } + + if role == "bd" { + resp, err := h.userHostClient.InviteBD(request.Context(), &userv1.InviteBDRequest{ + Meta: httpkit.UserMeta(request, ""), + CommandId: commandID, + InviterUserId: userID, + TargetUserId: targetUserID, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + httpkit.WriteOK(writer, request, map[string]any{"invitation": roleInvitationData(resp.GetInvitation())}) + return + } + + agencyName := stringJSONValue(body["agency_name"]) + if agencyName == "" { + users, err := h.userProfiles(request, []int64{targetUserID}) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + target := users[targetUserID] + agencyName = firstBDLeaderNonBlank(target.Username, target.DisplayUserID, int64String(targetUserID)) + } + resp, err := h.userHostClient.InviteAgency(request.Context(), &userv1.InviteAgencyRequest{ + Meta: httpkit.UserMeta(request, ""), + CommandId: commandID, + InviterUserId: userID, + TargetUserId: targetUserID, + AgencyName: agencyName, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + httpkit.WriteOK(writer, request, map[string]any{"invitation": roleInvitationData(resp.GetInvitation())}) +} + +func (h *Handler) resolveActiveBDLeader(writer http.ResponseWriter, request *http.Request, userID int64) (*userv1.BDProfile, bool) { + if h.userHostClient == nil { + httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") + return nil, false + } + resp, err := h.userHostClient.GetBDProfile(request.Context(), &userv1.GetBDProfileRequest{ + Meta: httpkit.UserMeta(request, ""), + UserId: userID, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return nil, false + } + profile := resp.GetBdProfile() + if profile == nil || profile.GetRole() != "bd_leader" || profile.GetStatus() != bdStatusActive { + httpkit.WriteError(writer, request, http.StatusForbidden, httpkit.CodePermissionDenied, "permission denied") + return nil, false + } + return profile, true +} + +func bdLeaderProfileFromProto(profile *userv1.BDProfile) bdLeaderProfileData { + if profile == nil { + return bdLeaderProfileData{} + } + return bdLeaderProfileData{ + UserID: int64String(profile.GetUserId()), + Role: profile.GetRole(), + RegionID: profile.GetRegionId(), + ParentLeaderUserID: int64String(profile.GetParentLeaderUserId()), + Status: profile.GetStatus(), + CreatedByUserID: int64String(profile.GetCreatedByUserId()), + CreatedAtMS: profile.GetCreatedAtMs(), + UpdatedAtMS: profile.GetUpdatedAtMs(), + } +} + +func roleInvitationData(invitation *userv1.RoleInvitation) map[string]any { + if invitation == nil { + return map[string]any{} + } + return map[string]any{ + "invitation_id": int64String(invitation.GetInvitationId()), + "command_id": invitation.GetCommandId(), + "invitation_type": invitation.GetInvitationType(), + "status": invitation.GetStatus(), + "inviter_user_id": int64String(invitation.GetInviterUserId()), + "target_user_id": int64String(invitation.GetTargetUserId()), + "region_id": invitation.GetRegionId(), + "agency_name": invitation.GetAgencyName(), + "parent_bd_user_id": int64String(invitation.GetParentBdUserId()), + "parent_leader_user_id": int64String(invitation.GetParentLeaderUserId()), + "processed_by_user_id": int64String(invitation.GetProcessedByUserId()), + "process_reason": invitation.GetProcessReason(), + "processed_at_ms": invitation.GetProcessedAtMs(), + "created_at_ms": invitation.GetCreatedAtMs(), + "updated_at_ms": invitation.GetUpdatedAtMs(), + } +} + +func queryPageSize(request *http.Request, fallback int) int { + value, _ := strconv.Atoi(strings.TrimSpace(request.URL.Query().Get("page_size"))) + if value <= 0 { + value = fallback + } + if value > 100 { + return 100 + } + return value +} + +func stringJSONValue(value any) string { + switch v := value.(type) { + case string: + return strings.TrimSpace(v) + case float64: + return strconv.FormatInt(int64(v), 10) + case int64: + return strconv.FormatInt(v, 10) + case int: + return strconv.Itoa(v) + default: + return "" + } +} + +func int64JSONValue(value any) int64 { + switch v := value.(type) { + case string: + parsed, _ := strconv.ParseInt(strings.TrimSpace(v), 10, 64) + return parsed + case float64: + return int64(v) + case int64: + return v + case int: + return int64(v) + default: + return 0 + } +} + +func firstBDLeaderNonBlank(values ...string) string { + for _, value := range values { + if trimmed := strings.TrimSpace(value); trimmed != "" { + return trimmed + } + } + return "-" +} diff --git a/services/gateway-service/internal/transport/http/userapi/handler.go b/services/gateway-service/internal/transport/http/userapi/handler.go index 1411a46b..a94dcdd9 100644 --- a/services/gateway-service/internal/transport/http/userapi/handler.go +++ b/services/gateway-service/internal/transport/http/userapi/handler.go @@ -63,6 +63,11 @@ func (h *Handler) UserHandlers() httproutes.UserHandlers { ListAgencyCenterApplications: h.listAgencyCenterApplications, ReviewAgencyCenterApplication: h.reviewAgencyCenterApplication, RemoveAgencyCenterHost: h.removeAgencyCenterHost, + GetBDLeaderCenterOverview: h.getBDLeaderCenterOverview, + ListBDLeaderCenterBDs: h.listBDLeaderCenterBDs, + ListBDLeaderCenterAgencies: h.listBDLeaderCenterAgencies, + InviteBDLeaderBD: h.inviteBDLeaderBD, + InviteBDLeaderAgency: h.inviteBDLeaderAgency, CompleteMyOnboarding: h.completeMyOnboarding, UpdateMyProfile: h.updateMyProfile, ChangeMyCountry: h.changeMyCountry, diff --git a/services/user-service/internal/service/host/commands.go b/services/user-service/internal/service/host/commands.go index 51158198..f972624a 100644 --- a/services/user-service/internal/service/host/commands.go +++ b/services/user-service/internal/service/host/commands.go @@ -79,6 +79,9 @@ type InviteAgencyCommand struct { InviterUserID int64 TargetUserID int64 AgencyName string + AgencyID int64 + MembershipID int64 + EventID int64 NowMs int64 } @@ -95,9 +98,24 @@ type InviteBDCommand struct { InvitationID int64 InviterUserID int64 TargetUserID int64 + EventID int64 NowMs int64 } +// ListBDLeaderBDsCommand 描述 BD Leader 查询直属 BD 列表的条件。 +type ListBDLeaderBDsCommand struct { + LeaderUserID int64 + Status string + PageSize int +} + +// ListBDLeaderAgenciesCommand 描述 BD Leader 查询下级 Agency 列表的条件。 +type ListBDLeaderAgenciesCommand struct { + LeaderUserID int64 + Status string + PageSize int +} + // ProcessRoleInvitationInput 是处理角色邀请的外部输入。 type ProcessRoleInvitationInput struct { CommandID string diff --git a/services/user-service/internal/service/host/service.go b/services/user-service/internal/service/host/service.go index 9fa9a910..8d2c2e0a 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) + ListBDLeaderBDs(ctx context.Context, command ListBDLeaderBDsCommand) ([]hostdomain.BDProfile, error) + ListBDLeaderAgencies(ctx context.Context, command ListBDLeaderAgenciesCommand) ([]hostdomain.Agency, error) ProcessRoleInvitation(ctx context.Context, command ProcessRoleInvitationCommand) (hostdomain.ProcessRoleInvitationResult, error) CreateBDLeader(ctx context.Context, command CreateBDLeaderCommand) (hostdomain.BDProfile, error) CreateBD(ctx context.Context, command CreateBDCommand) (hostdomain.BDProfile, error) @@ -196,12 +198,12 @@ func (s *Service) GetAgency(ctx context.Context, agencyID int64) (hostdomain.Age return s.repository.GetAgency(ctx, agencyID) } -// InviteAgency 创建邀请用户成为 Agency 拥有者的待处理邀请。 +// InviteAgency 由 BD 直接创建用户的 Agency owner 身份,不再等待目标用户确认。 func (s *Service) InviteAgency(ctx context.Context, command InviteAgencyInput) (hostdomain.RoleInvitation, error) { if err := s.requireWriteDependencies(); err != nil { return hostdomain.RoleInvitation{}, err } - // Agency 名称在邀请创建时固化,接受时用这份快照创建 Agency。 + // Agency 名称在邀请动作里固化;持久化层会在同一事务中写 accepted invitation、Agency、owner Host 和 owner membership。 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") @@ -214,16 +216,19 @@ 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 负责人邀请用户成为 BD 的待处理邀请。 +// InviteBD 由 BD Leader 直接创建用户的 BD 身份,不再等待目标用户确认。 func (s *Service) InviteBD(ctx context.Context, command InviteBDInput) (hostdomain.RoleInvitation, error) { if err := s.requireWriteDependencies(); err != nil { return hostdomain.RoleInvitation{}, err } - // 负责人身份、区域、目标是否已有 BD 都交给持久化层在同一事务中校验。 + // 负责人身份、区域、目标是否已有 BD 都交给持久化层在同一事务中校验,并和 accepted invitation 一起提交。 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") } @@ -234,10 +239,41 @@ 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, }) } +// ListBDLeaderBDs 返回当前 BD Leader 直属的有效 BD 列表。 +func (s *Service) ListBDLeaderBDs(ctx context.Context, command ListBDLeaderBDsCommand) ([]hostdomain.BDProfile, error) { + if s.repository == nil { + return nil, xerr.New(xerr.Unavailable, "host repository is not configured") + } + if command.LeaderUserID <= 0 { + return nil, xerr.New(xerr.InvalidArgument, "leader_user_id is required") + } + return s.repository.ListBDLeaderBDs(ctx, ListBDLeaderBDsCommand{ + LeaderUserID: command.LeaderUserID, + Status: normalizeStatus(command.Status), + PageSize: normalizePageSize(command.PageSize), + }) +} + +// ListBDLeaderAgencies 返回当前 BD Leader 团队下的 Agency 列表。 +func (s *Service) ListBDLeaderAgencies(ctx context.Context, command ListBDLeaderAgenciesCommand) ([]hostdomain.Agency, error) { + if s.repository == nil { + return nil, xerr.New(xerr.Unavailable, "host repository is not configured") + } + if command.LeaderUserID <= 0 { + return nil, xerr.New(xerr.InvalidArgument, "leader_user_id is required") + } + return s.repository.ListBDLeaderAgencies(ctx, ListBDLeaderAgenciesCommand{ + LeaderUserID: command.LeaderUserID, + Status: normalizeStatus(command.Status), + PageSize: normalizePageSize(command.PageSize), + }) +} + // ProcessRoleInvitation 接受、拒绝或取消角色邀请。 func (s *Service) ProcessRoleInvitation(ctx context.Context, command ProcessRoleInvitationInput) (hostdomain.ProcessRoleInvitationResult, error) { if err := s.requireWriteDependencies(); err != nil { @@ -576,3 +612,13 @@ func normalizeAction(value string) string { func normalizeStatus(value string) string { return strings.ToLower(strings.TrimSpace(value)) } + +func normalizePageSize(value int) int { + if value <= 0 { + return 20 + } + if value > 100 { + return 100 + } + return value +} diff --git a/services/user-service/internal/service/host/service_test.go b/services/user-service/internal/service/host/service_test.go index 9462e76a..8ab15cdc 100644 --- a/services/user-service/internal/service/host/service_test.go +++ b/services/user-service/internal/service/host/service_test.go @@ -195,27 +195,23 @@ func TestAcceptAgencyInvitationCreatesOwnerHostAndRejectsActiveHost(t *testing.T if err != nil { t.Fatalf("InviteAgency failed: %v", err) } - accepted, err := svc.ProcessRoleInvitation(ctx, hostservice.ProcessRoleInvitationInput{ - CommandID: "accept-agency-601", - ActorUserID: 601, - InvitationID: invitation.InvitationID, - Action: hostdomain.InvitationActionAccept, - }) - if err != nil { - t.Fatalf("accept agency invitation failed: %v", err) + if invitation.Status != hostdomain.InvitationStatusAccepted { + t.Fatalf("agency invitation should be accepted immediately: %+v", invitation) } - if accepted.Agency.OwnerUserID != 601 || accepted.HostProfile.CurrentAgencyID != accepted.Agency.AgencyID || accepted.Membership.MembershipType != hostdomain.MembershipTypeOwner { - t.Fatalf("owner agency facts mismatch: %+v", accepted) - } - - blockedInvitation, err := svc.InviteAgency(ctx, hostservice.InviteAgencyInput{ - CommandID: "invite-agency-602", - InviterUserID: 501, - TargetUserID: 602, - AgencyName: "Blocked Agency", - }) + summary, err := svc.GetUserRoleSummary(ctx, 601) if err != nil { - t.Fatalf("InviteAgency for later active host failed: %v", err) + t.Fatalf("GetUserRoleSummary failed: %v", err) + } + agency, err := svc.GetAgency(ctx, summary.AgencyID) + if err != nil { + t.Fatalf("GetAgency failed: %v", err) + } + hostProfile, err := svc.GetHostProfile(ctx, 601) + if err != nil { + t.Fatalf("GetHostProfile failed: %v", err) + } + if !summary.IsAgency || !summary.IsHost || agency.OwnerUserID != 601 || hostProfile.CurrentAgencyID != agency.AgencyID { + t.Fatalf("owner agency facts mismatch: summary=%+v agency=%+v host=%+v", summary, agency, hostProfile) } repository.PutHostProfile(hostdomain.HostProfile{ UserID: 602, @@ -223,14 +219,14 @@ func TestAcceptAgencyInvitationCreatesOwnerHostAndRejectsActiveHost(t *testing.T RegionID: 10, Source: "test", }) - _, err = svc.ProcessRoleInvitation(ctx, hostservice.ProcessRoleInvitationInput{ - CommandID: "accept-agency-602", - ActorUserID: 602, - InvitationID: blockedInvitation.InvitationID, - Action: hostdomain.InvitationActionAccept, + _, err = svc.InviteAgency(ctx, hostservice.InviteAgencyInput{ + CommandID: "invite-agency-602", + InviterUserID: 501, + TargetUserID: 602, + AgencyName: "Blocked Agency", }) if got := xerr.CodeOf(err); got != xerr.Conflict { - t.Fatalf("active host must not accept agency invitation: got %s err=%v", got, err) + t.Fatalf("active host must not become agency owner: got %s err=%v", got, err) } } @@ -255,17 +251,15 @@ func TestAcceptBDInvitationDoesNotCreateHostProfile(t *testing.T) { if err != nil { t.Fatalf("InviteBD failed: %v", err) } - accepted, err := svc.ProcessRoleInvitation(ctx, hostservice.ProcessRoleInvitationInput{ - CommandID: "accept-bd-702", - ActorUserID: 702, - InvitationID: invitation.InvitationID, - Action: hostdomain.InvitationActionAccept, - }) - if err != nil { - t.Fatalf("accept bd invitation failed: %v", err) + if invitation.Status != hostdomain.InvitationStatusAccepted { + t.Fatalf("bd invitation should be accepted immediately: %+v", invitation) } - if accepted.BDProfile.UserID != 702 || accepted.BDProfile.Role != hostdomain.BDRoleBD || accepted.BDProfile.ParentLeaderUserID != 701 { - t.Fatalf("bd profile mismatch: %+v", accepted.BDProfile) + bdProfile, err := svc.GetBDProfile(ctx, 702) + if err != nil { + t.Fatalf("GetBDProfile failed: %v", err) + } + if bdProfile.UserID != 702 || bdProfile.Role != hostdomain.BDRoleBD || bdProfile.ParentLeaderUserID != 701 { + t.Fatalf("bd profile mismatch: %+v", bdProfile) } if _, err := svc.GetHostProfile(ctx, 702); xerr.CodeOf(err) != xerr.NotFound { t.Fatalf("becoming bd must not create host profile: err=%v", err) @@ -710,11 +704,11 @@ func TestGetUserRoleSummaryAggregatesRolesAndPendingInvitations(t *testing.T) { if !summary.IsHost || !summary.IsAgency || !summary.IsManager || !summary.IsBD || !summary.IsBDLeader || !summary.IsCoinSeller || summary.AgencyID != 933 || summary.BDID != 931 { t.Fatalf("role summary mismatch: %+v", summary) } - pending, err := svc.GetUserRoleSummary(ctx, 932) + directBD, err := svc.GetUserRoleSummary(ctx, 932) if err != nil { - t.Fatalf("GetUserRoleSummary pending failed: %v", err) + t.Fatalf("GetUserRoleSummary direct bd failed: %v", err) } - if pending.PendingRoleInvitations != 1 || pending.IsHost || pending.IsBD { - t.Fatalf("pending role summary mismatch: %+v", pending) + if directBD.PendingRoleInvitations != 0 || directBD.IsHost || !directBD.IsBD || directBD.BDID != 932 { + t.Fatalf("direct bd role summary mismatch: %+v", directBD) } } diff --git a/services/user-service/internal/storage/mysql/host/invitations.go b/services/user-service/internal/storage/mysql/host/invitations.go index a78b88a0..e6b2c604 100644 --- a/services/user-service/internal/storage/mysql/host/invitations.go +++ b/services/user-service/internal/storage/mysql/host/invitations.go @@ -69,7 +69,7 @@ func (r *Repository) InviteAgency(ctx context.Context, command hostservice.Invit InvitationID: command.InvitationID, CommandID: command.CommandID, InvitationType: hostdomain.InvitationTypeAgency, - Status: hostdomain.InvitationStatusPending, + Status: hostdomain.InvitationStatusAccepted, InviterUserID: command.InviterUserID, InviterBDUserID: inviter.UserID, TargetUserID: command.TargetUserID, @@ -77,13 +77,42 @@ 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, } - // 待处理邀请与 command_result 同事务写入,保证重复提交能按 invitation_id 回放。 + // 新邀请不再等待目标用户确认:accepted invitation、Agency、owner Host 和 owner membership 必须同事务提交。 if err := insertRoleInvitation(ctx, tx, invitation); err != nil { return hostdomain.RoleInvitation{}, mapHostDuplicateError(err) } + result := hostdomain.ProcessRoleInvitationResult{Invitation: invitation} + created, 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 created { + 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, @@ -145,19 +174,37 @@ func (r *Repository) InviteBD(ctx context.Context, command hostservice.InviteBDC InvitationID: command.InvitationID, CommandID: command.CommandID, InvitationType: hostdomain.InvitationTypeBD, - Status: hostdomain.InvitationStatusPending, + Status: hostdomain.InvitationStatusAccepted, InviterUserID: command.InviterUserID, InviterBDUserID: inviter.UserID, TargetUserID: command.TargetUserID, RegionID: inviter.RegionID, ParentLeaderUserID: inviter.UserID, + ProcessedByUserID: command.InviterUserID, + ProcessReason: "direct_invite", + ProcessedAtMs: command.NowMs, CreatedAtMs: command.NowMs, UpdatedAtMs: command.NowMs, } - // 这里只创建待处理邀请;真正的 BD 身份行在目标用户接受时再落库。 + // 新 BD 邀请直接创建 BD 身份;accepted invitation 只作为审计事实和幂等回放结果。 if err := insertRoleInvitation(ctx, tx, invitation); 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 { + return hostdomain.RoleInvitation{}, err + } + if err := insertHostOutbox(ctx, tx, command.EventID, "BDCreated", "bd_profile", invitation.TargetUserID, command.NowMs); err != nil { + return hostdomain.RoleInvitation{}, err + } if err := insertCommandResult(ctx, tx, hostdomain.CommandResult{ CommandID: command.CommandID, CommandType: hostdomain.CommandTypeInviteBD, diff --git a/services/user-service/internal/storage/mysql/host/queries.go b/services/user-service/internal/storage/mysql/host/queries.go index d592af01..ddf1234e 100644 --- a/services/user-service/internal/storage/mysql/host/queries.go +++ b/services/user-service/internal/storage/mysql/host/queries.go @@ -281,6 +281,50 @@ func (r *Repository) HasActiveAgencyOwner(ctx context.Context, userID int64) (in return agency.AgencyID, true, nil } +// ListBDLeaderBDs 读取 BD Leader 直属 BD;调用前先校验 leader 当前仍有效,避免停用后继续读取团队数据。 +func (r *Repository) ListBDLeaderBDs(ctx context.Context, command hostservice.ListBDLeaderBDsCommand) ([]hostdomain.BDProfile, error) { + leader, err := queryBDProfile(ctx, r.db, "WHERE user_id = ?", command.LeaderUserID) + if err != nil { + return nil, err + } + if leader.Status != hostdomain.BDStatusActive || leader.Role != hostdomain.BDRoleLeader { + return nil, xerr.New(xerr.PermissionDenied, "leader is not active") + } + status := command.Status + if status == "" { + status = hostdomain.BDStatusActive + } + clause, args := appScopedClause(ctx, "WHERE role = ? AND parent_leader_user_id = ? AND status = ? ORDER BY created_at_ms DESC, user_id DESC LIMIT ?", hostdomain.BDRoleBD, command.LeaderUserID, status, command.PageSize) + return queryBDProfiles(ctx, r.db, clause, args...) +} + +// ListBDLeaderAgencies 读取 BD Leader 团队 Agency;包含直属 leader 自己创建的 Agency 和下属 BD 创建的 Agency。 +func (r *Repository) ListBDLeaderAgencies(ctx context.Context, command hostservice.ListBDLeaderAgenciesCommand) ([]hostdomain.Agency, error) { + leader, err := queryBDProfile(ctx, r.db, "WHERE user_id = ?", command.LeaderUserID) + if err != nil { + return nil, err + } + if leader.Status != hostdomain.BDStatusActive || leader.Role != hostdomain.BDRoleLeader { + return nil, xerr.New(xerr.PermissionDenied, "leader is not active") + } + status := command.Status + if status == "" { + status = hostdomain.AgencyStatusActive + } + clause, args := appScopedClause(ctx, `WHERE status = ? AND ( + parent_bd_user_id = ? + OR parent_bd_user_id IN ( + SELECT user_id + FROM bd_profiles + WHERE app_code = agencies.app_code + AND role = ? + AND parent_leader_user_id = ? + AND status = ? + ) + ) ORDER BY created_at_ms DESC, agency_id DESC LIMIT ?`, status, command.LeaderUserID, hostdomain.BDRoleBD, command.LeaderUserID, hostdomain.BDStatusActive, command.PageSize) + return queryAgencies(ctx, r.db, clause, 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) @@ -373,6 +417,24 @@ func queryAgency(ctx context.Context, q sqlQueryer, clause string, args ...any) return agency, err } +func queryAgencies(ctx context.Context, q sqlQueryer, clause string, args ...any) ([]hostdomain.Agency, error) { + rows, err := q.QueryContext(ctx, fmt.Sprintf(`SELECT %s FROM agencies %s`, agencyColumns, clause), args...) + if err != nil { + return nil, err + } + defer rows.Close() + + agencies := make([]hostdomain.Agency, 0) + for rows.Next() { + agency, err := scanAgency(rows) + if err != nil { + return nil, err + } + agencies = append(agencies, agency) + } + return agencies, rows.Err() +} + func queryActiveAgencyByOwner(ctx context.Context, q sqlQueryer, ownerUserID int64, lock bool) (hostdomain.Agency, bool, error) { clause := "WHERE owner_user_id = ? AND status = ?" if lock { @@ -461,6 +523,24 @@ func queryBDProfile(ctx context.Context, q sqlQueryer, clause string, args ...an return profile, err } +func queryBDProfiles(ctx context.Context, q sqlQueryer, clause string, args ...any) ([]hostdomain.BDProfile, error) { + rows, err := q.QueryContext(ctx, fmt.Sprintf(`SELECT %s FROM bd_profiles %s`, bdProfileColumns, clause), args...) + if err != nil { + return nil, err + } + defer rows.Close() + + profiles := make([]hostdomain.BDProfile, 0) + for rows.Next() { + profile, err := scanBDProfile(rows) + if err != nil { + return nil, err + } + profiles = append(profiles, profile) + } + return profiles, rows.Err() +} + func queryBDProfileMaybe(ctx context.Context, q sqlQueryer, userID int64, lock bool) (hostdomain.BDProfile, bool, error) { clause := "WHERE user_id = ? AND status = ?" if lock { diff --git a/services/user-service/internal/transport/grpc/host.go b/services/user-service/internal/transport/grpc/host.go index 1e9f2a16..33ce2d29 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 拥有者的邀请。 +// 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,50 @@ func (s *Server) InviteBD(ctx context.Context, req *userv1.InviteBDRequest) (*us return &userv1.InviteBDResponse{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 { + return nil, xerr.ToGRPCError(xerr.New(xerr.Unavailable, "host service is not configured")) + } + ctx = contextWithApp(ctx, req.GetMeta()) + profiles, err := s.hostSvc.ListBDLeaderBDs(ctx, hostservice.ListBDLeaderBDsCommand{ + LeaderUserID: req.GetLeaderUserId(), + Status: req.GetStatus(), + PageSize: int(req.GetPageSize()), + }) + if err != nil { + return nil, xerr.ToGRPCError(err) + } + + resp := &userv1.ListBDLeaderBDsResponse{BdProfiles: make([]*userv1.BDProfile, 0, len(profiles))} + for _, profile := range profiles { + resp.BdProfiles = append(resp.BdProfiles, toProtoBDProfile(profile)) + } + return resp, nil +} + +// ListBDLeaderAgencies 返回当前 BD Leader 团队下的 Agency 列表。 +func (s *Server) ListBDLeaderAgencies(ctx context.Context, req *userv1.ListBDLeaderAgenciesRequest) (*userv1.ListBDLeaderAgenciesResponse, error) { + if s.hostSvc == nil { + return nil, xerr.ToGRPCError(xerr.New(xerr.Unavailable, "host service is not configured")) + } + ctx = contextWithApp(ctx, req.GetMeta()) + agencies, err := s.hostSvc.ListBDLeaderAgencies(ctx, hostservice.ListBDLeaderAgenciesCommand{ + LeaderUserID: req.GetLeaderUserId(), + Status: req.GetStatus(), + PageSize: int(req.GetPageSize()), + }) + if err != nil { + return nil, xerr.ToGRPCError(err) + } + + resp := &userv1.ListBDLeaderAgenciesResponse{Agencies: make([]*userv1.Agency, 0, len(agencies))} + for _, agency := range agencies { + resp.Agencies = append(resp.Agencies, toProtoAgency(agency)) + } + return resp, nil +} + // ProcessRoleInvitation 处理 Agency 或 BD 邀请。 func (s *Server) ProcessRoleInvitation(ctx context.Context, req *userv1.ProcessRoleInvitationRequest) (*userv1.ProcessRoleInvitationResponse, error) { if s.hostSvc == nil {