@univerjs-pro/collaboration-client v0.5.4


Class: MemberService

Defined in: packages/collaboration-client/src/services/member/member.service.ts:15

This services manages members is each rooms.

Extends

Constructors

new MemberService()

new MemberService(_univerInstanceService, _userManagerService): MemberService

Defined in: packages/collaboration-client/src/services/member/member.service.ts:19

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService
_userManagerServiceUserManagerService

Returns

MemberService

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96

Methods

dispose()

dispose(): void

Defined in: packages/collaboration-client/src/services/member/member.service.ts:116

Returns

void

Overrides

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


getCurrentUser()

getCurrentUser(): Nullable<IUser>

Defined in: packages/collaboration-client/src/services/member/member.service.ts:54

Returns

Nullable<IUser>

Deprecated

please use userManagerService


getMember()

getMember(roomID, memberID): undefined | Member

Defined in: packages/collaboration-client/src/services/member/member.service.ts:101

Get a member in a room(unit).

Parameters

ParameterTypeDescription
roomIDstringi.e. unitID.
memberIDstringmemberID of the member to be retrieved.

Returns

undefined | Member

member object.


getRoom()

getRoom(roomID): undefined | RoomMember

Defined in: packages/collaboration-client/src/services/member/member.service.ts:91

Get RoomMember for a unit.

Parameters

ParameterTypeDescription
roomIDstringwhich is same with unitId.

Returns

undefined | RoomMember

RoomMember which is a object that manages members in a single room.


removeMember()

removeMember(roomID, memberID): void

Defined in: packages/collaboration-client/src/services/member/member.service.ts:79

Remove a member from a room(unit).

Parameters

ParameterTypeDescription
roomIDstringi.e. unitID.
memberIDstringmemberID of the member to be removed.

Returns

void


setCurrentUser()

setCurrentUser(user): void

Defined in: packages/collaboration-client/src/services/member/member.service.ts:47

Parameters

ParameterType
userIUser

Returns

void

Deprecated

please use userManagerService


updateMember()

updateMember(roomID, member): void

Defined in: packages/collaboration-client/src/services/member/member.service.ts:63

Update a member in a room(unit).

Parameters

ParameterTypeDescription
roomIDstringi.e. unitID.
memberMembermember object to be updated.

Returns

void


waitForRoom$()

waitForRoom$(unitId): Observable<RoomMember>

Defined in: packages/collaboration-client/src/services/member/member.service.ts:32

Parameters

ParameterType
unitIdstring

Returns

Observable<RoomMember>