fix and update
This commit is contained in:
@@ -11,6 +11,12 @@ service AdminService {
|
||||
rpc SetSuperAdmin (SetSuperAdminRequest) returns (AdminUser);
|
||||
rpc SetUserVerification (SetUserVerificationRequest) returns (AdminUser);
|
||||
rpc ListVerificationIcons (Empty) returns (ListVerificationIconsResponse);
|
||||
rpc GetUserSignInHistory (GetUserInsightsRequest) returns (UserSignInHistoryResponse);
|
||||
rpc GetUserActivity (GetUserInsightsRequest) returns (UserActivityResponse);
|
||||
rpc ListUserChatRooms (GetUserInsightsRequest) returns (UserChatRoomsResponse);
|
||||
rpc ListUserChatMessages (ListUserChatMessagesRequest) returns (UserChatMessagesResponse);
|
||||
rpc SearchUserChatMessages (SearchUserChatMessagesRequest) returns (UserChatMessageSearchResponse);
|
||||
rpc AdminDeleteChatMessage (AdminDeleteChatMessageRequest) returns (Empty);
|
||||
}
|
||||
|
||||
message Empty {}
|
||||
@@ -83,3 +89,123 @@ message AdminUser {
|
||||
message ListUsersResponse {
|
||||
repeated AdminUser users = 1;
|
||||
}
|
||||
|
||||
message GetUserInsightsRequest {
|
||||
string userId = 1;
|
||||
optional string search = 2;
|
||||
optional int32 limit = 3;
|
||||
optional int32 offset = 4;
|
||||
}
|
||||
|
||||
message AdminSignInEvent {
|
||||
string id = 1;
|
||||
bool success = 2;
|
||||
optional string reason = 3;
|
||||
optional string ipAddress = 4;
|
||||
optional string userAgent = 5;
|
||||
optional string deviceName = 6;
|
||||
string createdAt = 7;
|
||||
}
|
||||
|
||||
message UserSignInHistoryResponse {
|
||||
int32 total = 1;
|
||||
repeated AdminSignInEvent events = 2;
|
||||
}
|
||||
|
||||
message UserActivityItem {
|
||||
string id = 1;
|
||||
string action = 2;
|
||||
string title = 3;
|
||||
optional string detail = 4;
|
||||
optional string entityType = 5;
|
||||
optional string entityId = 6;
|
||||
string createdAt = 7;
|
||||
}
|
||||
|
||||
message UserActivityResponse {
|
||||
int32 total = 1;
|
||||
repeated UserActivityItem items = 2;
|
||||
}
|
||||
|
||||
message AdminChatRoomMember {
|
||||
string id = 1;
|
||||
string displayName = 2;
|
||||
}
|
||||
|
||||
message AdminChatLastMessage {
|
||||
string id = 1;
|
||||
string senderName = 2;
|
||||
string preview = 3;
|
||||
string createdAt = 4;
|
||||
}
|
||||
|
||||
message AdminChatRoomSummary {
|
||||
string id = 1;
|
||||
string type = 2;
|
||||
string name = 3;
|
||||
string groupId = 4;
|
||||
string groupName = 5;
|
||||
int32 memberCount = 6;
|
||||
int32 messageCount = 7;
|
||||
repeated AdminChatRoomMember members = 8;
|
||||
optional AdminChatLastMessage lastMessage = 9;
|
||||
string joinedAt = 10;
|
||||
}
|
||||
|
||||
message UserChatRoomsResponse {
|
||||
int32 total = 1;
|
||||
repeated AdminChatRoomSummary rooms = 2;
|
||||
}
|
||||
|
||||
message ListUserChatMessagesRequest {
|
||||
string userId = 1;
|
||||
string roomId = 2;
|
||||
optional string search = 3;
|
||||
optional int32 limit = 4;
|
||||
optional string beforeMessageId = 5;
|
||||
}
|
||||
|
||||
message SearchUserChatMessagesRequest {
|
||||
string userId = 1;
|
||||
string search = 2;
|
||||
optional int32 limit = 3;
|
||||
optional int32 offset = 4;
|
||||
}
|
||||
|
||||
message AdminChatMessage {
|
||||
string id = 1;
|
||||
string senderId = 2;
|
||||
string senderName = 3;
|
||||
string type = 4;
|
||||
optional string content = 5;
|
||||
string preview = 6;
|
||||
bool isEncrypted = 7;
|
||||
bool isDeleted = 8;
|
||||
string createdAt = 9;
|
||||
optional string editedAt = 10;
|
||||
optional string roomId = 11;
|
||||
optional string roomName = 12;
|
||||
optional string groupName = 13;
|
||||
}
|
||||
|
||||
message AdminChatRoomContext {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string type = 3;
|
||||
string groupName = 4;
|
||||
}
|
||||
|
||||
message UserChatMessagesResponse {
|
||||
optional AdminChatRoomContext room = 1;
|
||||
repeated AdminChatMessage messages = 2;
|
||||
}
|
||||
|
||||
message UserChatMessageSearchResponse {
|
||||
int32 total = 1;
|
||||
repeated AdminChatMessage messages = 2;
|
||||
}
|
||||
|
||||
message AdminDeleteChatMessageRequest {
|
||||
string actorUserId = 1;
|
||||
string messageId = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user