Variable ServerMessageSchemaConst
ServerMessageSchema: ZodDiscriminatedUnion<
[
ZodObject<
{
iceServers: ZodOptional<
ZodArray<
ZodObject<
{
credential: ZodOptional<ZodString>;
urls: ZodUnion<readonly [ZodString, ZodArray<(...)>]>;
username: ZodOptional<ZodString>;
},
$strip,
>,
>,
>;
localRole: ZodOptional<ZodString>;
peerId: ZodString;
peerMetadata: ZodOptional<
ZodRecord<ZodString, ZodRecord<ZodString, ZodString>>,
>;
peerRoles: ZodOptional<ZodRecord<ZodString, ZodString>>;
peers: ZodArray<ZodString>;
roomId: ZodString;
type: ZodLiteral<"room-joined">;
v: ZodOptional<ZodNumber>;
},
$strip,
>,
ZodObject<
{
metadata: ZodOptional<ZodRecord<ZodString, ZodString>>;
peerId: ZodString;
role: ZodOptional<ZodString>;
type: ZodLiteral<"peer-joined">;
},
$strip,
>,
ZodObject<{ peerId: ZodString; type: ZodLiteral<"peer-left"> }, $strip>,
],
"type",
> = ...
Zod schema describing every message the server sends to a client. A parsed value is a ServerMessage.