import { z } from "zod";
/**
 * Realtime event catalogue (§8.1 spec required before Phase 2).
 *
 * Protocol version is negotiated at connect time via the `auth.protocolVersion`
 * field on the Socket.IO handshake. The gateway rejects a connection whose major
 * version it does not support, so an event's payload shape may only change
 * within a major version by adding optional fields.
 */
export declare const PROTOCOL_VERSION: "1.0";
export declare const ConnectAuth: z.ZodObject<{
    ticket: z.ZodString;
    protocolVersion: z.ZodString;
}, "strip", z.ZodTypeAny, {
    ticket: string;
    protocolVersion: string;
}, {
    ticket: string;
    protocolVersion: string;
}>;
export type ConnectAuth = z.infer<typeof ConnectAuth>;
export declare const ClientJoinChannel: z.ZodObject<{
    channelId: z.ZodNumber;
    cursorSeq: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    channelId: number;
    cursorSeq: number;
}, {
    channelId: number;
    cursorSeq: number;
}>;
export declare const ClientSendMessage: z.ZodObject<{
    channelId: z.ZodNumber;
    clientMsgId: z.ZodString;
    text: z.ZodString;
    blocks: z.ZodOptional<z.ZodUnknown>;
    parentId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
    isBroadcast: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
    channelId: number;
    text: string;
    clientMsgId: string;
    parentId?: number | null | undefined;
    blocks?: unknown;
    isBroadcast?: boolean | undefined;
}, {
    channelId: number;
    text: string;
    clientMsgId: string;
    parentId?: number | null | undefined;
    blocks?: unknown;
    isBroadcast?: boolean | undefined;
}>;
export declare const ClientAckRead: z.ZodObject<{
    channelId: z.ZodNumber;
    seq: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    channelId: number;
    seq: number;
}, {
    channelId: number;
    seq: number;
}>;
export declare const ClientAckThreadRead: z.ZodObject<{
    rootMessageId: z.ZodNumber;
    seq: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    seq: number;
    rootMessageId: number;
}, {
    seq: number;
    rootMessageId: number;
}>;
export declare const ClientTyping: z.ZodObject<{
    workspaceId: z.ZodNumber;
    channelId: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    workspaceId: number;
    channelId: number;
}, {
    workspaceId: number;
    channelId: number;
}>;
export declare const ClientPresenceHeartbeat: z.ZodObject<{
    active: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
    active?: boolean | undefined;
}, {
    active?: boolean | undefined;
}>;
/** WebRTC signalling, relayed peer-to-peer through the gateway. This is the
 * one client event whose payload the server forwards rather than acts on —
 * see CallSignalRequest in calls-http.ts. */
