UNPKG

open-im-sdk-for-cocos

Version:
27 lines (26 loc) 2.2 kB
import type { GetUserInfoWithCacheParams } from '../types/params'; import OpenIMSDK from '.'; import type { MessageReceiveOptType } from '../types/enum'; import type { FullUserItemWithCache, SelfUserInfo, UserOnlineState, WsResponse } from '../types/entity'; export declare function setupUser(openIMSDK: OpenIMSDK): { getSelfUserInfo: (operationID?: string) => Promise<WsResponse<SelfUserInfo>>; setSelfInfo: (params: Partial<SelfUserInfo>, operationID?: string) => Promise<WsResponse<unknown>>; getUsersInfoWithCache: (params: GetUserInfoWithCacheParams, operationID?: string) => Promise<WsResponse<FullUserItemWithCache[]>>; subscribeUsersStatus: (params: string[], operationID?: string) => Promise<WsResponse<UserOnlineState>>; unsubscribeUsersStatus: (params: string[], operationID?: string) => Promise<WsResponse<unknown>>; getSubscribeUsersStatus: (operationID?: string) => Promise<WsResponse<UserOnlineState[]>>; setAppBackgroundStatus: (params: boolean, operationID?: string) => Promise<WsResponse<unknown>>; networkStatusChanged: (operationID?: string) => Promise<WsResponse<unknown>>; setGlobalRecvMessageOpt: (params: MessageReceiveOptType, operationID?: string) => Promise<WsResponse<unknown>>; }; export interface UserApi { getSelfUserInfo: (operationID?: string) => Promise<WsResponse<SelfUserInfo>>; setSelfInfo: (params: Partial<SelfUserInfo>, operationID?: string) => Promise<WsResponse<unknown>>; getUsersInfoWithCache: (params: GetUserInfoWithCacheParams, operationID?: string) => Promise<WsResponse<FullUserItemWithCache[]>>; subscribeUsersStatus: (params: string[], operationID?: string) => Promise<WsResponse<UserOnlineState>>; unsubscribeUsersStatus: (params: string[], operationID?: string) => Promise<WsResponse<unknown>>; getSubscribeUsersStatus: (operationID?: string) => Promise<WsResponse<UserOnlineState[]>>; setAppBackgroundStatus: (params: boolean, operationID?: string) => Promise<WsResponse<unknown>>; networkStatusChanged: (operationID?: string) => Promise<WsResponse<unknown>>; setGlobalRecvMessageOpt: (params: MessageReceiveOptType, operationID?: string) => Promise<WsResponse<unknown>>; }