import { TelegramApi, TelegramApiResult, TelegramAttachment, TelegramAttachmentKind, TelegramAttachmentPhotoSize, TelegramChatMemberHookPayload, TelegramChatMemberSummary, TelegramChatSummary, TelegramChatType, TelegramCommandApi, TelegramCommandApiResult, TelegramCommandBinding, TelegramCommandBindings, TelegramCommandContext, TelegramCommandDefinition, TelegramCommandRegistry, TelegramCommandScope, TelegramConfigBuilder, TelegramFragmentConfig, TelegramHooks, TelegramHooksMap, TelegramMessage, TelegramMessageHookPayload, TelegramMessageSummary, TelegramQueuedResult, TelegramUpdate, TelegramUpdateType, TelegramUser, TelegramUserSummary, createTelegram, defineCommand, telegramAttachmentKindSchema, telegramAttachmentSchema } from "./types.js"; import { telegramFragmentDefinition } from "./definition.js"; import { telegramRoutesFactory } from "./routes.js"; import { telegramSchema } from "./schema.js"; import * as _fragno_dev_core_client0 from "@fragno-dev/core/client"; import { FragnoPublicClientConfig } from "@fragno-dev/core/client"; import * as _fragno_dev_core0 from "@fragno-dev/core"; import { FragnoRouteConfig } from "@fragno-dev/core"; import * as _fragno_dev_db0 from "@fragno-dev/db"; import { FragnoPublicConfigWithDatabase } from "@fragno-dev/db"; import * as _fragno_dev_db_schema0 from "@fragno-dev/db/schema"; import * as zod from "zod"; import * as zod_v4_core0 from "zod/v4/core"; import * as _standard_schema_spec0 from "@standard-schema/spec"; import * as _fragno_dev_db_fragment_definition_builder0 from "@fragno-dev/db/fragment-definition-builder"; import * as _fragno_dev_core_api0 from "@fragno-dev/core/api"; //#region src/index.d.ts declare function createTelegramFragment(config: TelegramFragmentConfig, fragnoConfig: FragnoPublicConfigWithDatabase): _fragno_dev_core0.FragnoInstantiatedFragment; }, zod_v4_core0.$strip>, "UNAUTHORIZED" | "INVALID_UPDATE", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/commands/bind", zod.ZodObject<{ chatId: zod.ZodString; commandName: zod.ZodString; enabled: zod.ZodDefault>; scopes: zod.ZodOptional>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ chatId: zod.ZodString; commandName: zod.ZodString; enabled: zod.ZodBoolean; scopes: zod.ZodOptional>>; }, zod_v4_core0.$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, zod.ZodObject<{ commands: zod.ZodArray; scopes: zod.ZodArray>; enabled: zod.ZodOptional; effectiveScopes: zod.ZodOptional>>; binding: zod.ZodOptional; scopes: zod.ZodOptional>>; }, zod_v4_core0.$strip>>>; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, "chat_not_found", "chatId", _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats", _standard_schema_spec0.StandardSchemaV1 | undefined, zod.ZodArray; title: zod.ZodNullable; username: zod.ZodNullable; isForum: zod.ZodBoolean; commandBindings: zod.ZodNullable; scopes: zod.ZodOptional>>; }, zod_v4_core0.$strip>>>; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>, string, "type", _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats/:chatId", _standard_schema_spec0.StandardSchemaV1 | undefined, zod.ZodObject<{ chat: zod.ZodObject<{ id: zod.ZodString; type: zod.ZodEnum<{ private: "private"; group: "group"; supergroup: "supergroup"; channel: "channel"; }>; title: zod.ZodNullable; username: zod.ZodNullable; isForum: zod.ZodBoolean; commandBindings: zod.ZodNullable; scopes: zod.ZodOptional>>; }, zod_v4_core0.$strip>>>; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>; members: zod.ZodArray; leftAt: zod.ZodNullable; user: zod.ZodNullable; firstName: zod.ZodString; lastName: zod.ZodNullable; isBot: zod.ZodBoolean; languageCode: zod.ZodNullable; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, "chat_not_found", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats/:chatId/messages", _standard_schema_spec0.StandardSchemaV1 | undefined, zod.ZodObject<{ messages: zod.ZodArray; senderChatId: zod.ZodNullable; replyToMessageId: zod.ZodNullable; messageType: zod.ZodEnum<{ message: "message"; edited_message: "edited_message"; channel_post: "channel_post"; }>; text: zod.ZodNullable; attachments: zod.ZodArray; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; sizes: zod.ZodArray; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"voice">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; duration: zod.ZodNumber; mimeType: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"audio">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; duration: zod.ZodNumber; performer: zod.ZodOptional; title: zod.ZodOptional; fileName: zod.ZodOptional; mimeType: zod.ZodOptional; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"document">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; fileName: zod.ZodOptional; mimeType: zod.ZodOptional; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"video">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; duration: zod.ZodNumber; fileName: zod.ZodOptional; mimeType: zod.ZodOptional; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"video_note">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; length: zod.ZodNumber; duration: zod.ZodNumber; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"sticker">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; emoji: zod.ZodOptional; setName: zod.ZodOptional; isAnimated: zod.ZodBoolean; isVideo: zod.ZodBoolean; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"animation">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; duration: zod.ZodNumber; fileName: zod.ZodOptional; mimeType: zod.ZodOptional; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>], "kind">>; payload: zod.ZodNullable; sentAt: zod.ZodDate; editedAt: zod.ZodNullable; commandName: zod.ZodNullable; fromUser: zod.ZodNullable; firstName: zod.ZodString; lastName: zod.ZodNullable; isBot: zod.ZodBoolean; languageCode: zod.ZodNullable; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>>; cursor: zod.ZodOptional; hasNextPage: zod.ZodBoolean; }, zod_v4_core0.$strip>, string, "pageSize" | "cursor" | "order", _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/actions", zod.ZodObject<{ action: zod.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"; }>; }, zod_v4_core0.$strip>, zod.ZodObject<{ ok: zod.ZodBoolean; }, zod_v4_core0.$strip>, "TELEGRAM_API_ERROR", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/send", zod.ZodObject<{ text: zod.ZodString; parseMode: zod.ZodOptional>; disableWebPagePreview: zod.ZodOptional; replyToMessageId: zod.ZodOptional>; }, zod_v4_core0.$strip>, zod.ZodObject<{ ok: zod.ZodBoolean; queued: zod.ZodBoolean; }, zod_v4_core0.$strip>, string, string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/messages/:messageId/edit", zod.ZodObject<{ text: zod.ZodString; parseMode: zod.ZodOptional>; disableWebPagePreview: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ ok: zod.ZodBoolean; queued: zod.ZodBoolean; }, zod_v4_core0.$strip>, "INVALID_MESSAGE_ID", string, _fragno_dev_db0.DatabaseRequestContext>], _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<{ user: _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"]>>>; 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; }>, _fragno_dev_db0.DatabaseServiceContext, _fragno_dev_db0.DatabaseRequestContext, _fragno_dev_db_fragment_definition_builder0.DatabaseRequestStorage, FragnoPublicConfigWithDatabase>; declare function createTelegramFragmentClients(fragnoConfig?: FragnoPublicClientConfig): { useCommands: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/commands", zod.ZodObject<{ commands: zod.ZodArray; scopes: zod.ZodArray>; enabled: zod.ZodOptional; effectiveScopes: zod.ZodOptional>>; binding: zod.ZodOptional; scopes: zod.ZodOptional>>; }, zod_v4_core0.$strip>>>; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, "chat_not_found", "chatId">; useBindCommand: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api0.NonGetHTTPMethod, "/commands/bind", zod.ZodObject<{ chatId: zod.ZodString; commandName: zod.ZodString; enabled: zod.ZodDefault>; scopes: zod.ZodOptional>>; }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{ chatId: zod.ZodString; commandName: zod.ZodString; enabled: zod.ZodBoolean; scopes: zod.ZodOptional>>; }, zod_v4_core0.$strip> | undefined, "chat_not_found" | "command_not_found" | "invalid_scopes", string>; useChats: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/chats", zod.ZodArray; title: zod.ZodNullable; username: zod.ZodNullable; isForum: zod.ZodBoolean; commandBindings: zod.ZodNullable; scopes: zod.ZodOptional>>; }, zod_v4_core0.$strip>>>; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>, string, "type">; useChat: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/chats/:chatId", zod.ZodObject<{ chat: zod.ZodObject<{ id: zod.ZodString; type: zod.ZodEnum<{ private: "private"; group: "group"; supergroup: "supergroup"; channel: "channel"; }>; title: zod.ZodNullable; username: zod.ZodNullable; isForum: zod.ZodBoolean; commandBindings: zod.ZodNullable; scopes: zod.ZodOptional>>; }, zod_v4_core0.$strip>>>; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>; members: zod.ZodArray; leftAt: zod.ZodNullable; user: zod.ZodNullable; firstName: zod.ZodString; lastName: zod.ZodNullable; isBot: zod.ZodBoolean; languageCode: zod.ZodNullable; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, "chat_not_found", string>; useChatMessages: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/chats/:chatId/messages", zod.ZodObject<{ messages: zod.ZodArray; senderChatId: zod.ZodNullable; replyToMessageId: zod.ZodNullable; messageType: zod.ZodEnum<{ message: "message"; edited_message: "edited_message"; channel_post: "channel_post"; }>; text: zod.ZodNullable; attachments: zod.ZodArray; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; sizes: zod.ZodArray; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"voice">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; duration: zod.ZodNumber; mimeType: zod.ZodOptional; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"audio">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; duration: zod.ZodNumber; performer: zod.ZodOptional; title: zod.ZodOptional; fileName: zod.ZodOptional; mimeType: zod.ZodOptional; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"document">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; fileName: zod.ZodOptional; mimeType: zod.ZodOptional; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"video">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; duration: zod.ZodNumber; fileName: zod.ZodOptional; mimeType: zod.ZodOptional; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"video_note">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; length: zod.ZodNumber; duration: zod.ZodNumber; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"sticker">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; emoji: zod.ZodOptional; setName: zod.ZodOptional; isAnimated: zod.ZodBoolean; isVideo: zod.ZodBoolean; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>, zod.ZodObject<{ kind: zod.ZodLiteral<"animation">; fileId: zod.ZodString; fileUniqueId: zod.ZodString; fileSize: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; duration: zod.ZodNumber; fileName: zod.ZodOptional; mimeType: zod.ZodOptional; thumbnail: zod.ZodOptional; width: zod.ZodNumber; height: zod.ZodNumber; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>], "kind">>; payload: zod.ZodNullable; sentAt: zod.ZodDate; editedAt: zod.ZodNullable; commandName: zod.ZodNullable; fromUser: zod.ZodNullable; firstName: zod.ZodString; lastName: zod.ZodNullable; isBot: zod.ZodBoolean; languageCode: zod.ZodNullable; createdAt: zod.ZodDate; updatedAt: zod.ZodDate; }, zod_v4_core0.$strip>>; }, zod_v4_core0.$strip>>; cursor: zod.ZodOptional; hasNextPage: zod.ZodBoolean; }, zod_v4_core0.$strip>, string, "pageSize" | "cursor" | "order">; useChatAction: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api0.NonGetHTTPMethod, "/chats/:chatId/actions", zod.ZodObject<{ action: zod.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"; }>; }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{ ok: zod.ZodBoolean; }, zod_v4_core0.$strip> | undefined, "TELEGRAM_API_ERROR", string>; useSendMessage: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api0.NonGetHTTPMethod, "/chats/:chatId/send", zod.ZodObject<{ text: zod.ZodString; parseMode: zod.ZodOptional>; disableWebPagePreview: zod.ZodOptional; replyToMessageId: zod.ZodOptional>; }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{ ok: zod.ZodBoolean; queued: zod.ZodBoolean; }, zod_v4_core0.$strip> | undefined, string, string>; useEditMessage: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api0.NonGetHTTPMethod, "/chats/:chatId/messages/:messageId/edit", zod.ZodObject<{ text: zod.ZodString; parseMode: zod.ZodOptional>; disableWebPagePreview: zod.ZodOptional; }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{ ok: zod.ZodBoolean; queued: zod.ZodBoolean; }, zod_v4_core0.$strip> | undefined, "INVALID_MESSAGE_ID", string>; }; //#endregion export { type FragnoRouteConfig, type TelegramApi, type TelegramApiResult, type TelegramAttachment, type TelegramAttachmentKind, type TelegramAttachmentPhotoSize, type TelegramChatMemberHookPayload, type TelegramChatMemberSummary, type TelegramChatSummary, type TelegramChatType, type TelegramCommandApi, type TelegramCommandApiResult, type TelegramCommandBinding, type TelegramCommandBindings, type TelegramCommandContext, type TelegramCommandDefinition, type TelegramCommandRegistry, type TelegramCommandScope, type TelegramConfigBuilder, type TelegramFragmentConfig, type TelegramHooks, type TelegramMessage, type TelegramMessageHookPayload, type TelegramMessageSummary, type TelegramQueuedResult, type TelegramUpdate, type TelegramUpdateType, type TelegramUser, type TelegramUserSummary, createTelegram, createTelegramFragment, createTelegramFragmentClients, defineCommand, telegramAttachmentKindSchema, telegramAttachmentSchema, telegramFragmentDefinition, telegramRoutesFactory, telegramSchema }; //# sourceMappingURL=index.d.ts.map