Class: Participant
A live Participant object. Every field from the API response is available
directly on the object (e.g. participant.displayName, participant.externalUserId),
and the object also exposes action methods (update(), delete(), watch()).
Extends
Constructors
new Participant()
Internal
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | ClientContext | - |
_projectId | string | - |
data | object | - |
data.displayName | string | Description Display name of the participant |
data.externalUserId | string | Description External User ID from ODIN (stable identifier) |
data.id | string | Description Unique identifier for the participant |
data.joinedAt | string | Format: date-time Description When the participant first joined any session in the project |
data.projectId | string | Description ODIN project ID this participant belongs to |
data.tenantId | string | Description Tenant ID |
data.userData | Record<string, never> | Description User data from ODIN (parsed JSON) |
Returns
Inherited from
ParticipantResponse.constructor
Defined in
4Players/cortex-typescript-sdk/src/resources/participants.ts:128
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
displayName | string | Description Display name of the participant | ParticipantResponse.displayName | 4Players/cortex-typescript-sdk/src/types.ts:3224 |
externalUserId | string | Description External User ID from ODIN (stable identifier) | ParticipantResponse.externalUserId | 4Players/cortex-typescript-sdk/src/types.ts:3226 |
id | string | Description Unique identifier for the participant | ParticipantResponse.id | 4Players/cortex-typescript-sdk/src/types.ts:3220 |
joinedAt | string | Format: date-time Description When the participant first joined any session in the project | ParticipantResponse.joinedAt | 4Players/cortex-typescript-sdk/src/types.ts:3235 |
projectId | string | Description ODIN project ID this participant belongs to | ParticipantResponse.projectId | 4Players/cortex-typescript-sdk/src/types.ts:3222 |
tenantId | string | Description Tenant ID | ParticipantResponse.tenantId | 4Players/cortex-typescript-sdk/src/types.ts:3228 |
userData | Record<string, never> | Description User data from ODIN (parsed JSON) | ParticipantResponse.userData | 4Players/cortex-typescript-sdk/src/types.ts:3230 |
Accessors
data
The raw API response object.
Deprecated
The response fields are now available directly on this object
(e.g. participant.displayName instead of participant.data.displayName).
This accessor will be removed before the stable release.
Returns
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:140
Methods
delete()
Delete this participant
Returns
Promise<void>
Defined in
4Players/cortex-typescript-sdk/src/resources/participants.ts:161
update()
Update this participant
Parameters
| Parameter | Type | Description |
|---|---|---|
body | object | Updated participant data |
body.displayName? | string | Description Display name of the participant |
body.userData? | Record<string, never> | Description User data from ODIN (parsed JSON) |
Returns
Promise<object>
Updated participant
| 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:149
watch()
Live-subscribe to this participant. current becomes undefined if deleted.
Returns
DocumentSubscription<object>
A DocumentSubscription for this participant
| 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:173