typings: replace participantName with participantIdentity in event payloads for consistency

This commit is contained in:
juancarmore 2025-08-13 17:24:33 +02:00
parent 018f5b2bfa
commit f427a829b8
2 changed files with 13 additions and 15 deletions

View File

@ -2,24 +2,22 @@ import { ParticipantRole } from './participant.js';
import { MeetRoomPreferences } from './room-preferences.js';
export enum MeetSignalType {
MEET_ROOM_PREFERENCES_UPDATED = 'meet_room_preferences_updated',
MEET_PARTICIPANT_ROLE_UPDATED = 'meet_participant_role_updated',
MEET_ROOM_PREFERENCES_UPDATED = 'meet_room_preferences_updated',
MEET_PARTICIPANT_ROLE_UPDATED = 'meet_participant_role_updated'
}
export interface MeetRoomPreferencesUpdatedPayload {
roomId: string;
preferences: MeetRoomPreferences;
timestamp: number;
roomId: string;
preferences: MeetRoomPreferences;
timestamp: number;
}
export interface MeetParticipantRoleUpdatedPayload {
roomId: string;
participantName: string;
newRole: ParticipantRole;
timestamp: number;
secret: string;
roomId: string;
participantIdentity: string;
newRole: ParticipantRole;
secret?: string;
timestamp: number;
}
export type MeetSignalPayload =
| MeetRoomPreferencesUpdatedPayload
| MeetParticipantRoleUpdatedPayload;
export type MeetSignalPayload = MeetRoomPreferencesUpdatedPayload | MeetParticipantRoleUpdatedPayload;

View File

@ -48,11 +48,11 @@ export interface WebComponentEventPayloads {
[WebComponentEvent.READY]: {};
[WebComponentEvent.JOINED]: {
roomId: string;
participantName: string;
participantIdentity: string;
};
[WebComponentEvent.LEFT]: {
roomId: string;
participantName: string;
participantIdentity: string;
reason: LeftEventReason;
};
}