@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,1392 @@
1
+ import { n as FragnoClientMutatorData, o as NonGetHTTPMethod, s as FragnoPublicClientConfig, t as FragnoClientHookData } from "./client-Bk-J98pf.js";
2
+ import * as _fragno_dev_core0 from "@fragno-dev/core";
3
+ import { FragnoRouteConfig } from "@fragno-dev/core";
4
+ import * as zod from "zod";
5
+ import { z } from "zod";
6
+ import * as _fragno_dev_db_schema0 from "@fragno-dev/db/schema";
7
+ import * as zod_v4_core0 from "zod/v4/core";
8
+ import * as _standard_schema_spec0 from "@standard-schema/spec";
9
+ import * as _fragno_dev_db0 from "@fragno-dev/db";
10
+ import { FragnoPublicConfigWithDatabase, HookFn, HookHandlerTx } from "@fragno-dev/db";
11
+ import * as _fragno_dev_db_fragment_definition_builder0 from "@fragno-dev/db/fragment-definition-builder";
12
+
13
+ //#region src/types.d.ts
14
+ declare const telegramChatTypeSchema: z.ZodEnum<{
15
+ private: "private";
16
+ group: "group";
17
+ supergroup: "supergroup";
18
+ channel: "channel";
19
+ }>;
20
+ type TelegramChatType = z.infer<typeof telegramChatTypeSchema>;
21
+ type TelegramCommandScope = TelegramChatType;
22
+ declare const telegramMessageEntitySchema: z.ZodObject<{
23
+ type: z.ZodString;
24
+ offset: z.ZodNumber;
25
+ length: z.ZodNumber;
26
+ }, z.core.$loose>;
27
+ type TelegramMessageEntity = z.infer<typeof telegramMessageEntitySchema>;
28
+ declare const telegramUserSchema: z.ZodObject<{
29
+ id: z.ZodNumber;
30
+ is_bot: z.ZodOptional<z.ZodBoolean>;
31
+ first_name: z.ZodString;
32
+ last_name: z.ZodOptional<z.ZodString>;
33
+ username: z.ZodOptional<z.ZodString>;
34
+ language_code: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$loose>;
36
+ type TelegramUser = z.infer<typeof telegramUserSchema>;
37
+ declare const telegramChatSchema: z.ZodObject<{
38
+ id: z.ZodNumber;
39
+ type: z.ZodEnum<{
40
+ private: "private";
41
+ group: "group";
42
+ supergroup: "supergroup";
43
+ channel: "channel";
44
+ }>;
45
+ title: z.ZodOptional<z.ZodString>;
46
+ username: z.ZodOptional<z.ZodString>;
47
+ is_forum: z.ZodOptional<z.ZodBoolean>;
48
+ }, z.core.$loose>;
49
+ type TelegramChat = z.infer<typeof telegramChatSchema>;
50
+ interface TelegramMessage {
51
+ message_id: number;
52
+ date: number;
53
+ edit_date?: number;
54
+ text?: string;
55
+ from?: TelegramUser;
56
+ sender_chat?: TelegramChat;
57
+ chat: TelegramChat;
58
+ reply_to_message?: TelegramMessage;
59
+ new_chat_members?: TelegramUser[];
60
+ left_chat_member?: TelegramUser;
61
+ entities?: TelegramMessageEntity[];
62
+ [key: string]: unknown;
63
+ }
64
+ declare const telegramUpdateSchema: z.ZodObject<{
65
+ update_id: z.ZodNumber;
66
+ message: z.ZodOptional<z.ZodType<TelegramMessage, unknown, z.core.$ZodTypeInternals<TelegramMessage, unknown>>>;
67
+ edited_message: z.ZodOptional<z.ZodType<TelegramMessage, unknown, z.core.$ZodTypeInternals<TelegramMessage, unknown>>>;
68
+ channel_post: z.ZodOptional<z.ZodType<TelegramMessage, unknown, z.core.$ZodTypeInternals<TelegramMessage, unknown>>>;
69
+ }, z.core.$loose>;
70
+ type TelegramUpdate = z.infer<typeof telegramUpdateSchema>;
71
+ type TelegramUpdateType = "message" | "edited_message" | "channel_post";
72
+ declare const telegramCommandBindingSchema: z.ZodObject<{
73
+ enabled: z.ZodOptional<z.ZodBoolean>;
74
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
75
+ private: "private";
76
+ group: "group";
77
+ supergroup: "supergroup";
78
+ channel: "channel";
79
+ }>>>;
80
+ }, z.core.$loose>;
81
+ type TelegramCommandBinding = z.infer<typeof telegramCommandBindingSchema>;
82
+ declare const telegramCommandBindingsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
83
+ enabled: z.ZodOptional<z.ZodBoolean>;
84
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
85
+ private: "private";
86
+ group: "group";
87
+ supergroup: "supergroup";
88
+ channel: "channel";
89
+ }>>>;
90
+ }, z.core.$loose>>;
91
+ type TelegramCommandBindings = z.infer<typeof telegramCommandBindingsSchema>;
92
+ interface TelegramUserSummary {
93
+ id: string;
94
+ username: string | null;
95
+ firstName: string;
96
+ lastName: string | null;
97
+ isBot: boolean;
98
+ languageCode: string | null;
99
+ createdAt: Date;
100
+ updatedAt: Date;
101
+ }
102
+ interface TelegramChatSummary {
103
+ id: string;
104
+ type: TelegramChatType;
105
+ title: string | null;
106
+ username: string | null;
107
+ isForum: boolean;
108
+ commandBindings: TelegramCommandBindings | null;
109
+ createdAt: Date;
110
+ updatedAt: Date;
111
+ }
112
+ interface TelegramChatMemberSummary {
113
+ id: string;
114
+ chatId: string;
115
+ userId: string;
116
+ status: string;
117
+ joinedAt: Date | null;
118
+ leftAt: Date | null;
119
+ user: TelegramUserSummary | null;
120
+ createdAt: Date;
121
+ updatedAt: Date;
122
+ }
123
+ interface TelegramMessageSummary {
124
+ id: string;
125
+ chatId: string;
126
+ fromUserId: string | null;
127
+ senderChatId: string | null;
128
+ replyToMessageId: string | null;
129
+ messageType: TelegramUpdateType;
130
+ text: string | null;
131
+ payload: unknown | null;
132
+ sentAt: Date;
133
+ editedAt: Date | null;
134
+ commandName: string | null;
135
+ fromUser: TelegramUserSummary | null;
136
+ }
137
+ interface TelegramMessageHookPayload {
138
+ updateId: number;
139
+ updateType: TelegramUpdateType;
140
+ messageId: string;
141
+ chatId: string;
142
+ fromUserId: string | null;
143
+ text: string | null;
144
+ commandName: string | null;
145
+ sentAt: Date;
146
+ editedAt: Date | null;
147
+ }
148
+ interface TelegramCommandHookPayload {
149
+ updateId: number;
150
+ messageId: string;
151
+ chatId: string;
152
+ fromUserId: string | null;
153
+ commandName: string;
154
+ args: string;
155
+ raw: string;
156
+ sentAt: Date;
157
+ }
158
+ interface TelegramChatMemberHookPayload {
159
+ updateId: number;
160
+ chatId: string;
161
+ userId: string;
162
+ status: string;
163
+ joinedAt: Date | null;
164
+ leftAt: Date | null;
165
+ }
166
+ type TelegramOutgoingHookAction = "sendMessage" | "editMessageText";
167
+ type TelegramOutgoingHookPayload = {
168
+ action: TelegramOutgoingHookAction;
169
+ payload: Record<string, unknown>;
170
+ };
171
+ type TelegramHooks = {
172
+ onMessageReceived?: (payload: TelegramMessageHookPayload) => Promise<void> | void;
173
+ onCommandMatched?: (payload: TelegramCommandHookPayload) => Promise<void> | void;
174
+ onChatMemberUpdated?: (payload: TelegramChatMemberHookPayload) => Promise<void> | void;
175
+ };
176
+ type TelegramInternalHookPayload = {
177
+ update: TelegramUpdate;
178
+ };
179
+ type TelegramHooksMap = {
180
+ internalProcessUpdate: HookFn<TelegramInternalHookPayload>;
181
+ internalOutgoingMessage: HookFn<TelegramOutgoingHookPayload>;
182
+ onMessageReceived: HookFn<TelegramMessageHookPayload>;
183
+ onCommandMatched: HookFn<TelegramCommandHookPayload>;
184
+ onChatMemberUpdated: HookFn<TelegramChatMemberHookPayload>;
185
+ };
186
+ type TelegramApiResult<T> = {
187
+ ok: true;
188
+ result: T;
189
+ } | {
190
+ ok: false;
191
+ error_code?: number;
192
+ description?: string;
193
+ };
194
+ interface TelegramApi {
195
+ call<T>(method: string, payload: Record<string, unknown>): Promise<TelegramApiResult<T>>;
196
+ sendMessage(payload: Record<string, unknown>): Promise<TelegramApiResult<TelegramMessage>>;
197
+ editMessageText(payload: Record<string, unknown>): Promise<TelegramApiResult<TelegramMessage>>;
198
+ sendChatAction(payload: Record<string, unknown>): Promise<TelegramApiResult<boolean>>;
199
+ }
200
+ type TelegramQueuedResult = {
201
+ ok: true;
202
+ queued: true;
203
+ } | {
204
+ ok: false;
205
+ error_code?: number;
206
+ description?: string;
207
+ };
208
+ type TelegramCommandApiResult<T> = TelegramApiResult<T> | TelegramQueuedResult;
209
+ interface TelegramCommandApi {
210
+ call<T>(method: string, payload: Record<string, unknown>): Promise<TelegramCommandApiResult<T>>;
211
+ sendMessage(payload: Record<string, unknown>): Promise<TelegramQueuedResult>;
212
+ editMessageText(payload: Record<string, unknown>): Promise<TelegramQueuedResult>;
213
+ sendChatAction(payload: Record<string, unknown>): Promise<TelegramApiResult<boolean>>;
214
+ }
215
+ interface TelegramCommandContext {
216
+ updateId: number;
217
+ idempotencyKey: string;
218
+ update: TelegramUpdate;
219
+ message: TelegramMessage;
220
+ chat: TelegramChatSummary;
221
+ fromUser: TelegramUserSummary | null;
222
+ command: {
223
+ name: string;
224
+ args: string;
225
+ raw: string;
226
+ };
227
+ api: TelegramCommandApi;
228
+ handlerTx: HookHandlerTx;
229
+ }
230
+ type TelegramCommandHandler = (ctx: TelegramCommandContext) => Promise<void> | void;
231
+ interface TelegramCommandDefinition {
232
+ name: string;
233
+ description?: string;
234
+ scopes?: TelegramCommandScope[];
235
+ handler: TelegramCommandHandler;
236
+ }
237
+ type TelegramCommandRegistry = Record<string, TelegramCommandDefinition>;
238
+ interface TelegramFragmentConfig {
239
+ botToken: string;
240
+ webhookSecretToken: string;
241
+ botUsername?: string;
242
+ apiBaseUrl?: string;
243
+ commands?: TelegramCommandRegistry;
244
+ hooks?: TelegramHooks;
245
+ }
246
+ type TelegramConfigBuilder = {
247
+ command: (command: TelegramCommandDefinition) => TelegramConfigBuilder;
248
+ build: (overrides?: Partial<TelegramFragmentConfig>) => TelegramFragmentConfig;
249
+ };
250
+ declare function defineCommand(name: string, definition: Omit<TelegramCommandDefinition, "name">): TelegramCommandDefinition;
251
+ declare function createTelegram(baseConfig?: Partial<TelegramFragmentConfig>): TelegramConfigBuilder;
252
+ //#endregion
253
+ //#region src/definition.d.ts
254
+ declare const telegramFragmentDefinition: _fragno_dev_core0.FragmentDefinition<TelegramFragmentConfig, _fragno_dev_db0.FragnoPublicConfigWithDatabase, _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<{
255
+ 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"]>>>;
256
+ 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"]>>>;
257
+ 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"]>>>;
258
+ 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"]>>>;
259
+ }>>, {
260
+ processIncomingUpdate: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, update: TelegramUpdate) => _fragno_dev_db0.TxResult<{
261
+ kind: "ignored";
262
+ updateId: number;
263
+ }, {
264
+ kind: "ignored";
265
+ updateId: number;
266
+ }> | _fragno_dev_db0.TxResult<{
267
+ kind: "ignored";
268
+ updateId: number;
269
+ } | {
270
+ kind: "message";
271
+ updateId: number;
272
+ updateType: TelegramMessageSummary["messageType"];
273
+ chat: TelegramChatSummary;
274
+ message: TelegramMessageSummary;
275
+ fromUser: TelegramUserSummary | null;
276
+ command: {
277
+ name: string;
278
+ args: string;
279
+ raw: string;
280
+ scopes: TelegramCommandScope[];
281
+ } | null;
282
+ }, [{
283
+ id: string | _fragno_dev_db_schema0.FragnoId;
284
+ type: string;
285
+ title: string | null;
286
+ username: string | null;
287
+ isForum: boolean;
288
+ commandBindings: unknown | null;
289
+ createdAt: Date;
290
+ updatedAt: Date;
291
+ }[], {
292
+ id: string | _fragno_dev_db_schema0.FragnoId;
293
+ username: string | null;
294
+ firstName: string;
295
+ lastName: string | null;
296
+ isBot: boolean;
297
+ languageCode: string | null;
298
+ createdAt: Date;
299
+ updatedAt: Date;
300
+ }[], {
301
+ id: string | _fragno_dev_db_schema0.FragnoId;
302
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
303
+ userId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
304
+ status: string;
305
+ joinedAt: Date | null;
306
+ leftAt: Date | null;
307
+ createdAt: Date;
308
+ updatedAt: Date;
309
+ chatMemberUser?: {
310
+ id: string | _fragno_dev_db_schema0.FragnoId;
311
+ username: string | null;
312
+ firstName: string;
313
+ lastName: string | null;
314
+ isBot: boolean;
315
+ languageCode: string | null;
316
+ createdAt: Date;
317
+ updatedAt: Date;
318
+ } | null;
319
+ }[], {
320
+ id: string | _fragno_dev_db_schema0.FragnoId;
321
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
322
+ fromUserId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
323
+ senderChatId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
324
+ replyToMessageId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
325
+ messageType: string;
326
+ text: string | null;
327
+ payload: unknown | null;
328
+ sentAt: Date;
329
+ editedAt: Date | null;
330
+ commandName: string | null;
331
+ messageAuthor?: {
332
+ id: string | _fragno_dev_db_schema0.FragnoId;
333
+ username: string | null;
334
+ firstName: string;
335
+ lastName: string | null;
336
+ isBot: boolean;
337
+ languageCode: string | null;
338
+ createdAt: Date;
339
+ updatedAt: Date;
340
+ } | null;
341
+ } | null]>;
342
+ bindCommand: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
343
+ chatId: string;
344
+ commandName: string;
345
+ enabled: boolean;
346
+ scopes?: TelegramCommandScope[];
347
+ }) => _fragno_dev_db0.TxResult<{
348
+ ok: false;
349
+ reason: "chat_not_found";
350
+ binding?: undefined;
351
+ } | {
352
+ ok: true;
353
+ binding: {
354
+ chatId: string;
355
+ commandName: string;
356
+ enabled: boolean;
357
+ scopes: ("private" | "group" | "supergroup" | "channel")[] | undefined;
358
+ };
359
+ reason?: undefined;
360
+ }, [{
361
+ id: _fragno_dev_db_schema0.FragnoId;
362
+ type: string;
363
+ title: string | null;
364
+ username: string | null;
365
+ isForum: boolean;
366
+ commandBindings: unknown;
367
+ createdAt: Date;
368
+ updatedAt: Date;
369
+ } | null]>;
370
+ listChats: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, type?: TelegramChatSummary["type"]) => _fragno_dev_db0.TxResult<TelegramChatSummary[], TelegramChatSummary[]>;
371
+ getChat: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, chatId: string) => _fragno_dev_db0.TxResult<TelegramChatSummary | null, TelegramChatSummary | null>;
372
+ getChatWithMembers: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, chatId: string) => _fragno_dev_db0.TxResult<{
373
+ chat: TelegramChatSummary | null;
374
+ members: TelegramChatMemberSummary[];
375
+ }, {
376
+ chat: TelegramChatSummary | null;
377
+ members: TelegramChatMemberSummary[];
378
+ }>;
379
+ listMessages: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
380
+ chatId: string;
381
+ pageSize: number;
382
+ order: "asc" | "desc";
383
+ cursor?: _fragno_dev_db0.Cursor;
384
+ }) => _fragno_dev_db0.TxResult<{
385
+ messages: TelegramMessageSummary[];
386
+ cursor: _fragno_dev_db0.Cursor | undefined;
387
+ hasNextPage: boolean;
388
+ }, {
389
+ messages: TelegramMessageSummary[];
390
+ cursor: _fragno_dev_db0.Cursor | undefined;
391
+ hasNextPage: boolean;
392
+ }>;
393
+ upsertOutgoingMessage: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
394
+ message: TelegramMessage;
395
+ messageType: TelegramUpdateType;
396
+ }) => _fragno_dev_db0.TxResult<void, [{
397
+ id: string | _fragno_dev_db_schema0.FragnoId;
398
+ type: string;
399
+ title: string | null;
400
+ username: string | null;
401
+ isForum: boolean;
402
+ commandBindings: unknown | null;
403
+ createdAt: Date;
404
+ updatedAt: Date;
405
+ }[], {
406
+ id: string | _fragno_dev_db_schema0.FragnoId;
407
+ username: string | null;
408
+ firstName: string;
409
+ lastName: string | null;
410
+ isBot: boolean;
411
+ languageCode: string | null;
412
+ createdAt: Date;
413
+ updatedAt: Date;
414
+ }[], {
415
+ id: string | _fragno_dev_db_schema0.FragnoId;
416
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
417
+ fromUserId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
418
+ senderChatId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
419
+ replyToMessageId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
420
+ messageType: string;
421
+ text: string | null;
422
+ payload: unknown | null;
423
+ sentAt: Date;
424
+ editedAt: Date | null;
425
+ commandName: string | null;
426
+ messageAuthor?: {
427
+ id: string | _fragno_dev_db_schema0.FragnoId;
428
+ username: string | null;
429
+ firstName: string;
430
+ lastName: string | null;
431
+ isBot: boolean;
432
+ languageCode: string | null;
433
+ createdAt: Date;
434
+ updatedAt: Date;
435
+ } | null;
436
+ } | null]>;
437
+ }, {}, {}, {}, _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>, _fragno_dev_db_fragment_definition_builder0.DatabaseRequestStorage, []>;
438
+ //#endregion
439
+ //#region src/routes.d.ts
440
+ declare const telegramRoutesFactory: _fragno_dev_core0.RouteFactory<TelegramFragmentConfig, _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<{
441
+ 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"]>>>;
442
+ 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"]>>>;
443
+ 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"]>>>;
444
+ 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"]>>>;
445
+ }>>, _fragno_dev_core0.BoundServices<{
446
+ processIncomingUpdate: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, update: TelegramUpdate) => _fragno_dev_db0.TxResult<{
447
+ kind: "ignored";
448
+ updateId: number;
449
+ }, {
450
+ kind: "ignored";
451
+ updateId: number;
452
+ }> | _fragno_dev_db0.TxResult<{
453
+ kind: "ignored";
454
+ updateId: number;
455
+ } | {
456
+ kind: "message";
457
+ updateId: number;
458
+ updateType: TelegramMessageSummary["messageType"];
459
+ chat: TelegramChatSummary;
460
+ message: TelegramMessageSummary;
461
+ fromUser: TelegramUserSummary | null;
462
+ command: {
463
+ name: string;
464
+ args: string;
465
+ raw: string;
466
+ scopes: TelegramCommandScope[];
467
+ } | null;
468
+ }, [{
469
+ id: string | _fragno_dev_db_schema0.FragnoId;
470
+ type: string;
471
+ title: string | null;
472
+ username: string | null;
473
+ isForum: boolean;
474
+ commandBindings: unknown | null;
475
+ createdAt: Date;
476
+ updatedAt: Date;
477
+ }[], {
478
+ id: string | _fragno_dev_db_schema0.FragnoId;
479
+ username: string | null;
480
+ firstName: string;
481
+ lastName: string | null;
482
+ isBot: boolean;
483
+ languageCode: string | null;
484
+ createdAt: Date;
485
+ updatedAt: Date;
486
+ }[], {
487
+ id: string | _fragno_dev_db_schema0.FragnoId;
488
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
489
+ userId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
490
+ status: string;
491
+ joinedAt: Date | null;
492
+ leftAt: Date | null;
493
+ createdAt: Date;
494
+ updatedAt: Date;
495
+ chatMemberUser?: {
496
+ id: string | _fragno_dev_db_schema0.FragnoId;
497
+ username: string | null;
498
+ firstName: string;
499
+ lastName: string | null;
500
+ isBot: boolean;
501
+ languageCode: string | null;
502
+ createdAt: Date;
503
+ updatedAt: Date;
504
+ } | null;
505
+ }[], {
506
+ id: string | _fragno_dev_db_schema0.FragnoId;
507
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
508
+ fromUserId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
509
+ senderChatId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
510
+ replyToMessageId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
511
+ messageType: string;
512
+ text: string | null;
513
+ payload: unknown | null;
514
+ sentAt: Date;
515
+ editedAt: Date | null;
516
+ commandName: string | null;
517
+ messageAuthor?: {
518
+ id: string | _fragno_dev_db_schema0.FragnoId;
519
+ username: string | null;
520
+ firstName: string;
521
+ lastName: string | null;
522
+ isBot: boolean;
523
+ languageCode: string | null;
524
+ createdAt: Date;
525
+ updatedAt: Date;
526
+ } | null;
527
+ } | null]>;
528
+ bindCommand: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
529
+ chatId: string;
530
+ commandName: string;
531
+ enabled: boolean;
532
+ scopes?: TelegramCommandScope[];
533
+ }) => _fragno_dev_db0.TxResult<{
534
+ ok: false;
535
+ reason: "chat_not_found";
536
+ binding?: undefined;
537
+ } | {
538
+ ok: true;
539
+ binding: {
540
+ chatId: string;
541
+ commandName: string;
542
+ enabled: boolean;
543
+ scopes: ("private" | "group" | "supergroup" | "channel")[] | undefined;
544
+ };
545
+ reason?: undefined;
546
+ }, [{
547
+ id: _fragno_dev_db_schema0.FragnoId;
548
+ type: string;
549
+ title: string | null;
550
+ username: string | null;
551
+ isForum: boolean;
552
+ commandBindings: unknown;
553
+ createdAt: Date;
554
+ updatedAt: Date;
555
+ } | null]>;
556
+ listChats: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, type?: TelegramChatSummary["type"]) => _fragno_dev_db0.TxResult<TelegramChatSummary[], TelegramChatSummary[]>;
557
+ getChat: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, chatId: string) => _fragno_dev_db0.TxResult<TelegramChatSummary | null, TelegramChatSummary | null>;
558
+ getChatWithMembers: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, chatId: string) => _fragno_dev_db0.TxResult<{
559
+ chat: TelegramChatSummary | null;
560
+ members: TelegramChatMemberSummary[];
561
+ }, {
562
+ chat: TelegramChatSummary | null;
563
+ members: TelegramChatMemberSummary[];
564
+ }>;
565
+ listMessages: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
566
+ chatId: string;
567
+ pageSize: number;
568
+ order: "asc" | "desc";
569
+ cursor?: _fragno_dev_db0.Cursor;
570
+ }) => _fragno_dev_db0.TxResult<{
571
+ messages: TelegramMessageSummary[];
572
+ cursor: _fragno_dev_db0.Cursor | undefined;
573
+ hasNextPage: boolean;
574
+ }, {
575
+ messages: TelegramMessageSummary[];
576
+ cursor: _fragno_dev_db0.Cursor | undefined;
577
+ hasNextPage: boolean;
578
+ }>;
579
+ upsertOutgoingMessage: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
580
+ message: TelegramMessage;
581
+ messageType: TelegramUpdateType;
582
+ }) => _fragno_dev_db0.TxResult<void, [{
583
+ id: string | _fragno_dev_db_schema0.FragnoId;
584
+ type: string;
585
+ title: string | null;
586
+ username: string | null;
587
+ isForum: boolean;
588
+ commandBindings: unknown | null;
589
+ createdAt: Date;
590
+ updatedAt: Date;
591
+ }[], {
592
+ id: string | _fragno_dev_db_schema0.FragnoId;
593
+ username: string | null;
594
+ firstName: string;
595
+ lastName: string | null;
596
+ isBot: boolean;
597
+ languageCode: string | null;
598
+ createdAt: Date;
599
+ updatedAt: Date;
600
+ }[], {
601
+ id: string | _fragno_dev_db_schema0.FragnoId;
602
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
603
+ fromUserId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
604
+ senderChatId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
605
+ replyToMessageId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
606
+ messageType: string;
607
+ text: string | null;
608
+ payload: unknown | null;
609
+ sentAt: Date;
610
+ editedAt: Date | null;
611
+ commandName: string | null;
612
+ messageAuthor?: {
613
+ id: string | _fragno_dev_db_schema0.FragnoId;
614
+ username: string | null;
615
+ firstName: string;
616
+ lastName: string | null;
617
+ isBot: boolean;
618
+ languageCode: string | null;
619
+ createdAt: Date;
620
+ updatedAt: Date;
621
+ } | null;
622
+ } | null]>;
623
+ }>, {}, readonly [_fragno_dev_core0.FragnoRouteConfig<"POST", "/telegram/webhook", z.ZodObject<{
624
+ update_id: z.ZodNumber;
625
+ message: z.ZodOptional<z.ZodType<TelegramMessage, unknown, z.core.$ZodTypeInternals<TelegramMessage, unknown>>>;
626
+ edited_message: z.ZodOptional<z.ZodType<TelegramMessage, unknown, z.core.$ZodTypeInternals<TelegramMessage, unknown>>>;
627
+ channel_post: z.ZodOptional<z.ZodType<TelegramMessage, unknown, z.core.$ZodTypeInternals<TelegramMessage, unknown>>>;
628
+ }, z.core.$loose>, z.ZodObject<{
629
+ ok: z.ZodBoolean;
630
+ duplicate: z.ZodOptional<z.ZodBoolean>;
631
+ }, z.core.$strip>, "UNAUTHORIZED", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/commands/bind", z.ZodObject<{
632
+ chatId: z.ZodString;
633
+ commandName: z.ZodString;
634
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
635
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
636
+ private: "private";
637
+ group: "group";
638
+ supergroup: "supergroup";
639
+ channel: "channel";
640
+ }>>>;
641
+ }, z.core.$strip>, z.ZodObject<{
642
+ chatId: z.ZodString;
643
+ commandName: z.ZodString;
644
+ enabled: z.ZodBoolean;
645
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
646
+ private: "private";
647
+ group: "group";
648
+ supergroup: "supergroup";
649
+ channel: "channel";
650
+ }>>>;
651
+ }, 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<{
652
+ commands: z.ZodArray<z.ZodObject<{
653
+ name: z.ZodString;
654
+ description: z.ZodOptional<z.ZodString>;
655
+ scopes: z.ZodArray<z.ZodEnum<{
656
+ private: "private";
657
+ group: "group";
658
+ supergroup: "supergroup";
659
+ channel: "channel";
660
+ }>>;
661
+ enabled: z.ZodOptional<z.ZodBoolean>;
662
+ effectiveScopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
663
+ private: "private";
664
+ group: "group";
665
+ supergroup: "supergroup";
666
+ channel: "channel";
667
+ }>>>;
668
+ binding: z.ZodOptional<z.ZodNullable<z.ZodObject<{
669
+ enabled: z.ZodOptional<z.ZodBoolean>;
670
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
671
+ private: "private";
672
+ group: "group";
673
+ supergroup: "supergroup";
674
+ channel: "channel";
675
+ }>>>;
676
+ }, z.core.$strip>>>;
677
+ }, z.core.$strip>>;
678
+ }, 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<{
679
+ id: z.ZodString;
680
+ type: z.ZodEnum<{
681
+ private: "private";
682
+ group: "group";
683
+ supergroup: "supergroup";
684
+ channel: "channel";
685
+ }>;
686
+ title: z.ZodNullable<z.ZodString>;
687
+ username: z.ZodNullable<z.ZodString>;
688
+ isForum: z.ZodBoolean;
689
+ commandBindings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
690
+ enabled: z.ZodOptional<z.ZodBoolean>;
691
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
692
+ private: "private";
693
+ group: "group";
694
+ supergroup: "supergroup";
695
+ channel: "channel";
696
+ }>>>;
697
+ }, z.core.$loose>>>;
698
+ createdAt: z.ZodDate;
699
+ updatedAt: z.ZodDate;
700
+ }, 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<{
701
+ chat: z.ZodObject<{
702
+ id: z.ZodString;
703
+ type: z.ZodEnum<{
704
+ private: "private";
705
+ group: "group";
706
+ supergroup: "supergroup";
707
+ channel: "channel";
708
+ }>;
709
+ title: z.ZodNullable<z.ZodString>;
710
+ username: z.ZodNullable<z.ZodString>;
711
+ isForum: z.ZodBoolean;
712
+ commandBindings: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
713
+ enabled: z.ZodOptional<z.ZodBoolean>;
714
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
715
+ private: "private";
716
+ group: "group";
717
+ supergroup: "supergroup";
718
+ channel: "channel";
719
+ }>>>;
720
+ }, z.core.$loose>>>;
721
+ createdAt: z.ZodDate;
722
+ updatedAt: z.ZodDate;
723
+ }, z.core.$strip>;
724
+ members: z.ZodArray<z.ZodObject<{
725
+ id: z.ZodString;
726
+ chatId: z.ZodString;
727
+ userId: z.ZodString;
728
+ status: z.ZodString;
729
+ joinedAt: z.ZodNullable<z.ZodDate>;
730
+ leftAt: z.ZodNullable<z.ZodDate>;
731
+ user: z.ZodNullable<z.ZodObject<{
732
+ id: z.ZodString;
733
+ username: z.ZodNullable<z.ZodString>;
734
+ firstName: z.ZodString;
735
+ lastName: z.ZodNullable<z.ZodString>;
736
+ isBot: z.ZodBoolean;
737
+ languageCode: z.ZodNullable<z.ZodString>;
738
+ createdAt: z.ZodDate;
739
+ updatedAt: z.ZodDate;
740
+ }, z.core.$strip>>;
741
+ createdAt: z.ZodDate;
742
+ updatedAt: z.ZodDate;
743
+ }, z.core.$strip>>;
744
+ }, 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<{
745
+ messages: z.ZodArray<z.ZodObject<{
746
+ id: z.ZodString;
747
+ chatId: z.ZodString;
748
+ fromUserId: z.ZodNullable<z.ZodString>;
749
+ senderChatId: z.ZodNullable<z.ZodString>;
750
+ replyToMessageId: z.ZodNullable<z.ZodString>;
751
+ messageType: z.ZodEnum<{
752
+ message: "message";
753
+ edited_message: "edited_message";
754
+ channel_post: "channel_post";
755
+ }>;
756
+ text: z.ZodNullable<z.ZodString>;
757
+ payload: z.ZodNullable<z.ZodUnknown>;
758
+ sentAt: z.ZodDate;
759
+ editedAt: z.ZodNullable<z.ZodDate>;
760
+ commandName: z.ZodNullable<z.ZodString>;
761
+ fromUser: z.ZodNullable<z.ZodObject<{
762
+ id: z.ZodString;
763
+ username: z.ZodNullable<z.ZodString>;
764
+ firstName: z.ZodString;
765
+ lastName: z.ZodNullable<z.ZodString>;
766
+ isBot: z.ZodBoolean;
767
+ languageCode: z.ZodNullable<z.ZodString>;
768
+ createdAt: z.ZodDate;
769
+ updatedAt: z.ZodDate;
770
+ }, z.core.$strip>>;
771
+ }, z.core.$strip>>;
772
+ cursor: z.ZodOptional<z.ZodString>;
773
+ hasNextPage: z.ZodBoolean;
774
+ }, z.core.$strip>, string, "pageSize" | "cursor" | "order", _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/actions", z.ZodObject<{
775
+ action: z.ZodEnum<{
776
+ typing: "typing";
777
+ upload_photo: "upload_photo";
778
+ record_video: "record_video";
779
+ upload_video: "upload_video";
780
+ record_voice: "record_voice";
781
+ upload_voice: "upload_voice";
782
+ upload_document: "upload_document";
783
+ choose_sticker: "choose_sticker";
784
+ find_location: "find_location";
785
+ record_video_note: "record_video_note";
786
+ upload_video_note: "upload_video_note";
787
+ }>;
788
+ }, z.core.$strip>, z.ZodObject<{
789
+ ok: z.ZodBoolean;
790
+ }, z.core.$strip>, "TELEGRAM_API_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/send", z.ZodObject<{
791
+ text: z.ZodString;
792
+ parseMode: z.ZodOptional<z.ZodEnum<{
793
+ MarkdownV2: "MarkdownV2";
794
+ Markdown: "Markdown";
795
+ HTML: "HTML";
796
+ }>>;
797
+ disableWebPagePreview: z.ZodOptional<z.ZodBoolean>;
798
+ replyToMessageId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
799
+ }, z.core.$strip>, z.ZodObject<{
800
+ ok: z.ZodBoolean;
801
+ queued: z.ZodBoolean;
802
+ }, z.core.$strip>, string, string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/messages/:messageId/edit", z.ZodObject<{
803
+ text: z.ZodString;
804
+ parseMode: z.ZodOptional<z.ZodEnum<{
805
+ MarkdownV2: "MarkdownV2";
806
+ Markdown: "Markdown";
807
+ HTML: "HTML";
808
+ }>>;
809
+ disableWebPagePreview: z.ZodOptional<z.ZodBoolean>;
810
+ }, z.core.$strip>, z.ZodObject<{
811
+ ok: z.ZodBoolean;
812
+ queued: z.ZodBoolean;
813
+ }, z.core.$strip>, "INVALID_MESSAGE_ID", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>]>;
814
+ //#endregion
815
+ //#region src/schema.d.ts
816
+ declare const telegramSchema: _fragno_dev_db_schema0.Schema<{
817
+ 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"]>>>;
818
+ 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"]>>>;
819
+ 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"]>>>;
820
+ 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"]>>>;
821
+ }>;
822
+ //#endregion
823
+ //#region src/index.d.ts
824
+ declare function createTelegramFragment(config: TelegramFragmentConfig, fragnoConfig: FragnoPublicConfigWithDatabase): _fragno_dev_core0.FragnoInstantiatedFragment<readonly [_fragno_dev_core0.FragnoRouteConfig<"POST", "/telegram/webhook", zod.ZodObject<{
825
+ update_id: zod.ZodNumber;
826
+ message: zod.ZodOptional<zod.ZodType<TelegramMessage, unknown, zod_v4_core0.$ZodTypeInternals<TelegramMessage, unknown>>>;
827
+ edited_message: zod.ZodOptional<zod.ZodType<TelegramMessage, unknown, zod_v4_core0.$ZodTypeInternals<TelegramMessage, unknown>>>;
828
+ channel_post: zod.ZodOptional<zod.ZodType<TelegramMessage, unknown, zod_v4_core0.$ZodTypeInternals<TelegramMessage, unknown>>>;
829
+ }, zod_v4_core0.$loose>, zod.ZodObject<{
830
+ ok: zod.ZodBoolean;
831
+ duplicate: zod.ZodOptional<zod.ZodBoolean>;
832
+ }, zod_v4_core0.$strip>, "UNAUTHORIZED", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/commands/bind", zod.ZodObject<{
833
+ chatId: zod.ZodString;
834
+ commandName: zod.ZodString;
835
+ enabled: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
836
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
837
+ private: "private";
838
+ group: "group";
839
+ supergroup: "supergroup";
840
+ channel: "channel";
841
+ }>>>;
842
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
843
+ chatId: zod.ZodString;
844
+ commandName: zod.ZodString;
845
+ enabled: zod.ZodBoolean;
846
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
847
+ private: "private";
848
+ group: "group";
849
+ supergroup: "supergroup";
850
+ channel: "channel";
851
+ }>>>;
852
+ }, zod_v4_core0.$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, zod.ZodObject<{
853
+ commands: zod.ZodArray<zod.ZodObject<{
854
+ name: zod.ZodString;
855
+ description: zod.ZodOptional<zod.ZodString>;
856
+ scopes: zod.ZodArray<zod.ZodEnum<{
857
+ private: "private";
858
+ group: "group";
859
+ supergroup: "supergroup";
860
+ channel: "channel";
861
+ }>>;
862
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
863
+ effectiveScopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
864
+ private: "private";
865
+ group: "group";
866
+ supergroup: "supergroup";
867
+ channel: "channel";
868
+ }>>>;
869
+ binding: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
870
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
871
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
872
+ private: "private";
873
+ group: "group";
874
+ supergroup: "supergroup";
875
+ channel: "channel";
876
+ }>>>;
877
+ }, zod_v4_core0.$strip>>>;
878
+ }, zod_v4_core0.$strip>>;
879
+ }, zod_v4_core0.$strip>, "chat_not_found", "chatId", _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats", _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined, zod.ZodArray<zod.ZodObject<{
880
+ id: zod.ZodString;
881
+ type: zod.ZodEnum<{
882
+ private: "private";
883
+ group: "group";
884
+ supergroup: "supergroup";
885
+ channel: "channel";
886
+ }>;
887
+ title: zod.ZodNullable<zod.ZodString>;
888
+ username: zod.ZodNullable<zod.ZodString>;
889
+ isForum: zod.ZodBoolean;
890
+ commandBindings: zod.ZodNullable<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
891
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
892
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
893
+ private: "private";
894
+ group: "group";
895
+ supergroup: "supergroup";
896
+ channel: "channel";
897
+ }>>>;
898
+ }, zod_v4_core0.$loose>>>;
899
+ createdAt: zod.ZodDate;
900
+ updatedAt: zod.ZodDate;
901
+ }, zod_v4_core0.$strip>>, string, "type", _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/chats/:chatId", _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined, zod.ZodObject<{
902
+ chat: zod.ZodObject<{
903
+ id: zod.ZodString;
904
+ type: zod.ZodEnum<{
905
+ private: "private";
906
+ group: "group";
907
+ supergroup: "supergroup";
908
+ channel: "channel";
909
+ }>;
910
+ title: zod.ZodNullable<zod.ZodString>;
911
+ username: zod.ZodNullable<zod.ZodString>;
912
+ isForum: zod.ZodBoolean;
913
+ commandBindings: zod.ZodNullable<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
914
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
915
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
916
+ private: "private";
917
+ group: "group";
918
+ supergroup: "supergroup";
919
+ channel: "channel";
920
+ }>>>;
921
+ }, zod_v4_core0.$loose>>>;
922
+ createdAt: zod.ZodDate;
923
+ updatedAt: zod.ZodDate;
924
+ }, zod_v4_core0.$strip>;
925
+ members: zod.ZodArray<zod.ZodObject<{
926
+ id: zod.ZodString;
927
+ chatId: zod.ZodString;
928
+ userId: zod.ZodString;
929
+ status: zod.ZodString;
930
+ joinedAt: zod.ZodNullable<zod.ZodDate>;
931
+ leftAt: zod.ZodNullable<zod.ZodDate>;
932
+ user: zod.ZodNullable<zod.ZodObject<{
933
+ id: zod.ZodString;
934
+ username: zod.ZodNullable<zod.ZodString>;
935
+ firstName: zod.ZodString;
936
+ lastName: zod.ZodNullable<zod.ZodString>;
937
+ isBot: zod.ZodBoolean;
938
+ languageCode: zod.ZodNullable<zod.ZodString>;
939
+ createdAt: zod.ZodDate;
940
+ updatedAt: zod.ZodDate;
941
+ }, zod_v4_core0.$strip>>;
942
+ createdAt: zod.ZodDate;
943
+ updatedAt: zod.ZodDate;
944
+ }, zod_v4_core0.$strip>>;
945
+ }, zod_v4_core0.$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, zod.ZodObject<{
946
+ messages: zod.ZodArray<zod.ZodObject<{
947
+ id: zod.ZodString;
948
+ chatId: zod.ZodString;
949
+ fromUserId: zod.ZodNullable<zod.ZodString>;
950
+ senderChatId: zod.ZodNullable<zod.ZodString>;
951
+ replyToMessageId: zod.ZodNullable<zod.ZodString>;
952
+ messageType: zod.ZodEnum<{
953
+ message: "message";
954
+ edited_message: "edited_message";
955
+ channel_post: "channel_post";
956
+ }>;
957
+ text: zod.ZodNullable<zod.ZodString>;
958
+ payload: zod.ZodNullable<zod.ZodUnknown>;
959
+ sentAt: zod.ZodDate;
960
+ editedAt: zod.ZodNullable<zod.ZodDate>;
961
+ commandName: zod.ZodNullable<zod.ZodString>;
962
+ fromUser: zod.ZodNullable<zod.ZodObject<{
963
+ id: zod.ZodString;
964
+ username: zod.ZodNullable<zod.ZodString>;
965
+ firstName: zod.ZodString;
966
+ lastName: zod.ZodNullable<zod.ZodString>;
967
+ isBot: zod.ZodBoolean;
968
+ languageCode: zod.ZodNullable<zod.ZodString>;
969
+ createdAt: zod.ZodDate;
970
+ updatedAt: zod.ZodDate;
971
+ }, zod_v4_core0.$strip>>;
972
+ }, zod_v4_core0.$strip>>;
973
+ cursor: zod.ZodOptional<zod.ZodString>;
974
+ hasNextPage: zod.ZodBoolean;
975
+ }, zod_v4_core0.$strip>, string, "pageSize" | "cursor" | "order", _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/actions", zod.ZodObject<{
976
+ action: zod.ZodEnum<{
977
+ typing: "typing";
978
+ upload_photo: "upload_photo";
979
+ record_video: "record_video";
980
+ upload_video: "upload_video";
981
+ record_voice: "record_voice";
982
+ upload_voice: "upload_voice";
983
+ upload_document: "upload_document";
984
+ choose_sticker: "choose_sticker";
985
+ find_location: "find_location";
986
+ record_video_note: "record_video_note";
987
+ upload_video_note: "upload_video_note";
988
+ }>;
989
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
990
+ ok: zod.ZodBoolean;
991
+ }, zod_v4_core0.$strip>, "TELEGRAM_API_ERROR", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/send", zod.ZodObject<{
992
+ text: zod.ZodString;
993
+ parseMode: zod.ZodOptional<zod.ZodEnum<{
994
+ MarkdownV2: "MarkdownV2";
995
+ Markdown: "Markdown";
996
+ HTML: "HTML";
997
+ }>>;
998
+ disableWebPagePreview: zod.ZodOptional<zod.ZodBoolean>;
999
+ replyToMessageId: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
1000
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
1001
+ ok: zod.ZodBoolean;
1002
+ queued: zod.ZodBoolean;
1003
+ }, zod_v4_core0.$strip>, string, string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/chats/:chatId/messages/:messageId/edit", zod.ZodObject<{
1004
+ text: zod.ZodString;
1005
+ parseMode: zod.ZodOptional<zod.ZodEnum<{
1006
+ MarkdownV2: "MarkdownV2";
1007
+ Markdown: "Markdown";
1008
+ HTML: "HTML";
1009
+ }>>;
1010
+ disableWebPagePreview: zod.ZodOptional<zod.ZodBoolean>;
1011
+ }, zod_v4_core0.$strip>, zod.ZodObject<{
1012
+ ok: zod.ZodBoolean;
1013
+ queued: zod.ZodBoolean;
1014
+ }, zod_v4_core0.$strip>, "INVALID_MESSAGE_ID", string, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>>], _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<{
1015
+ 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"]>>>;
1016
+ 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"]>>>;
1017
+ 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"]>>>;
1018
+ 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"]>>>;
1019
+ }>>, _fragno_dev_core0.BoundServices<{
1020
+ processIncomingUpdate: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, update: TelegramUpdate) => _fragno_dev_db0.TxResult<{
1021
+ kind: "ignored";
1022
+ updateId: number;
1023
+ }, {
1024
+ kind: "ignored";
1025
+ updateId: number;
1026
+ }> | _fragno_dev_db0.TxResult<{
1027
+ kind: "ignored";
1028
+ updateId: number;
1029
+ } | {
1030
+ kind: "message";
1031
+ updateId: number;
1032
+ updateType: TelegramMessageSummary["messageType"];
1033
+ chat: TelegramChatSummary;
1034
+ message: TelegramMessageSummary;
1035
+ fromUser: TelegramUserSummary | null;
1036
+ command: {
1037
+ name: string;
1038
+ args: string;
1039
+ raw: string;
1040
+ scopes: TelegramCommandScope[];
1041
+ } | null;
1042
+ }, [{
1043
+ id: string | _fragno_dev_db_schema0.FragnoId;
1044
+ type: string;
1045
+ title: string | null;
1046
+ username: string | null;
1047
+ isForum: boolean;
1048
+ commandBindings: unknown | null;
1049
+ createdAt: Date;
1050
+ updatedAt: Date;
1051
+ }[], {
1052
+ id: string | _fragno_dev_db_schema0.FragnoId;
1053
+ username: string | null;
1054
+ firstName: string;
1055
+ lastName: string | null;
1056
+ isBot: boolean;
1057
+ languageCode: string | null;
1058
+ createdAt: Date;
1059
+ updatedAt: Date;
1060
+ }[], {
1061
+ id: string | _fragno_dev_db_schema0.FragnoId;
1062
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
1063
+ userId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
1064
+ status: string;
1065
+ joinedAt: Date | null;
1066
+ leftAt: Date | null;
1067
+ createdAt: Date;
1068
+ updatedAt: Date;
1069
+ chatMemberUser?: {
1070
+ id: string | _fragno_dev_db_schema0.FragnoId;
1071
+ username: string | null;
1072
+ firstName: string;
1073
+ lastName: string | null;
1074
+ isBot: boolean;
1075
+ languageCode: string | null;
1076
+ createdAt: Date;
1077
+ updatedAt: Date;
1078
+ } | null;
1079
+ }[], {
1080
+ id: string | _fragno_dev_db_schema0.FragnoId;
1081
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
1082
+ fromUserId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
1083
+ senderChatId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
1084
+ replyToMessageId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
1085
+ messageType: string;
1086
+ text: string | null;
1087
+ payload: unknown | null;
1088
+ sentAt: Date;
1089
+ editedAt: Date | null;
1090
+ commandName: string | null;
1091
+ messageAuthor?: {
1092
+ id: string | _fragno_dev_db_schema0.FragnoId;
1093
+ username: string | null;
1094
+ firstName: string;
1095
+ lastName: string | null;
1096
+ isBot: boolean;
1097
+ languageCode: string | null;
1098
+ createdAt: Date;
1099
+ updatedAt: Date;
1100
+ } | null;
1101
+ } | null]>;
1102
+ bindCommand: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
1103
+ chatId: string;
1104
+ commandName: string;
1105
+ enabled: boolean;
1106
+ scopes?: TelegramCommandScope[];
1107
+ }) => _fragno_dev_db0.TxResult<{
1108
+ ok: false;
1109
+ reason: "chat_not_found";
1110
+ binding?: undefined;
1111
+ } | {
1112
+ ok: true;
1113
+ binding: {
1114
+ chatId: string;
1115
+ commandName: string;
1116
+ enabled: boolean;
1117
+ scopes: ("private" | "group" | "supergroup" | "channel")[] | undefined;
1118
+ };
1119
+ reason?: undefined;
1120
+ }, [{
1121
+ id: _fragno_dev_db_schema0.FragnoId;
1122
+ type: string;
1123
+ title: string | null;
1124
+ username: string | null;
1125
+ isForum: boolean;
1126
+ commandBindings: unknown;
1127
+ createdAt: Date;
1128
+ updatedAt: Date;
1129
+ } | null]>;
1130
+ listChats: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, type?: TelegramChatSummary["type"]) => _fragno_dev_db0.TxResult<TelegramChatSummary[], TelegramChatSummary[]>;
1131
+ getChat: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, chatId: string) => _fragno_dev_db0.TxResult<TelegramChatSummary | null, TelegramChatSummary | null>;
1132
+ getChatWithMembers: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, chatId: string) => _fragno_dev_db0.TxResult<{
1133
+ chat: TelegramChatSummary | null;
1134
+ members: TelegramChatMemberSummary[];
1135
+ }, {
1136
+ chat: TelegramChatSummary | null;
1137
+ members: TelegramChatMemberSummary[];
1138
+ }>;
1139
+ listMessages: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
1140
+ chatId: string;
1141
+ pageSize: number;
1142
+ order: "asc" | "desc";
1143
+ cursor?: _fragno_dev_db0.Cursor;
1144
+ }) => _fragno_dev_db0.TxResult<{
1145
+ messages: TelegramMessageSummary[];
1146
+ cursor: _fragno_dev_db0.Cursor | undefined;
1147
+ hasNextPage: boolean;
1148
+ }, {
1149
+ messages: TelegramMessageSummary[];
1150
+ cursor: _fragno_dev_db0.Cursor | undefined;
1151
+ hasNextPage: boolean;
1152
+ }>;
1153
+ upsertOutgoingMessage: (this: _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, input: {
1154
+ message: TelegramMessage;
1155
+ messageType: TelegramUpdateType;
1156
+ }) => _fragno_dev_db0.TxResult<void, [{
1157
+ id: string | _fragno_dev_db_schema0.FragnoId;
1158
+ type: string;
1159
+ title: string | null;
1160
+ username: string | null;
1161
+ isForum: boolean;
1162
+ commandBindings: unknown | null;
1163
+ createdAt: Date;
1164
+ updatedAt: Date;
1165
+ }[], {
1166
+ id: string | _fragno_dev_db_schema0.FragnoId;
1167
+ username: string | null;
1168
+ firstName: string;
1169
+ lastName: string | null;
1170
+ isBot: boolean;
1171
+ languageCode: string | null;
1172
+ createdAt: Date;
1173
+ updatedAt: Date;
1174
+ }[], {
1175
+ id: string | _fragno_dev_db_schema0.FragnoId;
1176
+ chatId: string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference;
1177
+ fromUserId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
1178
+ senderChatId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
1179
+ replyToMessageId: (string | _fragno_dev_db_schema0.FragnoId | _fragno_dev_db_schema0.FragnoReference) | null;
1180
+ messageType: string;
1181
+ text: string | null;
1182
+ payload: unknown | null;
1183
+ sentAt: Date;
1184
+ editedAt: Date | null;
1185
+ commandName: string | null;
1186
+ messageAuthor?: {
1187
+ id: string | _fragno_dev_db_schema0.FragnoId;
1188
+ username: string | null;
1189
+ firstName: string;
1190
+ lastName: string | null;
1191
+ isBot: boolean;
1192
+ languageCode: string | null;
1193
+ createdAt: Date;
1194
+ updatedAt: Date;
1195
+ } | null;
1196
+ } | null]>;
1197
+ }>, _fragno_dev_db0.DatabaseServiceContext<TelegramHooksMap>, _fragno_dev_db0.DatabaseRequestContext<TelegramHooksMap>, _fragno_dev_db_fragment_definition_builder0.DatabaseRequestStorage, FragnoPublicConfigWithDatabase>;
1198
+ declare function createTelegramFragmentClients(fragnoConfig?: FragnoPublicClientConfig): {
1199
+ useCommands: FragnoClientHookData<"GET", "/commands", zod.ZodObject<{
1200
+ commands: zod.ZodArray<zod.ZodObject<{
1201
+ name: zod.ZodString;
1202
+ description: zod.ZodOptional<zod.ZodString>;
1203
+ scopes: zod.ZodArray<zod.ZodEnum<{
1204
+ private: "private";
1205
+ group: "group";
1206
+ supergroup: "supergroup";
1207
+ channel: "channel";
1208
+ }>>;
1209
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
1210
+ effectiveScopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
1211
+ private: "private";
1212
+ group: "group";
1213
+ supergroup: "supergroup";
1214
+ channel: "channel";
1215
+ }>>>;
1216
+ binding: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
1217
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
1218
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
1219
+ private: "private";
1220
+ group: "group";
1221
+ supergroup: "supergroup";
1222
+ channel: "channel";
1223
+ }>>>;
1224
+ }, zod_v4_core0.$strip>>>;
1225
+ }, zod_v4_core0.$strip>>;
1226
+ }, zod_v4_core0.$strip>, "chat_not_found", "chatId">;
1227
+ useBindCommand: FragnoClientMutatorData<NonGetHTTPMethod, "/commands/bind", zod.ZodObject<{
1228
+ chatId: zod.ZodString;
1229
+ commandName: zod.ZodString;
1230
+ enabled: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
1231
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
1232
+ private: "private";
1233
+ group: "group";
1234
+ supergroup: "supergroup";
1235
+ channel: "channel";
1236
+ }>>>;
1237
+ }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{
1238
+ chatId: zod.ZodString;
1239
+ commandName: zod.ZodString;
1240
+ enabled: zod.ZodBoolean;
1241
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
1242
+ private: "private";
1243
+ group: "group";
1244
+ supergroup: "supergroup";
1245
+ channel: "channel";
1246
+ }>>>;
1247
+ }, zod_v4_core0.$strip> | undefined, "chat_not_found" | "command_not_found" | "invalid_scopes", string>;
1248
+ useChats: FragnoClientHookData<"GET", "/chats", zod.ZodArray<zod.ZodObject<{
1249
+ id: zod.ZodString;
1250
+ type: zod.ZodEnum<{
1251
+ private: "private";
1252
+ group: "group";
1253
+ supergroup: "supergroup";
1254
+ channel: "channel";
1255
+ }>;
1256
+ title: zod.ZodNullable<zod.ZodString>;
1257
+ username: zod.ZodNullable<zod.ZodString>;
1258
+ isForum: zod.ZodBoolean;
1259
+ commandBindings: zod.ZodNullable<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1260
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
1261
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
1262
+ private: "private";
1263
+ group: "group";
1264
+ supergroup: "supergroup";
1265
+ channel: "channel";
1266
+ }>>>;
1267
+ }, zod_v4_core0.$loose>>>;
1268
+ createdAt: zod.ZodDate;
1269
+ updatedAt: zod.ZodDate;
1270
+ }, zod_v4_core0.$strip>>, string, "type">;
1271
+ useChat: FragnoClientHookData<"GET", "/chats/:chatId", zod.ZodObject<{
1272
+ chat: zod.ZodObject<{
1273
+ id: zod.ZodString;
1274
+ type: zod.ZodEnum<{
1275
+ private: "private";
1276
+ group: "group";
1277
+ supergroup: "supergroup";
1278
+ channel: "channel";
1279
+ }>;
1280
+ title: zod.ZodNullable<zod.ZodString>;
1281
+ username: zod.ZodNullable<zod.ZodString>;
1282
+ isForum: zod.ZodBoolean;
1283
+ commandBindings: zod.ZodNullable<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1284
+ enabled: zod.ZodOptional<zod.ZodBoolean>;
1285
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
1286
+ private: "private";
1287
+ group: "group";
1288
+ supergroup: "supergroup";
1289
+ channel: "channel";
1290
+ }>>>;
1291
+ }, zod_v4_core0.$loose>>>;
1292
+ createdAt: zod.ZodDate;
1293
+ updatedAt: zod.ZodDate;
1294
+ }, zod_v4_core0.$strip>;
1295
+ members: zod.ZodArray<zod.ZodObject<{
1296
+ id: zod.ZodString;
1297
+ chatId: zod.ZodString;
1298
+ userId: zod.ZodString;
1299
+ status: zod.ZodString;
1300
+ joinedAt: zod.ZodNullable<zod.ZodDate>;
1301
+ leftAt: zod.ZodNullable<zod.ZodDate>;
1302
+ user: zod.ZodNullable<zod.ZodObject<{
1303
+ id: zod.ZodString;
1304
+ username: zod.ZodNullable<zod.ZodString>;
1305
+ firstName: zod.ZodString;
1306
+ lastName: zod.ZodNullable<zod.ZodString>;
1307
+ isBot: zod.ZodBoolean;
1308
+ languageCode: zod.ZodNullable<zod.ZodString>;
1309
+ createdAt: zod.ZodDate;
1310
+ updatedAt: zod.ZodDate;
1311
+ }, zod_v4_core0.$strip>>;
1312
+ createdAt: zod.ZodDate;
1313
+ updatedAt: zod.ZodDate;
1314
+ }, zod_v4_core0.$strip>>;
1315
+ }, zod_v4_core0.$strip>, "chat_not_found", string>;
1316
+ useChatMessages: FragnoClientHookData<"GET", "/chats/:chatId/messages", zod.ZodObject<{
1317
+ messages: zod.ZodArray<zod.ZodObject<{
1318
+ id: zod.ZodString;
1319
+ chatId: zod.ZodString;
1320
+ fromUserId: zod.ZodNullable<zod.ZodString>;
1321
+ senderChatId: zod.ZodNullable<zod.ZodString>;
1322
+ replyToMessageId: zod.ZodNullable<zod.ZodString>;
1323
+ messageType: zod.ZodEnum<{
1324
+ message: "message";
1325
+ edited_message: "edited_message";
1326
+ channel_post: "channel_post";
1327
+ }>;
1328
+ text: zod.ZodNullable<zod.ZodString>;
1329
+ payload: zod.ZodNullable<zod.ZodUnknown>;
1330
+ sentAt: zod.ZodDate;
1331
+ editedAt: zod.ZodNullable<zod.ZodDate>;
1332
+ commandName: zod.ZodNullable<zod.ZodString>;
1333
+ fromUser: zod.ZodNullable<zod.ZodObject<{
1334
+ id: zod.ZodString;
1335
+ username: zod.ZodNullable<zod.ZodString>;
1336
+ firstName: zod.ZodString;
1337
+ lastName: zod.ZodNullable<zod.ZodString>;
1338
+ isBot: zod.ZodBoolean;
1339
+ languageCode: zod.ZodNullable<zod.ZodString>;
1340
+ createdAt: zod.ZodDate;
1341
+ updatedAt: zod.ZodDate;
1342
+ }, zod_v4_core0.$strip>>;
1343
+ }, zod_v4_core0.$strip>>;
1344
+ cursor: zod.ZodOptional<zod.ZodString>;
1345
+ hasNextPage: zod.ZodBoolean;
1346
+ }, zod_v4_core0.$strip>, string, "pageSize" | "cursor" | "order">;
1347
+ useChatAction: FragnoClientMutatorData<NonGetHTTPMethod, "/chats/:chatId/actions", zod.ZodObject<{
1348
+ action: zod.ZodEnum<{
1349
+ typing: "typing";
1350
+ upload_photo: "upload_photo";
1351
+ record_video: "record_video";
1352
+ upload_video: "upload_video";
1353
+ record_voice: "record_voice";
1354
+ upload_voice: "upload_voice";
1355
+ upload_document: "upload_document";
1356
+ choose_sticker: "choose_sticker";
1357
+ find_location: "find_location";
1358
+ record_video_note: "record_video_note";
1359
+ upload_video_note: "upload_video_note";
1360
+ }>;
1361
+ }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{
1362
+ ok: zod.ZodBoolean;
1363
+ }, zod_v4_core0.$strip> | undefined, "TELEGRAM_API_ERROR", string>;
1364
+ useSendMessage: FragnoClientMutatorData<NonGetHTTPMethod, "/chats/:chatId/send", zod.ZodObject<{
1365
+ text: zod.ZodString;
1366
+ parseMode: zod.ZodOptional<zod.ZodEnum<{
1367
+ MarkdownV2: "MarkdownV2";
1368
+ Markdown: "Markdown";
1369
+ HTML: "HTML";
1370
+ }>>;
1371
+ disableWebPagePreview: zod.ZodOptional<zod.ZodBoolean>;
1372
+ replyToMessageId: zod.ZodOptional<zod.ZodCoercedNumber<unknown>>;
1373
+ }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{
1374
+ ok: zod.ZodBoolean;
1375
+ queued: zod.ZodBoolean;
1376
+ }, zod_v4_core0.$strip> | undefined, string, string>;
1377
+ useEditMessage: FragnoClientMutatorData<NonGetHTTPMethod, "/chats/:chatId/messages/:messageId/edit", zod.ZodObject<{
1378
+ text: zod.ZodString;
1379
+ parseMode: zod.ZodOptional<zod.ZodEnum<{
1380
+ MarkdownV2: "MarkdownV2";
1381
+ Markdown: "Markdown";
1382
+ HTML: "HTML";
1383
+ }>>;
1384
+ disableWebPagePreview: zod.ZodOptional<zod.ZodBoolean>;
1385
+ }, zod_v4_core0.$strip> | undefined, zod.ZodObject<{
1386
+ ok: zod.ZodBoolean;
1387
+ queued: zod.ZodBoolean;
1388
+ }, zod_v4_core0.$strip> | undefined, "INVALID_MESSAGE_ID", string>;
1389
+ };
1390
+ //#endregion
1391
+ export { type FragnoRouteConfig, type TelegramApi, type TelegramApiResult, 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, telegramFragmentDefinition, telegramRoutesFactory, telegramSchema };
1392
+ //# sourceMappingURL=index.d.ts.map