Class: ParticipantManager
Manages participants for a project.
Constructors
new ParticipantManager()
Internal
Parameters
| Parameter | Type |
|---|---|
ctx | ClientContext |
projectId | string |
Returns
Defined in
4Players/cortex-typescript-sdk/src/resources/participants.ts:29
Methods
create()
Create or find a participant
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Participant creation payload |
body.displayName? | string | Description Display name of the participant |
body.externalUserId | string | Description External User ID from ODIN (stable identifier) |
body.userData? | Record<string, never> | Description User data from ODIN (parsed JSON) |
Returns
Promise<Participant>
Live Participant object
Defined in
4Players/cortex-typescript-sdk/src/resources/participants.ts:53
get()
Get a participant by ID
Parameters
| Parameter | Type | Description |
|---|---|---|
participantId | string | Participant ID |
Returns
Promise<Participant>
Live Participant object
Defined in
4Players/cortex-typescript-sdk/src/resources/participants.ts:67
list()
List participants for this project
Parameters
| Parameter | Type | Description |
|---|---|---|
query? | object | Optional pagination and search filters |
query.limit? | number | Description Pagination limit |
query.offset? | number | Description Pagination offset |
query.search? | string | Description Search by display name or user ID |
Returns
Promise<object>
Participants list with total count
| Name | Type | Description | Defined in |
|---|---|---|---|
participants | object[] | Description List of participants | 4Players/cortex-typescript-sdk/src/types.ts:4274 |
total | number | Description Total count of participants | 4Players/cortex-typescript-sdk/src/types.ts:4276 |
Defined in
4Players/cortex-typescript-sdk/src/resources/participants.ts:39
watch()
watch()
Live-subscribe to participants. With no argument, watches the whole collection; with a participant ID, watches that single participant.
Returns
CollectionSubscription<object>
A CollectionSubscription (no id) or DocumentSubscription (with id)
| Name | Type | Description | Defined in |
|---|---|---|---|
displayName | string | Description Display name of the participant | 4Players/cortex-typescript-sdk/src/types.ts:3224 |
externalUserId | string | Description External User ID from ODIN (stable identifier) | 4Players/cortex-typescript-sdk/src/types.ts:3226 |
id | string | Description Unique identifier for the participant | 4Players/cortex-typescript-sdk/src/types.ts:3220 |
joinedAt | string | Format: date-time Description When the participant first joined any session in the project | 4Players/cortex-typescript-sdk/src/types.ts:3235 |
projectId | string | Description ODIN project ID this participant belongs to | 4Players/cortex-typescript-sdk/src/types.ts:3222 |
tenantId | string | Description Tenant ID | 4Players/cortex-typescript-sdk/src/types.ts:3228 |
userData | Record<string, never> | Description User data from ODIN (parsed JSON) | 4Players/cortex-typescript-sdk/src/types.ts:3230 |
Defined in
4Players/cortex-typescript-sdk/src/resources/participants.ts:81
watch(participantId)
Parameters
| Parameter | Type |
|---|---|
participantId | string |
Returns
DocumentSubscription<object>
| Name | Type | Description | Defined in |
|---|---|---|---|
displayName | string | Description Display name of the participant | 4Players/cortex-typescript-sdk/src/types.ts:3224 |
externalUserId | string | Description External User ID from ODIN (stable identifier) | 4Players/cortex-typescript-sdk/src/types.ts:3226 |
id | string | Description Unique identifier for the participant | 4Players/cortex-typescript-sdk/src/types.ts:3220 |
joinedAt | string | Format: date-time Description When the participant first joined any session in the project | 4Players/cortex-typescript-sdk/src/types.ts:3235 |
projectId | string | Description ODIN project ID this participant belongs to | 4Players/cortex-typescript-sdk/src/types.ts:3222 |
tenantId | string | Description Tenant ID | 4Players/cortex-typescript-sdk/src/types.ts:3228 |
userData | Record<string, never> | Description User data from ODIN (parsed JSON) | 4Players/cortex-typescript-sdk/src/types.ts:3230 |
Defined in
4Players/cortex-typescript-sdk/src/resources/participants.ts:82