@fragno-dev/telegram-fragment 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/LICENSE.md +16 -0
  2. package/README.md +87 -0
  3. package/dist/browser/client/react.d.ts +226 -0
  4. package/dist/browser/client/react.d.ts.map +1 -0
  5. package/dist/browser/client/react.js +166 -0
  6. package/dist/browser/client/react.js.map +1 -0
  7. package/dist/browser/client/solid.d.ts +228 -0
  8. package/dist/browser/client/solid.d.ts.map +1 -0
  9. package/dist/browser/client/solid.js +136 -0
  10. package/dist/browser/client/solid.js.map +1 -0
  11. package/dist/browser/client/svelte.d.ts +223 -0
  12. package/dist/browser/client/svelte.d.ts.map +1 -0
  13. package/dist/browser/client/svelte.js +134 -0
  14. package/dist/browser/client/svelte.js.map +1 -0
  15. package/dist/browser/client/vanilla.d.ts +252 -0
  16. package/dist/browser/client/vanilla.d.ts.map +1 -0
  17. package/dist/browser/client/vanilla.js +160 -0
  18. package/dist/browser/client/vanilla.js.map +1 -0
  19. package/dist/browser/client/vue.d.ts +226 -0
  20. package/dist/browser/client/vue.d.ts.map +1 -0
  21. package/dist/browser/client/vue.js +133 -0
  22. package/dist/browser/client/vue.js.map +1 -0
  23. package/dist/browser/client-Bk-J98pf.d.ts +679 -0
  24. package/dist/browser/client-Bk-J98pf.d.ts.map +1 -0
  25. package/dist/browser/index.d.ts +1392 -0
  26. package/dist/browser/index.d.ts.map +1 -0
  27. package/dist/browser/index.js +24 -0
  28. package/dist/browser/index.js.map +1 -0
  29. package/dist/browser/schema-QDMf15Vn.js +2343 -0
  30. package/dist/browser/schema-QDMf15Vn.js.map +1 -0
  31. package/dist/node/command-handler-api.js +42 -0
  32. package/dist/node/command-handler-api.js.map +1 -0
  33. package/dist/node/definition.d.ts +194 -0
  34. package/dist/node/definition.d.ts.map +1 -0
  35. package/dist/node/definition.js +90 -0
  36. package/dist/node/definition.js.map +1 -0
  37. package/dist/node/index.d.ts +587 -0
  38. package/dist/node/index.d.ts.map +1 -0
  39. package/dist/node/index.js +29 -0
  40. package/dist/node/index.js.map +1 -0
  41. package/dist/node/routes.d.ts +385 -0
  42. package/dist/node/routes.d.ts.map +1 -0
  43. package/dist/node/routes.js +392 -0
  44. package/dist/node/routes.js.map +1 -0
  45. package/dist/node/schema.d.ts +13 -0
  46. package/dist/node/schema.d.ts.map +1 -0
  47. package/dist/node/schema.js +78 -0
  48. package/dist/node/schema.js.map +1 -0
  49. package/dist/node/services.js +589 -0
  50. package/dist/node/services.js.map +1 -0
  51. package/dist/node/telegram-api.js +41 -0
  52. package/dist/node/telegram-api.js.map +1 -0
  53. package/dist/node/telegram-utils.js +61 -0
  54. package/dist/node/telegram-utils.js.map +1 -0
  55. package/dist/node/types.d.ts +245 -0
  56. package/dist/node/types.d.ts.map +1 -0
  57. package/dist/node/types.js +92 -0
  58. package/dist/node/types.js.map +1 -0
  59. package/dist/tsconfig.tsbuildinfo +1 -0
  60. package/package.json +96 -0
