import { DeviceType } from '../model/proto/constant/device_type'; import { ParsedModel } from '../model/parsed-model'; import { ProfileAccessStrategy } from '../model/proto/constant/profile_access_strategy'; import { ResponseAction } from '../model/proto/constant/response_action'; import Response from '../model/response'; import SessionCloseInfo from '../model/session-close-info'; import TurmsClient from '../turms-client'; import UserLocation from '../model/user-location'; import { UserStatus } from '../model/proto/constant/user_status'; export interface UserInfo { userId?: string; password?: string; deviceType?: DeviceType; deviceDetails?: Record; onlineStatus?: UserStatus; location?: UserLocation; } export default class UserService { private _turmsClient; private _stateStore; private _userInfo; private _storePassword; private _onOnlineListeners; private _onOfflineListeners; constructor(turmsClient: TurmsClient); get userInfo(): UserInfo; get isLoggedIn(): boolean; addOnOnlineListener(listener: () => void): void; addOnOfflineListener(listener: (sessionCloseInfo: SessionCloseInfo) => void): void; removeOnOnlineListener(listener: () => void): void; removeOnOfflineListener(listener: () => void): void; static getUserLocationFromBrowser(): Promise; login({ userId, password, deviceType, deviceDetails, onlineStatus, location, storePassword }: { userId: string; password?: string; deviceType?: string | DeviceType; deviceDetails?: Record; onlineStatus?: string | UserStatus; location?: GeolocationPosition | UserLocation; storePassword?: boolean; }): Promise>; private _connect; logout({ immediate }?: { immediate?: boolean; }): Promise>; updateOnlineStatus({ onlineStatus }: { onlineStatus: string | UserStatus; }): Promise>; disconnectOnlineDevices({ deviceTypes }: { deviceTypes: string[] | DeviceType[]; }): Promise>; updatePassword({ password }: { password: string; }): Promise>; updateProfile({ name, intro, profilePicture, profileAccessStrategy }: { name?: string; intro?: string; profilePicture?: string; profileAccessStrategy?: string | ProfileAccessStrategy; }): Promise>; queryUserProfiles({ userIds, lastUpdatedDate }: { userIds: string[]; lastUpdatedDate?: Date; }): Promise>; queryNearbyUsers({ latitude, longitude, maxCount, maxDistance, withCoordinates, withDistance, withUserInfo }: { latitude: number; longitude: number; maxCount?: number; maxDistance?: number; withCoordinates?: boolean; withDistance?: boolean; withUserInfo?: boolean; }): Promise>; queryOnlineStatusesRequest({ userIds }: { userIds: string[]; }): Promise>; queryRelationships({ relatedUserIds, isBlocked, groupIndexes, lastUpdatedDate }: { relatedUserIds?: string[]; isBlocked?: boolean; groupIndexes?: number[]; lastUpdatedDate?: Date; }): Promise>; queryRelatedUserIds({ isBlocked, groupIndexes, lastUpdatedDate }?: { isBlocked?: boolean; groupIndexes?: number[]; lastUpdatedDate?: Date; }): Promise>; queryFriends({ groupIndexes, lastUpdatedDate }?: { groupIndexes?: number[]; lastUpdatedDate?: Date; }): Promise>; queryBlockedUsers({ groupIndexes, lastUpdatedDate }?: { groupIndexes?: number[]; lastUpdatedDate?: Date; }): Promise>; createRelationship({ userId, isBlocked, groupIndex }: { userId: string; isBlocked: boolean; groupIndex?: number; }): Promise>; createFriendRelationship({ userId, groupIndex }: { userId: string; groupIndex?: number; }): Promise>; createBlockedUserRelationship({ userId, groupIndex }: { userId: string; groupIndex?: number; }): Promise>; deleteRelationship({ relatedUserId, deleteGroupIndex, targetGroupIndex }: { relatedUserId: string; deleteGroupIndex?: number; targetGroupIndex?: number; }): Promise>; updateRelationship({ relatedUserId, isBlocked, groupIndex }: { relatedUserId: string; isBlocked?: boolean; groupIndex?: number; }): Promise>; sendFriendRequest({ recipientId, content }: { recipientId: string; content: string; }): Promise>; replyFriendRequest({ requestId, responseAction, reason }: { requestId: string; responseAction: string | ResponseAction; reason?: string; }): Promise>; queryFriendRequests({ areSentByMe, lastUpdatedDate }: { areSentByMe: boolean; lastUpdatedDate?: Date; }): Promise>; createRelationshipGroup({ name }: { name: string; }): Promise>; deleteRelationshipGroups({ groupIndex, targetGroupIndex }: { groupIndex: number; targetGroupIndex?: number; }): Promise>; updateRelationshipGroup({ groupIndex, newName }: { groupIndex: number; newName: string; }): Promise>; queryRelationshipGroups({ lastUpdatedDate }?: { lastUpdatedDate?: Date; }): Promise>; moveRelatedUserToGroup({ relatedUserId, groupIndex }: { relatedUserId: string; groupIndex: number; }): Promise>; updateLocation({ latitude, longitude, details }: { latitude: number; longitude: number; details?: Record; }): Promise>; private static _parseDeviceType; private static _parseUserStatus; private _updateSharedUserInfo; private _changeToOnline; private _changeToOffline; } //# sourceMappingURL=user-service.d.ts.map