Skip to main content

Class: ProjectUserManager

Manages users for a project.

Constructors

new ProjectUserManager()

new ProjectUserManager(ctx, projectId): ProjectUserManager

Internal

Parameters

ParameterType
ctxClientContext
projectIdstring

Returns

ProjectUserManager

Defined in

4Players/cortex-typescript-sdk/src/resources/users.ts:19

Methods

changeRole()

changeRole(body): Promise<void>

Change a project member's role

Parameters

ParameterTypeDescription
bodyobjectRole change payload (permissionId and new role)
body.permissionIdstringDescription The permission ID of the user (ProjectUserDto.id)
body.role"admin" | "maintainer" | "developer"Description New role to assign Example maintainer @enum {string}

Returns

Promise<void>

Defined in

4Players/cortex-typescript-sdk/src/resources/users.ts:67


invite()

invite(body): Promise<object>

Invite a user to this project

Parameters

ParameterTypeDescription
bodyobjectInvitation payload (email and role)
body.emailstringDescription Email address of the user to invite Example user@example.com
body.role"admin" | "maintainer" | "developer"Description Role to assign to the invited user Example developer @enum {string}

Returns

Promise<object>

Invited user

NameTypeDescriptionDefined in
created?stringDescription When the user was added to the project4Players/cortex-typescript-sdk/src/types.ts:2814
emailstringDescription Email address of the user4Players/cortex-typescript-sdk/src/types.ts:2802
idstringDescription Unique identifier for the user4Players/cortex-typescript-sdk/src/types.ts:2798
namestringDescription Display name of the user4Players/cortex-typescript-sdk/src/types.ts:2800
role"admin" | "maintainer" | "developer"Description The user's role within the project4Players/cortex-typescript-sdk/src/types.ts:2807
status"pending" | "active" | "revoked"Description Status of the user's project association4Players/cortex-typescript-sdk/src/types.ts:2812

Defined in

4Players/cortex-typescript-sdk/src/resources/users.ts:42


list()

list(): Promise<object[]>

List users for this project

Returns

Promise<object[]>

Array of project users

Defined in

4Players/cortex-typescript-sdk/src/resources/users.ts:28


remove()

remove(body): Promise<void>

Remove a user from this project

Parameters

ParameterTypeDescription
bodyobjectRemoval payload (permissionId)
body.permissionIdstringDescription The permission ID of the user to remove (ProjectUserDto.id)

Returns

Promise<void>

Defined in

4Players/cortex-typescript-sdk/src/resources/users.ts:55