@univerjs-pro/collaboration-client v0.5.0-beta.1Docs


Class: MemberService

This services manages members is each rooms.

Extends

Constructors

new MemberService()

new MemberService(_univerInstanceService, _userManagerService): MemberService

Parameters

ParameterType
_univerInstanceServiceIUniverInstanceService
_userManagerServiceUserManagerService

Returns

MemberService

Overrides

Disposable.constructor

Defined in

packages/collaboration-client/src/services/member/member.service.ts:17

Properties

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

Methods

dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

packages/collaboration-client/src/services/member/member.service.ts:105


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


getCurrentUser()

getCurrentUser(): Nullable<IUser>

Returns

Nullable<IUser>

Deprecated

please use userManagerService

Defined in

packages/collaboration-client/src/services/member/member.service.ts:44


getMember()

getMember(roomID, memberID): undefined | Member

Get a member in a room(unit).

Parameters

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

Returns

undefined | Member

member object.

Defined in

packages/collaboration-client/src/services/member/member.service.ts:90


getRoom()

getRoom(roomID): undefined | RoomMember

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.

Defined in

packages/collaboration-client/src/services/member/member.service.ts:80


removeMember()

removeMember(roomID, memberID): void

Remove a member from a room(unit).

Parameters

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

Returns

void

Defined in

packages/collaboration-client/src/services/member/member.service.ts:68


setCurrentUser()

setCurrentUser(user): void

Parameters

ParameterType
userIUser

Returns

void

Deprecated

please use userManagerService

Defined in

packages/collaboration-client/src/services/member/member.service.ts:37


updateMember()

updateMember(roomID, member): void

Update a member in a room(unit).

Parameters

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

Returns

void

Defined in

packages/collaboration-client/src/services/member/member.service.ts:53