import { TelegramChatMemberSummary, TelegramChatSummary, TelegramCommandScope, TelegramFragmentConfig, TelegramHooksMap, TelegramMessage, TelegramMessageSummary, TelegramUpdate, TelegramUpdateType, TelegramUserSummary } from "./types.js"; import * as _fragno_dev_core0 from "@fragno-dev/core"; import * as _fragno_dev_db0 from "@fragno-dev/db"; import * as _fragno_dev_db_schema0 from "@fragno-dev/db/schema"; import { z } from "zod"; import * as _standard_schema_spec0 from "@standard-schema/spec"; //#region src/routes.d.ts declare const telegramRoutesFactory: _fragno_dev_core0.RouteFactory> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"firstName", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"lastName", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isBot", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"languageCode", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_user_username", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["username"]>>>; chat: _fragno_dev_db_schema0.Table> & Record<"type", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"title", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isForum", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"commandBindings", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>; chatMember: _fragno_dev_db_schema0.Table> & Record<"chatId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference, _fragno_dev_db_schema0.FragnoReference>> & Record<"userId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference, _fragno_dev_db_schema0.FragnoReference>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"joinedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date | null>> & Record<"leftAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record & Record<"chatMemberChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table> & Record<"type", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"title", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isForum", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"commandBindings", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>> & Record<"chatMemberUser", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"firstName", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"lastName", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isBot", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"languageCode", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_user_username", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["username"]>>>>>, Record> & Record<"idx_chat_member_chat", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["chatId"]>> & Record<"idx_chat_member_user", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["userId"]>> & Record<"idx_chat_member_unique", _fragno_dev_db_schema0.Index, _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference, _fragno_dev_db_schema0.FragnoReference>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["chatId", "userId"]>>>; message: _fragno_dev_db_schema0.Table> & Record<"chatId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference, _fragno_dev_db_schema0.FragnoReference>> & Record<"fromUserId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference | null, _fragno_dev_db_schema0.FragnoReference | null>> & Record<"senderChatId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference | null, _fragno_dev_db_schema0.FragnoReference | null>> & Record<"replyToMessageId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference | null, _fragno_dev_db_schema0.FragnoReference | null>> & Record<"messageType", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"text", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"payload", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"sentAt", _fragno_dev_db_schema0.Column<"timestamp", Date | _fragno_dev_db0.DbNow, Date>> & Record<"editedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date | null>> & Record<"commandName", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record & Record<"messageChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table> & Record<"type", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"title", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isForum", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"commandBindings", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>> & Record<"messageAuthor", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"firstName", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"lastName", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isBot", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"languageCode", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_user_username", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["username"]>>>>> & Record<"messageSenderChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table> & Record<"type", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"title", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isForum", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"commandBindings", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>> & Record<"messageReplyTo", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table> & Record<"chatId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference, _fragno_dev_db_schema0.FragnoReference>> & Record<"fromUserId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference | null, _fragno_dev_db_schema0.FragnoReference | null>> & Record<"senderChatId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference | null, _fragno_dev_db_schema0.FragnoReference | null>> & Record<"replyToMessageId", _fragno_dev_db_schema0.Column<"bigint", string | bigint | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference | null, _fragno_dev_db_schema0.FragnoReference | null>> & Record<"messageType", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"text", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"payload", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"sentAt", _fragno_dev_db_schema0.Column<"timestamp", Date | _fragno_dev_db0.DbNow, Date>> & Record<"editedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date | null>> & Record<"commandName", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record & Record<"messageChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table> & Record<"type", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"title", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isForum", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"commandBindings", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>> & Record<"messageAuthor", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"firstName", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"lastName", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isBot", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"languageCode", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_user_username", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["username"]>>>>> & Record<"messageSenderChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table> & Record<"type", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"title", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"username", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"isForum", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"commandBindings", _fragno_dev_db_schema0.Column<"json", unknown, unknown>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", (Date | _fragno_dev_db0.DbNow) | null, Date>>, Record, Record> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>>, Record> & Record<"idx_message_chat", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["chatId"]>> & Record<"idx_message_chat_sent", _fragno_dev_db_schema0.Index, _fragno_dev_db_schema0.Column<"timestamp", Date | _fragno_dev_db0.DbNow, Date>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["chatId", "sentAt"]>> & Record<"idx_message_from", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fromUserId"]>> & Record<"idx_message_sent", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["sentAt"]>>>>>, Record> & Record<"idx_message_chat", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["chatId"]>> & Record<"idx_message_chat_sent", _fragno_dev_db_schema0.Index, _fragno_dev_db_schema0.Column<"timestamp", Date | _fragno_dev_db0.DbNow, Date>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["chatId", "sentAt"]>> & Record<"idx_message_from", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fromUserId"]>> & Record<"idx_message_sent", _fragno_dev_db_schema0.Index] & _fragno_dev_db_schema0.AnyColumn[], readonly ["sentAt"]>>>; }>>, _fragno_dev_core0.BoundServices<{ processIncomingUpdate: (this: _fragno_dev_db0.DatabaseServiceContext, update: TelegramUpdate) => _fragno_dev_db0.TxResult<{ kind: "ignored"; updateId: number; }, { kind: "ignored"; updateId: number; }> | _fragno_dev_db0.TxResult<{ kind: "ignored"; updateId: number; } | { kind: "message"; updateId: number; updateType: TelegramMessageSummary["messageType"]; chat: TelegramChatSummary; message: TelegramMessageSummary; fromUser: TelegramUserSummary | null; command: { name: string; args: string; raw: string; scopes: TelegramCommandScope[]; } | null; }, [{ id: string | _fragno_dev_db_schema0.FragnoId; type: string; title: string | null; username: string | null; isForum: boolean; commandBindings: unknown | null; createdAt: Date; updatedAt: Date; }[], { id: string | _fragno_dev_db_schema0.FragnoId; username: string | null; firstName: string; lastName: string | null; isBot: boolean; languageCode: string | null; createdAt: Date; updatedAt: Date; }[], { id: string | _fragno_dev_db_schema0.FragnoId; chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference; userId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference; status: string; joinedAt: Date | null; leftAt: Date | null; createdAt: Date; updatedAt: Date; chatMemberUser?: { id: string | _fragno_dev_db_schema0.FragnoId; username: string | null; firstName: string; lastName: string | null; isBot: boolean; languageCode: string | null; createdAt: Date; updatedAt: Date; } | null; }[], { id: string | _fragno_dev_db_schema0.FragnoId; chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference; fromUserId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null; senderChatId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null; replyToMessageId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null; messageType: string; text: string | null; payload: unknown | null; sentAt: Date; editedAt: Date | null; commandName: string | null; messageAuthor?: { id: string | _fragno_dev_db_schema0.FragnoId; username: string | null; firstName: string; lastName: string | null; isBot: boolean; languageCode: string | null; createdAt: Date; updatedAt: Date; } | null; } | null]>; bindCommand: (this: _fragno_dev_db0.DatabaseServiceContext, input: { chatId: string; commandName: string; enabled: boolean; scopes?: TelegramCommandScope[]; }) => _fragno_dev_db0.TxResult<{ ok: false; reason: "chat_not_found"; binding?: undefined; } | { ok: true; binding: { chatId: string; commandName: string; enabled: boolean; scopes: ("private" | "group" | "supergroup" | "channel")[] | undefined; }; reason?: undefined; }, [{ id: _fragno_dev_db_schema0.FragnoId; type: string; title: string | null; username: string | null; isForum: boolean; commandBindings: unknown; createdAt: Date; updatedAt: Date; } | null]>; listChats: (this: _fragno_dev_db0.DatabaseServiceContext, type?: TelegramChatSummary["type"]) => _fragno_dev_db0.TxResult; getChat: (this: _fragno_dev_db0.DatabaseServiceContext, chatId: string) => _fragno_dev_db0.TxResult; getChatWithMembers: (this: _fragno_dev_db0.DatabaseServiceContext, chatId: string) => _fragno_dev_db0.TxResult<{ chat: TelegramChatSummary | null; members: TelegramChatMemberSummary[]; }, { chat: TelegramChatSummary | null; members: TelegramChatMemberSummary[]; }>; listMessages: (this: _fragno_dev_db0.DatabaseServiceContext, input: { chatId: string; pageSize: number; order: "asc" | "desc"; cursor?: _fragno_dev_db0.Cursor; }) => _fragno_dev_db0.TxResult<{ messages: TelegramMessageSummary[]; cursor: _fragno_dev_db0.Cursor | undefined; hasNextPage: boolean; }, { messages: TelegramMessageSummary[]; cursor: _fragno_dev_db0.Cursor | undefined; hasNextPage: boolean; }>; upsertOutgoingMessage: (this: _fragno_dev_db0.DatabaseServiceContext, input: { message: TelegramMessage; messageType: TelegramUpdateType; }) => _fragno_dev_db0.TxResult; }>, {}, readonly [_fragno_dev_core0.FragnoRouteConfig<"POST", "/telegram/webhook", z.ZodUnknown, z.ZodObject<{ ok: z.ZodBoolean; duplicate: z.ZodOptional; }, z.core.$strip>, "UNAUTHORIZED" | "INVALID_UPDATE", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/commands/bind", z.ZodObject<{ chatId: z.ZodString; commandName: z.ZodString; enabled: z.ZodDefault>; scopes: z.ZodOptional>>; }, z.core.$strip>, z.ZodObject<{ chatId: z.ZodString; commandName: z.ZodString; enabled: z.ZodBoolean; scopes: z.ZodOptional>>; }, z.core.$strip>, "chat_not_found" | "command_not_found" | "invalid_scopes", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/commands", _standard_schema_spec0.StandardSchemaV1 | undefined, z.ZodObject<{ commands: z.ZodArray; scopes: z.ZodArray>; enabled: z.ZodOptional; effectiveScopes: z.ZodOptional>>; binding: z.ZodOptional; scopes: z.ZodOptional>>; }, z.core.$strip>>>; }, z.core.$strip>>; }, z.core.$strip>, "chat_not_found", "chatId", _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats", _standard_schema_spec0.StandardSchemaV1 | undefined, z.ZodArray; title: z.ZodNullable; username: z.ZodNullable; isForum: z.ZodBoolean; commandBindings: z.ZodNullable; scopes: z.ZodOptional>>; }, z.core.$strip>>>; createdAt: z.ZodDate; updatedAt: z.ZodDate; }, z.core.$strip>>, string, "type", _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats/:chatId", _standard_schema_spec0.StandardSchemaV1 | undefined, z.ZodObject<{ chat: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ private: "private"; group: "group"; supergroup: "supergroup"; channel: "channel"; }>; title: z.ZodNullable; username: z.ZodNullable; isForum: z.ZodBoolean; commandBindings: z.ZodNullable; scopes: z.ZodOptional>>; }, z.core.$strip>>>; createdAt: z.ZodDate; updatedAt: z.ZodDate; }, z.core.$strip>; members: z.ZodArray; leftAt: z.ZodNullable; user: z.ZodNullable; firstName: z.ZodString; lastName: z.ZodNullable; isBot: z.ZodBoolean; languageCode: z.ZodNullable; createdAt: z.ZodDate; updatedAt: z.ZodDate; }, z.core.$strip>>; createdAt: z.ZodDate; updatedAt: z.ZodDate; }, z.core.$strip>>; }, z.core.$strip>, "chat_not_found", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats/:chatId/messages", _standard_schema_spec0.StandardSchemaV1 | undefined, z.ZodObject<{ messages: z.ZodArray; senderChatId: z.ZodNullable; replyToMessageId: z.ZodNullable; messageType: z.ZodEnum<{ message: "message"; edited_message: "edited_message"; channel_post: "channel_post"; }>; text: z.ZodNullable; attachments: z.ZodArray; fileId: z.ZodString; fileUniqueId: z.ZodString; fileSize: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; thumbnail: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; sizes: z.ZodArray; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"voice">; fileId: z.ZodString; fileUniqueId: z.ZodString; fileSize: z.ZodOptional; duration: z.ZodNumber; mimeType: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"audio">; fileId: z.ZodString; fileUniqueId: z.ZodString; fileSize: z.ZodOptional; duration: z.ZodNumber; performer: z.ZodOptional; title: z.ZodOptional; fileName: z.ZodOptional; mimeType: z.ZodOptional; thumbnail: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"document">; fileId: z.ZodString; fileUniqueId: z.ZodString; fileSize: z.ZodOptional; fileName: z.ZodOptional; mimeType: z.ZodOptional; thumbnail: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"video">; fileId: z.ZodString; fileUniqueId: z.ZodString; fileSize: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; duration: z.ZodNumber; fileName: z.ZodOptional; mimeType: z.ZodOptional; thumbnail: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"video_note">; fileId: z.ZodString; fileUniqueId: z.ZodString; fileSize: z.ZodOptional; length: z.ZodNumber; duration: z.ZodNumber; thumbnail: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"sticker">; fileId: z.ZodString; fileUniqueId: z.ZodString; fileSize: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; emoji: z.ZodOptional; setName: z.ZodOptional; isAnimated: z.ZodBoolean; isVideo: z.ZodBoolean; thumbnail: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"animation">; fileId: z.ZodString; fileUniqueId: z.ZodString; fileSize: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; duration: z.ZodNumber; fileName: z.ZodOptional; mimeType: z.ZodOptional; thumbnail: z.ZodOptional; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>], "kind">>; payload: z.ZodNullable; sentAt: z.ZodDate; editedAt: z.ZodNullable; commandName: z.ZodNullable; fromUser: z.ZodNullable; firstName: z.ZodString; lastName: z.ZodNullable; isBot: z.ZodBoolean; languageCode: z.ZodNullable; createdAt: z.ZodDate; updatedAt: z.ZodDate; }, z.core.$strip>>; }, z.core.$strip>>; cursor: z.ZodOptional; hasNextPage: z.ZodBoolean; }, z.core.$strip>, string, "pageSize" | "cursor" | "order", _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/actions", z.ZodObject<{ action: z.ZodEnum<{ typing: "typing"; upload_photo: "upload_photo"; record_video: "record_video"; upload_video: "upload_video"; record_voice: "record_voice"; upload_voice: "upload_voice"; upload_document: "upload_document"; choose_sticker: "choose_sticker"; find_location: "find_location"; record_video_note: "record_video_note"; upload_video_note: "upload_video_note"; }>; }, z.core.$strip>, z.ZodObject<{ ok: z.ZodBoolean; }, z.core.$strip>, "TELEGRAM_API_ERROR", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/send", z.ZodObject<{ text: z.ZodString; parseMode: z.ZodOptional>; disableWebPagePreview: z.ZodOptional; replyToMessageId: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ ok: z.ZodBoolean; queued: z.ZodBoolean; }, z.core.$strip>, string, string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/messages/:messageId/edit", z.ZodObject<{ text: z.ZodString; parseMode: z.ZodOptional>; disableWebPagePreview: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ ok: z.ZodBoolean; queued: z.ZodBoolean; }, z.core.$strip>, "INVALID_MESSAGE_ID", string, _fragno_dev_db0.DatabaseRequestContext>]>; //#endregion export { telegramRoutesFactory }; //# sourceMappingURL=routes.d.ts.map