Class: ProjectUserManager
Manages users for a project.
Constructors
new ProjectUserManager()
Internal
Parameters
| Parameter | Type |
|---|---|
ctx | ClientContext |
projectId | string |
Returns
Defined in
4Players/cortex-typescript-sdk/src/resources/users.ts:19
Methods
changeRole()
Change a project member's role
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Role change payload (permissionId and new role) |
body.permissionId | string | Description 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 a user to this project
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Invitation payload (email and role) |
body.email | string | Description 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
| Name | Type | Description | Defined in |
|---|---|---|---|
created? | string | Description When the user was added to the project | 4Players/cortex-typescript-sdk/src/types.ts:2814 |
email | string | Description Email address of the user | 4Players/cortex-typescript-sdk/src/types.ts:2802 |
id | string | Description Unique identifier for the user | 4Players/cortex-typescript-sdk/src/types.ts:2798 |
name | string | Description Display name of the user | 4Players/cortex-typescript-sdk/src/types.ts:2800 |
role | "admin" | "maintainer" | "developer" | Description The user's role within the project | 4Players/cortex-typescript-sdk/src/types.ts:2807 |
status | "pending" | "active" | "revoked" | Description Status of the user's project association | 4Players/cortex-typescript-sdk/src/types.ts:2812 |
Defined in
4Players/cortex-typescript-sdk/src/resources/users.ts:42
list()
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 a user from this project
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Removal payload (permissionId) |
body.permissionId | string | Description The permission ID of the user to remove (ProjectUserDto.id) |
Returns
Promise<void>
Defined in
4Players/cortex-typescript-sdk/src/resources/users.ts:55