export declare const ClientCallSignal: z.ZodObject<{
    workspaceId: z.ZodNumber;
    callId: z.ZodNumber;
    toUserId: z.ZodNumber;
    signal: z.ZodEnum<["offer", "answer", "ice", "ready"]>;
    data: z.ZodUnknown;
}, "strip", z.ZodTypeAny, {
    workspaceId: number;
    callId: number;
    toUserId: number;
    signal: "ready" | "offer" | "answer" | "ice";
    data?: unknown;
}, {
    workspaceId: number;
    callId: number;
    toUserId: number;
    signal: "ready" | "offer" | "answer" | "ice";
    data?: unknown;
}>;
export declare const ClientEventEnvelope: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
    type: z.ZodLiteral<"channel:join">;
    payload: z.ZodObject<{
        channelId: z.ZodNumber;
        cursorSeq: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        channelId: number;
        cursorSeq: number;
    }, {
        channelId: number;
        cursorSeq: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "channel:join";
    payload: {
        channelId: number;
        cursorSeq: number;
    };
}, {
    type: "channel:join";
    payload: {
        channelId: number;
        cursorSeq: number;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"message:send">;
    payload: z.ZodObject<{
        channelId: z.ZodNumber;
        clientMsgId: z.ZodString;
        text: z.ZodString;
        blocks: z.ZodOptional<z.ZodUnknown>;
        parentId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
        isBroadcast: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        channelId: number;
        text: string;
        clientMsgId: string;
        parentId?: number | null | undefined;
        blocks?: unknown;
        isBroadcast?: boolean | undefined;
    }, {
        channelId: number;
        text: string;
        clientMsgId: string;
        parentId?: number | null | undefined;
        blocks?: unknown;
        isBroadcast?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "message:send";
    payload: {
        channelId: number;
        text: string;
        clientMsgId: string;
        parentId?: number | null | undefined;
        blocks?: unknown;
        isBroadcast?: boolean | undefined;
    };
}, {
    type: "message:send";
    payload: {
        channelId: number;
        text: string;
        clientMsgId: string;
        parentId?: number | null | undefined;
        blocks?: unknown;
        isBroadcast?: boolean | undefined;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"read:ack">;
    payload: z.ZodObject<{
        channelId: z.ZodNumber;
        seq: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        channelId: number;
        seq: number;
    }, {
        channelId: number;
        seq: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "read:ack";
    payload: {
        channelId: number;
        seq: number;
    };
}, {
    type: "read:ack";
    payload: {
        channelId: number;
        seq: number;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"thread:ack">;
    payload: z.ZodObject<{
        rootMessageId: z.ZodNumber;
        seq: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        seq: number;
        rootMessageId: number;
    }, {
        seq: number;
        rootMessageId: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "thread:ack";
    payload: {
        seq: number;
        rootMessageId: number;
    };
}, {
    type: "thread:ack";
    payload: {
        seq: number;
        rootMessageId: number;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"typing:start">;
    payload: z.ZodObject<{
        workspaceId: z.ZodNumber;
        channelId: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        workspaceId: number;
        channelId: number;
    }, {
        workspaceId: number;
        channelId: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "typing:start";
    payload: {
        workspaceId: number;
        channelId: number;
    };
}, {
    type: "typing:start";
    payload: {
        workspaceId: number;
        channelId: number;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"presence:heartbeat">;
    payload: z.ZodObject<{
        active: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        active?: boolean | undefined;
    }, {
        active?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "presence:heartbeat";
    payload: {
        active?: boolean | undefined;
    };
}, {
    type: "presence:heartbeat";
    payload: {
        active?: boolean | undefined;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"call:signal">;
    payload: z.ZodObject<{
        workspaceId: z.ZodNumber;
        callId: z.ZodNumber;
        toUserId: z.ZodNumber;
        signal: z.ZodEnum<["offer", "answer", "ice", "ready"]>;
        data: z.ZodUnknown;
    }, "strip", z.ZodTypeAny, {
        workspaceId: number;
        callId: number;
        toUserId: number;
        signal: "ready" | "offer" | "answer" | "ice";
        data?: unknown;
    }, {
        workspaceId: number;
        callId: number;
        toUserId: number;
        signal: "ready" | "offer" | "answer" | "ice";
        data?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "call:signal";
    payload: {
        workspaceId: number;
        callId: number;
        toUserId: number;
        signal: "ready" | "offer" | "answer" | "ice";
        data?: unknown;
    };
}, {
    type: "call:signal";
    payload: {
        workspaceId: number;
        callId: number;
        toUserId: number;
        signal: "ready" | "offer" | "answer" | "ice";
        data?: unknown;
    };
}>]>;
export type ClientEventEnvelope = z.infer<typeof ClientEventEnvelope>;
export declare const ServerMessageCreated: z.ZodObject<{
    message: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        channelId: z.ZodNumber;
        seq: z.ZodNumber;
        clientMsgId: z.ZodString;
        authorId: z.ZodNumber;
        type: z.ZodEnum<["text", "system"]>;
        text: z.ZodString;
        blocks: z.ZodDiscriminatedUnion<"v", [z.ZodObject<{
            v: z.ZodLiteral<1>;
            doc: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            forwardedMessage: z.ZodOptional<z.ZodObject<{
                messageId: z.ZodNumber;
                channelId: z.ZodNumber;
                parentId: z.ZodNullable<z.ZodNumber>;
                channelName: z.ZodNullable<z.ZodString>;
                channelType: z.ZodEnum<["public", "private", "dm", "group_dm"]>;
                authorId: z.ZodNumber;
                authorName: z.ZodString;
                authorAvatarUrl: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>;
                text: z.ZodString;
                createdAt: z.ZodString;
                attachmentNames: z.ZodArray<z.ZodString, "many">;
            }, "strip", z.ZodTypeAny, {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            }, {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            }>>;
        }, "strip", z.ZodTypeAny, {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        }, {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        }>]>;
        revision: z.ZodNumber;
        parentId: z.ZodNullable<z.ZodNumber>;
        isBroadcast: z.ZodBoolean;
        threadReplyCount: z.ZodNumber;
        threadLastReplyAt: z.ZodNullable<z.ZodString>;
        editedAt: z.ZodNullable<z.ZodString>;
        deletedAt: z.ZodNullable<z.ZodString>;
        createdAt: z.ZodString;
        reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
            emoji: z.ZodString;
            count: z.ZodNumber;
            reactedByMe: z.ZodBoolean;
        }, "strip", z.ZodTypeAny, {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }, {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }>, "many">>;
    }, "strip", z.ZodTypeAny, {
        type: "text" | "system";
        id: number;
        createdAt: string;
        workspaceId: number;
        channelId: number;
        parentId: number | null;
        authorId: number;
        text: string;
        seq: number;
        clientMsgId: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        };
        revision: number;
        isBroadcast: boolean;
        threadReplyCount: number;
        threadLastReplyAt: string | null;
        editedAt: string | null;
        deletedAt: string | null;
        reactions?: {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }[] | undefined;
    }, {
        type: "text" | "system";
        id: number;
        createdAt: string;
        workspaceId: number;
        channelId: number;
        parentId: number | null;
        authorId: number;
        text: string;
        seq: number;
        clientMsgId: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        };
        revision: number;
        isBroadcast: boolean;
        threadReplyCount: number;
        threadLastReplyAt: string | null;
        editedAt: string | null;
        deletedAt: string | null;
        reactions?: {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }[] | undefined;
    }>;
    /** Present on personal-room fanout so clients can route without joining ch: */
    workspaceId: z.ZodOptional<z.ZodNumber>;
    channelId: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
    message: {
        type: "text" | "system";
        id: number;
        createdAt: string;
        workspaceId: number;
        channelId: number;
        parentId: number | null;
        authorId: number;
        text: string;
        seq: number;
        clientMsgId: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        };
        revision: number;
        isBroadcast: boolean;
        threadReplyCount: number;
        threadLastReplyAt: string | null;
        editedAt: string | null;
        deletedAt: string | null;
        reactions?: {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }[] | undefined;
    };
    workspaceId?: number | undefined;
    channelId?: number | undefined;
}, {
    message: {
        type: "text" | "system";
        id: number;
        createdAt: string;
        workspaceId: number;
        channelId: number;
        parentId: number | null;
        authorId: number;
        text: string;
        seq: number;
        clientMsgId: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        };
        revision: number;
        isBroadcast: boolean;
        threadReplyCount: number;
        threadLastReplyAt: string | null;
        editedAt: string | null;
        deletedAt: string | null;
        reactions?: {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }[] | undefined;
    };
    workspaceId?: number | undefined;
    channelId?: number | undefined;
}>;
export declare const ServerMessageEdited: z.ZodObject<{
    message: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        channelId: z.ZodNumber;
        seq: z.ZodNumber;
        clientMsgId: z.ZodString;
        authorId: z.ZodNumber;
        type: z.ZodEnum<["text", "system"]>;
        text: z.ZodString;
        blocks: z.ZodDiscriminatedUnion<"v", [z.ZodObject<{
            v: z.ZodLiteral<1>;
            doc: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            forwardedMessage: z.ZodOptional<z.ZodObject<{
                messageId: z.ZodNumber;
                channelId: z.ZodNumber;
                parentId: z.ZodNullable<z.ZodNumber>;
                channelName: z.ZodNullable<z.ZodString>;
                channelType: z.ZodEnum<["public", "private", "dm", "group_dm"]>;
                authorId: z.ZodNumber;
                authorName: z.ZodString;
                authorAvatarUrl: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>;
                text: z.ZodString;
                createdAt: z.ZodString;
                attachmentNames: z.ZodArray<z.ZodString, "many">;
            }, "strip", z.ZodTypeAny, {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            }, {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            }>>;
        }, "strip", z.ZodTypeAny, {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        }, {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        }>]>;
        revision: z.ZodNumber;
        parentId: z.ZodNullable<z.ZodNumber>;
        isBroadcast: z.ZodBoolean;
        threadReplyCount: z.ZodNumber;
        threadLastReplyAt: z.ZodNullable<z.ZodString>;
        editedAt: z.ZodNullable<z.ZodString>;
        deletedAt: z.ZodNullable<z.ZodString>;
        createdAt: z.ZodString;
        reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
            emoji: z.ZodString;
            count: z.ZodNumber;
            reactedByMe: z.ZodBoolean;
        }, "strip", z.ZodTypeAny, {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }, {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }>, "many">>;
    }, "strip", z.ZodTypeAny, {
        type: "text" | "system";
        id: number;
        createdAt: string;
        workspaceId: number;
        channelId: number;
        parentId: number | null;
        authorId: number;
        text: string;
        seq: number;
        clientMsgId: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        };
        revision: number;
        isBroadcast: boolean;
        threadReplyCount: number;
        threadLastReplyAt: string | null;
        editedAt: string | null;
        deletedAt: string | null;
        reactions?: {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }[] | undefined;
    }, {
        type: "text" | "system";
        id: number;
        createdAt: string;
        workspaceId: number;
        channelId: number;
        parentId: number | null;
        authorId: number;
        text: string;
        seq: number;
        clientMsgId: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        };
        revision: number;
        isBroadcast: boolean;
        threadReplyCount: number;
        threadLastReplyAt: string | null;
        editedAt: string | null;
        deletedAt: string | null;
        reactions?: {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }[] | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    message: {
        type: "text" | "system";
        id: number;
        createdAt: string;
        workspaceId: number;
        channelId: number;
        parentId: number | null;
        authorId: number;
        text: string;
        seq: number;
        clientMsgId: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        };
        revision: number;
        isBroadcast: boolean;
        threadReplyCount: number;
        threadLastReplyAt: string | null;
        editedAt: string | null;
        deletedAt: string | null;
        reactions?: {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }[] | undefined;
    };
}, {
    message: {
        type: "text" | "system";
        id: number;
        createdAt: string;
        workspaceId: number;
        channelId: number;
        parentId: number | null;
        authorId: number;
        text: string;
        seq: number;
        clientMsgId: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        };
        revision: number;
        isBroadcast: boolean;
        threadReplyCount: number;
        threadLastReplyAt: string | null;
        editedAt: string | null;
        deletedAt: string | null;
        reactions?: {
            emoji: string;
            count: number;
            reactedByMe: boolean;
        }[] | undefined;
    };
}>;
export declare const ServerMessageDeleted: z.ZodObject<{
    channelId: z.ZodNumber;
    messageId: z.ZodNumber;
    seq: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    messageId: number;
    channelId: number;
    seq: number;
}, {
    messageId: number;
    channelId: number;
    seq: number;
}>;
export declare const ServerReactionChanged: z.ZodObject<{
    reaction: z.ZodObject<{
        messageId: z.ZodNumber;
        userId: z.ZodNumber;
        emoji: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        userId: number;
        messageId: number;
        emoji: string;
    }, {
        userId: number;
        messageId: number;
        emoji: string;
    }>;
    op: z.ZodEnum<["add", "remove"]>;
}, "strip", z.ZodTypeAny, {
    reaction: {
        userId: number;
        messageId: number;
        emoji: string;
    };
    op: "add" | "remove";
}, {
    reaction: {
        userId: number;
        messageId: number;
        emoji: string;
    };
    op: "add" | "remove";
}>;
export declare const ServerPinChanged: z.ZodObject<{
    channelId: z.ZodNumber;
    messageId: z.ZodNumber;
    op: z.ZodEnum<["add", "remove"]>;
}, "strip", z.ZodTypeAny, {
    messageId: number;
    channelId: number;
    op: "add" | "remove";
}, {
    messageId: number;
    channelId: number;
    op: "add" | "remove";
}>;
export declare const ServerChannelUpdated: z.ZodObject<{
    channel: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        type: z.ZodEnum<["public", "private", "dm", "group_dm"]>;
        name: z.ZodNullable<z.ZodString>;
        topic: z.ZodNullable<z.ZodString>;
        purpose: z.ZodNullable<z.ZodString>;
        createdBy: z.ZodNumber;
        isArchived: z.ZodBoolean;
        lastMessageAt: z.ZodNullable<z.ZodString>;
        memberCount: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        type: "public" | "private" | "dm" | "group_dm";
        id: number;
        name: string | null;
        workspaceId: number;
        topic: string | null;
        purpose: string | null;
        createdBy: number;
        isArchived: boolean;
        lastMessageAt: string | null;
        memberCount: number;
    }, {
        type: "public" | "private" | "dm" | "group_dm";
        id: number;
        name: string | null;
        workspaceId: number;
        topic: string | null;
        purpose: string | null;
        createdBy: number;
        isArchived: boolean;
        lastMessageAt: string | null;
        memberCount: number;
    }>;
}, "strip", z.ZodTypeAny, {
    channel: {
        type: "public" | "private" | "dm" | "group_dm";
        id: number;
        name: string | null;
        workspaceId: number;
        topic: string | null;
        purpose: string | null;
        createdBy: number;
        isArchived: boolean;
        lastMessageAt: string | null;
        memberCount: number;
    };
}, {
    channel: {
        type: "public" | "private" | "dm" | "group_dm";
        id: number;
        name: string | null;
        workspaceId: number;
        topic: string | null;
        purpose: string | null;
        createdBy: number;
        isArchived: boolean;
        lastMessageAt: string | null;
        memberCount: number;
    };
}>;
export declare const ServerReadStateUpdated: z.ZodObject<{
    channelMember: z.ZodObject<{
        channelId: z.ZodNumber;
        userId: z.ZodNumber;
        role: z.ZodEnum<["member", "owner"]>;
        joinedAt: z.ZodString;
        lastReadSeq: z.ZodNumber;
        lastReadAt: z.ZodNullable<z.ZodString>;
        mentionCount: z.ZodNumber;
        unreadCount: z.ZodOptional<z.ZodNumber>;
        isMuted: z.ZodBoolean;
        isStarred: z.ZodBoolean;
        isClosed: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        userId: number;
        role: "owner" | "member";
        joinedAt: string;
        channelId: number;
        lastReadSeq: number;
        lastReadAt: string | null;
        mentionCount: number;
        isMuted: boolean;
        isStarred: boolean;
        isClosed: boolean;
        unreadCount?: number | undefined;
    }, {
        userId: number;
        role: "owner" | "member";
        joinedAt: string;
        channelId: number;
        lastReadSeq: number;
        lastReadAt: string | null;
        mentionCount: number;
        isMuted: boolean;
        isStarred: boolean;
        isClosed: boolean;
        unreadCount?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    channelMember: {
        userId: number;
        role: "owner" | "member";
        joinedAt: string;
        channelId: number;
        lastReadSeq: number;
        lastReadAt: string | null;
        mentionCount: number;
        isMuted: boolean;
        isStarred: boolean;
        isClosed: boolean;
        unreadCount?: number | undefined;
    };
}, {
    channelMember: {
        userId: number;
        role: "owner" | "member";
        joinedAt: string;
        channelId: number;
        lastReadSeq: number;
        lastReadAt: string | null;
        mentionCount: number;
        isMuted: boolean;
        isStarred: boolean;
        isClosed: boolean;
        unreadCount?: number | undefined;
    };
}>;
export declare const ServerTypingChanged: z.ZodObject<{
    channelId: z.ZodNumber;
    userId: z.ZodNumber;
    isTyping: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
    userId: number;
    channelId: number;
    isTyping: boolean;
}, {
    userId: number;
    channelId: number;
    isTyping: boolean;
}>;
export declare const ServerPresenceChanged: z.ZodObject<{
    workspaceId: z.ZodNumber;
    userId: z.ZodNumber;
    status: z.ZodEnum<["active", "away", "offline"]>;
}, "strip", z.ZodTypeAny, {
    status: "away" | "active" | "offline";
    workspaceId: number;
    userId: number;
}, {
    status: "away" | "active" | "offline";
    workspaceId: number;
    userId: number;
}>;
export declare const ServerMemberStatusChanged: z.ZodObject<{
    workspaceId: z.ZodNumber;
    userId: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    workspaceId: number;
    userId: number;
}, {
    workspaceId: number;
    userId: number;
}>;
export declare const ServerSavedItemUpdated: z.ZodObject<{
    workspaceId: z.ZodNumber;
    messageId: z.ZodNumber;
    saved: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
    workspaceId: number;
    messageId: number;
    saved: boolean;
}, {
    workspaceId: number;
    messageId: number;
    saved: boolean;
}>;
export declare const ServerDraftUpdated: z.ZodObject<{
    workspaceId: z.ZodNumber;
    channelId: z.ZodNumber;
    threadRootMessageId: z.ZodNullable<z.ZodNumber>;
    text: z.ZodString;
    blocks: z.ZodNullable<z.ZodDiscriminatedUnion<"v", [z.ZodObject<{
        v: z.ZodLiteral<1>;
        doc: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        forwardedMessage: z.ZodOptional<z.ZodObject<{
            messageId: z.ZodNumber;
            channelId: z.ZodNumber;
            parentId: z.ZodNullable<z.ZodNumber>;
            channelName: z.ZodNullable<z.ZodString>;
            channelType: z.ZodEnum<["public", "private", "dm", "group_dm"]>;
            authorId: z.ZodNumber;
            authorName: z.ZodString;
            authorAvatarUrl: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>;
            text: z.ZodString;
            createdAt: z.ZodString;
            attachmentNames: z.ZodArray<z.ZodString, "many">;
        }, "strip", z.ZodTypeAny, {
            createdAt: string;
            messageId: number;
            channelId: number;
            parentId: number | null;
            channelName: string | null;
            channelType: "public" | "private" | "dm" | "group_dm";
            authorId: number;
            authorName: string;
            authorAvatarUrl: string | null;
            text: string;
            attachmentNames: string[];
        }, {
            createdAt: string;
            messageId: number;
            channelId: number;
            parentId: number | null;
            channelName: string | null;
            channelType: "public" | "private" | "dm" | "group_dm";
            authorId: number;
            authorName: string;
            authorAvatarUrl: string | null;
            text: string;
            attachmentNames: string[];
        }>>;
    }, "strip", z.ZodTypeAny, {
        v: 1;
        doc: Record<string, unknown>;
        forwardedMessage?: {
            createdAt: string;
            messageId: number;
            channelId: number;
            parentId: number | null;
            channelName: string | null;
            channelType: "public" | "private" | "dm" | "group_dm";
            authorId: number;
            authorName: string;
            authorAvatarUrl: string | null;
            text: string;
            attachmentNames: string[];
        } | undefined;
    }, {
        v: 1;
        doc: Record<string, unknown>;
        forwardedMessage?: {
            createdAt: string;
            messageId: number;
            channelId: number;
            parentId: number | null;
            channelName: string | null;
            channelType: "public" | "private" | "dm" | "group_dm";
            authorId: number;
            authorName: string;
            authorAvatarUrl: string | null;
            text: string;
            attachmentNames: string[];
        } | undefined;
    }>]>>;
    deleted: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
    workspaceId: number;
    channelId: number;
    text: string;
    blocks: {
        v: 1;
        doc: Record<string, unknown>;
        forwardedMessage?: {
            createdAt: string;
            messageId: number;
            channelId: number;
            parentId: number | null;
            channelName: string | null;
            channelType: "public" | "private" | "dm" | "group_dm";
            authorId: number;
            authorName: string;
            authorAvatarUrl: string | null;
            text: string;
            attachmentNames: string[];
        } | undefined;
    } | null;
    threadRootMessageId: number | null;
    deleted: boolean;
}, {
    workspaceId: number;
    channelId: number;
    text: string;
    blocks: {
        v: 1;
        doc: Record<string, unknown>;
        forwardedMessage?: {
            createdAt: string;
            messageId: number;
            channelId: number;
            parentId: number | null;
            channelName: string | null;
            channelType: "public" | "private" | "dm" | "group_dm";
            authorId: number;
            authorName: string;
            authorAvatarUrl: string | null;
            text: string;
            attachmentNames: string[];
        } | undefined;
    } | null;
    threadRootMessageId: number | null;
    deleted: boolean;
}>;
export declare const ServerNotificationPreferencesUpdated: z.ZodObject<{
    preferences: z.ZodObject<{
        workspaceId: z.ZodNumber;
        messages: z.ZodEnum<["all", "mentions", "off"]>;
        calls: z.ZodBoolean;
        tasks: z.ZodBoolean;
        calendar: z.ZodBoolean;
        sound: z.ZodBoolean;
        inAppFlash: z.ZodBoolean;
        updatedAt: z.ZodNullable<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        workspaceId: number;
        updatedAt: string | null;
        messages: "all" | "mentions" | "off";
        calls: boolean;
        tasks: boolean;
        calendar: boolean;
        sound: boolean;
        inAppFlash: boolean;
    }, {
        workspaceId: number;
        updatedAt: string | null;
        messages: "all" | "mentions" | "off";
        calls: boolean;
        tasks: boolean;
        calendar: boolean;
        sound: boolean;
        inAppFlash: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    preferences: {
        workspaceId: number;
        updatedAt: string | null;
        messages: "all" | "mentions" | "off";
        calls: boolean;
        tasks: boolean;
        calendar: boolean;
        sound: boolean;
        inAppFlash: boolean;
    };
}, {
    preferences: {
        workspaceId: number;
        updatedAt: string | null;
        messages: "all" | "mentions" | "off";
        calls: boolean;
        tasks: boolean;
        calendar: boolean;
        sound: boolean;
        inAppFlash: boolean;
    };
}>;
export declare const ServerActivityReadUpdated: z.ZodObject<{
    workspaceId: z.ZodNumber;
    messageIds: z.ZodArray<z.ZodNumber, "many">;
    read: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
    workspaceId: number;
    messageIds: number[];
    read: boolean;
}, {
    workspaceId: number;
    messageIds: number[];
    read: boolean;
}>;
export declare const ServerThreadSubscriptionUpdated: z.ZodObject<{
    status: z.ZodObject<{
        workspaceId: z.ZodNumber;
        channelId: z.ZodNumber;
        rootMessageId: z.ZodNumber;
        following: z.ZodBoolean;
        reason: z.ZodNullable<z.ZodString>;
        lastReadReplySeq: z.ZodNumber;
        unreadReplyCount: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        workspaceId: number;
        channelId: number;
        following: boolean;
        reason: string | null;
        lastReadReplySeq: number;
        unreadReplyCount: number;
        rootMessageId: number;
    }, {
        workspaceId: number;
        channelId: number;
        following: boolean;
        reason: string | null;
        lastReadReplySeq: number;
        unreadReplyCount: number;
        rootMessageId: number;
    }>;
}, "strip", z.ZodTypeAny, {
    status: {
        workspaceId: number;
        channelId: number;
        following: boolean;
        reason: string | null;
        lastReadReplySeq: number;
        unreadReplyCount: number;
        rootMessageId: number;
    };
}, {
    status: {
        workspaceId: number;
        channelId: number;
        following: boolean;
        reason: string | null;
        lastReadReplySeq: number;
        unreadReplyCount: number;
        rootMessageId: number;
    };
}>;
export declare const ServerTaskCreated: z.ZodObject<{
    task: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        title: z.ZodString;
        description: z.ZodNullable<z.ZodString>;
        status: z.ZodEnum<["todo", "in_progress", "done"]>;
        assigneeUserId: z.ZodNullable<z.ZodNumber>;
        dueAt: z.ZodNullable<z.ZodString>;
        createdBy: z.ZodNumber;
        channelId: z.ZodNullable<z.ZodNumber>;
        sourceMessageId: z.ZodNullable<z.ZodNumber>;
        completedAt: z.ZodNullable<z.ZodString>;
        deletedAt: z.ZodNullable<z.ZodString>;
        deletedBy: z.ZodNullable<z.ZodNumber>;
        createdAt: z.ZodString;
        updatedAt: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        description: string | null;
        title: string;
        status: "todo" | "in_progress" | "done";
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        deletedAt: string | null;
        updatedAt: string;
        assigneeUserId: number | null;
        dueAt: string | null;
        sourceMessageId: number | null;
        completedAt: string | null;
        deletedBy: number | null;
    }, {
        description: string | null;
        title: string;
        status: "todo" | "in_progress" | "done";
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        deletedAt: string | null;
        updatedAt: string;
        assigneeUserId: number | null;
        dueAt: string | null;
        sourceMessageId: number | null;
        completedAt: string | null;
        deletedBy: number | null;
    }>;
}, "strip", z.ZodTypeAny, {
    task: {
        description: string | null;
        title: string;
        status: "todo" | "in_progress" | "done";
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        deletedAt: string | null;
        updatedAt: string;
        assigneeUserId: number | null;
        dueAt: string | null;
        sourceMessageId: number | null;
        completedAt: string | null;
        deletedBy: number | null;
    };
}, {
    task: {
        description: string | null;
        title: string;
        status: "todo" | "in_progress" | "done";
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        deletedAt: string | null;
        updatedAt: string;
        assigneeUserId: number | null;
        dueAt: string | null;
        sourceMessageId: number | null;
        completedAt: string | null;
        deletedBy: number | null;
    };
}>;
export declare const ServerTaskUpdated: z.ZodObject<{
    task: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        title: z.ZodString;
        description: z.ZodNullable<z.ZodString>;
        status: z.ZodEnum<["todo", "in_progress", "done"]>;
        assigneeUserId: z.ZodNullable<z.ZodNumber>;
        dueAt: z.ZodNullable<z.ZodString>;
        createdBy: z.ZodNumber;
        channelId: z.ZodNullable<z.ZodNumber>;
        sourceMessageId: z.ZodNullable<z.ZodNumber>;
        completedAt: z.ZodNullable<z.ZodString>;
        deletedAt: z.ZodNullable<z.ZodString>;
        deletedBy: z.ZodNullable<z.ZodNumber>;
        createdAt: z.ZodString;
        updatedAt: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        description: string | null;
        title: string;
        status: "todo" | "in_progress" | "done";
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        deletedAt: string | null;
        updatedAt: string;
        assigneeUserId: number | null;
        dueAt: string | null;
        sourceMessageId: number | null;
        completedAt: string | null;
        deletedBy: number | null;
    }, {
        description: string | null;
        title: string;
        status: "todo" | "in_progress" | "done";
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        deletedAt: string | null;
        updatedAt: string;
        assigneeUserId: number | null;
        dueAt: string | null;
        sourceMessageId: number | null;
        completedAt: string | null;
        deletedBy: number | null;
    }>;
}, "strip", z.ZodTypeAny, {
    task: {
        description: string | null;
        title: string;
        status: "todo" | "in_progress" | "done";
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        deletedAt: string | null;
        updatedAt: string;
        assigneeUserId: number | null;
        dueAt: string | null;
        sourceMessageId: number | null;
        completedAt: string | null;
        deletedBy: number | null;
    };
}, {
    task: {
        description: string | null;
        title: string;
        status: "todo" | "in_progress" | "done";
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        deletedAt: string | null;
        updatedAt: string;
        assigneeUserId: number | null;
        dueAt: string | null;
        sourceMessageId: number | null;
        completedAt: string | null;
        deletedBy: number | null;
    };
}>;
export declare const ServerTaskDeleted: z.ZodObject<{
    workspaceId: z.ZodNumber;
    taskId: z.ZodNumber;
    title: z.ZodString;
    createdBy: z.ZodNumber;
    deletedByUserId: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    title: string;
    workspaceId: number;
    createdBy: number;
    taskId: number;
    deletedByUserId: number;
}, {
    title: string;
    workspaceId: number;
    createdBy: number;
    taskId: number;
    deletedByUserId: number;
}>;
export declare const ServerCalendarEventCreated: z.ZodObject<{
    event: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        title: z.ZodString;
        description: z.ZodNullable<z.ZodString>;
        location: z.ZodNullable<z.ZodString>;
        startsAt: z.ZodString;
        endsAt: z.ZodString;
        allDay: z.ZodBoolean;
        timezone: z.ZodString;
        recurrenceRule: z.ZodNullable<z.ZodString>;
        channelId: z.ZodNullable<z.ZodNumber>;
        createdBy: z.ZodNumber;
        attendees: z.ZodArray<z.ZodObject<{
            userId: z.ZodNumber;
            status: z.ZodEnum<["needs_action", "going", "maybe", "declined"]>;
            respondedAt: z.ZodNullable<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }, {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }>, "many">;
        seriesId: z.ZodNumber;
        occurrenceDate: z.ZodString;
        isOccurrence: z.ZodBoolean;
        isOverride: z.ZodBoolean;
        createdAt: z.ZodString;
        updatedAt: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        description: string | null;
        title: string;
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        updatedAt: string;
        location: string | null;
        startsAt: string;
        endsAt: string;
        allDay: boolean;
        timezone: string;
        recurrenceRule: string | null;
        attendees: {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }[];
        seriesId: number;
        occurrenceDate: string;
        isOccurrence: boolean;
        isOverride: boolean;
    }, {
        description: string | null;
        title: string;
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        updatedAt: string;
        location: string | null;
        startsAt: string;
        endsAt: string;
        allDay: boolean;
        timezone: string;
        recurrenceRule: string | null;
        attendees: {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }[];
        seriesId: number;
        occurrenceDate: string;
        isOccurrence: boolean;
        isOverride: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    event: {
        description: string | null;
        title: string;
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        updatedAt: string;
        location: string | null;
        startsAt: string;
        endsAt: string;
        allDay: boolean;
        timezone: string;
        recurrenceRule: string | null;
        attendees: {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }[];
        seriesId: number;
        occurrenceDate: string;
        isOccurrence: boolean;
        isOverride: boolean;
    };
}, {
    event: {
        description: string | null;
        title: string;
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        updatedAt: string;
        location: string | null;
        startsAt: string;
        endsAt: string;
        allDay: boolean;
        timezone: string;
        recurrenceRule: string | null;
        attendees: {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }[];
        seriesId: number;
        occurrenceDate: string;
        isOccurrence: boolean;
        isOverride: boolean;
    };
}>;
export declare const ServerCalendarEventUpdated: z.ZodObject<{
    event: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        title: z.ZodString;
        description: z.ZodNullable<z.ZodString>;
        location: z.ZodNullable<z.ZodString>;
        startsAt: z.ZodString;
        endsAt: z.ZodString;
        allDay: z.ZodBoolean;
        timezone: z.ZodString;
        recurrenceRule: z.ZodNullable<z.ZodString>;
        channelId: z.ZodNullable<z.ZodNumber>;
        createdBy: z.ZodNumber;
        attendees: z.ZodArray<z.ZodObject<{
            userId: z.ZodNumber;
            status: z.ZodEnum<["needs_action", "going", "maybe", "declined"]>;
            respondedAt: z.ZodNullable<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }, {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }>, "many">;
        seriesId: z.ZodNumber;
        occurrenceDate: z.ZodString;
        isOccurrence: z.ZodBoolean;
        isOverride: z.ZodBoolean;
        createdAt: z.ZodString;
        updatedAt: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        description: string | null;
        title: string;
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        updatedAt: string;
        location: string | null;
        startsAt: string;
        endsAt: string;
        allDay: boolean;
        timezone: string;
        recurrenceRule: string | null;
        attendees: {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }[];
        seriesId: number;
        occurrenceDate: string;
        isOccurrence: boolean;
        isOverride: boolean;
    }, {
        description: string | null;
        title: string;
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        updatedAt: string;
        location: string | null;
        startsAt: string;
        endsAt: string;
        allDay: boolean;
        timezone: string;
        recurrenceRule: string | null;
        attendees: {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }[];
        seriesId: number;
        occurrenceDate: string;
        isOccurrence: boolean;
        isOverride: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    event: {
        description: string | null;
        title: string;
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        updatedAt: string;
        location: string | null;
        startsAt: string;
        endsAt: string;
        allDay: boolean;
        timezone: string;
        recurrenceRule: string | null;
        attendees: {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }[];
        seriesId: number;
        occurrenceDate: string;
        isOccurrence: boolean;
        isOverride: boolean;
    };
}, {
    event: {
        description: string | null;
        title: string;
        id: number;
        createdAt: string;
        workspaceId: number;
        createdBy: number;
        channelId: number | null;
        updatedAt: string;
        location: string | null;
        startsAt: string;
        endsAt: string;
        allDay: boolean;
        timezone: string;
        recurrenceRule: string | null;
        attendees: {
            status: "needs_action" | "going" | "maybe" | "declined";
            userId: number;
            respondedAt: string | null;
        }[];
        seriesId: number;
        occurrenceDate: string;
        isOccurrence: boolean;
        isOverride: boolean;
    };
}>;
export declare const ServerCalendarEventDeleted: z.ZodObject<{
    workspaceId: z.ZodNumber;
    eventId: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    workspaceId: number;
    eventId: number;
}, {
    workspaceId: number;
    eventId: number;
}>;
export declare const ServerCallStarted: z.ZodObject<{
    call: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        kind: z.ZodEnum<["audio", "video", "connect"]>;
        status: z.ZodEnum<["ringing", "active", "ended", "missed"]>;
        channelId: z.ZodNullable<z.ZodNumber>;
        eventId: z.ZodNullable<z.ZodNumber>;
        title: z.ZodNullable<z.ZodString>;
        startedBy: z.ZodNumber;
        startedAt: z.ZodString;
        answeredAt: z.ZodNullable<z.ZodString>;
        endedAt: z.ZodNullable<z.ZodString>;
        durationSeconds: z.ZodNullable<z.ZodNumber>;
        participants: z.ZodArray<z.ZodObject<{
            userId: z.ZodNumber;
            state: z.ZodEnum<["ringing", "joined", "left", "declined", "missed"]>;
            invitedAt: z.ZodString;
            joinedAt: z.ZodNullable<z.ZodString>;
            leftAt: z.ZodNullable<z.ZodString>;
            seenAt: z.ZodNullable<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }, {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }>, "many">;
        recordingStatus: z.ZodDefault<z.ZodEnum<["idle", "recording", "processing", "ready", "failed"]>>;
        recordingObjectKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        transcriptStatus: z.ZodDefault<z.ZodEnum<["idle", "processing", "ready", "failed"]>>;
        transcript: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        summary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
        recordingObjectKey: string | null;
        transcriptStatus: "idle" | "processing" | "ready" | "failed";
        transcript: string | null;
        summary: string | null;
    }, {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
        recordingObjectKey?: string | null | undefined;
        transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
        transcript?: string | null | undefined;
        summary?: string | null | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    call: {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
        recordingObjectKey: string | null;
        transcriptStatus: "idle" | "processing" | "ready" | "failed";
        transcript: string | null;
        summary: string | null;
    };
}, {
    call: {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
        recordingObjectKey?: string | null | undefined;
        transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
        transcript?: string | null | undefined;
        summary?: string | null | undefined;
    };
}>;
export declare const ServerCallUpdated: z.ZodObject<{
    call: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        kind: z.ZodEnum<["audio", "video", "connect"]>;
        status: z.ZodEnum<["ringing", "active", "ended", "missed"]>;
        channelId: z.ZodNullable<z.ZodNumber>;
        eventId: z.ZodNullable<z.ZodNumber>;
        title: z.ZodNullable<z.ZodString>;
        startedBy: z.ZodNumber;
        startedAt: z.ZodString;
        answeredAt: z.ZodNullable<z.ZodString>;
        endedAt: z.ZodNullable<z.ZodString>;
        durationSeconds: z.ZodNullable<z.ZodNumber>;
        participants: z.ZodArray<z.ZodObject<{
            userId: z.ZodNumber;
            state: z.ZodEnum<["ringing", "joined", "left", "declined", "missed"]>;
            invitedAt: z.ZodString;
            joinedAt: z.ZodNullable<z.ZodString>;
            leftAt: z.ZodNullable<z.ZodString>;
            seenAt: z.ZodNullable<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }, {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }>, "many">;
        recordingStatus: z.ZodDefault<z.ZodEnum<["idle", "recording", "processing", "ready", "failed"]>>;
        recordingObjectKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        transcriptStatus: z.ZodDefault<z.ZodEnum<["idle", "processing", "ready", "failed"]>>;
        transcript: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        summary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
        recordingObjectKey: string | null;
        transcriptStatus: "idle" | "processing" | "ready" | "failed";
        transcript: string | null;
        summary: string | null;
    }, {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
        recordingObjectKey?: string | null | undefined;
        transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
        transcript?: string | null | undefined;
        summary?: string | null | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    call: {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
        recordingObjectKey: string | null;
        transcriptStatus: "idle" | "processing" | "ready" | "failed";
        transcript: string | null;
        summary: string | null;
    };
}, {
    call: {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
        recordingObjectKey?: string | null | undefined;
        transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
        transcript?: string | null | undefined;
        summary?: string | null | undefined;
    };
}>;
export declare const ServerCallEnded: z.ZodObject<{
    call: z.ZodObject<{
        id: z.ZodNumber;
        workspaceId: z.ZodNumber;
        kind: z.ZodEnum<["audio", "video", "connect"]>;
        status: z.ZodEnum<["ringing", "active", "ended", "missed"]>;
        channelId: z.ZodNullable<z.ZodNumber>;
        eventId: z.ZodNullable<z.ZodNumber>;
        title: z.ZodNullable<z.ZodString>;
        startedBy: z.ZodNumber;
        startedAt: z.ZodString;
        answeredAt: z.ZodNullable<z.ZodString>;
        endedAt: z.ZodNullable<z.ZodString>;
        durationSeconds: z.ZodNullable<z.ZodNumber>;
        participants: z.ZodArray<z.ZodObject<{
            userId: z.ZodNumber;
            state: z.ZodEnum<["ringing", "joined", "left", "declined", "missed"]>;
            invitedAt: z.ZodString;
            joinedAt: z.ZodNullable<z.ZodString>;
            leftAt: z.ZodNullable<z.ZodString>;
            seenAt: z.ZodNullable<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }, {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }>, "many">;
        recordingStatus: z.ZodDefault<z.ZodEnum<["idle", "recording", "processing", "ready", "failed"]>>;
        recordingObjectKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        transcriptStatus: z.ZodDefault<z.ZodEnum<["idle", "processing", "ready", "failed"]>>;
        transcript: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        summary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
        recordingObjectKey: string | null;
        transcriptStatus: "idle" | "processing" | "ready" | "failed";
        transcript: string | null;
        summary: string | null;
    }, {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
        recordingObjectKey?: string | null | undefined;
        transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
        transcript?: string | null | undefined;
        summary?: string | null | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    call: {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
        recordingObjectKey: string | null;
        transcriptStatus: "idle" | "processing" | "ready" | "failed";
        transcript: string | null;
        summary: string | null;
    };
}, {
    call: {
        title: string | null;
        status: "ringing" | "active" | "ended" | "missed";
        id: number;
        workspaceId: number;
        channelId: number | null;
        participants: {
            userId: number;
            joinedAt: string | null;
            state: "declined" | "ringing" | "missed" | "joined" | "left";
            invitedAt: string;
            leftAt: string | null;
            seenAt: string | null;
        }[];
        kind: "audio" | "video" | "connect";
        eventId: number | null;
        startedBy: number;
        startedAt: string;
        answeredAt: string | null;
        endedAt: string | null;
        durationSeconds: number | null;
        recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
        recordingObjectKey?: string | null | undefined;
        transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
        transcript?: string | null | undefined;
        summary?: string | null | undefined;
    };
}>;
/**
 * A relayed WebRTC offer/answer/ICE candidate. Unlike every other server
 * event this is addressed to exactly one user's personal room and is not a
 * broadcast of state — `fromUserId` is stamped by the gateway from the
 * authenticated socket, never taken from the sender's payload.
 */
export declare const ServerCallSignal: z.ZodObject<{
    callId: z.ZodNumber;
    fromUserId: z.ZodNumber;
    signal: z.ZodEnum<["offer", "answer", "ice", "ready"]>;
    data: z.ZodUnknown;
}, "strip", z.ZodTypeAny, {
    callId: number;
    signal: "ready" | "offer" | "answer" | "ice";
    fromUserId: number;
    data?: unknown;
}, {
    callId: number;
    signal: "ready" | "offer" | "answer" | "ice";
    fromUserId: number;
    data?: unknown;
}>;
export declare const ServerEventEnvelope: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
    type: z.ZodLiteral<"message:created">;
    payload: z.ZodObject<{
        message: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            channelId: z.ZodNumber;
            seq: z.ZodNumber;
            clientMsgId: z.ZodString;
            authorId: z.ZodNumber;
            type: z.ZodEnum<["text", "system"]>;
            text: z.ZodString;
            blocks: z.ZodDiscriminatedUnion<"v", [z.ZodObject<{
                v: z.ZodLiteral<1>;
                doc: z.ZodRecord<z.ZodString, z.ZodUnknown>;
                forwardedMessage: z.ZodOptional<z.ZodObject<{
                    messageId: z.ZodNumber;
                    channelId: z.ZodNumber;
                    parentId: z.ZodNullable<z.ZodNumber>;
                    channelName: z.ZodNullable<z.ZodString>;
                    channelType: z.ZodEnum<["public", "private", "dm", "group_dm"]>;
                    authorId: z.ZodNumber;
                    authorName: z.ZodString;
                    authorAvatarUrl: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>;
                    text: z.ZodString;
                    createdAt: z.ZodString;
                    attachmentNames: z.ZodArray<z.ZodString, "many">;
                }, "strip", z.ZodTypeAny, {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                }, {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                }>>;
            }, "strip", z.ZodTypeAny, {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            }, {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            }>]>;
            revision: z.ZodNumber;
            parentId: z.ZodNullable<z.ZodNumber>;
            isBroadcast: z.ZodBoolean;
            threadReplyCount: z.ZodNumber;
            threadLastReplyAt: z.ZodNullable<z.ZodString>;
            editedAt: z.ZodNullable<z.ZodString>;
            deletedAt: z.ZodNullable<z.ZodString>;
            createdAt: z.ZodString;
            reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
                emoji: z.ZodString;
                count: z.ZodNumber;
                reactedByMe: z.ZodBoolean;
            }, "strip", z.ZodTypeAny, {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }, {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }>, "many">>;
        }, "strip", z.ZodTypeAny, {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        }, {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        }>;
        /** Present on personal-room fanout so clients can route without joining ch: */
        workspaceId: z.ZodOptional<z.ZodNumber>;
        channelId: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        message: {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        };
        workspaceId?: number | undefined;
        channelId?: number | undefined;
    }, {
        message: {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        };
        workspaceId?: number | undefined;
        channelId?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "message:created";
    payload: {
        message: {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        };
        workspaceId?: number | undefined;
        channelId?: number | undefined;
    };
}, {
    type: "message:created";
    payload: {
        message: {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        };
        workspaceId?: number | undefined;
        channelId?: number | undefined;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"message:edited">;
    payload: z.ZodObject<{
        message: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            channelId: z.ZodNumber;
            seq: z.ZodNumber;
            clientMsgId: z.ZodString;
            authorId: z.ZodNumber;
            type: z.ZodEnum<["text", "system"]>;
            text: z.ZodString;
            blocks: z.ZodDiscriminatedUnion<"v", [z.ZodObject<{
                v: z.ZodLiteral<1>;
                doc: z.ZodRecord<z.ZodString, z.ZodUnknown>;
                forwardedMessage: z.ZodOptional<z.ZodObject<{
                    messageId: z.ZodNumber;
                    channelId: z.ZodNumber;
                    parentId: z.ZodNullable<z.ZodNumber>;
                    channelName: z.ZodNullable<z.ZodString>;
                    channelType: z.ZodEnum<["public", "private", "dm", "group_dm"]>;
                    authorId: z.ZodNumber;
                    authorName: z.ZodString;
                    authorAvatarUrl: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>;
                    text: z.ZodString;
                    createdAt: z.ZodString;
                    attachmentNames: z.ZodArray<z.ZodString, "many">;
                }, "strip", z.ZodTypeAny, {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                }, {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                }>>;
            }, "strip", z.ZodTypeAny, {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            }, {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            }>]>;
            revision: z.ZodNumber;
            parentId: z.ZodNullable<z.ZodNumber>;
            isBroadcast: z.ZodBoolean;
            threadReplyCount: z.ZodNumber;
            threadLastReplyAt: z.ZodNullable<z.ZodString>;
            editedAt: z.ZodNullable<z.ZodString>;
            deletedAt: z.ZodNullable<z.ZodString>;
            createdAt: z.ZodString;
            reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
                emoji: z.ZodString;
                count: z.ZodNumber;
                reactedByMe: z.ZodBoolean;
            }, "strip", z.ZodTypeAny, {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }, {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }>, "many">>;
        }, "strip", z.ZodTypeAny, {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        }, {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        }>;
    }, "strip", z.ZodTypeAny, {
        message: {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        };
    }, {
        message: {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "message:edited";
    payload: {
        message: {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        };
    };
}, {
    type: "message:edited";
    payload: {
        message: {
            type: "text" | "system";
            id: number;
            createdAt: string;
            workspaceId: number;
            channelId: number;
            parentId: number | null;
            authorId: number;
            text: string;
            seq: number;
            clientMsgId: string;
            blocks: {
                v: 1;
                doc: Record<string, unknown>;
                forwardedMessage?: {
                    createdAt: string;
                    messageId: number;
                    channelId: number;
                    parentId: number | null;
                    channelName: string | null;
                    channelType: "public" | "private" | "dm" | "group_dm";
                    authorId: number;
                    authorName: string;
                    authorAvatarUrl: string | null;
                    text: string;
                    attachmentNames: string[];
                } | undefined;
            };
            revision: number;
            isBroadcast: boolean;
            threadReplyCount: number;
            threadLastReplyAt: string | null;
            editedAt: string | null;
            deletedAt: string | null;
            reactions?: {
                emoji: string;
                count: number;
                reactedByMe: boolean;
            }[] | undefined;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"message:deleted">;
    payload: z.ZodObject<{
        channelId: z.ZodNumber;
        messageId: z.ZodNumber;
        seq: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        messageId: number;
        channelId: number;
        seq: number;
    }, {
        messageId: number;
        channelId: number;
        seq: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "message:deleted";
    payload: {
        messageId: number;
        channelId: number;
        seq: number;
    };
}, {
    type: "message:deleted";
    payload: {
        messageId: number;
        channelId: number;
        seq: number;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"reaction:changed">;
    payload: z.ZodObject<{
        reaction: z.ZodObject<{
            messageId: z.ZodNumber;
            userId: z.ZodNumber;
            emoji: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            userId: number;
            messageId: number;
            emoji: string;
        }, {
            userId: number;
            messageId: number;
            emoji: string;
        }>;
        op: z.ZodEnum<["add", "remove"]>;
    }, "strip", z.ZodTypeAny, {
        reaction: {
            userId: number;
            messageId: number;
            emoji: string;
        };
        op: "add" | "remove";
    }, {
        reaction: {
            userId: number;
            messageId: number;
            emoji: string;
        };
        op: "add" | "remove";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "reaction:changed";
    payload: {
        reaction: {
            userId: number;
            messageId: number;
            emoji: string;
        };
        op: "add" | "remove";
    };
}, {
    type: "reaction:changed";
    payload: {
        reaction: {
            userId: number;
            messageId: number;
            emoji: string;
        };
        op: "add" | "remove";
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"pin:changed">;
    payload: z.ZodObject<{
        channelId: z.ZodNumber;
        messageId: z.ZodNumber;
        op: z.ZodEnum<["add", "remove"]>;
    }, "strip", z.ZodTypeAny, {
        messageId: number;
        channelId: number;
        op: "add" | "remove";
    }, {
        messageId: number;
        channelId: number;
        op: "add" | "remove";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "pin:changed";
    payload: {
        messageId: number;
        channelId: number;
        op: "add" | "remove";
    };
}, {
    type: "pin:changed";
    payload: {
        messageId: number;
        channelId: number;
        op: "add" | "remove";
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"channel:updated">;
    payload: z.ZodObject<{
        channel: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            type: z.ZodEnum<["public", "private", "dm", "group_dm"]>;
            name: z.ZodNullable<z.ZodString>;
            topic: z.ZodNullable<z.ZodString>;
            purpose: z.ZodNullable<z.ZodString>;
            createdBy: z.ZodNumber;
            isArchived: z.ZodBoolean;
            lastMessageAt: z.ZodNullable<z.ZodString>;
            memberCount: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            type: "public" | "private" | "dm" | "group_dm";
            id: number;
            name: string | null;
            workspaceId: number;
            topic: string | null;
            purpose: string | null;
            createdBy: number;
            isArchived: boolean;
            lastMessageAt: string | null;
            memberCount: number;
        }, {
            type: "public" | "private" | "dm" | "group_dm";
            id: number;
            name: string | null;
            workspaceId: number;
            topic: string | null;
            purpose: string | null;
            createdBy: number;
            isArchived: boolean;
            lastMessageAt: string | null;
            memberCount: number;
        }>;
    }, "strip", z.ZodTypeAny, {
        channel: {
            type: "public" | "private" | "dm" | "group_dm";
            id: number;
            name: string | null;
            workspaceId: number;
            topic: string | null;
            purpose: string | null;
            createdBy: number;
            isArchived: boolean;
            lastMessageAt: string | null;
            memberCount: number;
        };
    }, {
        channel: {
            type: "public" | "private" | "dm" | "group_dm";
            id: number;
            name: string | null;
            workspaceId: number;
            topic: string | null;
            purpose: string | null;
            createdBy: number;
            isArchived: boolean;
            lastMessageAt: string | null;
            memberCount: number;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "channel:updated";
    payload: {
        channel: {
            type: "public" | "private" | "dm" | "group_dm";
            id: number;
            name: string | null;
            workspaceId: number;
            topic: string | null;
            purpose: string | null;
            createdBy: number;
            isArchived: boolean;
            lastMessageAt: string | null;
            memberCount: number;
        };
    };
}, {
    type: "channel:updated";
    payload: {
        channel: {
            type: "public" | "private" | "dm" | "group_dm";
            id: number;
            name: string | null;
            workspaceId: number;
            topic: string | null;
            purpose: string | null;
            createdBy: number;
            isArchived: boolean;
            lastMessageAt: string | null;
            memberCount: number;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"read:updated">;
    payload: z.ZodObject<{
        channelMember: z.ZodObject<{
            channelId: z.ZodNumber;
            userId: z.ZodNumber;
            role: z.ZodEnum<["member", "owner"]>;
            joinedAt: z.ZodString;
            lastReadSeq: z.ZodNumber;
            lastReadAt: z.ZodNullable<z.ZodString>;
            mentionCount: z.ZodNumber;
            unreadCount: z.ZodOptional<z.ZodNumber>;
            isMuted: z.ZodBoolean;
            isStarred: z.ZodBoolean;
            isClosed: z.ZodBoolean;
        }, "strip", z.ZodTypeAny, {
            userId: number;
            role: "owner" | "member";
            joinedAt: string;
            channelId: number;
            lastReadSeq: number;
            lastReadAt: string | null;
            mentionCount: number;
            isMuted: boolean;
            isStarred: boolean;
            isClosed: boolean;
            unreadCount?: number | undefined;
        }, {
            userId: number;
            role: "owner" | "member";
            joinedAt: string;
            channelId: number;
            lastReadSeq: number;
            lastReadAt: string | null;
            mentionCount: number;
            isMuted: boolean;
            isStarred: boolean;
            isClosed: boolean;
            unreadCount?: number | undefined;
        }>;
    }, "strip", z.ZodTypeAny, {
        channelMember: {
            userId: number;
            role: "owner" | "member";
            joinedAt: string;
            channelId: number;
            lastReadSeq: number;
            lastReadAt: string | null;
            mentionCount: number;
            isMuted: boolean;
            isStarred: boolean;
            isClosed: boolean;
            unreadCount?: number | undefined;
        };
    }, {
        channelMember: {
            userId: number;
            role: "owner" | "member";
            joinedAt: string;
            channelId: number;
            lastReadSeq: number;
            lastReadAt: string | null;
            mentionCount: number;
            isMuted: boolean;
            isStarred: boolean;
            isClosed: boolean;
            unreadCount?: number | undefined;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "read:updated";
    payload: {
        channelMember: {
            userId: number;
            role: "owner" | "member";
            joinedAt: string;
            channelId: number;
            lastReadSeq: number;
            lastReadAt: string | null;
            mentionCount: number;
            isMuted: boolean;
            isStarred: boolean;
            isClosed: boolean;
            unreadCount?: number | undefined;
        };
    };
}, {
    type: "read:updated";
    payload: {
        channelMember: {
            userId: number;
            role: "owner" | "member";
            joinedAt: string;
            channelId: number;
            lastReadSeq: number;
            lastReadAt: string | null;
            mentionCount: number;
            isMuted: boolean;
            isStarred: boolean;
            isClosed: boolean;
            unreadCount?: number | undefined;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"typing:changed">;
    payload: z.ZodObject<{
        channelId: z.ZodNumber;
        userId: z.ZodNumber;
        isTyping: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        userId: number;
        channelId: number;
        isTyping: boolean;
    }, {
        userId: number;
        channelId: number;
        isTyping: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "typing:changed";
    payload: {
        userId: number;
        channelId: number;
        isTyping: boolean;
    };
}, {
    type: "typing:changed";
    payload: {
        userId: number;
        channelId: number;
        isTyping: boolean;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"presence:changed">;
    payload: z.ZodObject<{
        workspaceId: z.ZodNumber;
        userId: z.ZodNumber;
        status: z.ZodEnum<["active", "away", "offline"]>;
    }, "strip", z.ZodTypeAny, {
        status: "away" | "active" | "offline";
        workspaceId: number;
        userId: number;
    }, {
        status: "away" | "active" | "offline";
        workspaceId: number;
        userId: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "presence:changed";
    payload: {
        status: "away" | "active" | "offline";
        workspaceId: number;
        userId: number;
    };
}, {
    type: "presence:changed";
    payload: {
        status: "away" | "active" | "offline";
        workspaceId: number;
        userId: number;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"member:status_changed">;
    payload: z.ZodObject<{
        workspaceId: z.ZodNumber;
        userId: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        workspaceId: number;
        userId: number;
    }, {
        workspaceId: number;
        userId: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "member:status_changed";
    payload: {
        workspaceId: number;
        userId: number;
    };
}, {
    type: "member:status_changed";
    payload: {
        workspaceId: number;
        userId: number;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"saved:updated">;
    payload: z.ZodObject<{
        workspaceId: z.ZodNumber;
        messageId: z.ZodNumber;
        saved: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        workspaceId: number;
        messageId: number;
        saved: boolean;
    }, {
        workspaceId: number;
        messageId: number;
        saved: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "saved:updated";
    payload: {
        workspaceId: number;
        messageId: number;
        saved: boolean;
    };
}, {
    type: "saved:updated";
    payload: {
        workspaceId: number;
        messageId: number;
        saved: boolean;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"draft:updated">;
    payload: z.ZodObject<{
        workspaceId: z.ZodNumber;
        channelId: z.ZodNumber;
        threadRootMessageId: z.ZodNullable<z.ZodNumber>;
        text: z.ZodString;
        blocks: z.ZodNullable<z.ZodDiscriminatedUnion<"v", [z.ZodObject<{
            v: z.ZodLiteral<1>;
            doc: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            forwardedMessage: z.ZodOptional<z.ZodObject<{
                messageId: z.ZodNumber;
                channelId: z.ZodNumber;
                parentId: z.ZodNullable<z.ZodNumber>;
                channelName: z.ZodNullable<z.ZodString>;
                channelType: z.ZodEnum<["public", "private", "dm", "group_dm"]>;
                authorId: z.ZodNumber;
                authorName: z.ZodString;
                authorAvatarUrl: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>;
                text: z.ZodString;
                createdAt: z.ZodString;
                attachmentNames: z.ZodArray<z.ZodString, "many">;
            }, "strip", z.ZodTypeAny, {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            }, {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            }>>;
        }, "strip", z.ZodTypeAny, {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        }, {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        }>]>>;
        deleted: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        workspaceId: number;
        channelId: number;
        text: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        } | null;
        threadRootMessageId: number | null;
        deleted: boolean;
    }, {
        workspaceId: number;
        channelId: number;
        text: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        } | null;
        threadRootMessageId: number | null;
        deleted: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "draft:updated";
    payload: {
        workspaceId: number;
        channelId: number;
        text: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        } | null;
        threadRootMessageId: number | null;
        deleted: boolean;
    };
}, {
    type: "draft:updated";
    payload: {
        workspaceId: number;
        channelId: number;
        text: string;
        blocks: {
            v: 1;
            doc: Record<string, unknown>;
            forwardedMessage?: {
                createdAt: string;
                messageId: number;
                channelId: number;
                parentId: number | null;
                channelName: string | null;
                channelType: "public" | "private" | "dm" | "group_dm";
                authorId: number;
                authorName: string;
                authorAvatarUrl: string | null;
                text: string;
                attachmentNames: string[];
            } | undefined;
        } | null;
        threadRootMessageId: number | null;
        deleted: boolean;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"notification-preferences:updated">;
    payload: z.ZodObject<{
        preferences: z.ZodObject<{
            workspaceId: z.ZodNumber;
            messages: z.ZodEnum<["all", "mentions", "off"]>;
            calls: z.ZodBoolean;
            tasks: z.ZodBoolean;
            calendar: z.ZodBoolean;
            sound: z.ZodBoolean;
            inAppFlash: z.ZodBoolean;
            updatedAt: z.ZodNullable<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            workspaceId: number;
            updatedAt: string | null;
            messages: "all" | "mentions" | "off";
            calls: boolean;
            tasks: boolean;
            calendar: boolean;
            sound: boolean;
            inAppFlash: boolean;
        }, {
            workspaceId: number;
            updatedAt: string | null;
            messages: "all" | "mentions" | "off";
            calls: boolean;
            tasks: boolean;
            calendar: boolean;
            sound: boolean;
            inAppFlash: boolean;
        }>;
    }, "strip", z.ZodTypeAny, {
        preferences: {
            workspaceId: number;
            updatedAt: string | null;
            messages: "all" | "mentions" | "off";
            calls: boolean;
            tasks: boolean;
            calendar: boolean;
            sound: boolean;
            inAppFlash: boolean;
        };
    }, {
        preferences: {
            workspaceId: number;
            updatedAt: string | null;
            messages: "all" | "mentions" | "off";
            calls: boolean;
            tasks: boolean;
            calendar: boolean;
            sound: boolean;
            inAppFlash: boolean;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "notification-preferences:updated";
    payload: {
        preferences: {
            workspaceId: number;
            updatedAt: string | null;
            messages: "all" | "mentions" | "off";
            calls: boolean;
            tasks: boolean;
            calendar: boolean;
            sound: boolean;
            inAppFlash: boolean;
        };
    };
}, {
    type: "notification-preferences:updated";
    payload: {
        preferences: {
            workspaceId: number;
            updatedAt: string | null;
            messages: "all" | "mentions" | "off";
            calls: boolean;
            tasks: boolean;
            calendar: boolean;
            sound: boolean;
            inAppFlash: boolean;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"activity:read-updated">;
    payload: z.ZodObject<{
        workspaceId: z.ZodNumber;
        messageIds: z.ZodArray<z.ZodNumber, "many">;
        read: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        workspaceId: number;
        messageIds: number[];
        read: boolean;
    }, {
        workspaceId: number;
        messageIds: number[];
        read: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "activity:read-updated";
    payload: {
        workspaceId: number;
        messageIds: number[];
        read: boolean;
    };
}, {
    type: "activity:read-updated";
    payload: {
        workspaceId: number;
        messageIds: number[];
        read: boolean;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"thread:subscription-updated">;
    payload: z.ZodObject<{
        status: z.ZodObject<{
            workspaceId: z.ZodNumber;
            channelId: z.ZodNumber;
            rootMessageId: z.ZodNumber;
            following: z.ZodBoolean;
            reason: z.ZodNullable<z.ZodString>;
            lastReadReplySeq: z.ZodNumber;
            unreadReplyCount: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            workspaceId: number;
            channelId: number;
            following: boolean;
            reason: string | null;
            lastReadReplySeq: number;
            unreadReplyCount: number;
            rootMessageId: number;
        }, {
            workspaceId: number;
            channelId: number;
            following: boolean;
            reason: string | null;
            lastReadReplySeq: number;
            unreadReplyCount: number;
            rootMessageId: number;
        }>;
    }, "strip", z.ZodTypeAny, {
        status: {
            workspaceId: number;
            channelId: number;
            following: boolean;
            reason: string | null;
            lastReadReplySeq: number;
            unreadReplyCount: number;
            rootMessageId: number;
        };
    }, {
        status: {
            workspaceId: number;
            channelId: number;
            following: boolean;
            reason: string | null;
            lastReadReplySeq: number;
            unreadReplyCount: number;
            rootMessageId: number;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "thread:subscription-updated";
    payload: {
        status: {
            workspaceId: number;
            channelId: number;
            following: boolean;
            reason: string | null;
            lastReadReplySeq: number;
            unreadReplyCount: number;
            rootMessageId: number;
        };
    };
}, {
    type: "thread:subscription-updated";
    payload: {
        status: {
            workspaceId: number;
            channelId: number;
            following: boolean;
            reason: string | null;
            lastReadReplySeq: number;
            unreadReplyCount: number;
            rootMessageId: number;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"task:created">;
    payload: z.ZodObject<{
        task: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            title: z.ZodString;
            description: z.ZodNullable<z.ZodString>;
            status: z.ZodEnum<["todo", "in_progress", "done"]>;
            assigneeUserId: z.ZodNullable<z.ZodNumber>;
            dueAt: z.ZodNullable<z.ZodString>;
            createdBy: z.ZodNumber;
            channelId: z.ZodNullable<z.ZodNumber>;
            sourceMessageId: z.ZodNullable<z.ZodNumber>;
            completedAt: z.ZodNullable<z.ZodString>;
            deletedAt: z.ZodNullable<z.ZodString>;
            deletedBy: z.ZodNullable<z.ZodNumber>;
            createdAt: z.ZodString;
            updatedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        }, {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        }>;
    }, "strip", z.ZodTypeAny, {
        task: {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        };
    }, {
        task: {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "task:created";
    payload: {
        task: {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        };
    };
}, {
    type: "task:created";
    payload: {
        task: {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"task:updated">;
    payload: z.ZodObject<{
        task: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            title: z.ZodString;
            description: z.ZodNullable<z.ZodString>;
            status: z.ZodEnum<["todo", "in_progress", "done"]>;
            assigneeUserId: z.ZodNullable<z.ZodNumber>;
            dueAt: z.ZodNullable<z.ZodString>;
            createdBy: z.ZodNumber;
            channelId: z.ZodNullable<z.ZodNumber>;
            sourceMessageId: z.ZodNullable<z.ZodNumber>;
            completedAt: z.ZodNullable<z.ZodString>;
            deletedAt: z.ZodNullable<z.ZodString>;
            deletedBy: z.ZodNullable<z.ZodNumber>;
            createdAt: z.ZodString;
            updatedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        }, {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        }>;
    }, "strip", z.ZodTypeAny, {
        task: {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        };
    }, {
        task: {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "task:updated";
    payload: {
        task: {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        };
    };
}, {
    type: "task:updated";
    payload: {
        task: {
            description: string | null;
            title: string;
            status: "todo" | "in_progress" | "done";
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            deletedAt: string | null;
            updatedAt: string;
            assigneeUserId: number | null;
            dueAt: string | null;
            sourceMessageId: number | null;
            completedAt: string | null;
            deletedBy: number | null;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"task:deleted">;
    payload: z.ZodObject<{
        workspaceId: z.ZodNumber;
        taskId: z.ZodNumber;
        title: z.ZodString;
        createdBy: z.ZodNumber;
        deletedByUserId: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        title: string;
        workspaceId: number;
        createdBy: number;
        taskId: number;
        deletedByUserId: number;
    }, {
        title: string;
        workspaceId: number;
        createdBy: number;
        taskId: number;
        deletedByUserId: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "task:deleted";
    payload: {
        title: string;
        workspaceId: number;
        createdBy: number;
        taskId: number;
        deletedByUserId: number;
    };
}, {
    type: "task:deleted";
    payload: {
        title: string;
        workspaceId: number;
        createdBy: number;
        taskId: number;
        deletedByUserId: number;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"event:created">;
    payload: z.ZodObject<{
        event: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            title: z.ZodString;
            description: z.ZodNullable<z.ZodString>;
            location: z.ZodNullable<z.ZodString>;
            startsAt: z.ZodString;
            endsAt: z.ZodString;
            allDay: z.ZodBoolean;
            timezone: z.ZodString;
            recurrenceRule: z.ZodNullable<z.ZodString>;
            channelId: z.ZodNullable<z.ZodNumber>;
            createdBy: z.ZodNumber;
            attendees: z.ZodArray<z.ZodObject<{
                userId: z.ZodNumber;
                status: z.ZodEnum<["needs_action", "going", "maybe", "declined"]>;
                respondedAt: z.ZodNullable<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }, {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }>, "many">;
            seriesId: z.ZodNumber;
            occurrenceDate: z.ZodString;
            isOccurrence: z.ZodBoolean;
            isOverride: z.ZodBoolean;
            createdAt: z.ZodString;
            updatedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        }, {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        }>;
    }, "strip", z.ZodTypeAny, {
        event: {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        };
    }, {
        event: {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "event:created";
    payload: {
        event: {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        };
    };
}, {
    type: "event:created";
    payload: {
        event: {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"event:updated">;
    payload: z.ZodObject<{
        event: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            title: z.ZodString;
            description: z.ZodNullable<z.ZodString>;
            location: z.ZodNullable<z.ZodString>;
            startsAt: z.ZodString;
            endsAt: z.ZodString;
            allDay: z.ZodBoolean;
            timezone: z.ZodString;
            recurrenceRule: z.ZodNullable<z.ZodString>;
            channelId: z.ZodNullable<z.ZodNumber>;
            createdBy: z.ZodNumber;
            attendees: z.ZodArray<z.ZodObject<{
                userId: z.ZodNumber;
                status: z.ZodEnum<["needs_action", "going", "maybe", "declined"]>;
                respondedAt: z.ZodNullable<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }, {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }>, "many">;
            seriesId: z.ZodNumber;
            occurrenceDate: z.ZodString;
            isOccurrence: z.ZodBoolean;
            isOverride: z.ZodBoolean;
            createdAt: z.ZodString;
            updatedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        }, {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        }>;
    }, "strip", z.ZodTypeAny, {
        event: {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        };
    }, {
        event: {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "event:updated";
    payload: {
        event: {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        };
    };
}, {
    type: "event:updated";
    payload: {
        event: {
            description: string | null;
            title: string;
            id: number;
            createdAt: string;
            workspaceId: number;
            createdBy: number;
            channelId: number | null;
            updatedAt: string;
            location: string | null;
            startsAt: string;
            endsAt: string;
            allDay: boolean;
            timezone: string;
            recurrenceRule: string | null;
            attendees: {
                status: "needs_action" | "going" | "maybe" | "declined";
                userId: number;
                respondedAt: string | null;
            }[];
            seriesId: number;
            occurrenceDate: string;
            isOccurrence: boolean;
            isOverride: boolean;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"event:deleted">;
    payload: z.ZodObject<{
        workspaceId: z.ZodNumber;
        eventId: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        workspaceId: number;
        eventId: number;
    }, {
        workspaceId: number;
        eventId: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "event:deleted";
    payload: {
        workspaceId: number;
        eventId: number;
    };
}, {
    type: "event:deleted";
    payload: {
        workspaceId: number;
        eventId: number;
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"call:started">;
    payload: z.ZodObject<{
        call: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            kind: z.ZodEnum<["audio", "video", "connect"]>;
            status: z.ZodEnum<["ringing", "active", "ended", "missed"]>;
            channelId: z.ZodNullable<z.ZodNumber>;
            eventId: z.ZodNullable<z.ZodNumber>;
            title: z.ZodNullable<z.ZodString>;
            startedBy: z.ZodNumber;
            startedAt: z.ZodString;
            answeredAt: z.ZodNullable<z.ZodString>;
            endedAt: z.ZodNullable<z.ZodString>;
            durationSeconds: z.ZodNullable<z.ZodNumber>;
            participants: z.ZodArray<z.ZodObject<{
                userId: z.ZodNumber;
                state: z.ZodEnum<["ringing", "joined", "left", "declined", "missed"]>;
                invitedAt: z.ZodString;
                joinedAt: z.ZodNullable<z.ZodString>;
                leftAt: z.ZodNullable<z.ZodString>;
                seenAt: z.ZodNullable<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }, {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }>, "many">;
            recordingStatus: z.ZodDefault<z.ZodEnum<["idle", "recording", "processing", "ready", "failed"]>>;
            recordingObjectKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
            transcriptStatus: z.ZodDefault<z.ZodEnum<["idle", "processing", "ready", "failed"]>>;
            transcript: z.ZodDefault<z.ZodNullable<z.ZodString>>;
            summary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        }, "strip", z.ZodTypeAny, {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
            recordingObjectKey: string | null;
            transcriptStatus: "idle" | "processing" | "ready" | "failed";
            transcript: string | null;
            summary: string | null;
        }, {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
            recordingObjectKey?: string | null | undefined;
            transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
            transcript?: string | null | undefined;
            summary?: string | null | undefined;
        }>;
    }, "strip", z.ZodTypeAny, {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
            recordingObjectKey: string | null;
            transcriptStatus: "idle" | "processing" | "ready" | "failed";
            transcript: string | null;
            summary: string | null;
        };
    }, {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
            recordingObjectKey?: string | null | undefined;
            transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
            transcript?: string | null | undefined;
            summary?: string | null | undefined;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "call:started";
    payload: {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
            recordingObjectKey: string | null;
            transcriptStatus: "idle" | "processing" | "ready" | "failed";
            transcript: string | null;
            summary: string | null;
        };
    };
}, {
    type: "call:started";
    payload: {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
            recordingObjectKey?: string | null | undefined;
            transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
            transcript?: string | null | undefined;
            summary?: string | null | undefined;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"call:updated">;
    payload: z.ZodObject<{
        call: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            kind: z.ZodEnum<["audio", "video", "connect"]>;
            status: z.ZodEnum<["ringing", "active", "ended", "missed"]>;
            channelId: z.ZodNullable<z.ZodNumber>;
            eventId: z.ZodNullable<z.ZodNumber>;
            title: z.ZodNullable<z.ZodString>;
            startedBy: z.ZodNumber;
            startedAt: z.ZodString;
            answeredAt: z.ZodNullable<z.ZodString>;
            endedAt: z.ZodNullable<z.ZodString>;
            durationSeconds: z.ZodNullable<z.ZodNumber>;
            participants: z.ZodArray<z.ZodObject<{
                userId: z.ZodNumber;
                state: z.ZodEnum<["ringing", "joined", "left", "declined", "missed"]>;
                invitedAt: z.ZodString;
                joinedAt: z.ZodNullable<z.ZodString>;
                leftAt: z.ZodNullable<z.ZodString>;
                seenAt: z.ZodNullable<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }, {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }>, "many">;
            recordingStatus: z.ZodDefault<z.ZodEnum<["idle", "recording", "processing", "ready", "failed"]>>;
            recordingObjectKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
            transcriptStatus: z.ZodDefault<z.ZodEnum<["idle", "processing", "ready", "failed"]>>;
            transcript: z.ZodDefault<z.ZodNullable<z.ZodString>>;
            summary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        }, "strip", z.ZodTypeAny, {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
            recordingObjectKey: string | null;
            transcriptStatus: "idle" | "processing" | "ready" | "failed";
            transcript: string | null;
            summary: string | null;
        }, {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
            recordingObjectKey?: string | null | undefined;
            transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
            transcript?: string | null | undefined;
            summary?: string | null | undefined;
        }>;
    }, "strip", z.ZodTypeAny, {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
            recordingObjectKey: string | null;
            transcriptStatus: "idle" | "processing" | "ready" | "failed";
            transcript: string | null;
            summary: string | null;
        };
    }, {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
            recordingObjectKey?: string | null | undefined;
            transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
            transcript?: string | null | undefined;
            summary?: string | null | undefined;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "call:updated";
    payload: {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
            recordingObjectKey: string | null;
            transcriptStatus: "idle" | "processing" | "ready" | "failed";
            transcript: string | null;
            summary: string | null;
        };
    };
}, {
    type: "call:updated";
    payload: {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
            recordingObjectKey?: string | null | undefined;
            transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
            transcript?: string | null | undefined;
            summary?: string | null | undefined;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"call:ended">;
    payload: z.ZodObject<{
        call: z.ZodObject<{
            id: z.ZodNumber;
            workspaceId: z.ZodNumber;
            kind: z.ZodEnum<["audio", "video", "connect"]>;
            status: z.ZodEnum<["ringing", "active", "ended", "missed"]>;
            channelId: z.ZodNullable<z.ZodNumber>;
            eventId: z.ZodNullable<z.ZodNumber>;
            title: z.ZodNullable<z.ZodString>;
            startedBy: z.ZodNumber;
            startedAt: z.ZodString;
            answeredAt: z.ZodNullable<z.ZodString>;
            endedAt: z.ZodNullable<z.ZodString>;
            durationSeconds: z.ZodNullable<z.ZodNumber>;
            participants: z.ZodArray<z.ZodObject<{
                userId: z.ZodNumber;
                state: z.ZodEnum<["ringing", "joined", "left", "declined", "missed"]>;
                invitedAt: z.ZodString;
                joinedAt: z.ZodNullable<z.ZodString>;
                leftAt: z.ZodNullable<z.ZodString>;
                seenAt: z.ZodNullable<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }, {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }>, "many">;
            recordingStatus: z.ZodDefault<z.ZodEnum<["idle", "recording", "processing", "ready", "failed"]>>;
            recordingObjectKey: z.ZodDefault<z.ZodNullable<z.ZodString>>;
            transcriptStatus: z.ZodDefault<z.ZodEnum<["idle", "processing", "ready", "failed"]>>;
            transcript: z.ZodDefault<z.ZodNullable<z.ZodString>>;
            summary: z.ZodDefault<z.ZodNullable<z.ZodString>>;
        }, "strip", z.ZodTypeAny, {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
            recordingObjectKey: string | null;
            transcriptStatus: "idle" | "processing" | "ready" | "failed";
            transcript: string | null;
            summary: string | null;
        }, {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
            recordingObjectKey?: string | null | undefined;
            transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
            transcript?: string | null | undefined;
            summary?: string | null | undefined;
        }>;
    }, "strip", z.ZodTypeAny, {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
            recordingObjectKey: string | null;
            transcriptStatus: "idle" | "processing" | "ready" | "failed";
            transcript: string | null;
            summary: string | null;
        };
    }, {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
            recordingObjectKey?: string | null | undefined;
            transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
            transcript?: string | null | undefined;
            summary?: string | null | undefined;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "call:ended";
    payload: {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus: "idle" | "recording" | "processing" | "ready" | "failed";
            recordingObjectKey: string | null;
            transcriptStatus: "idle" | "processing" | "ready" | "failed";
            transcript: string | null;
            summary: string | null;
        };
    };
}, {
    type: "call:ended";
    payload: {
        call: {
            title: string | null;
            status: "ringing" | "active" | "ended" | "missed";
            id: number;
            workspaceId: number;
            channelId: number | null;
            participants: {
                userId: number;
                joinedAt: string | null;
                state: "declined" | "ringing" | "missed" | "joined" | "left";
                invitedAt: string;
                leftAt: string | null;
                seenAt: string | null;
            }[];
            kind: "audio" | "video" | "connect";
            eventId: number | null;
            startedBy: number;
            startedAt: string;
            answeredAt: string | null;
            endedAt: string | null;
            durationSeconds: number | null;
            recordingStatus?: "idle" | "recording" | "processing" | "ready" | "failed" | undefined;
            recordingObjectKey?: string | null | undefined;
            transcriptStatus?: "idle" | "processing" | "ready" | "failed" | undefined;
            transcript?: string | null | undefined;
            summary?: string | null | undefined;
        };
    };
}>, z.ZodObject<{
    type: z.ZodLiteral<"call:signal">;
    payload: z.ZodObject<{
        callId: z.ZodNumber;
        fromUserId: z.ZodNumber;
        signal: z.ZodEnum<["offer", "answer", "ice", "ready"]>;
        data: z.ZodUnknown;
    }, "strip", z.ZodTypeAny, {
        callId: number;
        signal: "ready" | "offer" | "answer" | "ice";
        fromUserId: number;
        data?: unknown;
    }, {
        callId: number;
        signal: "ready" | "offer" | "answer" | "ice";
        fromUserId: number;
        data?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "call:signal";
    payload: {
        callId: number;
        signal: "ready" | "offer" | "answer" | "ice";
        fromUserId: number;
        data?: unknown;
    };
}, {
    type: "call:signal";
    payload: {
        callId: number;
        signal: "ready" | "offer" | "answer" | "ice";
        fromUserId: number;
        data?: unknown;
    };
}>]>;
export type ServerEventEnvelope = z.infer<typeof ServerEventEnvelope>;
//# sourceMappingURL=events.d.ts.map