@@ -0,0 +1,29 @@
1
+ import { telegramSchema } from "./schema.js";
2
+ import { createTelegram, defineCommand } from "./types.js";
3
+ import { telegramFragmentDefinition } from "./definition.js";
4
+ import { telegramRoutesFactory } from "./routes.js";
5
+ import { createClientBuilder } from "@fragno-dev/core/client";
6
+ import { instantiate } from "@fragno-dev/core";
7
+
8
+ //#region src/index.ts
9
+ const routes = [telegramRoutesFactory];
10
+ function createTelegramFragment(config, fragnoConfig) {
11
+ return instantiate(telegramFragmentDefinition).withConfig(config).withRoutes(routes).withOptions(fragnoConfig).build();
12
+ }
13
+ function createTelegramFragmentClients(fragnoConfig = {}) {
14
+ const builder = createClientBuilder(telegramFragmentDefinition, fragnoConfig, routes);
15
+ return {
16
+ useCommands: builder.createHook("/commands"),
17
+ useBindCommand: builder.createMutator("POST", "/commands/bind"),
18
+ useChats: builder.createHook("/chats"),
19
+ useChat: builder.createHook("/chats/:chatId"),
20
+ useChatMessages: builder.createHook("/chats/:chatId/messages"),
21
+ useChatAction: builder.createMutator("POST", "/chats/:chatId/actions"),
22
+ useSendMessage: builder.createMutator("POST", "/chats/:chatId/send"),
23
+ useEditMessage: builder.createMutator("POST", "/chats/:chatId/messages/:messageId/edit")
24
+ };
25
+ }
26
+
27
+ //#endregion
28
+ export { createTelegram, createTelegramFragment, createTelegramFragmentClients, defineCommand, telegramFragmentDefinition, telegramRoutesFactory, telegramSchema };
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["import { createClientBuilder } from \"@fragno-dev/core/client\";\nimport type { FragnoPublicClientConfig } from \"@fragno-dev/core/client\";\n\nimport { instantiate } from \"@fragno-dev/core\";\nimport type { FragnoPublicConfigWithDatabase } from \"@fragno-dev/db\";\n\nimport { telegramFragmentDefinition } from \"./definition\";\nimport { telegramRoutesFactory } from \"./routes\";\nimport type { TelegramFragmentConfig } from \"./types\";\n\nconst routes = [telegramRoutesFactory] as const;\n\nexport function createTelegramFragment(\n config: TelegramFragmentConfig,\n fragnoConfig: FragnoPublicConfigWithDatabase,\n) {\n return instantiate(telegramFragmentDefinition)\n .withConfig(config)\n .withRoutes(routes)\n .withOptions(fragnoConfig)\n .build();\n}\n\nexport function createTelegramFragmentClients(fragnoConfig: FragnoPublicClientConfig = {}) {\n const builder = createClientBuilder(telegramFragmentDefinition, fragnoConfig, routes);\n\n return {\n useCommands: builder.createHook(\"/commands\"),\n useBindCommand: builder.createMutator(\"POST\", \"/commands/bind\"),\n useChats: builder.createHook(\"/chats\"),\n useChat: builder.createHook(\"/chats/:chatId\"),\n useChatMessages: builder.createHook(\"/chats/:chatId/messages\"),\n useChatAction: builder.createMutator(\"POST\", \"/chats/:chatId/actions\"),\n useSendMessage: builder.createMutator(\"POST\", \"/chats/:chatId/send\"),\n useEditMessage: builder.createMutator(\"POST\", \"/chats/:chatId/messages/:messageId/edit\"),\n };\n}\n\nexport { telegramFragmentDefinition } from \"./definition\";\nexport { telegramRoutesFactory } from \"./routes\";\nexport { telegramSchema } from \"./schema\";\nexport { createTelegram, defineCommand } from \"./types\";\nexport type {\n TelegramApi,\n TelegramApiResult,\n TelegramCommandApi,\n TelegramCommandApiResult,\n TelegramChatMemberHookPayload,\n TelegramChatMemberSummary,\n TelegramChatSummary,\n TelegramChatType,\n TelegramCommandBinding,\n TelegramCommandBindings,\n TelegramConfigBuilder,\n TelegramCommandContext,\n TelegramCommandDefinition,\n TelegramCommandRegistry,\n TelegramCommandScope,\n TelegramFragmentConfig,\n TelegramHooks,\n TelegramMessage,\n TelegramMessageHookPayload,\n TelegramMessageSummary,\n TelegramQueuedResult,\n TelegramUpdateType,\n TelegramUpdate,\n TelegramUser,\n TelegramUserSummary,\n} from \"./types\";\nexport type { FragnoRouteConfig } from \"@fragno-dev/core\";\n"],"mappings":";;;;;;;;AAUA,MAAM,SAAS,CAAC,sBAAsB;AAEtC,SAAgB,uBACd,QACA,cACA;AACA,QAAO,YAAY,2BAA2B,CAC3C,WAAW,OAAO,CAClB,WAAW,OAAO,CAClB,YAAY,aAAa,CACzB,OAAO;;AAGZ,SAAgB,8BAA8B,eAAyC,EAAE,EAAE;CACzF,MAAM,UAAU,oBAAoB,4BAA4B,cAAc,OAAO;AAErF,QAAO;EACL,aAAa,QAAQ,WAAW,YAAY;EAC5C,gBAAgB,QAAQ,cAAc,QAAQ,iBAAiB;EAC/D,UAAU,QAAQ,WAAW,SAAS;EACtC,SAAS,QAAQ,WAAW,iBAAiB;EAC7C,iBAAiB,QAAQ,WAAW,0BAA0B;EAC9D,eAAe,QAAQ,cAAc,QAAQ,yBAAyB;EACtE,gBAAgB,QAAQ,cAAc,QAAQ,sBAAsB;EACpE,gBAAgB,QAAQ,cAAc,QAAQ,0CAA0C;EACzF"}
@@ -0,0 +1,385 @@
1
+ import { TelegramChatMemberSummary, TelegramChatSummary, TelegramCommandScope, TelegramFragmentConfig, TelegramHooksMap, TelegramMessage, TelegramMessageSummary, TelegramUpdate, TelegramUpdateType, TelegramUserSummary } from "./types.js";
2
+ import * as _fragno_dev_core0 from "@fragno-dev/core";
3
+ import * as _fragno_dev_db0 from "@fragno-dev/db";
4
+ import * as _fragno_dev_db_schema0 from "@fragno-dev/db/schema";
5
+ import { z } from "zod";
6
+ import * as _standard_schema_spec0 from "@standard-schema/spec";
7
+
8
+ //#region src/routes.d.ts
9
+ declare const telegramRoutesFactory: _fragno_dev_core0.RouteFactory<TelegramFragmentConfig, _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<{
10
+ user: _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_user_username", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["username"]>>>;
11
+ chat: _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>;
12
+ chatMember: _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation> & Record<"chatMemberChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>> & Record<"chatMemberUser", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_user_username", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["username"]>>>>>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_chat_member_chat", _fragno_dev_db_schema0.Index<readonly [_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"]>> & Record<"idx_chat_member_user", _fragno_dev_db_schema0.Index<readonly [_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 ["userId"]>> & Record<"idx_chat_member_unique", _fragno_dev_db_schema0.Index<readonly [_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.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"]>>>;
13
+ message: _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation> & Record<"messageChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>> & Record<"messageAuthor", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_user_username", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["username"]>>>>> & Record<"messageSenderChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>> & Record<"messageReplyTo", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation> & Record<"messageChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>> & Record<"messageAuthor", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_user_username", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["username"]>>>>> & Record<"messageSenderChat", _fragno_dev_db_schema0.Relation<"one", _fragno_dev_db_schema0.Table<Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(128)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & 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<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_chat_type", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["type"]>>>>>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_message_chat", _fragno_dev_db_schema0.Index<readonly [_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"]>> & Record<"idx_message_chat_sent", _fragno_dev_db_schema0.Index<readonly [_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.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<readonly [_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>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fromUserId"]>> & Record<"idx_message_sent", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"timestamp", Date | _fragno_dev_db0.DbNow, Date>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["sentAt"]>>>>>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_message_chat", _fragno_dev_db_schema0.Index<readonly [_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"]>> & Record<"idx_message_chat_sent", _fragno_dev_db_schema0.Index<readonly [_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.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<readonly [_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>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["fromUserId"]>> & Record<"idx_message_sent", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"timestamp", Date | _fragno_dev_db0.DbNow, Date>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["sentAt"]>>>;
14
+ }>>, _fragno_dev_core0.BoundServices<{
15
+ processIncomingUpdate: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, update: TelegramUpdate) => _fragno_dev_db0.TxResult<{
16
+ kind: "ignored";
17
+ updateId: number;
18
+ }, {
19
+ kind: "ignored";
20
+ updateId: number;
21
+ }> | _fragno_dev_db0.TxResult<{
22
+ kind: "ignored";
23
+ updateId: number;
24
+ } | {
25
+ kind: "message";
26
+ updateId: number;
27
+ updateType: TelegramMessageSummary["messageType"];
28
+ chat: TelegramChatSummary;
29
+ message: TelegramMessageSummary;
30
+ fromUser: TelegramUserSummary | null;
31
+ command: {
32
+ name: string;
33
+ args: string;
34
+ raw: string;
35
+ scopes: TelegramCommandScope[];
36
+ } | null;
37
+ }, [{
38
+ id: string | _fragno_dev_db_schema0.FragnoId;
39
+ type: string;
40
+ title: string | null;
41
+ username: string | null;
42
+ isForum: boolean;
43
+ commandBindings: unknown | null;
44
+ createdAt: Date;
45
+ updatedAt: Date;
46
+ }[], {
47
+ id: string | _fragno_dev_db_schema0.FragnoId;
48
+ username: string | null;
49
+ firstName: string;
50
+ lastName: string | null;
51
+ isBot: boolean;
52
+ languageCode: string | null;
53
+ createdAt: Date;
54
+ updatedAt: Date;
55
+ }[], {
56
+ id: string | _fragno_dev_db_schema0.FragnoId;
57
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
58
+ userId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
59
+ status: string;
60
+ joinedAt: Date | null;
61
+ leftAt: Date | null;
62
+ createdAt: Date;
63
+ updatedAt: Date;
64
+ chatMemberUser?: {
65
+ id: string | _fragno_dev_db_schema0.FragnoId;
66
+ username: string | null;
67
+ firstName: string;
68
+ lastName: string | null;
69
+ isBot: boolean;
70
+ languageCode: string | null;
71
+ createdAt: Date;
72
+ updatedAt: Date;
73
+ } | null;
74
+ }[], {
75
+ id: string | _fragno_dev_db_schema0.FragnoId;
76
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
77
+ fromUserId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
78
+ senderChatId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
79
+ replyToMessageId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
80
+ messageType: string;
81
+ text: string | null;
82
+ payload: unknown | null;
83
+ sentAt: Date;
84
+ editedAt: Date | null;
85
+ commandName: string | null;
86
+ messageAuthor?: {
87
+ id: string | _fragno_dev_db_schema0.FragnoId;
88
+ username: string | null;
89
+ firstName: string;
90
+ lastName: string | null;
91
+ isBot: boolean;
92
+ languageCode: string | null;
93
+ createdAt: Date;
94
+ updatedAt: Date;
95
+ } | null;
96
+ } | null]>;
97
+ bindCommand: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
98
+ chatId: string;
99
+ commandName: string;
100
+ enabled: boolean;
101
+ scopes?: TelegramCommandScope[];
102
+ }) => _fragno_dev_db0.TxResult<{
103
+ ok: false;
104
+ reason: "chat_not_found";
105
+ binding?: undefined;
106
+ } | {
107
+ ok: true;
108
+ binding: {
109
+ chatId: string;
110
+ commandName: string;
111
+ enabled: boolean;
112
+ scopes: ("private" | "group" | "supergroup" | "channel")[] | undefined;
113
+ };
114
+ reason?: undefined;
115
+ }, [{
116
+ id: _fragno_dev_db_schema0.FragnoId;
117
+ type: string;
118
+ title: string | null;
119
+ username: string | null;
120
+ isForum: boolean;
121
+ commandBindings: unknown;
122
+ createdAt: Date;
123
+ updatedAt: Date;
124
+ } | null]>;
125
+ listChats: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, type?: TelegramChatSummary["type"]) => _fragno_dev_db0.TxResult<TelegramChatSummary[], TelegramChatSummary[]>;
126
+ getChat: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, chatId: string) => _fragno_dev_db0.TxResult<TelegramChatSummary | null, TelegramChatSummary | null>;
127
+ getChatWithMembers: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, chatId: string) => _fragno_dev_db0.TxResult<{
128
+ chat: TelegramChatSummary | null;
129
+ members: TelegramChatMemberSummary[];
130
+ }, {
131
+ chat: TelegramChatSummary | null;
132
+ members: TelegramChatMemberSummary[];
133
+ }>;
134
+ listMessages: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
135
+ chatId: string;
136
+ pageSize: number;
137
+ order: "asc" | "desc";
138
+ cursor?: _fragno_dev_db0.Cursor;
139
+ }) => _fragno_dev_db0.TxResult<{
140
+ messages: TelegramMessageSummary[];
141
+ cursor: _fragno_dev_db0.Cursor | undefined;
142
+ hasNextPage: boolean;
143
+ }, {
144
+ messages: TelegramMessageSummary[];
145
+ cursor: _fragno_dev_db0.Cursor | undefined;
146
+ hasNextPage: boolean;
147
+ }>;
148
+ upsertOutgoingMessage: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
149
+ message: TelegramMessage;
150
+ messageType: TelegramUpdateType;
151
+ }) => _fragno_dev_db0.TxResult<void, [{
152
+ id: string | _fragno_dev_db_schema0.FragnoId;
153
+ type: string;
154
+ title: string | null;
155
+ username: string | null;
156
+ isForum: boolean;
157
+ commandBindings: unknown | null;
158
+ createdAt: Date;
159
+ updatedAt: Date;
160
+ }[], {
161
+ id: string | _fragno_dev_db_schema0.FragnoId;
162
+ username: string | null;
163
+ firstName: string;
164
+ lastName: string | null;
165
+ isBot: boolean;
166
+ languageCode: string | null;
167
+ createdAt: Date;
168
+ updatedAt: Date;
169
+ }[], {
170
+ id: string | _fragno_dev_db_schema0.FragnoId;
171
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
172
+ fromUserId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
173
+ senderChatId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
174
+ replyToMessageId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
175
+ messageType: string;
176
+ text: string | null;
177
+ payload: unknown | null;
178
+ sentAt: Date;
179
+ editedAt: Date | null;
180
+ commandName: string | null;
181
+ messageAuthor?: {
182
+ id: string | _fragno_dev_db_schema0.FragnoId;
183
+ username: string | null;
184
+ firstName: string;
185
+ lastName: string | null;
186
+ isBot: boolean;
187
+ languageCode: string | null;
188
+ createdAt: Date;
189
+ updatedAt: Date;
190
+ } | null;
191
+ } | null]>;
192
+ }>, {}, readonly [_fragno_dev_core0.FragnoRouteConfig<"POST", "/telegram/webhook", z.ZodObject<{
193
+ update_id: z.ZodNumber;
194
+ message: z.ZodOptional<z.ZodType<TelegramMessage, unknown, z.core.$ZodTypeInternals<TelegramMessage, unknown>>>;
195
+ edited_message: z.ZodOptional<z.ZodType<TelegramMessage, unknown, z.core.$ZodTypeInternals<TelegramMessage, unknown>>>;
196
+ channel_post: z.ZodOptional<z.ZodType<TelegramMessage, unknown, z.core.$ZodTypeInternals<TelegramMessage, unknown>>>;
197
+ }, z.core.$loose>, z.ZodObject<{
198
+ ok: z.ZodBoolean;
199
+ duplicate: z.ZodOptional<z.ZodBoolean>;
200
+ }, z.core.$strip>, "UNAUTHORIZED", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/commands/bind", z.ZodObject<{
201
+ chatId: z.ZodString;
202
+ commandName: z.ZodString;
203
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
204
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
205
+ private: "private";
206
+ group: "group";
207
+ supergroup: "supergroup";
208
+ channel: "channel";
209
+ }>>>;
210
+ }, z.core.$strip>, z.ZodObject<{
211
+ chatId: z.ZodString;
212
+ commandName: z.ZodString;
213
+ enabled: z.ZodBoolean;
214
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
215
+ private: "private";
216
+ group: "group";
217
+ supergroup: "supergroup";
218
+ channel: "channel";
219
+ }>>>;
220
+ }, z.core.$strip>, "chat_not_found" | "command_not_found" | "invalid_scopes", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/commands", _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
221
+ commands: z.ZodArray<z.ZodObject<{
222
+ name: z.ZodString;
223
+ description: z.ZodOptional<z.ZodString>;
224
+ scopes: z.ZodArray<z.ZodEnum<{
225
+ private: "private";
226
+ group: "group";
227
+ supergroup: "supergroup";
228
+ channel: "channel";
229
+ }>>;
230
+ enabled: z.ZodOptional<z.ZodBoolean>;
231
+ effectiveScopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
232
+ private: "private";
233
+ group: "group";
234
+ supergroup: "supergroup";
235
+ channel: "channel";
236
+ }>>>;
237
+ binding: z.ZodOptional<z.ZodNullable<z.ZodObject<{
238
+ enabled: z.ZodOptional<z.ZodBoolean>;
239
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
240
+ private: "private";
241
+ group: "group";
242
+ supergroup: "supergroup";
243
+ channel: "channel";
244
+ }>>>;
245
+ }, z.core.$strip>>>;
246
+ }, z.core.$strip>>;
247
+ }, z.core.$strip>, "chat_not_found", "chatId", _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats", _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined, z.ZodArray<z.ZodObject<{
248
+ id: z.ZodString;
249
+ type: z.ZodEnum<{
250
+ private: "private";
251
+ group: "group";
252
+ supergroup: "supergroup";
253
+ channel: "channel";
254
+ }>;
255
+ title: z.ZodNullable<z.ZodString>;
256
+ username: z.ZodNullable<z.ZodString>;
257
+ isForum: z.ZodBoolean;
258
+ commandBindings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
259
+ enabled: z.ZodOptional<z.ZodBoolean>;
260
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
261
+ private: "private";
262
+ group: "group";
263
+ supergroup: "supergroup";
264
+ channel: "channel";
265
+ }>>>;
266
+ }, z.core.$loose>>>;
267
+ createdAt: z.ZodDate;
268
+ updatedAt: z.ZodDate;
269
+ }, z.core.$strip>>, string, "type", _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats/:chatId", _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
270
+ chat: z.ZodObject<{
271
+ id: z.ZodString;
272
+ type: z.ZodEnum<{
273
+ private: "private";
274
+ group: "group";
275
+ supergroup: "supergroup";
276
+ channel: "channel";
277
+ }>;
278
+ title: z.ZodNullable<z.ZodString>;
279
+ username: z.ZodNullable<z.ZodString>;
280
+ isForum: z.ZodBoolean;
281
+ commandBindings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
282
+ enabled: z.ZodOptional<z.ZodBoolean>;
283
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
284
+ private: "private";
285
+ group: "group";
286
+ supergroup: "supergroup";
287
+ channel: "channel";
288
+ }>>>;
289
+ }, z.core.$loose>>>;
290
+ createdAt: z.ZodDate;
291
+ updatedAt: z.ZodDate;
292
+ }, z.core.$strip>;
293
+ members: z.ZodArray<z.ZodObject<{
294
+ id: z.ZodString;
295
+ chatId: z.ZodString;
296
+ userId: z.ZodString;
297
+ status: z.ZodString;
298
+ joinedAt: z.ZodNullable<z.ZodDate>;
299
+ leftAt: z.ZodNullable<z.ZodDate>;
300
+ user: z.ZodNullable<z.ZodObject<{
301
+ id: z.ZodString;
302
+ username: z.ZodNullable<z.ZodString>;
303
+ firstName: z.ZodString;
304
+ lastName: z.ZodNullable<z.ZodString>;
305
+ isBot: z.ZodBoolean;
306
+ languageCode: z.ZodNullable<z.ZodString>;
307
+ createdAt: z.ZodDate;
308
+ updatedAt: z.ZodDate;
309
+ }, z.core.$strip>>;
310
+ createdAt: z.ZodDate;
311
+ updatedAt: z.ZodDate;
312
+ }, z.core.$strip>>;
313
+ }, z.core.$strip>, "chat_not_found", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats/:chatId/messages", _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined, z.ZodObject<{
314
+ messages: z.ZodArray<z.ZodObject<{
315
+ id: z.ZodString;
316
+ chatId: z.ZodString;
317
+ fromUserId: z.ZodNullable<z.ZodString>;
318
+ senderChatId: z.ZodNullable<z.ZodString>;
319
+ replyToMessageId: z.ZodNullable<z.ZodString>;
320
+ messageType: z.ZodEnum<{
321
+ message: "message";
322
+ edited_message: "edited_message";
323
+ channel_post: "channel_post";
324
+ }>;
325
+ text: z.ZodNullable<z.ZodString>;
326
+ payload: z.ZodNullable<z.ZodUnknown>;
327
+ sentAt: z.ZodDate;
328
+ editedAt: z.ZodNullable<z.ZodDate>;
329
+ commandName: z.ZodNullable<z.ZodString>;
330
+ fromUser: z.ZodNullable<z.ZodObject<{
331
+ id: z.ZodString;
332
+ username: z.ZodNullable<z.ZodString>;
333
+ firstName: z.ZodString;
334
+ lastName: z.ZodNullable<z.ZodString>;
335
+ isBot: z.ZodBoolean;
336
+ languageCode: z.ZodNullable<z.ZodString>;
337
+ createdAt: z.ZodDate;
338
+ updatedAt: z.ZodDate;
339
+ }, z.core.$strip>>;
340
+ }, z.core.$strip>>;
341
+ cursor: z.ZodOptional<z.ZodString>;
342
+ hasNextPage: z.ZodBoolean;
343
+ }, z.core.$strip>, string, "pageSize" | "cursor" | "order", _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/actions", z.ZodObject<{
344
+ action: z.ZodEnum<{
345
+ typing: "typing";
346
+ upload_photo: "upload_photo";
347
+ record_video: "record_video";
348
+ upload_video: "upload_video";
349
+ record_voice: "record_voice";
350
+ upload_voice: "upload_voice";
351
+ upload_document: "upload_document";
352
+ choose_sticker: "choose_sticker";
353
+ find_location: "find_location";
354
+ record_video_note: "record_video_note";
355
+ upload_video_note: "upload_video_note";
356
+ }>;
357
+ }, z.core.$strip>, z.ZodObject<{
358
+ ok: z.ZodBoolean;
359
+ }, z.core.$strip>, "TELEGRAM_API_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/send", z.ZodObject<{
360
+ text: z.ZodString;
361
+ parseMode: z.ZodOptional<z.ZodEnum<{
362
+ MarkdownV2: "MarkdownV2";
363
+ Markdown: "Markdown";
364
+ HTML: "HTML";
365
+ }>>;
366
+ disableWebPagePreview: z.ZodOptional<z.ZodBoolean>;
367
+ replyToMessageId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
368
+ }, z.core.$strip>, z.ZodObject<{
369
+ ok: z.ZodBoolean;
370
+ queued: z.ZodBoolean;
371
+ }, z.core.$strip>, string, string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/messages/:messageId/edit", z.ZodObject<{
372
+ text: z.ZodString;
373
+ parseMode: z.ZodOptional<z.ZodEnum<{
374
+ MarkdownV2: "MarkdownV2";
375
+ Markdown: "Markdown";
376
+ HTML: "HTML";
377
+ }>>;
378
+ disableWebPagePreview: z.ZodOptional<z.ZodBoolean>;
379
+ }, z.core.$strip>, z.ZodObject<{
380
+ ok: z.ZodBoolean;
381
+ queued: z.ZodBoolean;
382
+ }, z.core.$strip>, "INVALID_MESSAGE_ID", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>]>;
383
+ //#endregion
384
+ export { telegramRoutesFactory };
385
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","names":[],"sources":["../../src/routes.ts"],"mappings":";;;;;;;;cAqJa,qBAAA,oBAAqB,YAAA,CA4UjC,sBAAA,EA5UiC,eAAA,CAAA,4BAAA,wBAAA,MAAA;2GAAA,sBAAA,CAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6U4pX,oBAAA;EAAA;;;;;;;;;;;;;;QAAA,sBAAA,CAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;6BAAszF,MAAA;EAAA;cAAA,sBAAA"}