import { z } from 'zod'; export declare const senderTypeSchema: z.ZodEnum<["system", "user"]>; export declare const realtimeChannelSchema: z.ZodObject<{ id: z.ZodString; pattern: z.ZodString; description: z.ZodNullable; webhookUrls: z.ZodNullable>; enabled: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { description: string | null; id: string; enabled: boolean; createdAt: string; updatedAt: string; pattern: string; webhookUrls: string[] | null; }, { description: string | null; id: string; enabled: boolean; createdAt: string; updatedAt: string; pattern: string; webhookUrls: string[] | null; }>; export type RealtimeChannel = z.infer; export declare const realtimeMessageSchema: z.ZodObject<{ id: z.ZodString; eventName: z.ZodString; channelId: z.ZodNullable; channelName: z.ZodString; payload: z.ZodRecord; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodNullable; wsAudienceCount: z.ZodNumber; whAudienceCount: z.ZodNumber; whDeliveredCount: z.ZodNumber; createdAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; createdAt: string; eventName: string; channelId: string | null; channelName: string; payload: Record; senderType: "user" | "system"; senderId: string | null; wsAudienceCount: number; whAudienceCount: number; whDeliveredCount: number; }, { id: string; createdAt: string; eventName: string; channelId: string | null; channelName: string; payload: Record; senderType: "user" | "system"; senderId: string | null; wsAudienceCount: number; whAudienceCount: number; whDeliveredCount: number; }>; export type RealtimeMessage = z.infer; export declare const realtimeConfigSchema: z.ZodObject<{ retentionDays: z.ZodNullable; }, "strip", z.ZodTypeAny, { retentionDays: number | null; }, { retentionDays: number | null; }>; export type RealtimeConfig = z.infer; /** * Payload for realtime:subscribe client event */ export declare const subscribeChannelPayloadSchema: z.ZodObject<{ channel: z.ZodString; }, "strip", z.ZodTypeAny, { channel: string; }, { channel: string; }>; export type SubscribeChannelPayload = z.infer; export declare const unsubscribeChannelPayloadSchema: z.ZodObject<{ channel: z.ZodString; }, "strip", z.ZodTypeAny, { channel: string; }, { channel: string; }>; export type UnsubscribeChannelPayload = z.infer; /** * Payload for realtime:publish client event */ export declare const publishEventPayloadSchema: z.ZodObject<{ channel: z.ZodString; event: z.ZodString; payload: z.ZodRecord; }, "strip", z.ZodTypeAny, { payload: Record; channel: string; event: string; }, { payload: Record; channel: string; event: string; }>; export type PublishEventPayload = z.infer; /** * A member present in a realtime channel. * Presence is ephemeral — tracked in-memory, not persisted to the database. * `presenceId` is the user ID for `type: 'user'` and the socket ID for `type: 'anonymous'`. */ export declare const presenceIdentityTypeSchema: z.ZodEnum<["user", "anonymous"]>; export type PresenceIdentityType = z.infer; export declare const presenceUserMemberSchema: z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"user">; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>; export declare const presenceAnonymousMemberSchema: z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>; export declare const presenceMemberSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"user">; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>, z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>]>; export type PresenceMember = z.infer; /** * Initial presence state returned from a successful subscribe ack. */ export declare const presenceSnapshotSchema: z.ZodObject<{ members: z.ZodArray; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>, z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>]>, "many">; }, "strip", z.ZodTypeAny, { members: ({ type: "user"; presenceId: string; joinedAt: string; } | { type: "anonymous"; presenceId: string; joinedAt: string; })[]; }, { members: ({ type: "user"; presenceId: string; joinedAt: string; } | { type: "anonymous"; presenceId: string; joinedAt: string; })[]; }>; export type PresenceSnapshot = z.infer; /** * Response for subscribe operations (used in Socket.IO ack callbacks) */ export declare const subscribeResponseSchema: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{ ok: z.ZodLiteral; channel: z.ZodString; presence: z.ZodObject<{ members: z.ZodArray; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>, z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>]>, "many">; }, "strip", z.ZodTypeAny, { members: ({ type: "user"; presenceId: string; joinedAt: string; } | { type: "anonymous"; presenceId: string; joinedAt: string; })[]; }, { members: ({ type: "user"; presenceId: string; joinedAt: string; } | { type: "anonymous"; presenceId: string; joinedAt: string; })[]; }>; }, "strip", z.ZodTypeAny, { channel: string; ok: true; presence: { members: ({ type: "user"; presenceId: string; joinedAt: string; } | { type: "anonymous"; presenceId: string; joinedAt: string; })[]; }; }, { channel: string; ok: true; presence: { members: ({ type: "user"; presenceId: string; joinedAt: string; } | { type: "anonymous"; presenceId: string; joinedAt: string; })[]; }; }>, z.ZodObject<{ ok: z.ZodLiteral; channel: z.ZodString; error: z.ZodObject<{ code: z.ZodString; message: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; message: string; }, { code: string; message: string; }>; }, "strip", z.ZodTypeAny, { error: { code: string; message: string; }; channel: string; ok: false; }, { error: { code: string; message: string; }; channel: string; ok: false; }>]>; export type SubscribeResponse = z.infer; /** * Payload for realtime:error server event (for unsolicited errors like publish failures) */ export declare const realtimeErrorPayloadSchema: z.ZodObject<{ channel: z.ZodOptional; code: z.ZodString; message: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; message: string; channel?: string | undefined; }, { code: string; message: string; channel?: string | undefined; }>; export type RealtimeErrorPayload = z.infer; /** * Payload sent to webhook endpoints */ export declare const webhookMessageSchema: z.ZodObject<{ messageId: z.ZodString; channel: z.ZodString; eventName: z.ZodString; payload: z.ZodRecord; }, "strip", z.ZodTypeAny, { eventName: string; payload: Record; channel: string; messageId: string; }, { eventName: string; payload: Record; channel: string; messageId: string; }>; export type WebhookMessage = z.infer; /** * Meta object included in all socket messages */ export declare const socketMessageMetaSchema: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; export type SocketMessageMeta = z.infer; /** * Base socket message schema (meta + passthrough for payload) */ export declare const socketMessageSchema: z.ZodObject<{ meta: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ meta: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ meta: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; }, z.ZodTypeAny, "passthrough">>; export type SocketMessage = z.infer; /** * Message for presence:join — broadcast when a new member becomes present */ export declare const presenceJoinMessageSchema: z.ZodObject<{ meta: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; } & { member: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"user">; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>, z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>]>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ meta: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; } & { member: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"user">; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>, z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>]>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ meta: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; } & { member: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"user">; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>, z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>]>; }, z.ZodTypeAny, "passthrough">>; export type PresenceJoinMessage = z.infer; /** * Message for presence:leave — broadcast when a member is no longer present */ export declare const presenceLeaveMessageSchema: z.ZodObject<{ meta: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; } & { member: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"user">; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>, z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>]>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ meta: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; } & { member: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"user">; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>, z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>]>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ meta: z.ZodObject<{ channel: z.ZodOptional; messageId: z.ZodString; senderType: z.ZodEnum<["system", "user"]>; senderId: z.ZodOptional; timestamp: z.ZodString; }, "strip", z.ZodTypeAny, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }, { timestamp: string; senderType: "user" | "system"; messageId: string; senderId?: string | undefined; channel?: string | undefined; }>; } & { member: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"user">; }, "strip", z.ZodTypeAny, { type: "user"; presenceId: string; joinedAt: string; }, { type: "user"; presenceId: string; joinedAt: string; }>, z.ZodObject<{ presenceId: z.ZodString; joinedAt: z.ZodString; } & { type: z.ZodLiteral<"anonymous">; }, "strip", z.ZodTypeAny, { type: "anonymous"; presenceId: string; joinedAt: string; }, { type: "anonymous"; presenceId: string; joinedAt: string; }>]>; }, z.ZodTypeAny, "passthrough">>; export type PresenceLeaveMessage = z.infer; //# sourceMappingURL=realtime.schema.d.ts.map