@openim/protocol
Version:
OpenIM protocol
342 lines (341 loc) • 10.6 kB
TypeScript
import { type Conversation } from "../conversation/conversation";
import { type RequestPagination, type UserInfo, type UserInfoWithEx } from "../sdkws/sdkws";
import { type StringValue } from "../wrapperspb/wrapperspb";
export declare const protobufPackage = "openim.user";
export interface getAllUserIDReq {
pagination: RequestPagination | undefined;
}
export interface getAllUserIDResp {
total: number;
userIDs: string[];
}
export interface accountCheckReq {
checkUserIDs: string[];
}
export interface accountCheckResp {
results: accountCheckResp_singleUserStatus[];
}
export interface accountCheckResp_singleUserStatus {
userID: string;
accountStatus: number;
}
export interface getDesignateUsersReq {
userIDs: string[];
}
export interface getDesignateUsersResp {
usersInfo: UserInfo[];
}
export interface updateUserInfoReq {
userInfo: UserInfo | undefined;
}
export interface updateUserInfoResp {
}
export interface updateUserInfoExReq {
userInfo: UserInfoWithEx | undefined;
}
export interface updateUserInfoExResp {
}
export interface setGlobalRecvMessageOptReq {
userID: string;
globalRecvMsgOpt: number;
}
export interface setGlobalRecvMessageOptResp {
}
export interface setConversationReq {
conversation: Conversation | undefined;
notificationType: number;
operationID: string;
}
export interface setConversationResp {
}
export interface setRecvMsgOptReq {
ownerUserID: string;
conversationID: string;
recvMsgOpt: number;
notificationType: number;
operationID: string;
}
export interface setRecvMsgOptResp {
}
export interface getConversationReq {
conversationID: string;
ownerUserID: string;
operationID: string;
}
export interface getConversationResp {
conversation: Conversation | undefined;
}
export interface getConversationsReq {
ownerUserID: string;
conversationIDs: string[];
operationID: string;
}
export interface getConversationsResp {
conversations: Conversation[];
}
export interface getAllConversationsReq {
ownerUserID: string;
operationID: string;
}
export interface getAllConversationsResp {
conversations: Conversation[];
}
export interface batchSetConversationsReq {
conversations: Conversation[];
OwnerUserID: string;
notificationType: number;
OperationID: string;
}
export interface batchSetConversationsResp {
Success: string[];
Failed: string[];
}
export interface getPaginationUsersReq {
pagination: RequestPagination | undefined;
userID: string;
nickName: string;
}
export interface getPaginationUsersResp {
total: number;
users: UserInfo[];
}
export interface userRegisterReq {
users: UserInfo[];
}
export interface userRegisterResp {
}
export interface getGlobalRecvMessageOptReq {
userID: string;
}
export interface getGlobalRecvMessageOptResp {
globalRecvMsgOpt: number;
}
export interface userRegisterCountReq {
start: number;
end: number;
}
export interface userRegisterCountResp {
total: number;
before: number;
count: {
[key: string]: number;
};
}
export interface userRegisterCountResp_CountEntry {
key: string;
value: number;
}
export interface subscribeOrCancelUsersStatusReq {
userID: string;
userIDs: string[];
genre: number;
}
export interface subscribeOrCancelUsersStatusResp {
statusList: onlineStatus[];
}
export interface getSubscribeUsersStatusReq {
userID: string;
}
export interface getSubscribeUsersStatusResp {
statusList: onlineStatus[];
}
export interface onlineStatus {
userID: string;
status: number;
platformIDs: number[];
}
export interface getUserStatusReq {
userID: string;
userIDs: string[];
}
export interface getUserStatusResp {
statusList: onlineStatus[];
}
export interface setUserStatusReq {
userID: string;
status: number;
platformID: number;
connID: string;
isBackground: boolean;
}
export interface setUserStatusResp {
}
export interface userOnlineStatus {
userID: string;
connID: string;
online: number[];
offline: number[];
}
export interface setUserOnlineStatusReq {
status: userOnlineStatus[];
}
export interface setUserOnlineStatusResp {
}
export interface processUserCommandAddReq {
userID: string;
type: number;
uuid: string;
value: StringValue | undefined;
ex: StringValue | undefined;
}
export interface processUserCommandAddResp {
}
export interface processUserCommandDeleteReq {
userID: string;
type: number;
uuid: string;
}
export interface processUserCommandDeleteResp {
}
export interface processUserCommandUpdateReq {
userID: string;
type: number;
uuid: string;
value: StringValue | undefined;
ex: StringValue | undefined;
}
export interface processUserCommandUpdateResp {
}
export interface processUserCommandGetReq {
userID: string;
type: number;
}
export interface CommandInfoResp {
type: number;
createTime: number;
uuid: string;
value: string;
ex: string;
}
export interface processUserCommandGetResp {
CommandResp: CommandInfoResp[];
}
export interface processUserCommandGetAllReq {
userID: string;
}
export interface AllCommandInfoResp {
type: number;
createTime: number;
uuid: string;
value: string;
ex: string;
}
export interface processUserCommandGetAllResp {
CommandResp: AllCommandInfoResp[];
}
export interface addNotificationAccountReq {
userID: string;
nickName: string;
faceURL: string;
}
export interface addNotificationAccountResp {
userID: string;
faceURL: string;
nickName: string;
}
export interface updateNotificationAccountInfoReq {
userID: string;
faceURL: string;
nickName: string;
}
export interface updateNotificationAccountInfoResp {
}
export interface searchNotificationAccountReq {
keyword: string;
pagination: RequestPagination | undefined;
}
export interface notificationAccountInfo {
userID: string;
faceURL: string;
nickName: string;
}
export interface searchNotificationAccountResp {
total: number;
notificationAccounts: notificationAccountInfo[];
}
export interface getNotificationAccountReq {
userID: string;
}
export interface getNotificationAccountResp {
}
export interface sortQueryReq {
asc: boolean;
userIDName: {
[key: string]: string;
};
}
export interface sortQueryReq_UserIDNameEntry {
key: string;
value: string;
}
export interface sortQueryResp {
users: UserInfo[];
}
export interface getGroupOnlineUserReq {
groupID: string;
desc: boolean;
pagination: RequestPagination | undefined;
}
export interface getGroupOnlineUserResp {
total: number;
userIDs: string[];
}
export interface getAllOnlineUsersReq {
cursor: number;
}
export interface getAllOnlineUsersResp {
StatusList: onlineStatus[];
nextCursor: number;
}
export interface user {
/** Get the specified user information full field */
getDesignateUsers(request: getDesignateUsersReq): Promise<getDesignateUsersResp>;
/** update user information */
updateUserInfo(request: updateUserInfoReq): Promise<updateUserInfoResp>;
updateUserInfoEx(request: updateUserInfoExReq): Promise<updateUserInfoExResp>;
/** Set user message receiving options */
setGlobalRecvMessageOpt(request: setGlobalRecvMessageOptReq): Promise<setGlobalRecvMessageOptResp>;
/** Get the user message receiving option If not found, no error will be returned */
getGlobalRecvMessageOpt(request: getGlobalRecvMessageOptReq): Promise<getGlobalRecvMessageOptResp>;
/** Check if userID exists */
accountCheck(request: accountCheckReq): Promise<accountCheckResp>;
/** Turn the page (or specify userID, nickname) to pull user information Full field */
getPaginationUsers(request: getPaginationUsersReq): Promise<getPaginationUsersResp>;
/** user registration */
userRegister(request: userRegisterReq): Promise<userRegisterResp>;
/** Get all user IDs */
getAllUserID(request: getAllUserIDReq): Promise<getAllUserIDResp>;
/** Get the total number of users and the user increment within a specified time period */
userRegisterCount(request: userRegisterCountReq): Promise<userRegisterCountResp>;
/** Subscribe or unsubscribe user presence */
subscribeOrCancelUsersStatus(request: subscribeOrCancelUsersStatusReq): Promise<subscribeOrCancelUsersStatusResp>;
/** Get the online status of subscribers */
getSubscribeUsersStatus(request: getSubscribeUsersStatusReq): Promise<getSubscribeUsersStatusResp>;
/** Get user online status */
getUserStatus(request: getUserStatusReq): Promise<getUserStatusResp>;
/** The gateway synchronizes the online status of users in redis */
setUserStatus(request: setUserStatusReq): Promise<setUserStatusResp>;
/** add a general function for add */
processUserCommandAdd(request: processUserCommandAddReq): Promise<processUserCommandAddResp>;
/** add a general function for update */
processUserCommandUpdate(request: processUserCommandUpdateReq): Promise<processUserCommandUpdateResp>;
/** add a general function for delete */
processUserCommandDelete(request: processUserCommandDeleteReq): Promise<processUserCommandDeleteResp>;
/** add a general function for get */
processUserCommandGet(request: processUserCommandGetReq): Promise<processUserCommandGetResp>;
/** add a general function for get all */
processUserCommandGetAll(request: processUserCommandGetAllReq): Promise<processUserCommandGetAllResp>;
/** add a system notification account */
addNotificationAccount(request: addNotificationAccountReq): Promise<addNotificationAccountResp>;
/** update the system notification info */
updateNotificationAccountInfo(request: updateNotificationAccountInfoReq): Promise<updateNotificationAccountInfoResp>;
/** search the system notification account */
searchNotificationAccount(request: searchNotificationAccountReq): Promise<searchNotificationAccountResp>;
/** getNotificationAccount by userID */
getNotificationAccount(request: getNotificationAccountReq): Promise<getNotificationAccountResp>;
sortQuery(request: sortQueryReq): Promise<sortQueryResp>;
setUserOnlineStatus(request: setUserOnlineStatusReq): Promise<setUserOnlineStatusResp>;
/** get all online users */
getGroupOnlineUser(request: getGroupOnlineUserReq): Promise<getGroupOnlineUserResp>;
getAllOnlineUsers(request: getAllOnlineUsersReq): Promise<getAllOnlineUsersResp>;
}