import { z } from 'zod'; declare const MomentState: { readonly LIVE: "LIVE"; readonly ENDED: "ENDED"; }; type MomentState = (typeof MomentState)[keyof typeof MomentState]; /** * Host go-live request. All fields optional — a moment can go live * untitled. Any additional metadata (cover, tags) is out of scope for * MVP; add fields here as the product surface grows. */ declare const GoLiveMomentRequestSchema: z.ZodObject<{ title: z.ZodOptional; }, z.core.$strip>; /** * Broadcaster payload — everything the phone needs to point its * RTMP(S) publisher at the newly-provisioned channel. `streamKey` is * plaintext and MUST be treated as secret on the client (never log, * never render, never persist). Returned only on go-live and never * re-fetched. */ declare const GoLiveMomentResponseSchema: z.ZodObject<{ momentId: z.ZodUUID; state: z.ZodLiteral<"LIVE">; liveStartedAt: z.ZodISODateTime; ingestEndpoint: z.ZodURL; streamKey: z.ZodString; playbackUrl: z.ZodURL; }, z.core.$strip>; /** * Host live-console read for a moment. `playbackUrl` here is the raw * (unsigned) URL — hosts don't need a signed ticket to preview their * own stream. Viewer playback goes through the viewer endpoint. */ declare const HostMomentLivePayloadSchema: z.ZodObject<{ momentId: z.ZodUUID; state: z.ZodEnum<{ readonly LIVE: "LIVE"; readonly ENDED: "ENDED"; }>; liveStartedAt: z.ZodISODateTime; liveEndedAt: z.ZodNullable; viewers: z.ZodNumber; peakViewers: z.ZodNumber; playbackUrl: z.ZodNullable; serverNow: z.ZodISODateTime; }, z.core.$strip>; /** * Authenticated viewer playback payload. Access is gated on a valid * session — no anonymous consumers — but there is NO registration / * entitlement check. Any logged-in user with the moment link can watch. * On ENDED state the playback fields collapse to null and the FE * renders an empty state (rather than 404) so a shared link stays * informative after the host ends the stream. */ declare const ViewerMomentPayloadSchema: z.ZodObject<{ momentId: z.ZodUUID; state: z.ZodEnum<{ readonly LIVE: "LIVE"; readonly ENDED: "ENDED"; }>; title: z.ZodNullable; playbackUrl: z.ZodNullable; token: z.ZodNullable; tokenExpiresAt: z.ZodNullable; viewers: z.ZodNumber; liveStartedAt: z.ZodISODateTime; liveEndedAt: z.ZodNullable; }, z.core.$strip>; /** * Start a viewing session on a moment. Same shape as the Event * flow — the FE POSTs this once when the player mounts, receives a * server-issued `sessionId`, then opens the Socket.IO connection at * `/moment-viewing-session?sessionId=` and emits `heartbeat` every * ~30s. On teardown it calls the `end` endpoint. */ declare const StartMomentViewingSessionRequestSchema: z.ZodObject<{ deviceType: z.ZodOptional; }, z.core.$strip>; declare const StartMomentViewingSessionResponseSchema: z.ZodObject<{ sessionId: z.ZodString; }, z.core.$strip>; declare const EndMomentViewingSessionResponseSchema: z.ZodObject<{ durationSec: z.ZodNumber; }, z.core.$strip>; /** * WebSocket ACK for a `heartbeat` message. Mirrors the Event flow so * FE state machines can share a client. `reason` is set only when * `ok === false`; the socket is closed by the server on the same tick. */ declare const MomentViewingSessionHeartbeatAckSchema: z.ZodObject<{ ok: z.ZodBoolean; reason: z.ZodOptional>; }, z.core.$strip>; /** Client → server frame names on `/moment-viewing-session`. */ declare const MomentViewingSessionEvents: { readonly Heartbeat: "heartbeat"; }; type GoLiveMomentRequest = z.infer; type GoLiveMomentResponse = z.infer; type HostMomentLivePayload = z.infer; type ViewerMomentPayload = z.infer; type StartMomentViewingSessionRequest = z.infer; type StartMomentViewingSessionResponse = z.infer; type EndMomentViewingSessionResponse = z.infer; type MomentViewingSessionHeartbeatAck = z.infer; type MomentViewingSessionEventName = (typeof MomentViewingSessionEvents)[keyof typeof MomentViewingSessionEvents]; export { type EndMomentViewingSessionResponse, EndMomentViewingSessionResponseSchema, type GoLiveMomentRequest, GoLiveMomentRequestSchema, type GoLiveMomentResponse, GoLiveMomentResponseSchema, type HostMomentLivePayload, HostMomentLivePayloadSchema, MomentState, type MomentViewingSessionEventName, MomentViewingSessionEvents, type MomentViewingSessionHeartbeatAck, MomentViewingSessionHeartbeatAckSchema, type StartMomentViewingSessionRequest, StartMomentViewingSessionRequestSchema, type StartMomentViewingSessionResponse, StartMomentViewingSessionResponseSchema, type ViewerMomentPayload, ViewerMomentPayloadSchema };